Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Standard Hough Circle Detection

$
0
0
Hello forum, Ive been trying to write the code for the standard hough circle detection but have not succeded. The code (very simple) is shown below. Basically i perform canny edge detection and then loop through the output and draw a circle when the pixel is not a zero. int main(int argc, char** argv) { image = imread("image.png",CV_LOAD_IMAGE_GRAYSCALE); image.copyTo(output); Canny(output, output, 100, 200, 3); Mat drawing = Mat::zeros(image.size(), CV_8UC1); for (int i = 0; i < output.rows; i++) for (int j = 0; j < output.cols; j++) if (output.at(i, j) != 0) circle(drawing, Point(i, j), 4, 10, 1, 8, 0); } The problem is, i thought that when 2 circles are drawn overlapping each other, the intersecting pixels would be "brighter". I dont think I should draw each circle on a separate matrix to be added after the double for loop so is there anyway I can write the standard HCT without having too many matrices ? Haziq

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>