예제 #1
0
        /// <summary>
        /// Label the connected parts of a binary image. (cvLabel)
        /// </summary>
        /// <param name="img">Input binary image (depth=IPL_DEPTH_8U and num. channels=1).</param>
        /// <param name="blobs">List of blobs.</param>
        /// <returns>Number of pixels that has been labeled.</returns>
        public static int Label(IplImage img, CvBlobs blobs)
        {
            if (img == null)
            {
                throw new ArgumentNullException("img");
            }
            if (blobs == null)
            {
                throw new ArgumentNullException("blobs");
            }

            return(blobs.Label(img));
        }
예제 #2
0
        /// <summary>
        /// Label the connected parts of a binary image. (cvLabel)
        /// </summary>
        /// <param name="img">Input binary image (depth=IPL_DEPTH_8U and num. channels=1).</param>
        /// <param name="blobs">List of blobs.</param>
        /// <returns>Number of pixels that has been labeled.</returns>
        public static int Label(Mat img, CvBlobs blobs)
        {
            if (img == null)
            {
                throw new ArgumentNullException(nameof(img));
            }
            if (blobs == null)
            {
                throw new ArgumentNullException(nameof(blobs));
            }

            return(blobs.Label(img));
        }