Detecting corners in webcam image

asked 2018-04-10 08:51:02 -0600

zachsents gravatar image

updated 2020-10-25 07:58:45 -0600

Hey everyone! Just curious about what the best route to solve this problem might be, as I’m new to OpenCV and am not familiar with all the functions quite yet.

I have a webcam that takes a 1280x720 image. I am trying to get an image of a piece of metal on a wood background and detect the edges/corners of it.

Here’s an example of an image I’m using:

image description

What I’ve tried already is grayscaling the image thresholding it, doing a slight Gaussian blur to eliminate some noise, then detecting contours and approximating polygons from that. I’ve also tried switching to adaptive thresholding. The contours end up discontinuous, though. Here’s the result of that:

image description

The issue is I’m kind of stuck now. What other steps should I include to isolate the edges?

edit retag flag offensive close merge delete

Comments

don't use jpeg image or color quantization it will give you false edges

LBerger gravatar imageLBerger ( 2018-04-10 09:10:41 -0600 )edit