Python implementation of the Palmprint RoI extraction algorithm from An Effectual Method for Extraction of ROI of Palmprints
- Image is blurred and mask is extracted using Otsu Binarization.
-
Centorid of mask is calcualted using moments M_10 and M_01 of the image.
-
Edges are extracted by subtracting the erosion of the mask from itself. A 3x3 + shaped kernel is used for erosion.
-
Outer boundary is detected using simple 8 connectivity.
-
Find distance of points on the boundary from the centroid.
-
Remove high frequency components from the function so that minimas due to unevenness of edge are removed
- Differentiate and find valley points from local minimas.
- Rotate the image to align valley points horizontally and crop the Region of Interest.
Numpy
OpenCV
Matplotlib