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

Fuad fulan • 2 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

Shreyas Bhat • 2 months ago

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

BD14 • 3 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 • 10 months 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 • 7 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 • 7 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 • 1 year 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
https://uploads.disquscdn.c...

Ruchika • 1 year ago

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

Thibaud • 1 year 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