Hey I calculated the orientation of a contour with the image moments. As a result I get an angle which is defined between -pi and pi. But this angle has an indetermination at -pi and pi. So my idea was to calculate the skewness with the 3rd order image moments, but I don't really know how to do that. Here Tracking object orientation with image moments the author does the same. But I don't really understand how he calculates the skewness because he/she uses a matlab function, which I don't know :-/
Does anybody knows more about that problem? I would be very thankfull for your help!!!! Best regards
I tried it with the 3rd order moment, but in some cases there still is the indetermination.
I solved the problem with the shapes. I calculated the shape with my angle and with the angle + PI and then I substracted both from my original image. The image with fewer white pixels was the one with the right orientation.