Help detecting small hole on tube

asked 2017-10-25 22:24:57 -0600

updated 2017-10-26 01:20:27 -0600

berak gravatar image

Hello, I am newish to openCV and trying to find a good method to detect a really small hole on a tube. I went to an image pixel website to find the values of the tube versus the hole colors so I know the threshold. I have thought about a few ways to do this but haven't been having food luck at detecting the hole by itself.

My general train of thought is to:

  • Load the image in
  • Gray scale it
  • Blur it for noise
  • Set a region to filter out the rest of the scene that is not the tube.

Then from here I have tried a few methods such at Hough, Canny, and contours but I can't seem to get a good setting on the tube hole itself. Please let me know if you're able to help. I am using python 3.5.3 and openCV 3.3 to try and do this.

Thanks!

C:\fakepath\tube1.jpg

edit retag flag offensive close merge delete

Comments

can you update the result of this phase "Set a region to filter out the rest of the scene that is not the tube." so that we could help you from there

John_OpenCVdev gravatar imageJohn_OpenCVdev ( 2017-10-26 05:11:48 -0600 )edit

Go to Opencv's folder --> then samples/python/houghcircles.py

supra56 gravatar imagesupra56 ( 2017-10-26 07:24:50 -0600 )edit