Home | History | Annotate | Download | only in scene4

Lines Matching refs:circle

54     """Find the circle in the image.
60 circle: (circle_center_x, circle_center_y, radius)
66 circle = cv2.HoughCircles(gray, cv2.cv.CV_HOUGH_GRADIENT,
69 circle = cv2.HoughCircles(gray, cv2.HOUGH_GRADIENT,
72 circle = None
74 assert circle is not None, 'No circle found!'
75 return circle
123 circle = {}
177 circle[i] = find_circle(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY),
184 # Find 3D location of circle centers
186 np.array([circle[i][0],
187 circle[i][1], 1])) * chart_distance * 1.0E-2
200 # Estimate ids[0] circle center from ids[1] & params
203 err_0 = np.linalg.norm(estimated_0 - circle[ids[0]][:2])
204 print 'Circle centers [%s]' % ids[0]
205 print 'Measured: %.1f, %.1f' % (circle[ids[0]][1], circle[ids[0]][0])
210 # Estimate ids[0] circle center from ids[1] & params
214 err_1 = np.linalg.norm(estimated_1 - circle[ids[1]][:2])
215 print 'Circle centers [%s]' % ids[1]
216 print 'Measured: %.1f, %.1f' % (circle[ids[1]][1], circle[ids[1]][0])
229 # Check focal length and circle size if more than 1 focal length
232 circle[ids[0]][2], circle[ids[1]][2])
236 msg = 'Circle size does not scale properly.'
237 assert np.isclose(circle[ids[0]][2]/fl[ids[0]]*sensor_diag[ids[0]],
238 circle[ids[1]][2]/fl[ids[1]]*sensor_diag[ids[1]],