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

Fuad fulan • 7 months ago

what library canny must install?
i got error cannot import name 'canny_edge_detector' from 'canny'
i dont know what library canny must i install on pip, please help me

[CG]Maxime • 1 month ago

canny is a file available in this article (see the tabs?)

Shreyas Bhat • 7 months ago

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

BD14 • 8 months 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 • 1 year 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)
help me please
Note : I changed just the image

Gflaesch • 11 months 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 • 11 months 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 • 1 year 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 • 2 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

Ruchika • 2 years ago

the codes given here at https://www.codingame.com/p... are not working offline. anyone having any idea

Thibaud • 2 years ago

If you are running python 2, there is some integer division that will yield zeroes. Notably in the blur kernel or in the if statement line 35 of the last script. Either add a float around v or switch to python 3