Borrar filtros
Borrar filtros

How do I find area using image processing?

6 visualizaciones (últimos 30 días)
Akbar
Akbar el 7 de Mayo de 2014
Respondida: Image Analyst el 7 de Mayo de 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.

Respuesta aceptada

Image Analyst
Image Analyst el 7 de Mayo de 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.)

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by