void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(blob.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("blob is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_blob = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(blob); if (!(scalefactor.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("scalefactor is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_scalefactor = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(scalefactor); if (!(mean.Value is OpenCVForUnityPlayMakerActions.Scalar)) { LogError("mean is not initialized. Add Action \"newScalar\"."); return; } OpenCVForUnity.CoreModule.Scalar wrapped_mean = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Scalar, OpenCVForUnity.CoreModule.Scalar>(mean); wrapped_owner.setInput(wrapped_blob, name.Value, wrapped_scalefactor, wrapped_mean); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(blob.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("blob is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_blob = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(blob); wrapped_owner.setInput(wrapped_blob); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(blob.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("blob is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_blob = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(blob); wrapped_owner.setInput(wrapped_blob, name.Value, (float)scalefactor.Value, new OpenCVForUnity.CoreModule.Scalar((double)mean_v0.Value, (double)mean_v1.Value, (double)mean_v2.Value, (double)mean_v3.Value)); }