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

            if (!(pt.Value is OpenCVForUnityPlayMakerActions.Point))
            {
                LogError("pt is not initialized. Add Action \"newPoint\".");
                return;
            }
            OpenCVForUnity.CoreModule.Point wrapped_pt = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(pt);

            if (!(nearestPt.Value is OpenCVForUnityPlayMakerActions.Point))
            {
                LogError("nearestPt is not initialized. Add Action \"newPoint\".");
                return;
            }
            OpenCVForUnity.CoreModule.Point wrapped_nearestPt = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(nearestPt);

            storeResult.Value = wrapped_owner.findNearest(wrapped_pt, wrapped_nearestPt);
        }
コード例 #2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(idx.Value is OpenCVForUnityPlayMakerActions.MatOfInt))
            {
                LogError("idx is not initialized. Add Action \"newMatOfInt\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfInt wrapped_idx = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(idx);

            List <OpenCVForUnity.CoreModule.MatOfPoint2f> wrapped_facetList = new List <OpenCVForUnity.CoreModule.MatOfPoint2f>();

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.MatOfPoint2f, OpenCVForUnity.CoreModule.MatOfPoint2f>(facetList, wrapped_facetList);

            if (!(facetCenters.Value is OpenCVForUnityPlayMakerActions.MatOfPoint2f))
            {
                LogError("facetCenters is not initialized. Add Action \"newMatOfPoint2f\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfPoint2f wrapped_facetCenters = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint2f, OpenCVForUnity.CoreModule.MatOfPoint2f>(facetCenters);

            wrapped_owner.getVoronoiFacetList(wrapped_idx, wrapped_facetList, wrapped_facetCenters);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.MatOfPoint2f, OpenCVForUnityPlayMakerActions.MatOfPoint2f>(wrapped_facetList, facetList);
        }
コード例 #3
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            int[] int_firstEdge    = firstEdge.intValues;
            int[] casted_firstEdge = new int[int_firstEdge.Length];
            for (int i = 0; i < casted_firstEdge.Length; i++)
            {
                casted_firstEdge[i] = (int)int_firstEdge[i];
            }

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Point))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Point();
            }
            ((OpenCVForUnityPlayMakerActions.Point)storeResult.Value).wrappedObject = wrapped_owner.getVertex(vertex.Value, casted_firstEdge);

            for (int i = 0; i < casted_firstEdge.Length; i++)
            {
                firstEdge.Set(i, (int)casted_firstEdge[i]);
            }
            firstEdge.SaveChanges();
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            storeResult.Value = wrapped_owner.findNearest(new OpenCVForUnity.CoreModule.Point((double)pt_x.Value, (double)pt_y.Value), new OpenCVForUnity.CoreModule.Point((double)nearestPt_x.Value, (double)nearestPt_y.Value));
        }
コード例 #5
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            storeResult.Value = wrapped_owner.getEdge(edge.Value, nextEdgeType.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            wrapped_owner.initDelaunay(new OpenCVForUnity.CoreModule.Rect((int)rect_x.Value, (int)rect_y.Value, (int)rect_width.Value, (int)rect_height.Value));
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Point))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Point();
            }
            ((OpenCVForUnityPlayMakerActions.Point)storeResult.Value).wrappedObject = wrapped_owner.getVertex(vertex.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(triangleList.Value is OpenCVForUnityPlayMakerActions.MatOfFloat6))
            {
                LogError("triangleList is not initialized. Add Action \"newMatOfFloat6\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfFloat6 wrapped_triangleList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat6, OpenCVForUnity.CoreModule.MatOfFloat6>(triangleList);

            wrapped_owner.getTriangleList(wrapped_triangleList);
        }
コード例 #9
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(ptvec.Value is OpenCVForUnityPlayMakerActions.MatOfPoint2f))
            {
                LogError("ptvec is not initialized. Add Action \"newMatOfPoint2f\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfPoint2f wrapped_ptvec = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfPoint2f, OpenCVForUnity.CoreModule.MatOfPoint2f>(ptvec);

            wrapped_owner.insert(wrapped_ptvec);
        }
コード例 #10
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(rect.Value is OpenCVForUnityPlayMakerActions.Rect))
            {
                LogError("rect is not initialized. Add Action \"newRect\".");
                return;
            }
            OpenCVForUnity.CoreModule.Rect wrapped_rect = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Rect, OpenCVForUnity.CoreModule.Rect>(rect);

            wrapped_owner.initDelaunay(wrapped_rect);
        }
コード例 #11
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(leadingEdgeList.Value is OpenCVForUnityPlayMakerActions.MatOfInt))
            {
                LogError("leadingEdgeList is not initialized. Add Action \"newMatOfInt\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfInt wrapped_leadingEdgeList = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(leadingEdgeList);

            wrapped_owner.getLeadingEdgeList(wrapped_leadingEdgeList);
        }
コード例 #12
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D))
            {
                LogError("owner is not initialized. Add Action \"newSubdiv2D\".");
                return;
            }
            OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner);

            if (!(pt.Value is OpenCVForUnityPlayMakerActions.Point))
            {
                LogError("pt is not initialized. Add Action \"newPoint\".");
                return;
            }
            OpenCVForUnity.CoreModule.Point wrapped_pt = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(pt);

            int[] int_edge    = edge.intValues;
            int[] casted_edge = new int[int_edge.Length];
            for (int i = 0; i < casted_edge.Length; i++)
            {
                casted_edge[i] = (int)int_edge[i];
            }

            int[] int_vertex    = vertex.intValues;
            int[] casted_vertex = new int[int_vertex.Length];
            for (int i = 0; i < casted_vertex.Length; i++)
            {
                casted_vertex[i] = (int)int_vertex[i];
            }

            storeResult.Value = wrapped_owner.locate(wrapped_pt, casted_edge, casted_vertex);

            for (int i = 0; i < casted_edge.Length; i++)
            {
                edge.Set(i, (int)casted_edge[i]);
            }
            edge.SaveChanges();

            for (int i = 0; i < casted_vertex.Length; i++)
            {
                vertex.Set(i, (int)casted_vertex[i]);
            }
            vertex.SaveChanges();
        }
コード例 #13
0
 public Subdiv2D(OpenCVForUnity.ImgprocModule.Subdiv2D nativeObj) : base(nativeObj)
 {
 }