コード例 #1
0
 private static CompositeTemplate CreateTemplateFromImages(IDSolRequestType request)
 {
     CompositeTemplate compositeTemplate = new CompositeTemplate();
       compositeTemplate.DataType = EBiometricDataType.Raw;
       for (int index = 0; index < request.FingerPrint.Length; ++index)
       {
     FingerprintTemplate fingerprintTemplate = new FingerprintTemplate();
     fingerprintTemplate.DataType = EBiometricDataType.Raw;
     fingerprintTemplate.Finger = IMSUtil.GetFingerByNumber(request.FingerPrint[index].FingerPosition.Value);
     GenericIdentifier genericIdentifier = new GenericIdentifier();
     byte[] afisReadyBmp = ImageUtil.GetAFISReadyBMP(request.FingerPrint[index].FingerPrintImage);
     genericIdentifier.RawData = afisReadyBmp;
     genericIdentifier.IdentType = new IdentifierType();
     genericIdentifier.IdentType.Type = EBiometricIdentifierType.FingerPrint;
     fingerprintTemplate.Identifier = (IIdentifier) genericIdentifier;
     compositeTemplate.Collection.Add((object) fingerprintTemplate);
       }
       if (request.FaceImage != null)
       {
     IMSUtil.log.Info("Face Image Is Not Null");
     FacialTemplate facialTemplate = new FacialTemplate();
     facialTemplate.DataType = EBiometricDataType.Raw;
     GenericIdentifier genericIdentifier = new GenericIdentifier();
     genericIdentifier.IdentType = new IdentifierType(EBiometricIdentifierType.FacialFeatures);
     genericIdentifier.RawData = request.FaceImage;
     facialTemplate.Identifier = (IIdentifier) genericIdentifier;
     compositeTemplate.Collection.Add((object) facialTemplate);
       }
       return compositeTemplate;
 }
コード例 #2
0
 private static FacialTemplate CreateFaceTemplateFromImage(IDSolRequestType request)
 {
     FacialTemplate facialTemplate = new FacialTemplate();
       facialTemplate.DataType = EBiometricDataType.Raw;
       GenericIdentifier genericIdentifier = new GenericIdentifier();
       genericIdentifier.IdentType = new IdentifierType(EBiometricIdentifierType.FacialFeatures);
       genericIdentifier.RawData = request.FaceImage;
       return facialTemplate;
 }