void DoProcess() { if (!(imgMat.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("imgMat is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_imgMat = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat> (imgMat); if (!(color.Value is OpenCVForUnityPlayMakerActions.Scalar)) { LogError("color is not initialized. Add Action \"newScalar\"."); return; } OpenCVForUnity.CoreModule.Scalar wrapped_color = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Scalar, OpenCVForUnity.CoreModule.Scalar> (color); List <UnityEngine.Vector2> wrapped_points = new List <UnityEngine.Vector2> (points.Length); for (int i = 0; i < points.Length; i++) { wrapped_points.Add((Vector2)points.Get(i)); } OpenCVForUnityUtils.DrawFaceLandmark(wrapped_imgMat, wrapped_points, wrapped_color, thickness.Value); }
void DoProcess () { if (!(imgMat.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError ("imgMat is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_imgMat = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat> (imgMat); if (!(color.Value is OpenCVForUnityPlayMakerActions.Scalar)) { LogError ("color is not initialized. Add Action \"newScalar\"."); return; } OpenCVForUnity.CoreModule.Scalar wrapped_color = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject<OpenCVForUnityPlayMakerActions.Scalar, OpenCVForUnity.CoreModule.Scalar> (color); OpenCVForUnityUtils.DrawFaceRect (wrapped_imgMat, rect.Value, wrapped_color, thickness.Value); }