我怎样才能去掉反射点?

How can I get rid of the reflection spots?

我有这些虹膜图像,我想去掉反射点。有什么建议吗?我不想将它们的像素值设置为零。我希望它们像附近的像素一样正常。先感谢您。

示例图片:

您可以使用roifill函数

img = imread('https://uk.mathworks.com/matlabcentral/answers/uploaded_files/31683/51-7.bmp'); 

sp = img > 240; %// find the bright spots, use some high threshold
J = roifill( img, imdilate( sp, ones(5) ) ); %// replace the bright spots

你得到(左边是原始的,右边是J):


根据 ,最近的 Matlab 版本不支持 roifillregionfill 应该是改为使用:

J = regionfill( img, imdilate( sp, ones( 5 ) ) );