Closed yzy888 closed 2 years ago
I believe your cv::Mat
will, by default, be RGB. Images must be 8-bit grayscale. Additionally, computeQualityScore()
should provide a good exception message, so try catching and printing it out instead of catching ...
OK, thank you, @gfiumara . I have edited the code as you said.
I replaced the code cv::Mat matData = cv::imread("E:/101_2.tif");
with cv::Mat matData = cv::imread("E:/101_2.tif", cv::IMREAD_GRAYSCALE);
and replaced the code catch (...)
with catch (NFIQ2::Exception ex)
. Then I run the code and I could catch the error "Width is too large after trimming whitespace. WxH: 1711x2807, but maximum width is 799". Should I resize the mat before resample the image? Or should I do other work to get the quality score successfully?
@yzy888 has you resolved this issue?
@yzy888 The description of the error is clear: the fingerprint area in the image is too large to be processed by NFIQ 2 (specifically FingerJet). Being 1711x2807 at 500 PPI would imply a 3.4" x 5.6" finger surface, which seems anthropometrically incorrect. Ensure you have parsed the image correctly.
Closing this issue due to topic (support request, not bug report) and inactivity.
Describe the issue Hi, I have downloaded the code NFIQ2-master and have written my code to input one image and output the quality score. My code could be compiled successfully, but when it was running and the method named "computeQualityScore" was called, an error would occur.
Expected behavior I want to know how to process the image before I convert one mat to a FingerprintImageData object so that I could get one quality score by calling "computeQualityScore" method. Or if I want to get the quality score of one fingerprint image with nfiq2 successfully, what should the image be like? Are there any documents for me to refer to? Thank you.
OS information
NFIQ 2 version information 2.1.0
Code sample My code is as follows: