How to compute the rotation angle with Hu moment
I use matchShapes() to find the similar contour.
Then use minAreaRect(), can compute the centre of contour.
But the angle isn't correct. Because the contour is irregular.
If compare the parameter of 2 Hu moment, can compute the rotation angle?
How to do it???
Thanks a lot
Isn't it a duplicate?
i don't know if you can compute rotation angle by comparing the parameter of 2 Hu moment. but take a look at the sample code to see how the angle of blob can be computed.
take a look at http://answers.opencv.org/question/77...