Veridis Biometrics SDK validating with strings

304 views Asked by At

I'm sorry to make a long introduction, but this is what I have done so far:

  • Downloaded the SDK;
  • Read the manual ;
  • Followed the sample project they patched with the SDK.

But, the thing is, I already had another biometric solution working and it used to save all hash data as varchar2 data type instead of byte arrays. So, my table already has a varchar2 column which would be really hard to change (administration wise).

Of course, I was glad that Veridis had this "CompareTo" method, which had an overload that allowed me to pass a string as argument. The only problem is that it doesn't seem to work. Here's the bit that handles the validation:

Private _modelo As BiometricTemplate
Private _valido As Boolean

Public WriteOnly Property ModeloBiometrico As String
    Set(value As String)
        _modelo = BiometricTemplate.Base64TemplateDecode(value)
    End Set
End Property

Private Sub OnSampleAcquired(device As 
                             Veridis.Biometric.IBiometricCaptureDevice, 
                             sample As Veridis.Biometric.BiometricSample) 
                             Implements Veridis.Biometric.ICaptureListener.OnSampleAcquired

    _valido = _modelo.CompareTo(New BiometricTemplate(sample)).Match

End Sub

This does work when saving/validating one finger, but the validation doesn't work if I save several fingers as it does with byte array. What is the problem here?

1

There are 1 answers

0
Vic Wolk On BEST ANSWER

Ok, if this serves anyone in the future, this is how I've solved this.

Short version:

The SDK actually always saves one or 3 samples of the same finger only!

Long version:

Firstly, I thought I was collecting 1 sample of each of the 3 fingers I'd input. It was never validating me, so I made this question on stackoverflow.

The thing is, after a whole day trying other methods and approaches, I found out that the second finger I had input was being validated. That made me wonder a lot and, after few tests, it turned out that it only really validated the second finger.

After summing that up, it's pretty obvious that I should input 3 samples of the same finger before starting another finger.

This is odd, because if you save only one finger, It will take one sample on account and this is it (although the hash code is bigger than 3 samples, which is not good at all, but that's another matter).