sourceafis-java
sourceafis-java copied to clipboard
FingerprintMatcher match always returns 0
I've scanned 2 fingerprints (Left Index and Left Middle), I've then converted Bitmap to byteArray (PNG, 100% quality, 500dpi). I've checked matching for LI - LM, LM-LI, LI-LI and LM-LM. And matcher always returns 0.
fun verify(source: ByteArray, probe: ByteArray): Double {
val sf = FingerprintImage(source,
FingerprintImageOptions().apply {
dpi(500.0)
})
val pf = FingerprintImage(probe,
FingerprintImageOptions().apply {
dpi(500.0)
})
val sft = FingerprintTemplate(sf)
val pft = FingerprintTemplate(pf)
val matcher = FingerprintMatcher(pft)
val result = matcher.match(sft)
return result
}
There's nothing wrong with the code you posted. Double-check the images. Zero score for self-match indicates no minutiae were found in the image. You can confirm that by opening the template using cbor.me. Then check the PNG images for low contrast and other obvious issues.