(Error: Invalid sample resolution)

General information about Neurotechnology and its software

(Error: Invalid sample resolution)

Postby rclaudio » Feb 14, 2017 00:45

I"m using Verifinger trial sdk and trying to enroll image form FVC2004 only as a first use.

The message I"ve got was that "(Error: Invalid sample resolution)".

Thanks for any help.
rclaudio
 
Posts: 2
Joined: Feb 14, 2017 00:41

(Error: Invalid sample resolution)

Postby rclaudio » Feb 14, 2017 02:30

I"m trying to use Verifinger trial SDK with FCV2004 images and I"ve got the message "(Error: Invalid sample resolution)".

Thanks for any help.
rclaudio
 
Posts: 2
Joined: Feb 14, 2017 00:41

Re: (Error: Invalid sample resolution)

Postby vaidasz » Feb 14, 2017 08:59

rclaudio wrote:I"m trying to use Verifinger trial SDK with FCV2004 images and I"ve got the message "(Error: Invalid sample resolution)".

Thanks for any help.


Hello,

You need to use:
Code: Select all
NImage image = NImage.FromFile(@"SOME_PATH");
if (image.HorzResolution < 250)
{
                image.HorzResolution = 500;
                image.ResolutionIsAspectRatio = true;
}
if (image.HorzResolution < 250)
{
                image.VertResolution = 500;
                image.ResolutionIsAspectRatio = true;
}
NFinger finger = new NFinger();
finger.Image = image;

Please keep in mind that you need to set true resolution and it does not mean that it will be 500.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 591
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Re: (Error: Invalid sample resolution)

Postby arslanali900 » Oct 25, 2018 13:31

Hi,
I am facing the same problem of "Invalid sample resolution", even if I change the resoultion of my image to the sample image resolution i.e 504 * 480, It gives the same error. Can you please specify in which we have to do the changes and how to compile it. (Im using the linux for compiling)
arslanali900
 
Posts: 2
Joined: Oct 25, 2018 13:23

Re: (Error: Invalid sample resolution)

Postby arslanali900 » Oct 25, 2018 13:45

NImage image = NImage.FromFile(@"SOME_PATH");
if (image.HorzResolution < 250)
{
image.HorzResolution = 500;
image.ResolutionIsAspectRatio = true;
}
if (image.HorzResolution < 250)
{
image.VertResolution = 500;
image.ResolutionIsAspectRatio = true;
}
NFinger finger = new NFinger();
finger.Image = image;


Can you please specify in which file we have to do the changes ? Im using IdentifyFingerCPP.cpp for linux.
arslanali900
 
Posts: 2
Joined: Oct 25, 2018 13:23

Re: (Error: Invalid sample resolution)

Postby Martynas » Oct 26, 2018 12:11

Hello,

arslanali900 wrote:Can you please specify in which file we have to do the changes ? Im using IdentifyFingerCPP.cpp for linux.


if you are using IdentifyFingerCPP.cpp, then changes should be done in it. Change the

Code: Select all
static NSubject CreateSubject(const NStringWrapper& fileName, const NStringWrapper& subjectId)
{
   NSubject subject;
   subject.SetId(subjectId);
   NFinger finger;
   finger.SetFileName(fileName);
   subject.GetFingers().Add(finger);
   return subject;
}


with

Code: Select all
static NSubject CreateSubject(const NStringWrapper& fileName, const NStringWrapper& subjectId)
{
   NSubject subject;
   subject.SetId(subjectId);
   NFinger finger;
   NImage image = NImage::FromFile(fileName);
   image.SetVertResolution(500);
   image.SetHorzResolution(500);
   image.SetResolutionIsAspectRatio(false);
   finger.SetImage(image);
   subject.GetFingers().Add(finger);
   return subject;
}
Best regards,

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


Return to Public

Who is online

Users browsing this forum: No registered users and 2 guests