|
public static int CompareFace(string cardImgPath, Bitmap imgCamTmp)
{
byte[] faceCard_bytes = new byte[720 * 576 * 3];
int faceCard_width = 0, faceCard_height = 0;
byte[] faceCard_feature = new byte[face_feature_size];
FaceDetectResult faceDetectResult_card = new FaceDetectResult();
Bitmap imgCam = new Bitmap(imgCamTmp);
byte[] faceCam_bytes = Util.getDataFromBitmap(imgCam);
int faceCam_width = imgCam.Width;
int faceCam_height = imgCam.Height;
byte[] faceCam_feature = new byte[face_feature_size];
FaceDetectResult faceDetectResult_Cam = new FaceDetectResult();
//读取***照片
int res = res = SynFaceUtil.ReadImageFromFile(cardImgPath, faceCard_bytes, 720 * 576 * 3, ref faceCard_width, ref faceCard_height, 24);
if (res != 0)
{
//***照片解析错误
return -101;
}
//获取***照片特征值
res = SynFaceUtil.SynFaceFaceFeature(faceCard_bytes, faceCard_width, faceCard_height, 1, ref faceDetectResult_card, faceCard_feature);
switch (res)
|
|