-1

So I have this circle, which is very thin:

enter image description here

How could I enhance this, to then detect it? I tried various HoughCircles for detection, but none return any circles.

For an answer, language does not matter. I'll find out how to convert it to python myself.

Jason Yost
  • 4,807
  • 7
  • 42
  • 65
sliders_alpha
  • 2,276
  • 4
  • 33
  • 52
  • 1
    @jacefarm not at all, I'm asking how to make this circle more thick/continuous. – sliders_alpha Nov 15 '16 at 16:54
  • if there's nothing else (except some noise) in the image you can use RANSAC circle detection very well to first detect the circle an later on draw it continuously and however thick you want it to be. See my 2nd (!) answer in http://stackoverflow.com/questions/20698613/detect-semi-circle-in-opencv – Micka Nov 16 '16 at 07:20

1 Answers1

0

For those interested in openCv there is a 'dilate' function that does just that.

cv2.imread(r'c:\checkout\imRecog\tests\thinline.bmp')
gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
kernel = np.ones((10,10),np.uint8)
grayThick = cv2.dilate(gray, kernel, iterations = 1)
cv2.imshow("output", np.hstack([gray, grayThick ]))
cv2.waitKey(0)
cv2.destroyAllWindows()

will thicken the line by 10 pixels and display it.

sliders_alpha
  • 2,276
  • 4
  • 33
  • 52