Enrollment 28.2.0
Loading...
Searching...
No Matches

It holds all functions and data related to print manipulation. More...

#include <PrintCapture.h>

Collaboration diagram for PrintCapture:

Public Member Functions

std::shared_ptr< PrintCapture > ChangeDpiTo (ImageDpi targetDpi) const
 Create new PrintCapture with given DPI.
std::shared_ptr< PrintCapture > ChangeDpiTo (const Image::ImageResampler &resampler) const
 Create new PrintCapture using provided DPI-change configuration.
virtual std::vector< std::shared_ptr< PrintSegment > > SegmentWith (PrintCaptureSegmentation &detector)
 It segments print capture.
std::shared_ptr< Image > CropPrint (const Rectangle &rectangle, const PrintCropConfiguration &cfg) const final
 It crops image with given rectangle and background color.
std::shared_ptr< Image > CropPrint (const Rectangle &rectangle) const
 It crops image with given rectangle by default PrintCropConfiguration.
std::shared_ptr< Image > Draw (const std::vector< std::shared_ptr< PrintSegment > > &segments, const ImageShapeAttributes &attr) const
 It draws rounding boxes into PrintCapture.
void WriteTo (Writer &writer) const final
 Function serializes print via provided Writer.
uint8_t CalculateIntensity ()
 Function calculates the image intensity.

Static Public Member Functions

static std::shared_ptr< PrintCapture > Create (std::shared_ptr< Image > img, const PrintAttributes &pa=PrintAttributes(), std::shared_ptr< PrintExecutor > executor=GlobalPrintExecutor::Get())
 Constructor of PrintCapture.

Public Attributes

const std::shared_ptr< Image > image
 Provides PrintCapture Image.
const PrintAttributes printAttributes
 Provides PrintCapture Image.

Detailed Description

It holds all functions and data related to print manipulation.

See Description with examples.

Member Function Documentation

◆ CalculateIntensity()

uint8_t CalculateIntensity ( )
inline

Function calculates the image intensity.

The intensity value is low for dry fingerprints (and for low pressure prints) and high for wet fingerprints (or for high pressure prints).

Returns
image intensity in range 0 (lowest intensity, dry finger, low pressure) to 100 (highest intensity, wet finger, high pressure)
Exceptions
EnrollmentExceptionwhen fails to calculate intensity

References Print::CalculateIntensity(), and image.

Here is the call graph for this function:

◆ ChangeDpiTo() [1/2]

std::shared_ptr< PrintCapture > ChangeDpiTo ( const Image::ImageResampler & resampler) const
inlinenodiscard

Create new PrintCapture using provided DPI-change configuration.

It creates new print with changed image dpi by function Image::ChangeDpiTo() and with same attributes using a DPI-change configuration.

Parameters
resamplerimage resampler
Returns
print capture with given DPI
Exceptions
ImageExceptionwhen there is an processing error
EnrollmentInvalidArgumentExceptionwhen resize algorithm is NIST and print capture image is not single-channel grayscale

References Create(), image, and printAttributes.

Here is the call graph for this function:

◆ ChangeDpiTo() [2/2]

std::shared_ptr< PrintCapture > ChangeDpiTo ( ImageDpi targetDpi) const
inlinenodiscard

Create new PrintCapture with given DPI.

It creates new print with changed image dpi by function Image::ChangeDpiTo() and with same position and attributes. The function uses Standard resizing algorithm. See BicubicImageResampler.

Parameters
targetDpiDPI of new print.
Returns
print with target DPI
Exceptions
ImageExceptionwhen it is not possible to change image DPI
EnrollmentInvalidArgumentExceptionwhen targetDpi is 0

References ChangeDpiTo().

Referenced by ChangeDpiTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Create()

std::shared_ptr< PrintCapture > Create ( std::shared_ptr< Image > img,
const PrintAttributes & pa = PrintAttributes(),
std::shared_ptr< PrintExecutor > executor = GlobalPrintExecutor::Get() )
inlinestatic

Constructor of PrintCapture.

Parameters
imgprint image, can contain one or more fingerprints to segment
paoptional PrintAttributes
executorPrintExecutor to use for PrintCapture functionality execution
Exceptions
NullArgumentExceptionwhen image is null
Returns
created PrintCapture object

References GlobalPrintExecutor::Get().

Referenced by ChangeDpiTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CropPrint() [1/2]

std::shared_ptr< Image > CropPrint ( const Rectangle & rectangle) const
inlinenodiscard

It crops image with given rectangle by default PrintCropConfiguration.

Parameters
rectangleRectangle to be cropped
Returns
cropped Image

References CropPrint().

Here is the call graph for this function:

◆ CropPrint() [2/2]

std::shared_ptr< Image > CropPrint ( const Rectangle & rectangle,
const PrintCropConfiguration & cfg ) const
inlinenodiscardfinal

It crops image with given rectangle and background color.

Parameters
rectangleRectangle to be cropped
cfgconfiguration of print cropping
Returns
Image cropped image

References image.

Referenced by CropPrint().

Here is the caller graph for this function:

◆ Draw()

std::shared_ptr< Image > Draw ( const std::vector< std::shared_ptr< PrintSegment > > & segments,
const ImageShapeAttributes & attr ) const
inline

It draws rounding boxes into PrintCapture.

Parameters
segmentsdetected segments
attrImageShapeAttributes of rounding boxes
Returns
Image with drawn rounding boxes

References image.

◆ SegmentWith()

virtual std::vector< std::shared_ptr< PrintSegment > > SegmentWith ( PrintCaptureSegmentation & detector)
inlinevirtual

It segments print capture.

It uses PrintDetector::Segment function to find print segments. It always returns segments without position. The user MUST assign position to segment via function PrintSegment::SetPosition to be possible to transform PrintSegment into Print.

Parameters
detectorPrintDetector to detect PrintSegments in PrintCapture
Returns
detected print segments
Exceptions
EnrollmentExceptionfrom PrintDetector

Reimplemented in SlapCapture, and ThumbsCapture.

Referenced by SlapCapture::SegmentWith(), and ThumbsCapture::SegmentWith().

Here is the caller graph for this function:

◆ WriteTo()

void WriteTo ( Writer & writer) const
inlinefinalvirtual

Function serializes print via provided Writer.

Parameters
writerused to serialize PrintCapture.

Implements Serializable.

References image, and printAttributes.


The documentation for this class was generated from the following file: