I have the following image in fits format. I want to remove all the stars and other smaller dots from that image using matlab.
I performed the following matlab operations to remove stars in it.
I = imread('NGC_0253.jpg');
if size(I,3)==3
I=rgb2gray(I);
end
K = imcomplement(I);
L = I-K;
M = medfilt2(L);
imshow(M)
I also try the following:
I = imread('NGC_0253.jpg');
if size(I,3)==3
I=rgb2gray(I);
end
K = imcomplement(I);
L = I-K;
M = bwareaopen(L,1000);
N = medfilt2(M);
imshow(N)
but it also does not satisfy me:
Which is not my objective. My objective is to remove all the stars from the image.
So, What should I do to remove all the stars leaving the galaxy intact from the image?