PVerify Class Reference

Detailed Description

The PVerify class is a Face Recognition helper class which allows for easy verification/authentication of faces from descriptions, images and videos.

Verification is the process which determines whether two identities are the same. To perform verification two descriptions of the two identities to be verified are required. These descriptions have been generated from a collection of images and/or videos of that identity. The two descriptions are passed to a comparer which knows how to compare the information held in the descriptions. The comparer returns a match result which gives a probability between 0 and 1 on how likely the two descriptions belong to the same identity, with the higher the score being the more probable. In addition a threshold level can be set. If the match-score is higher than (or equal to) the threshold then the identities are said to be verified (or authenticated). The threshold can be set to pre-determined levels, or manually set. This is typically set depending on your intended application.

This verification class is simply a wrapper for some of the other functions in the SDK. It enables you to quickly perform verification using a set of descriptions, images, image files and video files. It will not necessarily fulfill all use-cases but gives a good example of how verification can be performed.

Definition at line 62 of file PVerify.h.

#include <PVerify.h>

Constructor & Destructor Documentation

◆ PVerify() [1/3]

PVerify::PVerify ( )

Constructs an empty verification object.

◆ PVerify() [2/3]

PVerify::PVerify ( const PEnrollment enrollment,
EVerificationSecurityLevel  securityLevel = E_VERIFICATION_SECURITY_LEVEL_HIGH,
double  threshold = -1.0 
)

To use this verification class you need to construct it with a valid enrollment engine.

You can specify which security level to use which assigns a pre-determined threshold. The higher the security level the higher the threshold. You can also specify a manual security setting where you can supply your own threshold level.

◆ PVerify() [3/3]

PVerify::PVerify ( const PVerify other)

Constructs a shared copy of other.

◆ ~PVerify()

virtual PVerify::~PVerify ( )
virtual

Destroys this object.

Member Function Documentation

◆ GetSecurityLevel()

EVerificationSecurityLevel PVerify::GetSecurityLevel ( double &  threshold) const

Gets the current security level and corresponding threshold level.

◆ IsConfigured()

bool PVerify::IsConfigured ( ) const

Returns true if this verifier is configured and ready to be used, false otherwise.

◆ operator=()

PVerify& PVerify::operator= ( const PVerify other)

Performs a shared copy of other to this object.

◆ SetSecurityLevel()

PResult PVerify::SetSecurityLevel ( EVerificationSecurityLevel  securityLevel,
double  threshold = -1.0 
)

Sets the desired security level.

If a manual security level is set, then you need to specify a threshold between 0 and 1. If the value is outside this range an error is returned.

If a pre-defined security level is set then the threshold value is ignored. There are currently three pre-determined security levels (computed on ISO data set). The values of the threshold have been calculated by experiments in our labs. Pre-determined thresholds can be found here: Threshold Levels.

◆ VerifyFromDescription()

PResult PVerify::VerifyFromDescription ( const PDescription description1,
const PDescription description2,
PMatchScore matchScore 
) const

This function matches two descriptions and returns the match score.

Returns PResult::C_OK if success, another result otherwise.

◆ VerifyFromDescriptionFile()

PResult PVerify::VerifyFromDescriptionFile ( const PString descriptionFile1,
const PString descriptionFile2,
PMatchScore matchScore 
) const

Loads in two descriptions from file, matches them and returns the match score.

Returns PResult::C_OK if success, another result otherwise.

◆ VerifyFromImage()

PResult PVerify::VerifyFromImage ( const PImage image1,
const PImage image2,
PMatchScore matchScore,
PDescription outputDescription1,
PDescription outputDescription2 
) const

Detects the faces in each of the two images and then compares them.

It returns a match score and the two descriptions that were generated.

Assumes there is only 1 subject in both the images; returns an error otherwise. Returns PResult::C_OK if success, another result otherwise.

◆ VerifyFromImageFile()

PResult PVerify::VerifyFromImageFile ( const PString imageFilename1,
const PString imageFilename2,
PMatchScore matchScore,
PDescription outputDescription1,
PDescription outputDescription2 
) const

Detects the faces in each of the two images and then compares them.

It returns a match score and the two descriptions that were generated.

Assumes there is only 1 subject in the image; returns an error otherwise. Returns PResult::C_OK if success, another result otherwise.

◆ VerifyFromVideoFile()

PResult PVerify::VerifyFromVideoFile ( const PDescription description,
const PString videoFilename,
PMatchScore matchScore,
PDescription outputDescription,
papillon::int32  maxFrames = -1,
papillon::int32  maxExamples = 5 
) const

Loads in the specified video-file and runs through each frame detecting faces.

When either maxFrames or maxExamples has been reached, the faces are compared to the input description and a match score returned. The description generated on the video is also returned.

Note, this routine can be dangerous as all the faces in the input video are assumed to come from one subject. If you know this is not the case you should be using the FaceLog2 analytic which uses a tracker.

Returns PResult::C_OK if success, another result otherwise.