Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

moments for all contours

I want to compute moments for all contours but the moments() function compute moments for single contours.

Question:

How to compute moments for all contours like a binary image?

click to hide/show revision 2
No.2 Revision

moments for all contours

I want to compute moments for all contours but the moments() function compute moments for single contours.

Question:

How to compute moments for all contours like a binary image?

Note:

I have merged all contours points then compute moments & compute center by moments but it is not near to the center calculated from the binary image moments.