How to use imbinarize() on fingerprint? Different sensitivity gives same result.
2 views (last 30 days)
Show older comments
Hello,
I am preprocessing fingerprint images and have some trouble adaptively thresholding my filter output.
I get outputs like this:

I tried to binarize the image with
B = imbinarize(imageFiltered,'adaptive','Sensitivity',0.9);
but the output is rather bad and does not seem to depend on the sensitivity value. For 0.1 and 0.9 I get exactly (to the pixel) the same output. I also tried using the 'ForegroundPolarity' parameter with light and dark, which also did not seem to have an impact. Then I tried the adaptthresh() function
T = adaptthresh(imageFiltered,0.6);
I get a completely white picture - every pixel is 1, no pixel is 0 - again independently from the sensitivity I choose (in the range of 0.1 - 0.9). Am I using these functions incorrectly? How can I properly use the sensitivity value? At the moment I use a global threshold, but this works poorly on noisier images or images with locally varying intensities. Are there maybe other functions or methods to threshold those kind of images?
Thanks in advance for any help,
Kind regards,
0 Comments
Answers (2)
Image Analyst
on 20 Mar 2018
Looks like you're using anisotropic diffusion. https://www.mathworks.com/help/images/ref/imdiffusefilt.html
Maybe try a Hessian or Frangi filter to find ridges. Or try a mean shift filter to sharpen/steepen edges and flatten ridges. Check the File Exchange.
0 Comments
J_Matlab
on 21 Mar 2018
2 Comments
Image Analyst
on 21 Mar 2018
If it's double, it must be in the range of 0-1, not 0-255. Since you just used uint8() without scaling imageFiltered, then imageFiltered must be in the range 0-255. You could either pass it through im2double() or mat2gray() to change it to the range 0-1, or just convert it to uint8 on the original range double image, like you did.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!