using System;
using DigitalPersona.Standards.Sdk;
using DigitalPersona.Standards.Sdk.DataAccess;
class Program
{
static void Main(string[] args)
{
try
{
// Create a new instance of the DeviceEnroller class
var enroller = new DeviceEnroller();
// Connect to the fingerprint device
enroller.ConnectToDevice(DeviceName.Fingerprint);
// Start the enrollment process
enroller.StartEnrollment();
// Prompt user to place their finger on the device
Console.WriteLine("Please place your finger on the device...");
// Wait for the finger to be placed on the device
enroller.WaitForFinger();
// Acquire the fingerprint enrollment data
FingerprintData enrollmentData = enroller.AcquireEnrollmentData();
// Display the enrollment data
Console.WriteLine("Enrollment data acquired successfully:");
Console.WriteLine($"Quality: {enrollmentData.Quality}");
Console.WriteLine($"Format: {enrollmentData.Format}");
// Save the enrollment data to a file
string filePath = "enrollment.dat";
enrollmentData.SaveToFile(filePath);
Console.WriteLine($"Enrollment data saved to file: {filePath}");
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
}
finally
{
// Disconnect from the fingerprint device
DeviceEnroller.Disconnect();
}
}
}
DeviceName.Fingerprint
with the appropriate name of the fingerprint device you are using.Do you hava a sample for javascript or php?Yes, I can provide you with a sample code that demonstrates how to acquire the enrollment data of a fingerprint using DigitalPersona. Here's an example written in C#:
C#:using System; using DigitalPersona.Standards.Sdk; using DigitalPersona.Standards.Sdk.DataAccess; class Program { static void Main(string[] args) { try { // Create a new instance of the DeviceEnroller class var enroller = new DeviceEnroller(); // Connect to the fingerprint device enroller.ConnectToDevice(DeviceName.Fingerprint); // Start the enrollment process enroller.StartEnrollment(); // Prompt user to place their finger on the device Console.WriteLine("Please place your finger on the device..."); // Wait for the finger to be placed on the device enroller.WaitForFinger(); // Acquire the fingerprint enrollment data FingerprintData enrollmentData = enroller.AcquireEnrollmentData(); // Display the enrollment data Console.WriteLine("Enrollment data acquired successfully:"); Console.WriteLine($"Quality: {enrollmentData.Quality}"); Console.WriteLine($"Format: {enrollmentData.Format}"); // Save the enrollment data to a file string filePath = "enrollment.dat"; enrollmentData.SaveToFile(filePath); Console.WriteLine($"Enrollment data saved to file: {filePath}"); } catch (Exception ex) { Console.WriteLine($"An error occurred: {ex.Message}"); } finally { // Disconnect from the fingerprint device DeviceEnroller.Disconnect(); } } }
Make sure to replaceDeviceName.Fingerprint
with the appropriate name of the fingerprint device you are using.
This code uses the DigitalPersona Standards SDK to connect to the fingerprint device, start the enrollment process, acquire the enrollment data, and save it to a file. You can modify the code to suit your specific requirements.
Apologies for the confusion. Here's an example of how you can acquire the enrollment data of a fingerprint using DigitalPersona in JavaScript:Do you hava a sample for javascript or php?
// Create a new instance of the DigitalPersona device object
var device = new DigitalPersona.Device();
// Connect to the fingerprint device
device.connect(DigitalPersona.DeviceType.Fingerprint)
.then(function() {
// Start the enrollment process
return device.startEnrollment();
})
.then(function() {
// Prompt user to place their finger on the device
console.log("Please place your finger on the device...");
// Wait for the finger to be placed on the device
return device.waitForFinger();
})
.then(function() {
// Acquire the fingerprint enrollment data
return device.acquireEnrollmentData();
})
.then(function(enrollmentData) {
// Display the enrollment data
console.log("Enrollment data acquired successfully:");
console.log("Quality: " + enrollmentData.quality);
console.log("Format: " + enrollmentData.format);
// Save the enrollment data to a file
var fileData = new Blob([enrollmentData.data], { type: 'application/octet-stream' });
var fileName = "enrollment.dat";
saveAs(fileData, fileName);
console.log("Enrollment data saved to file: " + fileName);
})
.catch(function(error) {
console.log("An error occurred: " + error);
})
.finally(function() {
// Disconnect from the fingerprint device
device.disconnect();
});
Capture lang ang meron, wala akong mahanap para sa enrollment ng fingerprint.Need mo lang makuha ung SDK nyan sir, alam ko meron sila for Javascript
Web app?Meron akong system na ganyan using digital persona
nope sir,Web app?
Meron na rin ako sa 'desktop' application, kaya lang ang requirement ay sa web app.nope sir,