System.NullReferenceException while extracting template

General information about Neurotechnology and its software

System.NullReferenceException while extracting template

Postby inesortega » Mar 16, 2017 10:52


I"m using FingerCell Extractor in order to obtain a fingerprint template from a bitmap. The problem is that sometimes (I think when the core of the fingerprint it"s not on the image), I got System.NullReferenceException. If the fingerprint contains the core, I get the template correctly.

As the templates are being processed with FingerCell after being adquired with the sensor, I need to check whether the core is on the image or not. I expected that if the core is not in the image I will get a Bad Quality Message from the DLL, but instead I"m getting that exception... Any ideas to avoid that? It"s possible to check if the core is on the image before creating the template?

Here is my code:

Code: Select all
FncResult GetQuality(Bitmap ^ bitmap, String ^ sensor) {

   FncResult result = FNC_OK;

   NImage ^ image = NImage::FromBitmap(bitmap);
   bool available = NLicense::ObtainComponents("/local", 5000, "Biometrics.FingerExtraction");
   if (available) {
      Neurotec::FingerCell::FingerCell m_extractor;
      if (sensor == "EikonTouch" || sensor == "Fingerprints") {
         image->HorzResolution = 508;
         image->VertResolution = 508;
      else if (sensor == "SideTouch") {
         image->HorzResolution = 373;
         image->VertResolution = 373;
      else if (sensor == "NB-2020-U" || sensor == "NB-2024-U") {
         image->HorzResolution = 385;
         image->VertResolution = 385;
      image->ResolutionIsAspectRatio = false;

      NBuffer ^ templateBuffer = m_extractor.Extract(image);
      if (templateBuffer->Size == 0) {
         result = FNC_E_BAD_QUALITY;
      else result = FNC_OK;
   else result = FNC_E_NO_RECORDS;
   return result;
Posts: 1
Joined: Mar 16, 2017 10:47

Re: System.NullReferenceException while extracting template

Postby MartynasV » Mar 17, 2017 14:03


Send detailed issue description to

Also provide:
SDK revision number(can be found in SDK root directory, in Revision.txt file).
Fingerprint image which causes exception.
Martynas V
Posts: 242
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Return to Public

Who is online

Users browsing this forum: No registered users and 1 guest