void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.GridBoard)) { LogError("owner is not initialized. Add Action \"newGridBoard\"."); return; } OpenCVForUnity.ArucoModule.GridBoard wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.GridBoard, OpenCVForUnity.ArucoModule.GridBoard>(owner); if (!(outSize.Value is OpenCVForUnityPlayMakerActions.Size)) { LogError("outSize is not initialized. Add Action \"newSize\"."); return; } OpenCVForUnity.CoreModule.Size wrapped_outSize = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(outSize); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); wrapped_owner.draw(wrapped_outSize, wrapped_img); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.GridBoard)) { LogError("owner is not initialized. Add Action \"newGridBoard\"."); return; } OpenCVForUnity.ArucoModule.GridBoard wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.GridBoard, OpenCVForUnity.ArucoModule.GridBoard>(owner); if (!(img.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("img is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_img = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(img); wrapped_owner.draw(new OpenCVForUnity.CoreModule.Size((double)outSize_width.Value, (double)outSize_height.Value), wrapped_img, marginSize.Value, borderBits.Value); }