void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.FaceRecognizerSF)) { LogError("owner is not initialized. Add Action \"newFaceRecognizerSF\"."); return; } OpenCVForUnity.ObjdetectModule.FaceRecognizerSF wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.FaceRecognizerSF, OpenCVForUnity.ObjdetectModule.FaceRecognizerSF>(owner); if (!(src_img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("src_img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_src_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(src_img); if (!(face_box.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("face_box is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_face_box = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(face_box); if (!(aligned_img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("aligned_img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_aligned_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(aligned_img); wrapped_owner.alignCrop(wrapped_src_img, wrapped_face_box, wrapped_aligned_img); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.FaceRecognizerSF)) { LogError("owner is not initialized. Add Action \"newFaceRecognizerSF\"."); return; } OpenCVForUnity.ObjdetectModule.FaceRecognizerSF wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.FaceRecognizerSF, OpenCVForUnity.ObjdetectModule.FaceRecognizerSF>(owner); if (!(face_feature1.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("face_feature1 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_face_feature1 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(face_feature1); if (!(face_feature2.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("face_feature2 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_face_feature2 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(face_feature2); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Double)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.Double(); } ((OpenCVForUnityPlayMakerActions.Double)storeResult.Value).wrappedObject = wrapped_owner.match(wrapped_face_feature1, wrapped_face_feature2, dis_type.Value); }
public FaceRecognizerSF(OpenCVForUnity.ObjdetectModule.FaceRecognizerSF nativeObj) : base(nativeObj) { }