Home > front end >  How can I isolate the capacitor in these images?
How can I isolate the capacitor in these images?

Time:11-19

I'm having a lot of difficulty isolating these capacitors, yellow squares, in these images. The end goal would be to draw a minAreaRectangle around it and get the location and rotation. I can dim the brightness a bit but that's the least desirable outcome as other inspections rely on that same level of brightness.

enter image description here

lower = (100,200,200) upper = (160,255,255) result = cv2.inRange(input, lower, upper)

enter image description here

From that you should be able to use morphology to remove the partial ring and close up the white in the square

  • Related