void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.SegmentationModel)) { LogError("owner is not initialized. Add Action \"newSegmentationModel\"."); return; } OpenCVForUnity.DnnModule.SegmentationModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.SegmentationModel, OpenCVForUnity.DnnModule.SegmentationModel>(owner); if (!(frame.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("frame is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_frame = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(frame); if (!(mask.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("mask is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_mask = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(mask); wrapped_owner.segment(wrapped_frame, wrapped_mask); }
public SegmentationModel(OpenCVForUnity.DnnModule.SegmentationModel nativeObj) : base(nativeObj) { }