DocSDK  2.4.1
docsdk::LivenessPipelineResult Struct Reference

Liveness pipeline result. More...

#include <liveness_pipeline.h>

Data Structures

struct  Value
 Document liveness check result. More...
 

Public Types

enum  ValidationStatusCode {
  ValidationStatusCode::kOk, ValidationStatusCode::kDocumentTooCloseToCamera, ValidationStatusCode::kDocumentTooCloseToBorder, ValidationStatusCode::kDocumentCropped,
  ValidationStatusCode::kDocumentNotFound, ValidationStatusCode::kDocumentTooSmall, ValidationStatusCode::kTooManyDocuments, ValidationStatusCode::kDocumentIsColorless,
  ValidationStatusCode::kDocumentPhotoNotFound
}
 Image validation status code (image validation is performed beforehand each liveness check) More...
 
enum  ImageQualityWarning {
  ImageQualityWarning::kRelativeDocumentSizeLowerThan10Percent, ImageQualityWarning::kDocumentBordersOutsideOfFrame, ImageQualityWarning::kMultipleDocumentsInFrame, ImageQualityWarning::kDocumentTooCloseToBorder,
  ImageQualityWarning::kImageTooBlurry, ImageQualityWarning::kImageTooCompressed, ImageQualityWarning::kPoorImageExposure, ImageQualityWarning::kGlareOnImage
}
 Image quality warning (image quality check is performed along with liveness check) More...
 

Public Member Functions

 LivenessPipelineResult ()=default
 
 LivenessPipelineResult (ValidationStatusCode status_code)
 
 LivenessPipelineResult (Value value)
 
const ValueGetValue () const
 
const ValidationStatusCodeGetStatusCode () const noexcept
 
bool Ok () const noexcept
 

Friends

std::ostream & operator<< (std::ostream &os, const LivenessPipelineResult &result)
 

Detailed Description

Liveness pipeline result.

Member Enumeration Documentation

◆ ImageQualityWarning

Image quality warning (image quality check is performed along with liveness check)

Enumerator
kRelativeDocumentSizeLowerThan10Percent 

Document size (area) is lower than 10% of the frame size

kDocumentBordersOutsideOfFrame 

Document border(s) are outside of the frame, corresponds to ValidationStatusCode::kDocumentCropped

kMultipleDocumentsInFrame 

More than one document are present in the frame, corresponds to ValidationStatusCode::kTooManyDocuments

kDocumentTooCloseToBorder 

Document is too close to the frame border

kImageTooBlurry 

Image is too blurry

kImageTooCompressed 

Image is too compressed

kPoorImageExposure 

Image is either too bright or too dark

kGlareOnImage 

Image has glare

◆ ValidationStatusCode

Image validation status code (image validation is performed beforehand each liveness check)

Enumerator
kOk 

Validation successful

kDocumentTooCloseToCamera 

Document is too close to the camera

kDocumentTooCloseToBorder 

Document is too close to the image border

kDocumentCropped 

Document is cropped (part of the document is not present in the image), corresponds to ImageQualityWarning::kDocumentBordersOutsideOfFrame

kDocumentNotFound 

Document is not detected in the image

kDocumentTooSmall 

Document size in the image is too small

kTooManyDocuments 

Too many documents were detected in the image, corresponds to ImageQualityWarning::kMultipleDocumentsInFrame

kDocumentIsColorless 

Document is colorless (black and white)

kDocumentPhotoNotFound 

Document photo is not detected in the image

Constructor & Destructor Documentation

◆ LivenessPipelineResult() [1/3]

docsdk::LivenessPipelineResult::LivenessPipelineResult ( )
default

◆ LivenessPipelineResult() [2/3]

docsdk::LivenessPipelineResult::LivenessPipelineResult ( ValidationStatusCode  status_code)
inlineexplicit

◆ LivenessPipelineResult() [3/3]

docsdk::LivenessPipelineResult::LivenessPipelineResult ( Value  value)
inlineexplicit

Member Function Documentation

◆ GetStatusCode()

const ValidationStatusCode& docsdk::LivenessPipelineResult::GetStatusCode ( ) const
inlinenoexcept

Returns validation status code.

Returns
Validation status code

◆ GetValue()

const Value& docsdk::LivenessPipelineResult::GetValue ( ) const
inline

Returns document liveness checking result if validation was successful. Otherwise, throws an exception.

Returns
Liveness checking result
Exceptions
std::runtime_error

◆ Ok()

bool docsdk::LivenessPipelineResult::Ok ( ) const
inlinenoexcept

Returns a binary value indicated whether the validation was successful.

Returns
True if validation was successful, false otherwise

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const LivenessPipelineResult result 
)
friend

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