Using Segmenter

General information about Neurotechnology and its software

Using Segmenter

Postby guilespi » May 10, 2014 16:44

I"m using the sample Segment Fingers, for detecting and cutting fingerprints from images.

I"m using the following image:

http://picpaste.com/pics/VMLHSfGI.1399740079.bmp

And NFPosition set to 13, but segmenter never finds the proper separate fingers.

Bear in mind that image was captured using NT SDK with finger position set to RIGHT_INDEX_MIDDLE_FINGER.

Anyone knows how to properly segment that image using C# or Java SDKs?

Thanks
guilespi
 
Posts: 11
Joined: Apr 29, 2014 02:56

Re: Using Segmenter

Postby Vytautas » May 12, 2014 14:47

For segmenter parameters should be given as position (e.g. PlainRightFourFingers - 13) and then missing positions (RightRing = 4, RightLittle = 5) to get RightIndex and RightMiddle. In this particular case it should be 13 4 5 for right hand. Setting position 13 without missing positions will expect 4 objects instead of 2 and return Too few objects error.

Code: Select all
         Console.WriteLine("usage:");
         Console.WriteLine("\t{0} [image] [position] <optional: missing positions>", TutorialUtils.GetAssemblyName());
         Console.WriteLine("\t[image]             - image containing fingerprints");
         Console.WriteLine("\t[position]          - fingerpints position in provided image");
         Console.WriteLine("\t[missing positions] - one or more NFPosition value of missing fingers");
         Console.WriteLine();
         Console.WriteLine("\tvalid positions:");
         Console.WriteLine("\t\tPlainRightFourFingers = 13, PlainLeftFourFingers = 14, PlainThumbs = 15");
         Console.WriteLine("\t\tRightThumb = 1, RightIndex = 2, RightMiddle = 3, RightRing = 4, RightLittle = 5");
         Console.WriteLine("\t\tLeftThumb = 6, LeftIndex = 7, LeftMiddle = 8, LeftRing = 9, LeftLittle = 10");
         Console.WriteLine();
         Console.WriteLine("\texample: {0} image.png 15", TutorialUtils.GetAssemblyName());
         Console.WriteLine("\texample: {0} image.png 13 2 3", TutorialUtils.GetAssemblyName());
Vytautas P
Neurotechnology
Vytautas
Neurotechnology
 
Posts: 26
Joined: Apr 23, 2013 13:04

Re: Using Segmenter

Postby guilespi » May 12, 2014 15:20

Hi Vytautas, thanks for your answer.

I"m now calling with missing fingers as parameter and it"s not detecting segments either:

This is the output of the sample:

"
segment-fingers

Demonstrates fingers segmenter (Version: 5.0.0.0)
Copyright (C) 2011-2014 Neurotechnology

Arguments:
two_fingers.bmp
13
4
5

Found -1 segements
"

Have you tried using the image I provided and segmenter did work?

Thanks
guilespi
 
Posts: 11
Joined: Apr 29, 2014 02:56

Re: Using Segmenter

Postby guilespi » May 12, 2014 17:22

Ok, found the problem.

The Java sample shipped on the tutorials is broken.

With the following modifications segmentation works.

Code: Select all
NBiometricClient biometricClient = new NBiometricClient();
NSubject subject = new NSubject();
NImage _image = NImage.fromFile(args[0]);
         
NFinger finger = new NFinger();
finger.setImage(_image);
finger.setPosition(NFPosition.get(Integer.parseInt(args[1])));
subject.getFingers().add(finger);
for (int i = 2; i < args.length; i++) {
    subject.getMissingFingers().add(NFPosition.get(Integer.parseInt(args[i])));
}
NBiometricTask task = biometricClient.createTask(EnumSet.of(NBiometricOperation.SEGMENT, NBiometricOperation.CREATE_TEMPLATE), subject);


* Subject finger was not being set
* Subject missing fingers wasn"t being set
guilespi
 
Posts: 11
Joined: Apr 29, 2014 02:56


Return to Public

Who is online

Users browsing this forum: agrohimtit and 2 guests

cron