21 views (last 30 days)
Show older comments
Nithya SIvasamy on 16 Jun 2016
Answered: Image Analyst on 2 Aug 2024 at 18:53
The image is divided into 12 .The mean and standard deviation of all 12 images is identified.I want to draw the scatter plot for mean and standard deviation.Can anyone say the matlab code for this Can I Use single scatter plot for representing mean and SD
0 Comments Show -2 older commentsHide -2 older comments
Show -2 older commentsHide -2 older comments
Sign in to comment.
Answers (2)
Jaswanth on 2 Aug 2024 at 15:34
Open in MATLAB Online
Hi,
You can use scatter function of MATLAB to create a scatter plot to represent the mean and standard deviation of the 12 images.
Please refer to the following example code to create a scatter plot:
% Sample data for means and standard deviations of 12 images
means = [1.2, 2.3, 3.1, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 2.1, 3.4, 4.8];
std_devs = [0.5, 0.6, 0.4, 0.7, 0.8, 0.5, 0.6, 0.7, 0.9, 0.3, 0.4, 0.6];
% Create a scatter plot
figure;
scatter(means, std_devs, 'filled');
% Add labels and title
xlabel('Mean');
ylabel('Standard Deviation');
title('Scatter Plot of Mean vs. Standard Deviation');
% Optionally, add grid for better readability
grid on;
% Display the plot
hold off;
Replace the sample data with your actual mean and standard deviation values. This will create a scatter plot where each point corresponds to the mean and standard deviation of one of the 12 images.
Kindly refer to following MathWorks documentation to know more about the scatter function discussed above:
I hope the solution provided above is helpful.
0 Comments Show -2 older commentsHide -2 older comments
Show -2 older commentsHide -2 older comments
Sign in to comment.
Image Analyst on 2 Aug 2024 at 18:53
If you're doing this to quantify the spatial uniformity of an image, once you have the mean and standard deviation of the 12 tiles in your image, compute the
- mean of the 12 means
- standard deviation of the 12 means
- mean of the 12 standard deviations
- standard deviation of the 12 standard deviations
For a thought example let's say you had a splotchy image with light and dark regions, and let's say you created another image where you just sorted those pixels in increaing intensity, so that image looked like a smooth ramp. The mean and standard deviation of the two images would be the same but they'd look totally different : one is splotchy while the other is smooth. However the mean of the tile standard deviations would be different: low for the smooth image it would be low (since it does not change much from tile to tile) whereas for the splotchy image it would be high since the standard deviation varies a lot from tile to tile.
Now let's say you took the same pixels and totally scrambled/randomized the image so that it looks basically like white noise. Again the overall mean and standard deviation would not change. But because each tile looks really similar (even though it's noise) the mean and standard deviation don't change much from tile to tile so the standard deviation of the means and standard deviation of the standard deviations would be close to zero, but for the splotchy images, those numbers would not be close to zero.
So those 4 numbers are one way of quantifying the uniformity/texture/splotchiness of different images.
0 Comments Show -2 older commentsHide -2 older comments
Show -2 older commentsHide -2 older comments
Sign in to comment.
Sign in to answer this question.
See Also
Categories
MATLABGraphics2-D and 3-D PlotsData Distribution PlotsScatter Plots
Find more on Scatter Plots in Help Center and File Exchange
Tags
- scatter plot
- uniformity quantification
Products
- Image Processing Toolbox
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- Deutsch
- English
- Français
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)
Contact your local office