MATLAB: Recognition of a comet

matlab objects

sir, My project is "Comets recognition from satellite images".I have tried this code { for i = 1:3 im{i}= imread([int2str(i),'.jpg'],'jpg'); p{i} = rgb2gray(im{i}); q{i} = p{i}>180; bx{i} = bwareaopen(q{i},5); bw{i} = bwareaopen(q{i},8); k{i} = imsubtract(bx{i},bw{i}); s{i} = regionprops(k{i}, 'centroid'); centroids = cat(1, s{i}.Centroid); hold(imgca,'on') imshow(im{i}); plot(imgca,centroids(:,1), centroids(:,2),'G*') hold(imgca,'off') pause(0.4) end } But failed because it is representing some other object rather than the comets position that is indicated by kreutz comet.Please kindly reply me soon.

Best Answer

It is not always possible to recognize comets from a single image. You need to compare two or more images to determine whether an object has moved, as comets might turn out to only be a single pixel in any one image.