The library can be used to segment slaps and extract templates from prints.
Overview
The library can be used to segment slaps and extract templates from prints. The library can process following print types
We are able to segment Slap and provide segmented Prints for further processing. Usually the processing is template extraction from Print. The library provides ICSExtractor to extract Print.
Slap
Slap is image of usually 4 fingers. It can be segmented and result of segmentation is PrintSegment. Usually the fingertip has also position that is assigned by segmentation algorithm. The position of found fingertip on hand is estimated by comparing the x-coordinate of the center of the finger's bounding box rectangle. As a result, the estimation may not be precise for slaps with an angle greater than 45 degrees. When the segmentation algorithm does not detect position then it is necessary that user sets correct position to be possible to create Print for further processing.
We provides following algorithm for segmentation process:
Slap
It can be segmented with function Slap::SegmentWith that return segmented rectangles.
-
c++
const auto dpi = 1000;
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/slap.png"), dpi);
cfg.SetMaxRotation(10);
AlgorithmicSegmentation segmentation(cfg);
unsigned int fingerIndex = 0;
auto segments = slap->SegmentWith(segmentation);
for (auto& segment : segments)
{
const std::string file =
"output/slap_segment_" + std::to_string(fingerIndex) + ".png";
segment->ToPrint()->image->SaveAs(file);
fingerIndex++;
}
slap->Draw(segments, Shapes::InnoBlue)->SaveAs("output/slap_segments.png");
-
java
final int dpi = 1000;
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/slap.png"), dpi);
AlgorithmicSegmentation.Config cfg = AlgorithmicSegmentation.
Config.Default();
AlgorithmicSegmentation segmentation = new AlgorithmicSegmentation(cfg);
int fingerIndex = 0;
PrintSegments segments = slap.
SegmentWith(segmentation);
for (PrintSegment segment : segments) {
segment.
ToPrint().getImage().SaveAs(
"output/slap_segment_" + fingerIndex + ".png");
fingerIndex++;
}
slap.
Draw(segments, Shapes.InnoBlue).SaveAs(
"output/slap_segments.png");
-
csharp
const int dpi = 1000;
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/slap.png"), dpi);
uint fingerIndex = 0;
AlgorithmicSegmentation.Config cfg = AlgorithmicSegmentation.
Config.Default();
AlgorithmicSegmentation segmentation = new AlgorithmicSegmentation(cfg);
PrintSegments segments = slap.
SegmentWith(segmentation);
foreach (PrintSegment segment in segments)
{
segment.
ToPrint().image.SaveAs(
"output/slap_segment_" + fingerIndex +
".png");
fingerIndex++;
}
slap.
Draw(segments, Shapes.InnoBlue).SaveAs(
"output/slap_segments.png");
The output of example is segmented slap
Segmented Slap
and cropped segments
Slap Segment 1
Slap Segment 2
Slap Segment 3
Slap Segment 4
Modify segment dimensions and crop
It is possible to use crop configuration (PrintCropConfiguration) when creating prints from PrintSegment. It is also possible to modified segment dimension via function PrintSegment::Resize.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/canted_slap_left.png"));
NeuralSegmentation segmentation;
PrintCropConfiguration cropCfg;
auto segments = slap->SegmentWith(segmentation);
auto modifiedSegments = segments;
segments[0]->ToPrint(cropCfg)->image->SaveAs("output/slap_segment_crop_0.png");
modifiedSegments[1] = segments[1]->Resize(400.0F, 500.F);
modifiedSegments[1]->ToPrint(cropCfg)->image->SaveAs(
"output/slap_segment_crop_1.png");
auto segment2 = segments[2];
modifiedSegments[2] = segment2->Resize(segment2->roundingBox.GetWidth() * 1.3F,
segment2->roundingBox.GetHeight() * 1.5F);
modifiedSegments[2]->ToPrint(cropCfg)->image->SaveAs(
"output/slap_segment_crop_2.png");
modifiedSegments[3] = segments[3]->Resize(300.0F, 400.0F);
modifiedSegments[3]->ToPrint()->image->SaveAs("output/slap_segment_crop_3.png");
auto segmentsImage =
slap->image->DrawShape(SegmentsShape(segments, modifiedSegments));
segmentsImage->SaveAs("output/slap_segment_crop.png");
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/canted_slap_left.png"));
NeuralSegmentation segmentation = new NeuralSegmentation();
PrintCropConfiguration cropCfg = new PrintCropConfiguration();
PrintSegments segments = slap.
SegmentWith(segmentation);
PrintSegments modifiedSegments = new PrintSegments(segments);
segments.get(0).ToPrint(cropCfg).getImage().SaveAs(
"output/slap_segment_crop_0.png");
modifiedSegments.set(1, segments.get(1).Resize(400.0F, 500.0F));
modifiedSegments.get(1).ToPrint(cropCfg).getImage().SaveAs(
"output/slap_segment_crop_1.png");
PrintSegment segment2 = segments.get(2);
modifiedSegments.set(
2, segment2.
Resize(segment2.getRoundingBox().GetWidth() * 1.3F,
segment2.getRoundingBox().GetHeight() * 1.5F));
modifiedSegments.get(2).
ToPrint(cropCfg).getImage().SaveAs(
"output/slap_segment_crop_2.png");
modifiedSegments.set(3, segments.get(3).Resize(300.0F, 400.0F));
modifiedSegments.get(3).ToPrint().getImage().SaveAs(
"output/slap_segment_crop_3.png");
Image segmentsImage = slap.getImage().DrawShape(
new SegmentsShape(segments, modifiedSegments));
segmentsImage.
SaveAs(
"output/slap_segment_crop.png");
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/canted_slap_left.png"));
NeuralSegmentation segmentation = new NeuralSegmentation();
PrintCropConfiguration cropCfg = new PrintCropConfiguration();
PrintSegments segments = slap.
SegmentWith(segmentation);
PrintSegments modifiedSegments = new PrintSegments(segments);
segments[0].ToPrint(cropCfg).image.SaveAs("output/slap_segment_crop_0.png");
modifiedSegments[1] = segments[1].Resize(400.0F, 500.0F);
modifiedSegments[1].ToPrint(cropCfg).image.SaveAs(
"output/slap_segment_crop_1.png");
PrintSegment segment2 = segments[2];
modifiedSegments[2].ToPrint(cropCfg).image.SaveAs(
"output/slap_segment_crop_2.png");
modifiedSegments[3] = segments[3].Resize(300.0F, 400.0F);
modifiedSegments[3].ToPrint().image.SaveAs("output/slap_segment_crop_3.png");
Image segmentsImage =
slap.
image.DrawShape(
new SegmentsShape(segments, modifiedSegments));
segmentsImage.
SaveAs(
"output/slap_segment_crop.png");
The output of example is segmented slap (Original segments are light gray and modified are blue)
Modified Segmented Slap
and cropped segments
Modified Slap Segment 1
Modified Slap Segment 2
Modified Slap Segment 3
Modified Slap Segment 4
Hand position
Guess hand position. It is possible to guess hand position when slap contains at least 3 segments. The hand position can be obtained by function SlapCapture::GuessHandPosition.
-
c++
const auto dpi = 1000;
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/slap.png"), dpi);
AlgorithmicSegmentation segmentation{};
auto segments = slap->SegmentWith(segmentation);
auto guessedHand = SlapCapture::GuessHandPosition(segments);
if (guessedHand.IsGuessSuccessful())
{
std::cout << " Guessed hand position " << guessedHand.GetHandPosition()
<< std::endl;
}
-
java
final int dpi = 1000;
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/slap.png"), dpi);
AlgorithmicSegmentation segmentation = new AlgorithmicSegmentation();
PrintSegments segments = slap.
SegmentWith(segmentation);
GuessedHandPosition guessedHand = SlapCapture.GuessHandPosition(segments);
System.out.println(
}
-
csharp
const int dpi = 1000;
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/slap.png"), dpi);
AlgorithmicSegmentation segmentation = new AlgorithmicSegmentation();
PrintSegments segments = slap.
SegmentWith(segmentation);
GuessedHandPosition guessedHand = SlapCapture.GuessHandPosition(segments);
{
System.Console.WriteLine(" Guessed hand position " +
}
Thumbs
Thumbs is image of both thumbs. When 2 segments are detected then first is left and second is right thumb. When only one thumb is detected then position is unknown and user MUST set correct position to be possible to create Print for further processing.
We provides following algorithm for segmentation process:
Thumbs
It can be segmented with function Thumbs::SegmentWith that return segmented rectangles.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/thumbs.png"));
cfg.SetMaxRotation(10);
AlgorithmicSegmentation segmentation(cfg);
unsigned int fingerIndex = 0;
auto segments = thumbs->SegmentWith(segmentation);
for (auto& segment : segments)
{
const std::string file =
"output/thumbs_segment_" + std::to_string(fingerIndex) + ".png";
segment->ToPrint()->image->SaveAs(file);
fingerIndex++;
}
thumbs->Draw(segments, Shapes::InnoBlue)->SaveAs("output/thumbs_segments.png");
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/thumbs.png"));
ThumbsCapture thumbs = ThumbsCapture.
Create(img);
AlgorithmicSegmentation.Config cfg = AlgorithmicSegmentation.
Config.Default();
AlgorithmicSegmentation segmentation = new AlgorithmicSegmentation(cfg);
int fingerIndex = 0;
PrintSegments segments = thumbs.
SegmentWith(segmentation);
for (PrintSegment segment : segments) {
segment.
ToPrint().getImage().SaveAs(
"output/thumbs_segment_" + fingerIndex + ".png");
fingerIndex++;
}
thumbs.
Draw(segments, Shapes.InnoBlue).SaveAs(
"output/thumbs_segments.png");
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/thumbs.png"));
ThumbsCapture thumbs = ThumbsCapture.
Create(img);
uint fingerIndex = 0;
AlgorithmicSegmentation.Config cfg = AlgorithmicSegmentation.
Config.Default();
AlgorithmicSegmentation segmentation = new AlgorithmicSegmentation(cfg);
PrintSegments segments = thumbs.
SegmentWith(segmentation);
foreach (PrintSegment segment in segments)
{
segment.
ToPrint().image.SaveAs(
"output/thumbs_segment_" + fingerIndex +
".png");
fingerIndex++;
}
thumbs.
Draw(segments, Shapes.InnoBlue).SaveAs(
"output/thumbs_segments.png");
The output of example are segmented thumbs
Segmented Thumbs
and cropped segments
Thumbs Segment 1
Thumbs Segment 2
Prints
We can segment images with one or more fingerprints on it (up to 4 fingerprints). The position of segmented fingerprints are always unknown and user MUST set correct position to be possible to create Print for further processing.
We provides following algorithm for segmentation process:
Print
It can be segmented with function PrintCapture::SegmentWith that return segmented rectangles.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/print.png"));
NeuralSegmentation segmentation;
auto segments = print->SegmentWith(segmentation);
auto segment = segments[0];
segment->ToPrint()->image->SaveAs("output/print_nn_segment.png");
print->Draw(segments, Shapes::InnoBlue)->SaveAs("output/print_nn_segments.png");
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/print.png"));
PrintCapture print = PrintCapture.
Create(img);
NeuralSegmentation segmentation = new NeuralSegmentation();
PrintSegments segments = print.
SegmentWith(segmentation);
PrintSegment segment = segments.get(0);
segment.
ToPrint().getImage().SaveAs(
"output/print_nn_segment.png");
print.
Draw(segments, Shapes.InnoBlue).SaveAs(
"output/print_nn_segments.png");
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/print.png"));
PrintCapture print = PrintCapture.
Create(img);
NeuralSegmentation segmentation = new NeuralSegmentation();
PrintSegments segments = print.
SegmentWith(segmentation);
PrintSegment segment = segments[0];
segment.
ToPrint().image.SaveAs(
"output/print_nn_segment.png");
print.
Draw(segments, Shapes.InnoBlue).SaveAs(
"output/print_nn_segments.png");
The output of example is segmented fingerprint
Segmented Print
and its cropp
Fingerprint Segment
Extraction
The SDK provides following extraction types
ICS Extraction
We provide ICS (Internal Innovatrics template) for Print via ICSExtractor. The main goal is to create template for further processing e.g. 1:1 Verification. During the extraction some intermediate artifacts can be provided.
- Note
- The adjudicator feature MUST be allowed in license to obtain intermediate artifacts.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
ICSExtractor::Artifacts artifacts;
ICSExtractor::SkeletonImage skeleton;
ICSExtractor::FilteredImage filtered;
ICSExtractor::BinarizedImage binarized;
artifacts.
Add(binarized);
ICSExtractor extractor;
auto tmpl = extractor.
Extract(fp, artifacts);
skeleton.
GetImage()->SaveAs(
"output/skeleton.png");
filtered.
GetImage()->SaveAs(
"output/filtered.png");
binarized.
GetImage()->SaveAs(
"output/binarized.png");
BinaryFile::WriteAll("output/fp.ics", tmpl->icsTemplateData);
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor.Artifacts artifacts = new ICSExtractor.Artifacts();
ICSExtractor.SkeletonImage skeleton = new ICSExtractor.SkeletonImage();
ICSExtractor.FilteredImage filtered = new ICSExtractor.FilteredImage();
ICSExtractor.BinarizedImage binarized = new ICSExtractor.BinarizedImage();
artifacts.
Add(binarized);
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(fp, artifacts);
skeleton.
GetImage().SaveAs(
"output/skeleton.png");
filtered.
GetImage().SaveAs(
"output/filtered.png");
binarized.
GetImage().SaveAs(
"output/binarized.png");
BinaryFile.WriteAll("output/fp.ics", tmpl.getIcsTemplateData());
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor.Artifacts artifacts = new ICSExtractor.Artifacts();
ICSExtractor.SkeletonImage skeleton = new ICSExtractor.SkeletonImage();
ICSExtractor.FilteredImage filtered = new ICSExtractor.FilteredImage();
ICSExtractor.BinarizedImage binarized = new ICSExtractor.BinarizedImage();
artifacts.
Add(binarized);
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(fp, artifacts);
skeleton.
GetImage().SaveAs(
"output/skeleton.png");
filtered.
GetImage().SaveAs(
"output/filtered.png");
binarized.
GetImage().SaveAs(
"output/binarized.png");
The output of example is template and required intermediate images.
Finger for extraction
Binarized
Filtered
Skeleton
1 to 1 Verification
We provide verification of ICS (Internal Innovatrics template) for Print via ICSVerifyMatcher. The main goal is to calculate Similarity Score for given probe and gallery templates. The examples uses following images:
Probe
Gallery
-
c++
auto img1 =
Image::Decode(BinaryFile::ReadAll(
"assets/s1_li.png"));
auto img2 =
Image::Decode(BinaryFile::ReadAll(
"assets/s2_li.png"));
ICSExtractor extractor;
auto tmpl1 = extractor.
Extract(p1);
auto tmpl2 = extractor.
Extract(p2);
const ICSVerifyMatcher matcher(cfg);
auto score = matcher.
Match(*tmpl1, *tmpl2);
std::cout << " Similarity score == " << score << std::endl;
-
java
Image img_1 = Image.
Decode(BinaryFile.ReadAll(
"assets/s1_li.png"));
Image img_2 = Image.
Decode(BinaryFile.ReadAll(
"assets/s2_li.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl_1 = extractor.
Extract(p_1);
ExtractedPrint tmpl_2 = extractor.
Extract(p_2);
ICSVerifyMatcher matcher = new ICSVerifyMatcher(ICSVerifyMatcher.Config.Default());
long score = matcher.
Match(tmpl_1, tmpl_2);
System.out.println(" Similarity score == " + score);
-
csharp
Image img_1 = Image.
Decode(BinaryFile.ReadAll(
"assets/s1_li.png"));
Image img_2 = Image.
Decode(BinaryFile.ReadAll(
"assets/s2_li.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl_1 = extractor.
Extract(p_1);
ExtractedPrint tmpl_2 = extractor.
Extract(p_2);
ICSVerifyMatcher matcher =
new ICSVerifyMatcher(ICSVerifyMatcher.Config.Default());
uint score = matcher.
Match(tmpl_1, tmpl_2);
System.Console.WriteLine(" Similarity score == " + score);
Matching Minutiae
During verification process SDK can provide matching minutiae between verified probe against gallery ICSTemplate. The matching minutia has same index in provided probe and gallery minutiae.
- Note
- The adjudicator feature MUST be allowed in license to obtain matching minutiae.
-
c++
auto img1 =
Image::Decode(BinaryFile::ReadAll(
"assets/s1_li.png"));
auto img2 =
Image::Decode(BinaryFile::ReadAll(
"assets/s2_li.png"));
ICSExtractor extractor;
auto probe = extractor.
Extract(p1);
auto gallery = extractor.
Extract(p2);
auto matchingMinutiae = ICSVerifyMatcher::MatchingMinutiae();
const ICSVerifyMatcher matcher;
std::ignore = matcher.
Match(*probe, *gallery, matchingMinutiae);
auto p1Minutiae = probe->print->DrawMinutiae(matchingMinutiae.GetProbeMinutiae(),
Shapes::InnoBlue);
auto p2Minutiae = gallery->print->DrawMinutiae(
matchingMinutiae.GetGalleryMinutiae(), Shapes::InnoBlue);
p1Minutiae->SaveAs("output/s1_li_minutiae.png");
p2Minutiae->SaveAs("output/s2_li_minutiae.png");
-
java
Image img_1 = Image.
Decode(BinaryFile.ReadAll(
"assets/s1_li.png"));
Image img_2 = Image.Decode(BinaryFile.ReadAll("assets/s2_li.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint probe = extractor.
Extract(p_1);
ExtractedPrint gallery = extractor.
Extract(p_2);
ICSVerifyMatcher.MatchingMinutiae matchingMinutiae = new ICSVerifyMatcher
.MatchingMinutiae();
ICSVerifyMatcher matcher = new ICSVerifyMatcher();
long score = matcher.
Match(probe, gallery, matchingMinutiae);
Image p_1_minutiae = probe.getPrint().DrawMinutiae(
Image p_2_minutiae = gallery.getPrint().DrawMinutiae(
p_1_minutiae.
SaveAs(
"output/s1_li_minutiae.png");
p_2_minutiae.
SaveAs(
"output/s2_li_minutiae.png");
-
csharp
Image img_1 = Image.
Decode(BinaryFile.ReadAll(
"assets/s1_li.png"));
Image img_2 = Image.
Decode(BinaryFile.ReadAll(
"assets/s2_li.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint probe = extractor.
Extract(p_1);
ExtractedPrint gallery = extractor.
Extract(p_2);
ICSVerifyMatcher.MatchingMinutiae matchingMinutiae =
new ICSVerifyMatcher.MatchingMinutiae();
ICSVerifyMatcher matcher = new ICSVerifyMatcher();
uint score = matcher.
Match(probe, gallery, matchingMinutiae);
Shapes.InnoBlue);
Image p_2_minutiae = gallery.
print.DrawMinutiae(
p_1_minutiae.
SaveAs(
"output/s1_li_minutiae.png");
p_2_minutiae.
SaveAs(
"output/s2_li_minutiae.png");
Output of example are verified prints with drown matching minutiae.
Probe with matching minutiae
|
Gallery with matching minutiae
|
Quality
Qualities provided for a fingerprint image and template:
-
Template quality is calculated from a fingerprint template. The quality is an integer number between 0 (blank image) and 100 (maximum quality). For enrollment, it is recommended to use only templates with quality > 30.
-
c++
ICSExtractor extractor;
const uint8_t quality = tmpl->CalculateQuality();
std::cout << " Template Quality == " << +quality << std::endl;
-
java
ICSExtractor extractor = new ICSExtractor();
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ExtractedPrint tmpl = extractor.
Extract(
System.out.println(" Template Quality == " + quality);
-
csharp
Image img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl =
System.Console.WriteLine(" Template Quality == {0}", quality);
-
Presence image quality number is calculated as an area where presence of fingerprint is detected. The calculated value does not measure quality of the presented fingerprint pattern. Presence value is calculated from the fingerprint image. The range is from 0 (lowest quality) to 100 (highest quality).
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
const uint8_t presence = fp->CalculatePresence();
std::cout << " Presence quality == " << +presence << std::endl;
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
System.out.println(" Presence Quality == " + presence);
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var presence = fp.CalculatePresence();
System.Console.WriteLine(" Presence Quality == {0}", presence);
-
NFIQ image quality number is calculated in accordance with the general guidelines contained in Section 7.2.5 of ANSI/INCITS 381 standard (Section 8.3.7.3 Quality score of ISO/IEC 19794-4 international standard). Presence value is calculated from the fingerprint image. The range is from 1 (highest quality) to 5 (lowest quality).
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
const uint8_t nfiq1 = fp->CalculateNFIQ1();
std::cout << " NFIQ quality == " << +nfiq1 << std::endl;
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
System.out.println(" NFIQ1 Quality == " + nfiq1);
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var nfiq1 = fp.CalculateNFIQ1();
System.Console.WriteLine(" NFIQ1 Quality == {0}", nfiq1);
-
NFIQ2 image quality number is calculated in accordance with the general guidelines contained in Section 7.2.5 of ANSI/INCITS 381 standard (Section 8.3.7.3 Quality score of ISO/IEC 19794-4 international standard). Presence value is calculated from the fingerprint image. The range is from 0 (lowest quality) to 100 (highest quality).
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
const uint8_t nfiq2 = fp->CalculateNFIQ2();
std::cout << " NFIQ2 quality == " << +nfiq2 << std::endl;
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
System.out.println(" NFIQ2 Quality == " + nfiq2);
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var nfiq2 = fp.CalculateNFIQ2();
System.Console.WriteLine(" NFIQ2 Quality == {0}", nfiq2);
-
Image quality number is calculated in accordance with the general guidelines contained in Section 7.2.5 of ANSI/INCITS 381 standard Section 8.3.7.3 Quality score of ISO/IEC 19794-4 international standard). The range is from 0 (lowest quality) to 100 (highest quality).
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
const uint8_t imageQuality = fp->CalculateImageQuality();
std::cout << " Image quality == " << +imageQuality << std::endl;
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
System.out.println(" Image Quality == " + imageQuality);
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var imageQuality = fp.CalculateImageQuality();
System.Console.WriteLine(" Image Quality == {0}", imageQuality);
-
Placement The placement score number ranges from 0 to 100 and represents the fitness of the finger placement, evaluated with respect to the detected fingerprint classification (arch, loop, whorl).
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
const uint8_t placement = fp->CalculatePlacement();
std::cout << " Placement quality == " << +placement << std::endl;
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
System.out.println(" Placement Quality == " + placement);
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var placement = fp.CalculatePlacement();
System.Console.WriteLine(" Placement Quality == {0}", placement);
-
Intensity The intensity value is from 0 (lowest intensity, dry finger, low pressure) to 100 (highest intensity, wet finger, high pressure).
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
const uint8_t intensity = fp->CalculateIntensity();
std::cout << " Image intensity == " << +intensity << std::endl;
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
System.out.println(" Intensity Quality == " + intensity);
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var intensity = fp.CalculateIntensity();
System.Console.WriteLine(" Image intensity == {0}", intensity);
Minutiae
The SDK provides extracted minutiae from ICSTemplate and draw them into Image.
When default minutiae shape does not fit, you can draw own via image functionality.
- Note
- The adjudicator feature MUST be allowed in license to obtain minutiae from template.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
ICSExtractor::SkeletonImage skeleton;
ICSExtractor extractor;
auto tmpl = extractor.
Extract(fp, skeleton);
auto minutiae = tmpl->GetMinutiae();
auto skeletonWithMinutiae = skeleton.
DrawMinutiae(minutiae, Shapes::InnoBlue);
skeletonWithMinutiae->SaveAs("output/skeleton_with_minutiae.png");
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor.SkeletonImage skeleton = new ICSExtractor.SkeletonImage();
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(fp, skeleton);
Image skeletonWithMinutiae = skeleton.
DrawMinutiae(minutiae, Shapes.InnoBlue);
skeletonWithMinutiae.
SaveAs(
"output/skeleton_with_minutiae.png");
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor.SkeletonImage skeleton = new ICSExtractor.SkeletonImage();
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(fp, skeleton);
Image skeletonWithMinutiae = skeleton.
DrawMinutiae(minutiae, Shapes.InnoBlue);
skeletonWithMinutiae.
SaveAs(
"output/skeleton_with_minutiae.png");
Minutiae
Critical Points
The SDK provides extracted core/deltas from ICSTemplate and draw them into Image.
When default critical point shape does not fit, you can draw own via image functionality.
- Note
- The adjudicator feature MUST be allowed in license to obtain critical points from template.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/rolled_print.png"));
ICSExtractor extractor;
auto points = tmpl->GetCriticalPoints();
auto printWithPoints = fp->DrawCriticalPoints(points, Shapes::InnoBlue);
printWithPoints->SaveAs("output/rolled_print_with_critical_points.png");
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/rolled_print.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(fp);
printWithPoints.
SaveAs(
"output/rolled_print_with_critical_points.png");
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/rolled_print.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(fp);
printWithPoints.
SaveAs(
"output/rolled_print_with_critical_points.png");
Critical Points
Template Conversions
ISO Template
It is possible to convert proprietary ICSTemplate to ISOTemplate version 2 with PrintAttributes via function ExtractedPrint::ToISO().
-
c++
ICSExtractor extractor;
auto iso = tmpl->ToISO();
std::cout << "ISO template version: " << iso->GetVersion() << std::endl;
BinaryFile::WriteAll("output/template.iso", iso->data);
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(
ISOTemplate iso = tmpl.
ToISO();
System.out.println(
"ISO template version: " + iso.
GetVersion());
BinaryFile.WriteAll("output/template.iso", iso.getData());
-
csharp
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl =
ISOTemplate iso = tmpl.
ToISO();
Console.WriteLine(
"ISO template version: " + iso.
GetVersion());
BinaryFile.WriteAll(
"output/template.iso", iso.
data);
It is possible to convert ICSTemplate / ANSITemplate / ISOTemplate / ISONCTemplate / ISOCCTemplate / ILOSIDTemplate to ISOTemplate version 2/3 via ISOTemplateAdapter. The attributes are copied from adapted template if they are present in adapted template.
-
c++
ICSExtractor extractor;
auto extractedPrint = extractor.
Extract(
auto fromIcs = adapter.
Adapt(*extractedPrint);
BinaryFile::WriteAll("output/template_from_ics.isov3", fromIcs.data);
auto fromAnsi = adapter.
Adapt(*extractedPrint->ToANSI());
BinaryFile::WriteAll("output/template_from_ansi.isov3", fromAnsi.data);
auto fromIso = adapter.
Adapt(*extractedPrint->ToISO());
BinaryFile::WriteAll("output/template_from_iso.isov3", fromIso.data);
const ILOSIDTemplateAdapter ilosidAdapter;
auto ilosid = ilosidAdapter.
Adapt(*extractedPrint);
auto fromIlosid = adapter.
Adapt(ilosid);
BinaryFile::WriteAll("output/template_from_ilosid.isov3", fromIlosid.data);
const ISOCCTemplateAdapter isoccAdapter;
auto isocc = isoccAdapter.
Adapt(*extractedPrint);
auto fromIsocc = adapter.
Adapt(isocc);
BinaryFile::WriteAll("output/template_from_isocc.isov3", fromIsocc.data);
const ISONCTemplateAdapter isoncAdapter;
auto isonc = isoncAdapter.
Adapt(*extractedPrint);
auto fromIsonc = adapter.
Adapt(isonc);
BinaryFile::WriteAll("output/template_from_isonc.isov3", fromIsonc.data);
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint extractedPrint = extractor.
Extract(
ISOTemplateAdapter adapter = new ISOTemplateAdapter(
ISOTemplateAdapter.Version.VERSION_3);
ISOTemplate fromIcs = adapter.
Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.isov3", fromIcs.getData());
ISOTemplate fromAnsi = adapter.
Adapt(extractedPrint.
ToANSI());
BinaryFile.WriteAll("output/template_from_ansi.isov3", fromAnsi.getData());
ISOTemplate fromIso = adapter.
Adapt(extractedPrint.
ToISO());
BinaryFile.WriteAll("output/template_from_iso.isov3", fromIso.getData());
ILOSIDTemplateAdapter ilosidAdapter = new ILOSIDTemplateAdapter();
ILOSIDTemplate ilosid = ilosidAdapter.
Adapt(extractedPrint);
ISOTemplate fromIlosid = adapter.
Adapt(ilosid);
BinaryFile.WriteAll("output/template_from_ilosid.isov3", fromIlosid.getData());
ISOCCTemplateAdapter isoccAdapter = new ISOCCTemplateAdapter();
ISOCCTemplate isocc = isoccAdapter.
Adapt(extractedPrint);
ISOTemplate fromIsocc = adapter.
Adapt(isocc);
BinaryFile.WriteAll("output/template_from_isocc.isov3", fromIsocc.getData());
ISONCTemplateAdapter isoncAdapter = new ISONCTemplateAdapter();
ISONCTemplate isonc = isoncAdapter.
Adapt(extractedPrint);
ISOTemplate fromIsonc = adapter.
Adapt(isonc);
BinaryFile.WriteAll("output/template_from_isonc.isov3", fromIsonc.getData());
-
csharp
var img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
var extractor = new ICSExtractor();
var extractedPrint =
var adapter = new ISOTemplateAdapter(ISOTemplateAdapter.Version.VERSION_3);
var fromIcs = adapter.Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.isov3", fromIcs.data);
var fromAnsi = adapter.Adapt(extractedPrint.ToANSI());
BinaryFile.WriteAll("output/template_from_ansi.isov3", fromAnsi.data);
var fromIso = adapter.Adapt(extractedPrint.ToISO());
BinaryFile.WriteAll("output/template_from_iso.isov3", fromIso.data);
var ilosidAdapter = new ILOSIDTemplateAdapter();
var ilosid = ilosidAdapter.Adapt(extractedPrint);
var fromIlosid = adapter.Adapt(ilosid);
BinaryFile.WriteAll("output/template_from_ilosid.isov3", fromIlosid.data);
var isoccAdapter = new ISOCCTemplateAdapter();
var isocc = isoccAdapter.Adapt(extractedPrint);
var fromIsocc = adapter.Adapt(isocc);
BinaryFile.WriteAll("output/template_from_isocc.isov3", fromIsocc.data);
var isoncAdapter = new ISONCTemplateAdapter();
var isonc = isoncAdapter.Adapt(extractedPrint);
var fromIsonc = adapter.Adapt(isonc);
BinaryFile.WriteAll("output/template_from_isonc.isov3", fromIsonc.data);
ISO Image
It is possible to convert Print to ISO image compliant with ISO 19794-4:2011 and back from image to Print.
-
c++
auto img =
Image::Decode(BinaryFile::ReadAll(
"assets/finger.png"));
PrintAttributes pa;
std::cout << " Conversion Print to ISO image" << std::endl;
auto encoder = PngImageEncoder();
auto isoImage = fp->ToIsoImage(encoder);
std::cout << " Conversion ISO to Print image" << std::endl;
auto printImage = fp->FromIsoImage(isoImage);
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
PrintAttributes pa = new PrintAttributes();
pa.SetCaptureDeviceTechnology(
pa.SetCaptureDeviceVendorID(new PrintCaptureDeviceVendorID(11));
pa.SetCaptureDeviceTypeID(new PrintCaptureDeviceTypeID(7));
pa.SetCertificationFlag(true);
System.out.println(" Conversion Print to ISO image");
PngImageEncoder encoder = new PngImageEncoder();
System.out.println(" Conversion ISO to Print image");
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
PrintAttributes pa = new PrintAttributes();
System.Console.WriteLine(" Conversion Print to ISO image");
var encoder = new PngImageEncoder();
var isoImage = fp.ToIsoImage(encoder);
System.Console.WriteLine(" Conversion ISO to Print image");
var printImage = Print.FromIsoImage(isoImage);
ANSI Template
It is possible to convert proprietary ICSTemplate to ANSITemplate with PrintAttributes via function ExtractedPrint::ToANSI().
-
c++
ICSExtractor extractor;
auto ansi = tmpl->ToANSI();
std::cout << "ANSI template version: " << ansi->GetVersion() << std::endl;
BinaryFile::WriteAll("output/template.ansi", ansi->data);
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl = extractor.
Extract(
ANSITemplate ansi = tmpl.
ToANSI();
System.out.println(
"ANSI template version: " + ansi.
GetVersion());
BinaryFile.WriteAll("output/template.ansi", ansi.getData());
-
csharp
Image img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint tmpl =
ANSITemplate ansi = tmpl.
ToANSI();
Console.WriteLine(
"ANSI template version: " + ansi.
GetVersion());
BinaryFile.WriteAll(
"output/template.ansi", ansi.
data);
It is possible to convert ICSTemplate / ISOTemplate / ISONCTemplate / ISOCCTemplate / ILOSIDTemplate to ANSITemplate via ANSITemplateAdapter. The attributes are copied from adapted template if they are present in adapted template.
-
c++
ICSExtractor extractor;
auto extractedPrint = extractor.
Extract(
const ANSITemplateAdapter adapter;
auto fromIcs = adapter.
Adapt(*extractedPrint);
BinaryFile::WriteAll("output/template_from_ics.ansi", fromIcs.data);
auto fromIso = adapter.
Adapt(*extractedPrint->ToISO());
BinaryFile::WriteAll("output/template_from_iso.ansi", fromIso.data);
const ILOSIDTemplateAdapter ilosidAdapter;
auto ilosid = ilosidAdapter.
Adapt(*extractedPrint);
auto fromIlosid = adapter.
Adapt(ilosid);
BinaryFile::WriteAll("output/template_from_ilosid.ansi", fromIlosid.data);
const ISOCCTemplateAdapter isoccAdapter;
auto isocc = isoccAdapter.
Adapt(*extractedPrint);
auto fromIsocc = adapter.
Adapt(isocc);
BinaryFile::WriteAll("output/template_from_isocc.ansi", fromIsocc.data);
const ISONCTemplateAdapter isoncAdapter;
auto isonc = isoncAdapter.
Adapt(*extractedPrint);
auto fromIsonc = adapter.
Adapt(isonc);
BinaryFile::WriteAll("output/template_from_isonc.ansi", fromIsonc.data);
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint extractedPrint = extractor.
Extract(
ANSITemplateAdapter adapter = new ANSITemplateAdapter();
ANSITemplate fromIcs = adapter.
Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.ansi", fromIcs.getData());
ANSITemplate fromIso = adapter.
Adapt(extractedPrint.
ToISO());
BinaryFile.WriteAll("output/template_from_iso.ansi", fromIso.getData());
ILOSIDTemplateAdapter ilosidAdapter = new ILOSIDTemplateAdapter();
ILOSIDTemplate ilosid = ilosidAdapter.
Adapt(extractedPrint);
ANSITemplate fromIlosid = adapter.
Adapt(ilosid);
BinaryFile.WriteAll("output/template_from_ilosid.ansi", fromIlosid.getData());
ISOCCTemplateAdapter isoccAdapter = new ISOCCTemplateAdapter();
ISOCCTemplate isocc = isoccAdapter.
Adapt(extractedPrint);
ANSITemplate fromIsocc = adapter.
Adapt(isocc);
BinaryFile.WriteAll("output/template_from_isocc.ansi", fromIsocc.getData());
ISONCTemplateAdapter isoncAdapter = new ISONCTemplateAdapter();
ISONCTemplate isonc = isoncAdapter.
Adapt(extractedPrint);
ANSITemplate fromIsonc = adapter.
Adapt(isonc);
BinaryFile.WriteAll("output/template_from_isonc.ansi", fromIsonc.getData());
-
csharp
var img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
var extractor = new ICSExtractor();
var extractedPrint =
var adapter = new ANSITemplateAdapter();
var fromIcs = adapter.Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.ansi", fromIcs.data);
var fromIso = adapter.Adapt(extractedPrint.ToISO());
BinaryFile.WriteAll("output/template_from_iso.ansi", fromIso.data);
var ilosidAdapter = new ILOSIDTemplateAdapter();
var ilosid = ilosidAdapter.Adapt(extractedPrint);
var fromIlosid = adapter.Adapt(ilosid);
BinaryFile.WriteAll("output/template_from_ilosid.ansi", fromIlosid.data);
var isoccAdapter = new ISOCCTemplateAdapter();
var isocc = isoccAdapter.Adapt(extractedPrint);
var fromIsocc = adapter.Adapt(isocc);
BinaryFile.WriteAll("output/template_from_isocc.ansi", fromIsocc.data);
var isoncAdapter = new ISONCTemplateAdapter();
var isonc = isoncAdapter.Adapt(extractedPrint);
var fromIsonc = adapter.Adapt(isonc);
BinaryFile.WriteAll("output/template_from_isonc.ansi", fromIsonc.data);
ILO SID Template
International Labour Organisation Seafarers Identity Document template.
It is possible to convert ICSTemplate / ANSITemplate / ISOTemplate / ISONCTemplate / ISOCCTemplate to ILOSIDTemplate via ILOSIDTemplateAdapter.
-
c++
ICSExtractor extractor;
auto extractedPrint = extractor.
Extract(
const ILOSIDTemplateAdapter adapter;
auto fromIcs = adapter.
Adapt(*extractedPrint);
BinaryFile::WriteAll("output/template_from_ics.ilosid", fromIcs.GetData());
auto fromAnsi = adapter.
Adapt(*extractedPrint->ToANSI());
BinaryFile::WriteAll("output/template_from_ansi.ilosid", fromAnsi.GetData());
auto fromIso = adapter.
Adapt(*extractedPrint->ToISO());
BinaryFile::WriteAll("output/template_from_iso.ilosid", fromIso.GetData());
const ISONCTemplateAdapter isoncAdapter;
auto isonc = isoncAdapter.
Adapt(*extractedPrint);
auto fromIsonc = adapter.
Adapt(isonc);
BinaryFile::WriteAll("output/template_from_isonc.ilosid", fromIsonc.GetData());
const ISOCCTemplateAdapter isoccAdapter;
auto isocc = isoccAdapter.
Adapt(*extractedPrint);
auto fromIsocc = adapter.
Adapt(isocc);
BinaryFile::WriteAll("output/template_from_isocc.ilosid", fromIsocc.GetData());
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint extractedPrint = extractor.
Extract(
ILOSIDTemplateAdapter adapter = new ILOSIDTemplateAdapter();
ILOSIDTemplate fromIcs = adapter.
Adapt(extractedPrint);
BinaryFile.WriteAll(
"output/template_from_ics.ilosid", fromIcs.
GetData());
ILOSIDTemplate fromAnsi = adapter.
Adapt(extractedPrint.
ToANSI());
BinaryFile.WriteAll(
"output/template_from_ansi.ilosid", fromAnsi.
GetData());
ILOSIDTemplate fromIso = adapter.
Adapt(extractedPrint.
ToISO());
BinaryFile.WriteAll(
"output/template_from_iso.ilosid", fromIso.
GetData());
ISONCTemplateAdapter isoncAdapter = new ISONCTemplateAdapter();
ISONCTemplate isonc = isoncAdapter.
Adapt(extractedPrint);
ILOSIDTemplate fromIlosid = adapter.
Adapt(isonc);
BinaryFile.WriteAll(
"output/template_from_isonc.ilosid", fromIlosid.
GetData());
ISOCCTemplateAdapter isoccAdapter = new ISOCCTemplateAdapter();
ISOCCTemplate isocc = isoccAdapter.
Adapt(extractedPrint);
ILOSIDTemplate fromIsocc = adapter.
Adapt(isocc);
BinaryFile.WriteAll(
"output/template_from_isocc.ilosid", fromIsocc.
GetData());
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var extractor = new ICSExtractor();
var extractedPrint =
var adapter = new ILOSIDTemplateAdapter();
var fromIcs = adapter.Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.ilosid", fromIcs.GetData());
var fromAnsi = adapter.Adapt(extractedPrint.ToANSI());
BinaryFile.WriteAll("output/template_from_ansi.ilosid", fromAnsi.GetData());
var fromIso = adapter.Adapt(extractedPrint.ToISO());
BinaryFile.WriteAll("output/template_from_iso.ilosid", fromIso.GetData());
var isoncAdapter = new ISONCTemplateAdapter();
var isonc = isoncAdapter.Adapt(extractedPrint);
var fromIsonc = adapter.Adapt(isonc);
BinaryFile.WriteAll("output/template_from_isonc.ilosid", fromIsonc.GetData());
var isoccAdapter = new ISOCCTemplateAdapter();
var isocc = isoccAdapter.Adapt(extractedPrint);
var fromIsocc = adapter.Adapt(isocc);
BinaryFile.WriteAll("output/template_from_isocc.ilosid", fromIsocc.GetData());
ISO NC Template
ISO/IEC 19794-2:2005 template, template version 2.0, 5-byte format for minutiae (normal card encoding).
It is possible to convert ICSTemplate / ANSITemplate / ISOTemplate / ILOSIDTemplate / ISOCCTemplate to ISONCTemplate via ISONCTemplateAdapter.
-
c++
ICSExtractor extractor;
auto extractedPrint = extractor.
Extract(
const ISONCTemplateAdapter adapter;
auto fromIcs = adapter.
Adapt(*extractedPrint);
BinaryFile::WriteAll("output/template_from_ics.isonc", fromIcs.GetData());
auto fromAnsi = adapter.
Adapt(*extractedPrint->ToANSI());
BinaryFile::WriteAll("output/template_from_ansi.isonc", fromAnsi.GetData());
auto fromIso = adapter.
Adapt(*extractedPrint->ToISO());
BinaryFile::WriteAll("output/template_from_iso.isonc", fromIso.GetData());
const ILOSIDTemplateAdapter ilosidAdapter;
auto ilosid = ilosidAdapter.
Adapt(*extractedPrint);
auto fromIlosid = adapter.
Adapt(ilosid);
BinaryFile::WriteAll("output/template_from_ilosid.isonc", fromIlosid.GetData());
const ISOCCTemplateAdapter isoccAdapter;
auto isocc = isoccAdapter.
Adapt(*extractedPrint);
auto fromIsocc = adapter.
Adapt(isocc);
BinaryFile::WriteAll("output/template_from_isocc.isonc", fromIsocc.GetData());
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint extractedPrint = extractor.
Extract(
ISONCTemplateAdapter adapter = new ISONCTemplateAdapter();
ISONCTemplate fromIcs = adapter.
Adapt(extractedPrint);
BinaryFile.WriteAll(
"output/template_from_ics.isonc", fromIcs.
GetData());
ISONCTemplate fromAnsi = adapter.
Adapt(extractedPrint.
ToANSI());
BinaryFile.WriteAll(
"output/template_from_ansi.isonc", fromAnsi.
GetData());
ISONCTemplate fromIso = adapter.
Adapt(extractedPrint.
ToISO());
BinaryFile.WriteAll(
"output/template_from_iso.isonc", fromIso.
GetData());
ILOSIDTemplateAdapter ilosidAdapter = new ILOSIDTemplateAdapter();
ILOSIDTemplate ilosid = ilosidAdapter.
Adapt(extractedPrint);
ISONCTemplate fromIlosid = adapter.
Adapt(ilosid);
BinaryFile.WriteAll(
"output/template_from_ilosid.isonc", fromIlosid.
GetData());
ISOCCTemplateAdapter isoccAdapter = new ISOCCTemplateAdapter();
ISOCCTemplate isocc = isoccAdapter.
Adapt(extractedPrint);
ISONCTemplate fromIsocc = adapter.
Adapt(isocc);
BinaryFile.WriteAll(
"output/template_from_isocc.isonc", fromIsocc.
GetData());
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var extractor = new ICSExtractor();
var extractedPrint =
var adapter = new ISONCTemplateAdapter();
var fromIcs = adapter.Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.isonc", fromIcs.GetData());
var fromAnsi = adapter.Adapt(extractedPrint.ToANSI());
BinaryFile.WriteAll("output/template_from_ansi.isonc", fromAnsi.GetData());
var fromIso = adapter.Adapt(extractedPrint.ToISO());
BinaryFile.WriteAll("output/template_from_iso.isonc", fromIso.GetData());
var ilosidAdapter = new ILOSIDTemplateAdapter();
var ilosid = ilosidAdapter.Adapt(extractedPrint);
var fromIlosid = adapter.Adapt(ilosid);
BinaryFile.WriteAll("output/template_from_ilosid.isonc", fromIlosid.GetData());
var isoccAdapter = new ISOCCTemplateAdapter();
var isocc = isoccAdapter.Adapt(extractedPrint);
var fromIsocc = adapter.Adapt(isocc);
BinaryFile.WriteAll("output/template_from_isocc.isonc", fromIsocc.GetData());
ISO CC Template
ISO/IEC 19794-2:2005 template, template version 2.0, 3-byte format for minutiae (compact card encoding).
It is possible to convert ICSTemplate / ANSITemplate / ISOTemplate / ILOSIDTemplate / ISONCTemplate to ISOCCTemplate via ISOCCTemplateAdapter.
-
c++
ICSExtractor extractor;
auto extractedPrint = extractor.
Extract(
const ISOCCTemplateAdapter adapter;
auto fromIcs = adapter.
Adapt(*extractedPrint);
BinaryFile::WriteAll("output/template_from_ics.isocc", fromIcs.GetData());
auto fromAnsi = adapter.
Adapt(*extractedPrint->ToANSI());
BinaryFile::WriteAll("output/template_from_ansi.isocc", fromAnsi.GetData());
auto fromIso = adapter.
Adapt(*extractedPrint->ToISO());
BinaryFile::WriteAll("output/template_from_iso.isocc", fromIso.GetData());
const ILOSIDTemplateAdapter ilosidAdapter;
auto ilosid = ilosidAdapter.
Adapt(*extractedPrint);
auto fromIlosid = adapter.
Adapt(ilosid);
BinaryFile::WriteAll("output/template_from_ilosid.isocc", fromIlosid.GetData());
const ISONCTemplateAdapter isoncAdapter;
auto isonc = isoncAdapter.
Adapt(*extractedPrint);
auto fromIsonc = adapter.
Adapt(isonc);
BinaryFile::WriteAll("output/template_from_isonc.isocc", fromIsonc.GetData());
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint extractedPrint = extractor.
Extract(
ISOCCTemplateAdapter adapter = new ISOCCTemplateAdapter();
ISOCCTemplate fromIcs = adapter.
Adapt(extractedPrint);
BinaryFile.WriteAll(
"output/template_from_ics.isocc", fromIcs.
GetData());
ISOCCTemplate fromAnsi = adapter.
Adapt(extractedPrint.
ToANSI());
BinaryFile.WriteAll(
"output/template_from_ansi.isocc", fromAnsi.
GetData());
ISOCCTemplate fromIso = adapter.
Adapt(extractedPrint.
ToISO());
BinaryFile.WriteAll(
"output/template_from_iso.isocc", fromIso.
GetData());
ILOSIDTemplateAdapter ilosidAdapter = new ILOSIDTemplateAdapter();
ILOSIDTemplate ilosid = ilosidAdapter.
Adapt(extractedPrint);
ISOCCTemplate fromIlosid = adapter.
Adapt(ilosid);
BinaryFile.WriteAll(
"output/template_from_ilosid.isocc", fromIlosid.
GetData());
ISONCTemplateAdapter isoncAdapter = new ISONCTemplateAdapter();
ISONCTemplate isonc = isoncAdapter.
Adapt(extractedPrint);
ISOCCTemplate fromIsonc = adapter.
Adapt(isonc);
BinaryFile.WriteAll(
"output/template_from_isonc.isocc", fromIsonc.
GetData());
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var extractor = new ICSExtractor();
var extractedPrint =
var adapter = new ISOCCTemplateAdapter();
var fromIcs = adapter.Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.isocc", fromIcs.GetData());
var fromAnsi = adapter.Adapt(extractedPrint.ToANSI());
BinaryFile.WriteAll("output/template_from_ansi.isocc", fromAnsi.GetData());
var fromIso = adapter.Adapt(extractedPrint.ToISO());
BinaryFile.WriteAll("output/template_from_iso.isocc", fromIso.GetData());
var ilosidAdapter = new ILOSIDTemplateAdapter();
var ilosid = ilosidAdapter.Adapt(extractedPrint);
var fromIlosid = adapter.Adapt(ilosid);
BinaryFile.WriteAll("output/template_from_ilosid.isocc", fromIlosid.GetData());
var isoncAdapter = new ISONCTemplateAdapter();
var isonc = isoncAdapter.Adapt(extractedPrint);
var fromIsonc = adapter.Adapt(isonc);
BinaryFile.WriteAll("output/template_from_isonc.isocc", fromIsonc.GetData());
It is possible to limit and modify minutiae order in ISOCCTemplate.
-
c++
ICSExtractor extractor;
auto extractedPrint = extractor.
Extract(
const ISOCCTemplateAdapter adapter(5,
auto fromIcs = adapter.
Adapt(*extractedPrint);
BinaryFile::WriteAll("output/template_from_ics.limited_isocc", fromIcs.GetData());
-
java
Image img = Image.
Decode(BinaryFile.ReadAll(
"assets/finger.png"));
ICSExtractor extractor = new ICSExtractor();
ExtractedPrint extractedPrint = extractor.
Extract(
ISOCCTemplateAdapter adapter = new ISOCCTemplateAdapter(5,
ISOCCTemplateAdapter.MinutiaSortOrder.X_ASC,
ISOCCTemplateAdapter.MinutiaSortOrder.NONE);
ISOCCTemplate fromIcs = adapter.
Adapt(extractedPrint);
BinaryFile.WriteAll(
"output/template_from_ics.limited_isocc", fromIcs.
GetData());
-
csharp
var img = Image.Decode(BinaryFile.ReadAll("assets/finger.png"));
var extractor = new ICSExtractor();
var extractedPrint =
var adapter =
new ISOCCTemplateAdapter(5, ISOCCTemplateAdapter.MinutiaSortOrder.X_ASC,
ISOCCTemplateAdapter.MinutiaSortOrder.NONE);
var fromIcs = adapter.Adapt(extractedPrint);
BinaryFile.WriteAll("output/template_from_ics.limited_isocc", fromIcs.GetData());
Load template
It is possible to load previously created template to make e.g. verification against enrolling Applicant.
-
c++
auto tmpl = ICSTemplate(BinaryFile::ReadAll("assets/template.ics"));
std::cout << " ICS template version: " << tmpl.GetVersion() << std::endl;
auto tmplFromIDkit =
ICSTemplate(BinaryFile::ReadAll("assets/idkit_template.ics"));
std::cout << " IDKit ICS template version: " << tmplFromIDkit.GetVersion()
<< std::endl;
-
java
ICSTemplate tmpl = new ICSTemplate(BinaryFile.ReadAll("assets/template.ics"));
System.out.println(
" ICS template version: " + tmpl.
GetVersion());
ICSTemplate tmplFromIDkit = new ICSTemplate(
BinaryFile.ReadAll("assets/idkit_template.ics"));
System.out.println(
" IDKit ICS template version: " + tmplFromIDkit.
GetVersion());
-
csharp
ICSTemplate tmpl = new ICSTemplate(BinaryFile.ReadAll("assets/template.ics"));
Console.WriteLine(
" ICS template version: " + tmpl.
GetVersion());
ICSTemplate tmplFromIDkit =
new ICSTemplate(BinaryFile.ReadAll("assets/idkit_template.ics"));
Console.WriteLine(
" IDKit ICS template version: " + tmplFromIDkit.
GetVersion());