How do I find area using image processing?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Akbar
am 7 Mai 2014
Beantwortet: Image Analyst
am 7 Mai 2014
Determine the area of the big white spot on Jupiter as shown below. Also compare the size of the spot with size of Earth. Note that appoximate values are: Radius of Jupiter: R_J = 71,500 km Radius of Earth: R_E = 6380 km
Wikipedia says: http://en.wikipedia.org/wiki/Great_Red_Spot#Great_Red_Spot The Great Red Spot is a persistent anticyclonic storm. The strorm is large enough to be visible through Earth-based telescopes. The spot is large enough to contain two or three planets the size of Earth.
Here is a code that i started to write:
if true
% jupiter.m
% find and compare the size of great red spot
clc; clear; figure
A = imread('jupiter2.jpg'); % image above
B = rgb2gray(A);
C = imcrop(B, [330 460 140 80]); % crop the big white spot
D = C > 160;
subplot(2,2,1); imshow(A);
subplot(2,2,2); imshow(B);
subplot(2,2,3); imshow(C);
subplot(2,2,4); imshow(D);
...
fprintf('Pixel area = %f\n',p_area);
fprintf('Real area = %f km^2\n',r_area);
fprintf('Size of Earth = %f km^2\n',pi*RE^2);
fprintf('Ratio = %f\n',r_area/(pi*RE^2));
end
In the code i don't know what to write instead of three dots? Below i've provided the output that my teacher got.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 7 Mai 2014
See my image segmentation tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It will show you how to get the area. Basically, call bwlabel() and regionprops(). (By the way, you can find it without cropping if you look at the circularity and size.)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!