Hi all,
I have a 1024X1280 uint8 image. After I am plotting random dot patterns on the image I use:
dots=(find(IMG));IMG(dots) = IMG(dots)./range(IMG(dots(:)));IMG(dots)=IMG(dots)-min(IMG(dots));IMG(dots)=IMG(dots)-mean(IMG(dots));IMG(dots)=IMG(dots)/max(IMG(dots));IMG(dots)=IMG(dots)*125+127;image = uint8(round(IMG));figure(2);imshow(image)
to set the mean luminance of the dots to grey. When I show the image on a black background I do not see pixels that are odd. But when I plot it on the grey background there are some odd pixels, which are surrounding each dot. I would like to get rid of them.
Could you please help me with this?
Many thanks.
Best Answer