void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DetectionModel))
            {
                LogError("owner is not initialized. Add Action \"newDetectionModel\".");
                return;
            }
            OpenCVForUnity.DnnModule.DetectionModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DetectionModel, OpenCVForUnity.DnnModule.DetectionModel>(owner);

            storeResult.Value = wrapped_owner.getNmsAcrossClasses();

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DetectionModel))
            {
                LogError("owner is not initialized. Add Action \"newDetectionModel\".");
                return;
            }
            OpenCVForUnity.DnnModule.DetectionModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DetectionModel, OpenCVForUnity.DnnModule.DetectionModel>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.DetectionModel))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.DetectionModel();
            }
            ((OpenCVForUnityPlayMakerActions.DetectionModel)storeResult.Value).wrappedObject = wrapped_owner.setNmsAcrossClasses(value.Value);
        }
示例#3
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DetectionModel))
            {
                LogError("owner is not initialized. Add Action \"newDetectionModel\".");
                return;
            }
            OpenCVForUnity.DnnModule.DetectionModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DetectionModel, OpenCVForUnity.DnnModule.DetectionModel>(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 (!(classIds.Value is OpenCVForUnityPlayMakerActions.MatOfInt))
            {
                LogError("classIds is not initialized. Add Action \"newMatOfInt\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfInt wrapped_classIds = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(classIds);

            if (!(confidences.Value is OpenCVForUnityPlayMakerActions.MatOfFloat))
            {
                LogError("confidences is not initialized. Add Action \"newMatOfFloat\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfFloat wrapped_confidences = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(confidences);

            if (!(boxes.Value is OpenCVForUnityPlayMakerActions.MatOfRect))
            {
                LogError("boxes is not initialized. Add Action \"newMatOfRect\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfRect wrapped_boxes = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect, OpenCVForUnity.CoreModule.MatOfRect>(boxes);

            wrapped_owner.detect(wrapped_frame, wrapped_classIds, wrapped_confidences, wrapped_boxes, confThreshold.Value, nmsThreshold.Value);
        }
示例#4
0
 public DetectionModel(OpenCVForUnity.DnnModule.DetectionModel nativeObj) : base(nativeObj)
 {
 }