How do I find area using image processing?
Mostrar comentarios más antiguos
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
Más respuestas (0)
Categorías
Más información sobre Geometric Transformation and Image Registration en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!