Process image to find external contour

后端 未结 3 647
闹比i
闹比i 2020-12-18 07:50

I have hundreds of PNG images for which I have to generate corresponding B&W images that show the outer outline of the object. The source PNG image has alpha channel, so

3条回答
  •  Happy的楠姐
    2020-12-18 08:42

    OpenCV has a findContours function that does exactly what you want. You will need to set contour retrieval mode to CV_RETR_EXTERNAL. To load your images use the imread function.

提交回复
热议问题