コード例 #1
0
        public List <CircleF> HoughtAlgoritm(int minDistance = 250, int acTreshold = 36, int minRadius = 10, int maxRadius = 300)
        {
            var grayImage   = SourseImage.Convert <Gray, byte>();
            var bluredImage = grayImage.SmoothGaussian(9);

            var listOfCircles = new List <CircleF>(CvInvoke.HoughCircles(bluredImage, HoughType.Gradient, 1.0, minDistance, 100, acTreshold, minRadius, maxRadius));

            return(listOfCircles);
        }
コード例 #2
0
        public Image <Gray, byte> FindColor(int color)
        {
            var hsvImage = SourseImage.Convert <Hsv, byte>();

            var hue = hsvImage.Split()[0];

            byte range = 10;

            var resultImage = hue.InRange(new Gray(Convert.ToByte(color) - range), new Gray(Convert.ToByte(color) + range));

            return(resultImage);
        }