We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Alfredo • 10 months ago

Hi, great job!

Not sure how old this post is, but any chance the author can check the section on "Circle Detection using the Circle Hough Transform", there seem to be some parts missing when your refer a variable, like in "all the possible values for , and ." I suspect there should be something before the comma and the end point, like: ""all the possible values for something, and something."

Fuad fulan • 3 years ago

what library canny must install?
i got error cannot import name 'canny_edge_detector' from 'canny'

[CG]Maxime • 2 years ago

Shreyas Bhat • 3 years ago

The code works wonderfully, but I wanted to know how to get the number of circles in a given image

BD14 • 3 years ago

I tried this code and it works very well. It's just little slow, and I
need to find a solution to get something faster. I thought to give a
gray image or b&w image, but I don't know how adapt the code for
that. If anyone knows... ? Thank you.

Duha • 3 years ago

Hi , when I run this code I faced this problem -->
( File "C:\Users\Duha\Desktop\Circle-Hough-Transform-master1\canny.py", line 10, in canny_edge_detector
grayscaled = compute_grayscale(input_pixels, width, height)
File "C:\Users\Duha\Desktop\Circle-Hough-Transform-master1\canny.py", line 32, in compute_grayscale
grayscale[x, y] = (pixel[0] + pixel[1] + pixel[2]) / 3
TypeError: 'int' object is not subscriptable)
Note : I changed just the image

Gflaesch • 3 years ago

Okay, sorry, I was mistaken. The reason is rather whether you have a grayscale image or rgb. in case of rgb grayscale is calculated from the average of the vector entries in pixel. If it is a greyscale image, then pixel is an integeter, such that pixel[0] makes no sense. You can rather just say grayscale[x, y] =pixel.

Gflaesch • 3 years ago

Watch out for the file format. You might have a .tiff file. i don't know whether others cause trouble as well, but I tried the code for a tiff, got the same problem as you. Using .png worked.

Anonymous • 4 years ago

I really appreciate what you did here, it was very helpful to see what is basically the inner workings of the openCV style library.

Durga Prasad • 4 years ago

Hello, i want to find the angle of the inclined line at the tip of the pen using open cv and python. Any help would be appreciated.Thanks in advance