Reputation: 8376
I'm testing some image processing to obtain minutiae from digital fingerprints. I'm doing so far:
So, the modifications I'm obtaining are:
However, I can't get to obtain possible corners in the last image, which belongs to thinned
instance of Mat
object.
This is code for trying to get corners:
corners_image = cornerHarris(thinned,1,1,0.04)
corners_image = dilate(corners_image,None)
But trying imshow
on the resulting matrix will show something like:
a black image.
How should I determine corners then?
Upvotes: 1
Views: 4460
Reputation: 2154
Actually cv::cornerHarris
returns corener responses, not corners itself. Looks like responses on your image is too small.
If you want to visualize corners you may get responses which are larger some threshold
parameter, then you may mark this points on original image as follows:
corners = cv2.cvtColor(thinned, cv2.COLOR_GRAY2BGR)
threshold = 0.1*corners_image.max()
corners [corners_image>threshold] = [0,0,255]
cv2.imshow('corners', corners)
Then you can call imshow
and red points will correspond to corner points. Most likely you will need to tune threshold parameter to get results what you need.
See more details in tutorial.
Upvotes: 3