コード例 #1
0
ファイル: Cv_N.cs プロジェクト: tuanthng/opencvsharp
        /// <summary>
        /// グラフ走査処理を1ステップ,あるいは数ステップ進める
        /// </summary>
        /// <param name="scanner">グラフ走査状態.この関数で更新される. </param>
        /// <returns></returns>
#else
        /// <summary>
        /// Returns index of graph vertex
        /// </summary>
        /// <param name="scanner">Graph traversal state. It is updated by the function. </param>
        /// <returns>The function cvNextGraphItem traverses through the graph until an event interesting to the user (that is, an event, specified in the mask in cvCreateGraphScanner call) is met or the traversal is over. In the first case it returns one of the events, listed in the description of mask parameter above and with the next call it resumes the traversal. In the latter case it returns CV_GRAPH_OVER (-1). When the event is CV_GRAPH_VERTEX, or CV_GRAPH_BACKTRACKING or CV_GRAPH_NEW_TREE, the currently observed vertex is stored in scanner->vtx. And if the event is edge-related, the edge itself is stored at scanner->edge, the previously visited vertex - at scanner->vtx and the other ending vertex of the edge - at scanner->dst.</returns>
#endif
        public static int NextGraphItem(CvGraphScanner scanner)
        {
            if (scanner == null)
            {
                throw new ArgumentNullException("scanner");
            }

            return(NativeMethods.cvNextGraphItem(scanner.CvPtr));
        }
コード例 #2
0
ファイル: Cv_N.cs プロジェクト: shimat/opencvsharp_2410
        /// <summary>
        /// グラフ走査処理を1ステップ,あるいは数ステップ進める
        /// </summary>
        /// <param name="scanner">グラフ走査状態.この関数で更新される. </param>
        /// <returns></returns>
#else
        /// <summary>
        /// Returns index of graph vertex
        /// </summary>
        /// <param name="scanner">Graph traversal state. It is updated by the function. </param>
        /// <returns>The function cvNextGraphItem traverses through the graph until an event interesting to the user (that is, an event, specified in the mask in cvCreateGraphScanner call) is met or the traversal is over. In the first case it returns one of the events, listed in the description of mask parameter above and with the next call it resumes the traversal. In the latter case it returns CV_GRAPH_OVER (-1). When the event is CV_GRAPH_VERTEX, or CV_GRAPH_BACKTRACKING or CV_GRAPH_NEW_TREE, the currently observed vertex is stored in scanner->vtx. And if the event is edge-related, the edge itself is stored at scanner->edge, the previously visited vertex - at scanner->vtx and the other ending vertex of the edge - at scanner->dst.</returns>
#endif
        public static int NextGraphItem(CvGraphScanner scanner)
        {
            if (scanner == null)
            {
                throw new ArgumentNullException("scanner");
            }

            var ret = NativeMethods.cvNextGraphItem(scanner.CvPtr);

            GC.KeepAlive(scanner);
            return(ret);
        }