Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why is a contour from cv2.findContours() in a shape like [N,1,2]?

Hi, guys,
I am a learner of OpenCV, and I found the returned contours from cv2.findContours() are in a a shape like [N,1,2]?
And I want to know why not using the shape as [N,2]?
What is the reason for the middle dimension?

Any idea or answer will be appreciated!

click to hide/show revision 2
retagged

updated 2020-09-28 01:02:41 -0600

berak gravatar image

Why is a contour from cv2.findContours() in a shape like [N,1,2]?

Hi, guys,
I am a learner of OpenCV, and I found the returned contours from cv2.findContours() are in a a shape like [N,1,2]?
And I want to know why not using the shape as [N,2]?
What is the reason for the middle dimension?

Any idea or answer will be appreciated!