Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started