Assuming the maximum 'area' (not 'length') of short ridges < 50 pixel, I think the following code can detect them.
I = imread('finger3.bmp');
BW = imbinarize(I);
stats = regionprops(~BW,{'Area','BoundingBox','PixelList'});
stats = struct2table(stats);
idx = stats.Area < 50;
stats = stats(idx,:);
imshow(I)
hold on
for kk = 1:height(stats)
rectangle('Position',stats.BoundingBox(kk,:),'EdgeColor','b')
plot(stats.PixelList{kk}(:,1), stats.PixelList{kk}(:,2),'r.')
end
Best Answer