void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Model)) { LogError("owner is not initialized. Add Action \"newModel\"."); return; } OpenCVForUnity.DnnModule.Model wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Model, OpenCVForUnity.DnnModule.Model>(owner); 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); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Model)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.Model(); } ((OpenCVForUnityPlayMakerActions.Model)storeResult.Value).wrappedObject = wrapped_owner.setInputMean(wrapped_mean); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Model)) { LogError("owner is not initialized. Add Action \"newModel\"."); return; } OpenCVForUnity.DnnModule.Model wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Model, OpenCVForUnity.DnnModule.Model>(owner); if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Model)) { storeResult.Value = new OpenCVForUnityPlayMakerActions.Model(); } ((OpenCVForUnityPlayMakerActions.Model)storeResult.Value).wrappedObject = wrapped_owner.setInputMean(new OpenCVForUnity.CoreModule.Scalar((double)mean_v0.Value, (double)mean_v1.Value, (double)mean_v2.Value, (double)mean_v3.Value)); }