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);
        }
示例#2
0
        /**
         * Create a GridBoard object
         *
         * param markersX number of markers in X direction
         * param markersY number of markers in Y direction
         * param markerLength marker side length (normally in meters)
         * param markerSeparation separation between two markers (same unit as markerLength)
         * param dictionary dictionary of markers indicating the type of markers
         * return the output GridBoard object
         *
         * This functions creates a GridBoard object given the number of markers in each direction and
         * the marker size and marker separation.
         */
        public static GridBoard create(int markersX, int markersY, float markerLength, float markerSeparation, Dictionary dictionary)
        {
            if (dictionary != null)
            {
                dictionary.ThrowIfDisposed();
            }

            return(GridBoard.__fromPtr__(aruco_GridBoard_create_11(markersX, markersY, markerLength, markerSeparation, dictionary.getNativeObjAddr())));
        }
        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);

            storeResult.Value = wrapped_owner.getMarkerSeparation();
        }
示例#4
0
        //javadoc: GridBoard::create(markersX, markersY, markerLength, markerSeparation, dictionary)
        public static GridBoard create(int markersX, int markersY, float markerLength, float markerSeparation, Dictionary dictionary)
        {
            if (dictionary != null)
            {
                dictionary.ThrowIfDisposed();
            }
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            GridBoard retVal = GridBoard.__fromPtr__(aruco_GridBoard_create_11(markersX, markersY, markerLength, markerSeparation, dictionary.getNativeObjAddr()));

            return(retVal);
#else
            return(null);
#endif
        }
        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);
        }
示例#6
0
 public GridBoard(OpenCVForUnity.ArucoModule.GridBoard nativeObj) : base(nativeObj)
 {
 }