VeriFinger shows pattern class as UNKNOWN always

General information about Neurotechnology and its software

VeriFinger shows pattern class as UNKNOWN always

Postby INDU JOSHI » Feb 28, 2018 09:41

I am evaluating VeriFinger SDK. As a start, I tried to extract features from a fingerprint image. I used images from NIST-SD4 and SD14. However, the pattern class is displayed as UNKNOWN in all the images that I tried, even though the images are of decent quality. I have written the following code:
Code: Select all
         NBiometricClient biometricClient = new NBiometricClient();
         NSubject subject = new NSubject();
         NFinger finger = new NFinger();
         NImage img = NImage.fromFile(filename, fmt);
         img.setHorzResolution(horz);
         img.setVertResolution(vert);
         img.setResolutionIsAspectRatio(false);
         finger.setImage(img);
         subject.getFingers().add(finger);
         biometricClient.setFingersTemplateSize(NTemplateSize.LARGE);
         NBiometricStatus status = biometricClient.createTemplate(subject);

         if (status == NBiometricStatus.OK) {            
            NTemplate template = new NTemplate(subject.getTemplateBuffer());
            for (NFRecord nfRec : template.getFingers().getRecords()) {
               System.out.format("   pattern class: %s%n", nfRec.getPatternClass());
            }
         } else {
            System.out.format("Extraction failed: %s
", status);
         }


Please suggest a solution.
INDU JOSHI
 
Posts: 4
Joined: Feb 28, 2018 08:52

Re: VeriFinger shows pattern class as UNKNOWN always

Postby Martynas » Feb 28, 2018 14:11

Hi,

biometricClient.setFingersDeterminePatternClass(true); is missing in your code.
Take a look at provided tutorial "CalssifyFinger" to find how it is used.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2203
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: VeriFinger shows pattern class as UNKNOWN always

Postby INDU JOSHI » Mar 09, 2018 12:13

I made the changes as suggested in classifyfinger. However, now it is showing 'Classification failed. Status: INTERNAL_ERROR'. I had written the following code:
Code: Select all
NImage img = NImage.fromFile(filename, fmt);
         img.setHorzResolution(horz);
         img.setVertResolution(vert);
         img.setResolutionIsAspectRatio(false);
         finger.setImage(img);
         subject.getFingers().add(finger);
         biometricClient.setFingersDeterminePatternClass(true);
         task = biometricClient.createTask(EnumSet.of(NBiometricOperation.DETECT_SEGMENTS), subject);
         biometricClient.performTask(task);

         if (task.getStatus() == NBiometricStatus.OK) {
            subject.getFingers().get(1).getObjects().get(0).getPatternClass();
            System.out.format("Fingerprint pattern class is \"%s\", confidence %d\n", ((NFinger) finger.getObjects().get(0).getChild()).getObjects().get(0).getPatternClass(), ((NFinger) finger
                  .getObjects().get(0).getChild()).getObjects().get(0).getPatternClassConfidence());
         } else {
            System.out.format("Classification failed. Status: %s\n", task.getStatus());
            Throwable error = task.getError();
            if (error != null) //throw error;
            System.exit(-1);
         }
INDU JOSHI
 
Posts: 4
Joined: Feb 28, 2018 08:52

Re: VeriFinger shows pattern class as UNKNOWN always

Postby MartynasV » Mar 13, 2018 13:58

INDU JOSHI wrote:I made the changes as suggested in classifyfinger. However, now it is showing 'Classification failed. Status: INTERNAL_ERROR'. I had written the following code:
Code: Select all
NImage img = NImage.fromFile(filename, fmt);
         img.setHorzResolution(horz);
         img.setVertResolution(vert);
         img.setResolutionIsAspectRatio(false);
         finger.setImage(img);
         subject.getFingers().add(finger);
         biometricClient.setFingersDeterminePatternClass(true);
         task = biometricClient.createTask(EnumSet.of(NBiometricOperation.DETECT_SEGMENTS), subject);
         biometricClient.performTask(task);

         if (task.getStatus() == NBiometricStatus.OK) {
            subject.getFingers().get(1).getObjects().get(0).getPatternClass();
            System.out.format("Fingerprint pattern class is \"%s\", confidence %d\n", ((NFinger) finger.getObjects().get(0).getChild()).getObjects().get(0).getPatternClass(), ((NFinger) finger
                  .getObjects().get(0).getChild()).getObjects().get(0).getPatternClassConfidence());
         } else {
            System.out.format("Classification failed. Status: %s\n", task.getStatus());
            Throwable error = task.getError();
            if (error != null) //throw error;
            System.exit(-1);
         }

Hello,

Print out task.getError(), if it has inner errors, then print them out too and provide them to me(full error stack trace).
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 328
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: VeriFinger shows pattern class as UNKNOWN always

Postby INDU JOSHI » Mar 17, 2018 07:57

Below is the error shown, when I added task.getError()
Classification failed. Status: INTERNAL_ERROR
com.neurotec.io.NFileNotFoundException: Fingers classifier model file is missing
INDU JOSHI
 
Posts: 4
Joined: Feb 28, 2018 08:52

Re: VeriFinger shows pattern class as UNKNOWN always

Postby MartynasV » Mar 19, 2018 08:37

INDU JOSHI wrote:Below is the error shown, when I added task.getError()
Classification failed. Status: INTERNAL_ERROR
com.neurotec.io.NFileNotFoundException: Fingers classifier model file is missing

Hello,

You are missing fingers .ndf file from "SDK\Bin\Data", just store it to your application's working directory.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 328
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: GalenRomO and 4 guests

cron