Merge pull request #27255 from nina16448:houghcircles_fix

Update houghcircles.py
This commit is contained in:
Alexander Smorkalov 2025-04-25 11:58:51 +03:00 committed by GitHub
commit 9533c5633d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ def main():
img = cv.medianBlur(img, 5) img = cv.medianBlur(img, 5)
cimg = src.copy() # numpy function cimg = src.copy() # numpy function
circles = cv.HoughCircles(img, cv.HOUGH_GRADIENT, 1, 10, np.array([]), 100, 30, 1, 30) circles = cv.HoughCircles(img, cv.HOUGH_GRADIENT, 1, 10, np.array([]), 200, 30, 5, 30)
if circles is not None: # Check if circles have been found and only then iterate over these and add them to the image if circles is not None: # Check if circles have been found and only then iterate over these and add them to the image
circles = np.uint16(np.around(circles)) circles = np.uint16(np.around(circles))