Question: [Python] [OpenCV] Fingerprint Segmentation Implement the following skeleton code of Fingerprint Segmentation Fingerprint Database: drive.google.com/drive/folders/1zdi-S1gEXy66fznDlrQ0g3Qy7d-0VPR8?usp=sharing import cv2 import numpy as np #----------------------------- class FpSegmentator: def
[Python] [OpenCV] Fingerprint Segmentation
Implement the following skeleton code of Fingerprint Segmentation
Fingerprint Database: drive.google.com/drive/folders/1zdi-S1gEXy66fznDlrQ0g3Qy7d-0VPR8?usp=sharing
![[Python] [OpenCV] Fingerprint Segmentation Implement the following skeleton code of Fingerprint Segmentation](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3e3aef0f91_56666f3e3aeec08b.jpg)
import cv2 import numpy as np #----------------------------- class FpSegmentator: def __init__(self, bs = 16): self.blockSize = bs def segment(self, fpImg): print("Stub - Fingerprint segmentation") #stub print(" Input - a fingerprint image") #stub print(" Output - a segmented image") #stub print(" Output - a mask image (region-of-interest)") #stub segmentedImg = fpImg #stub maskImg = fpImg #stub return segmentedImg, maskImg #----------------------------- if __name__ == "__main__": img = cv2.imread("1_1.bmp", cv2.IMREAD_GRAYSCALE) segmentator = FpSegmentator(16) maskImg = segmentator.segment(img) cv2.imshow("segment", maskImg) cv2.waitKey() cv2.destroyAllWindows() #-----------------------------Input fingerprint image Segmented image
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
