Changeset 32480 for lang/cpluspluscli

Show
Ignore:
Timestamp:
04/16/09 13:46:52 (4 years ago)
Author:
Matt
Message:

CvGraphScanner?
cvCreateGraphScanner
cvReleaseGraphScanner

Location:
lang/cpluspluscli/OpenCvSharp2/trunk
Files:
4 added
4 modified

Legend:

Unmodified
Added
Removed
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/OpenCvSharp.Extern.vcproj

    r32443 r32480  
    22<VisualStudioProject 
    33        ProjectType="Visual C++" 
    4         Version="9.00" 
     4        Version="9,00" 
    55        Name="OpenCvSharp.Extern" 
    66        ProjectGUID="{38E4FA6B-0F95-4020-98C4-D8828A20699F}" 
     
    574574                                </File> 
    575575                                <File 
     576                                        RelativePath=".\WCvGraphScanner.cpp" 
     577                                        > 
     578                                </File> 
     579                                <File 
    576580                                        RelativePath=".\WCvGraphVtx.cpp" 
    577581                                        > 
     
    740744                                </File> 
    741745                                <File 
     746                                        RelativePath=".\WCvGraphScanner.h" 
     747                                        > 
     748                                </File> 
     749                                <File 
    742750                                        RelativePath=".\WCvGraphVtx.h" 
    743751                                        > 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Core/CvDll.cs

    r32474 r32480  
    413413        [DllImport(DLL_CXCORE)] 
    414414        public static extern IntPtr cvCreateGraph([MarshalAs(UnmanagedType.I4)] SeqType graph_flags, int header_size, int vtx_size,int edge_size, IntPtr storage); 
     415        [DllImport(DLL_CXCORE)] 
     416        public static extern IntPtr cvCreateGraphScanner(IntPtr graph, IntPtr vtx, [MarshalAs(UnmanagedType.I4)] GraphScannerMask mask); 
    415417        [DllImport(DLL_CXCORE)] 
    416418        public static extern IntPtr cvCreateImage(CvSize size, BitDepth depth, int channels); 
     
    630632        public static extern void cvMulTransposed(IntPtr src, IntPtr dst, [MarshalAs(UnmanagedType.Bool)] bool order, IntPtr delta, double scale); 
    631633        [DllImport(DLL_CXCORE)] 
     634        public static extern int cvNextGraphItem(IntPtr scanner); 
     635        [DllImport(DLL_CXCORE)] 
    632636        public static extern IntPtr cvNextTreeNode([In, Out] CvTreeNodeIterator tree_iterator); 
    633637        [DllImport(DLL_CXCORE)] 
     
    681685        [DllImport(DLL_CXCORE)] 
    682686        public static extern void cvReleaseFileStorage(ref IntPtr fs); 
     687        [DllImport(DLL_CXCORE)] 
     688        public static extern void cvReleaseGraphScanner(ref IntPtr scanner); 
    683689        [DllImport(DLL_CXCORE)] 
    684690        public static extern void cvReleaseImage(ref IntPtr image); 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/Core/Cv_A-C.cs

    r32476 r32480  
    37933793        } 
    37943794        #endregion 
     3795        #region CreateGraphScanner 
     3796#if LANG_JP 
     3797        /// <summary> 
     3798        ///  
     3799        /// </summary> 
     3800        /// <param name="graph"> </param> 
     3801#else 
     3802        /// <summary> 
     3803        /// Creates structure for depth-first graph traversal 
     3804        /// </summary> 
     3805        /// <param name="graph">Graph.  </param> 
     3806#endif 
     3807        public static CvGraphScanner CreateGraphScanner(CvGraph graph) 
     3808        { 
     3809            return CreateGraphScanner(graph, null); 
     3810        } 
     3811#if LANG_JP 
     3812        /// <summary> 
     3813        ///  
     3814        /// </summary> 
     3815        /// <param name="graph"> </param> 
     3816        /// <param name="vtx"> </param> 
     3817#else 
     3818        /// <summary> 
     3819        /// Creates structure for depth-first graph traversal 
     3820        /// </summary> 
     3821        /// <param name="graph">Graph.  </param> 
     3822        /// <param name="vtx">Initial vertex to start from. If NULL, the traversal starts from the first vertex (a vertex with the minimal index in the sequence of vertices). </param> 
     3823#endif 
     3824        public static CvGraphScanner CreateGraphScanner(CvGraph graph, CvGraphVtx vtx) 
     3825        { 
     3826            return CreateGraphScanner(graph, vtx, GraphScannerMask.All_Items); 
     3827        } 
     3828#if LANG_JP 
     3829        /// <summary> 
     3830        ///  
     3831        /// </summary> 
     3832        /// <param name="graph"> </param> 
     3833        /// <param name="vtx"> </param> 
     3834        /// <param name="mask">v</param> 
     3835 
     3836#else 
     3837        /// <summary> 
     3838        /// Creates structure for depth-first graph traversal 
     3839        /// </summary> 
     3840        /// <param name="graph">Graph. </param> 
     3841        /// <param name="vtx">Initial vertex to start from. If NULL, the traversal starts from the first vertex (a vertex with the minimal index in the sequence of vertices). </param> 
     3842        /// <param name="mask">Event mask indicating which events are interesting to the user (where cvNextGraphItem  function returns control to the user) It can be CV_GRAPH_ALL_ITEMS (all events are interesting) or combination of the following flags: 
     3843        /// <br/> * CV_GRAPH_VERTEX - stop at the graph vertices visited for the first time 
     3844        ///   <br/>* CV_GRAPH_TREE_EDGE - stop at tree edges (tree edge is the edge connecting the last visited vertex and the vertex to be visited next) 
     3845        /// <br/>* CV_GRAPH_BACK_EDGE - stop at back edges (back edge is an edge connecting the last visited vertex with some of its ancestors in the search tree) 
     3846        /// <br/>* CV_GRAPH_FORWARD_EDGE - stop at forward edges (forward edge is an edge conecting the last visited vertex with some of its descendants in the search tree). The forward edges are only possible during oriented graph traversal) 
     3847        ///   <br/>* CV_GRAPH_CROSS_EDGE - stop at cross edges (cross edge is an edge connecting different search trees or branches of the same tree. The cross edges are only possible during oriented graphs traversal) 
     3848        ///   <br/> * CV_GRAPH_ANY_EDGE - stop and any edge (tree, back, forward and cross edges) 
     3849        ///   <br/>* CV_GRAPH_NEW_TREE - stop in the beginning of every new search tree. When the traversal procedure visits all vertices and edges reachible from the initial vertex (the visited vertices together with tree edges make up a tree), it searches for some unvisited vertex in the graph and resumes the traversal process from that vertex. Before starting a new tree (including the very first tree when cvNextGraphItem is called for the first time) it generates CV_GRAPH_NEW_TREE event. 
     3850        ///    <br/> For unoriented graphs each search tree corresponds to a connected component of the graph. 
     3851        ///  <br/> * CV_GRAPH_BACKTRACKING - stop at every already visited vertex during backtracking - returning to already visited vertexes of the traversal tree.</param> 
     3852#endif 
     3853        public static CvGraphScanner CreateGraphScanner(CvGraph graph, CvGraphVtx vtx, GraphScannerMask mask) 
     3854        { 
     3855            IntPtr vtx_ptr = (vtx == null) ? IntPtr.Zero : vtx.CvPtr; 
     3856 
     3857            return new CvGraphScanner(CvDll.cvCreateGraphScanner(graph.CvPtr, vtx_ptr, mask)); 
     3858        } 
     3859#endregion 
    37953860        #region CreateImage 
    37963861        /// <summary> 
  • lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp/OpenCvSharp.csproj

    r32443 r32480  
    162162    <Compile Include="Class\CvChainPtReader.cs" /> 
    163163    <Compile Include="Class\CvGraphEdge.cs" /> 
     164    <Compile Include="Class\CvGraphScanner.cs" /> 
    164165    <Compile Include="Class\CvGraphVtx.cs" /> 
    165166    <Compile Include="Class\CvHuMoments.cs" /> 
     
    176177    <Compile Include="Enum\ContourTreesMatchMethod.cs" /> 
    177178    <Compile Include="Enum\ConvexHullOrientation.cs" /> 
     179    <Compile Include="Enum\GraphScannerMask.cs" /> 
    178180    <Compile Include="Enum\PCAFlag.cs" /> 
    179181    <Compile Include="Enum\ConvertImageFlag.cs" />