C# EKYC Example

Initialize EKYC module

using OneML.Face;
EKYC ekyc = new EKYC();

Initialize EKYC module with licensing

using OneML.Face;
LicenseManager licenseManager = new LicenseManager();
licenseManager.SetKey("LICENSE_KEY_VALUE_HERE");
licenseManager.ActivateKey();
EKYC ekyc = new EKYC(licenseManager);

Initialize oneML’s Utils

Utils utils = new Utils();

Initialize oneML’s Utils with licensing

Utils utils = new Utils(licenseManager);

Read input as oneML’s Image

Image image1 = utils.ReadImageCV(path1);
Image image2 = utils.ReadImageCV(path2);

Run the module

// run both image blur check and face pad check
EKYCOps ops = new EKYCOps(true);
EKYCResult result = ekyc.Run(image1, image2, ops, ops);

And get the output

BBoxList boxes = result.GetBBoxes();
FloatList scores = result.GetBBoxScores();
Landmark5List landmarks = result.GetLandmarks();
FacePoseList poses = result.GetFacePoses();
int status = result.GetReturnStatus();
bool same = result.IsSamePerson();
float distance = result.GetDistance();

Cleanup

ekyc.Dispose();
utils.Dispose();

or wrap the application with

using (EKYC ekyc = new EKYC())
{
// use ekyc here
}