P
Peter van Leeuwen
Guest
I'm trying to detect shapes with a specific color, using openCV. The first thing i'm trying to do, is to detect circles in an image.
I'm able to detect the circles, using houghCircles, with this function call:
HoughCircles(gray, c, CV_HOUGH_GRADIENT, 1.5, gray.rows / 10, 200, 100, 0, 0);
Now i'm trying to detect the circles with the specific color. I'm doing this using the inRange function, which returns a 8-bit, single-channel image.
This function is able to filter only the given color out of the image. I.e. yellow.
But when i pass the returned image in to the houghCircles function, it's returning no circles. There are no compilation errors.
I already tried to change some of the parameters of houghCircles, but i'm not able to detect the circle.
This is an example of the image that inRange is returning: Grayscale image
What parameters do i need to use, to detect the circle in that image?
Thanks in advance,
Peter
Continue reading...
I'm able to detect the circles, using houghCircles, with this function call:
HoughCircles(gray, c, CV_HOUGH_GRADIENT, 1.5, gray.rows / 10, 200, 100, 0, 0);
Now i'm trying to detect the circles with the specific color. I'm doing this using the inRange function, which returns a 8-bit, single-channel image.
This function is able to filter only the given color out of the image. I.e. yellow.
But when i pass the returned image in to the houghCircles function, it's returning no circles. There are no compilation errors.
I already tried to change some of the parameters of houghCircles, but i'm not able to detect the circle.
This is an example of the image that inRange is returning: Grayscale image
What parameters do i need to use, to detect the circle in that image?
Thanks in advance,
Peter
Continue reading...