Skip to content
Advertisement

Tag: computer-vision

How to connect closest points together using opencv

Using the OpenCV module in python is it possible to connect the red dots in the image below such that each red dot is only connected once to its nearest neighbor red dot? Answer For the first step, you should convert your image to a binary image using the appropriate tools like cv2.cvtColor(), cv2.threshold(), cv2.bitwise_not(),… (depending on the image) –

Hough Circles open CV error

I am currently using HoughCircles on computer-vision but I can’t manage to make it work. How can this error be solved ? Here is my code : UPDATE : New error : Answer As @jeru-luke has told in comment, you should add img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) just before you call cv2.HoughCircles() : COLOR_BGR2GRAY and not COLOR_GRAY2BGR UPDATE: Add nimg =

Advertisement