sourceafis-java icon indicating copy to clipboard operation
sourceafis-java copied to clipboard

FingerprintMatcher match always returns 0

Open felislynx-silae opened this issue 1 year ago • 1 comments

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
    }

felislynx-silae avatar Jan 05 '24 08:01 felislynx-silae

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.

robertvazan avatar Jan 05 '24 13:01 robertvazan