c++ - Cannot save processed fingerprint image with VeriFinger -
i'm trying use sdk called verifinger process .bmp file containing fingerprint capture (for enhancement), , save new .bmp file.
verifinger comes few tutorials , samples, main 1 being called fingerssamplewx. here's screenshot of it, completeness:
following application's source code guide, able assemble piece of code should want, or believe:
#include <iostream> #include <nlicensing.hpp> #include <nmedia.hpp> #include <nbiometrics.hpp> using namespace neurotec::biometrics; using namespace neurotec::images; using namespace neurotec::licensing; int main() { if (nlicense::obtaincomponents("/local", "5000", "biometrics.fingerextraction")) std::wcout << l"license ok\n"; else std::wcout << l"license fail\n"; nfinger finger; finger.setfilename("f:\\input\\000001\\mdt1.bmp"); finger.setposition(nfpunknown); finger.setimpressiontype(nfitnonlivescanplain); // testing auto test1 = finger.getfilename(); auto test2 = finger.getimage(); auto test3 = finger.getprocessedimage(); nimage image(null); if (finger.gethandle()) { image = finger.getprocessedimage(); if (image.gethandle()) image.save("f:\\output\\000001\\mdt1_out.bmp"); } nlicense::releasecomponents("biometrics.fingerextraction"); }
however, image won't save. reason, line if (image.gethandle())
returns false
. that's why added testing
section.
checking value of test2
, test3
using debugger tells me:
handle=0x00000000 isdisposed=false
getprocessedimage() returns null, weird, because test1
returns file name of finger
object correctly. i'm sure missing something... been struggling few hours now.
update: verifinger paid software, it's possible download 30-day trial from here (700mb). sdk documentation located in documentation
folder both chm , pdf formats.
thanks.
from perusing sample code , doing reading, looks problem 1 of 2 possible problems.
either image not correct. not find more information input image not being liked try few different input images of different sizes. why ask getimage()
output test2 var? if doesn't work properly, suggests input image isn't liked.
in sample code read, nfinger instance appears added subject before operations done on nfinger instance. i'm not sure if modifies nfinger instance in way documentation seems light. looking @ nsubject.hpp, suggests finger added fingerscollection, doesn't appear more.
before "testing" section, add finger code subject:
nsubject subject; subject.setid("some unique string"); subject.getfingers().add(finger);
finally, failing this, use of m_biometricclient
variable in sample code, initialization of it, m_biometricclient.setfingersreturnprocessedimage(true)
looks interesting doesn't it! there's quite bit of initialisation code see in fingerssampleform.cpp. when finger added, client appears responsible enrolling via task (see void fingerssampleform::onenroll)
method operation of nboenroll
.
Comments
Post a Comment