hough-transform

Low Accuracy in Detecting Circles using Hough Circle open cv python

Low Accuracy in Detecting Circles using Hough Circle open cv python Question: I’m new to the Computer Vision field so this question may be fairly easy; yet I’m clueless on how to increase the Precision. I’m Trying to detect all circles in this picture. Here is the approach i took Gray Scaled the image gray …

Total answers: 1

OpenCV/Hough Circles: How to apply a condition if circles is None

OpenCV/Hough Circles: How to apply a condition if circles is None Question: I have the following code: def Tracking(): red_lower = np.array([35, 192, 65]) red_upper = np.array([179, 255, 255]) yellow_lower = np.array([16, 215, 177]) yellow_upper = np.array([179, 255, 255]) video = cv2.VideoCapture(1, 0) times = [] total = 0 is_round = False average = str(datetime.timedelta(seconds=0))[2:7] …

Total answers: 1

find intersection point of two lines drawn using houghlines opencv

find intersection point of two lines drawn using houghlines opencv Question: How can I get the intersection points of lines down using opencv Hough lines algorithm? Here is my code: import cv2 import numpy as np import imutils im = cv2.imread(‘../data/test1.jpg’) gray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY) edges = cv2.Canny(gray, 60, 150, apertureSize=3) img = im.copy() lines = …

Total answers: 6

How to merge lines after HoughLinesP?

How to merge lines after HoughLinesP? Question: My task is to find coordinates of lines (startX, startY, endX, endY) and rectangles (4 lines). Here is input file: I use the next code: img = cv.imread(image_src) gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY) ret, thresh1 = cv.threshold(gray,127,255,cv.THRESH_BINARY) edges = cv.Canny(thresh1,50,150,apertureSize = 3) minLineLength = 100 maxLineGap = 10 lines = …

Total answers: 5

Python OpenCV Hough Circles returns None

Python OpenCV Hough Circles returns None Question: I’m trying to figure out Hough Circles before I incorporate it into my main code for a tracking program I’m trying to write, but I can’t seem to get anything but None out from the circles. I’m using the Bengali flag as my image, since it’s simple and …

Total answers: 3

how to use hough circles in cv2 with python?

how to use hough circles in cv2 with python? Question: I have the following code and I want to detect the circle. img = cv2.imread(“act_circle.png”) gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) circles = cv2.HoughCircles(gray,cv2.CV_HOUGH_GRADIENT) it looks like it does not have the attribute and the error is the following ‘module’ object has no attribute ‘CV_HOUGH_GRADIENT’ Does anybody know …

Total answers: 3

Peak-finding algorithm for Python/SciPy

Peak-finding algorithm for Python/SciPy Question: I can write something myself by finding zero-crossings of the first derivative or something, but it seems like a common-enough function to be included in standard libraries. Anyone know of one? My particular application is a 2D array, but usually it would be used for finding peaks in FFTs, etc. …

Total answers: 10