Ala*_*isy 1 matlab image image-processing
我有这些虹膜图像,我想摆脱反射点.有什么建议吗?我不想将其像素值设置为零.我希望他们像邻居像素一样正常.先感谢您.
示例图片:

你可以使用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
Run Code Online (Sandbox Code Playgroud)
你得到(原件在左边,J在右边):

根据kkuilla,roifill最近的Matlab版本不支持,regionfill应该使用:
J = regionfill( img, imdilate( sp, ones( 5 ) ) );
Run Code Online (Sandbox Code Playgroud)