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.