I want to save the capture fingerprint into database. the below code is given with SDK which fired on fingerprint capture. Please help which value i can store into my database for identification.

private void OnCaptured(CaptureResult captureResult)
        {
            try
            {
                // Check capture quality and throw an error if bad.
                if (!_sender.CheckCaptureResult(captureResult)) return;

                count++;

                DataResult<Fmd> resultConversion = FeatureExtraction.CreateFmdFromFid(captureResult.Data, Constants.Formats.Fmd.ANSI);

                SendMessage(Action.SendMessage, "A finger was captured.  \r\nCount:  " + (count));

                if (resultConversion.ResultCode != Constants.ResultCode.DP_SUCCESS)
                {
                    _sender.Reset = true;
                    throw new Exception(resultConversion.ResultCode.ToString());
                }

                preenrollmentFmds.Add(resultConversion.Data);

                if (count >= 4)
                {
                    DataResult<Fmd> resultEnrollment = DPUruNet.Enrollment.CreateEnrollmentFmd(Constants.Formats.Fmd.ANSI, preenrollmentFmds);

                    if (resultEnrollment.ResultCode == Constants.ResultCode.DP_SUCCESS)
                    {
                        SendMessage(Action.SendMessage, "An enrollment FMD was successfully created.");
                        SendMessage(Action.SendMessage, "Place a finger on the reader.");
                        preenrollmentFmds.Clear();
                        count = 0;
                        return;
                    }
                    else if (resultEnrollment.ResultCode == Constants.ResultCode.DP_ENROLLMENT_INVALID_SET)
                    {
                        SendMessage(Action.SendMessage, "Enrollment was unsuccessful.  Please try again.");
                        SendMessage(Action.SendMessage, "Place a finger on the reader.");
                        preenrollmentFmds.Clear();
                        count = 0;
                        return;
                    }
                }

                SendMessage(Action.SendMessage, "Now place the same finger on the reader.");
            }
            catch (Exception ex)
            {
                // Send error message, then close form
                SendMessage(Action.SendMessage, "Error:  " + ex.Message);                
            }  
        }

I would refer to the API documentation for DataResult<fmd>. I'm sure there are methods to help you retrieve the images it captures. I'm not sure which SDK you are using, and the DigitalPersona documentation (which I think you may be using) requires that you purchase support.

DigitalPersona does have a SerializeXml method, which is database-friendly and allows you to recreate the images for verification after saving them.

Thanks, I have solved the problem by using the following line of code.

tempFingerPrint = Fmd.SerializeXml(resultConversion.Data);
tempFingerPrint = Fmd.DeserializeXml(resultConversion.Data);

Sir/madam, i would really appreciate your help. Can i have this code as i am using the same sdk which will be enrolling a fignerprint, saving to database and then verifying it after saved to database. Thanks..

1Thank you so much for your support

Regards
sagar

commented: how you compared the XML in the database +0

Thank you so much for your support

Regards
sagar

can i know this code below

tempFingerPrint = Fmd.SerializeXml(resultConversion.Data);
tempFingerPrint = Fmd.DeserializeXml(resultConversion.Data);

produces xml, if i want in bytes or char how could i do that? thanks

@jayamkoko, you may have better luck posting a new question that describes your problem. This question was already marked as 'solved'. I think I may be the only one receiving updates on this question, and there are people far better than me with C# that could help you. I'm not sure if you mean a String.toCharArray() conversion (which would still be XML), or getting at the raw image data. Anyway, a new 'unsolved' question may help you get the answer that you are looking for.

thanks... k i try n see in other post... can i ask ur help..as for me now u r smarter than me.... can i have the codes that enroll the fingerprint, save to database and then verify agains the database? ur help kindly appreciated... my email is jayamkoko@gmail.com

I know this is solved, but I wanted to bring something up in that you should really think about the security related to storing these finger prints.

Long story short, my last year of college was a granduate level class on Applied Cryptography. For my final paper I focused on biometics. Anyway, one of the dangers with biometrics is that unlike a password, which if stolen, can be changed (like someone hacks a database), a biometric cannot. That biometric is now useless.

One way to get around this issue was Soft Biometrics. If I remember right (it's been some time), the concept is that you has the results of the biometric value hashed before storing it. This drastically reduces the chances of someone stealing and making the person's biometric now useless. That being said, even hashed, a value can be cracked with enough time, so make sure you implement a top of the line hashing function, and a good Salt

commented: Not to mention once I have this, can I use it elsewhere? +7

Depending on how the data is stored, it is very possible to reuse these. There are algorithms out there for capturing this data, such as the iris recognition. These are from what I know, publically know (or should be, based on the rules of cryptography).

You pretty much have the bytes that represent someone's fingerprint, in some format

how you compared the XML in the database

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.