How to detect orientation of object in an image?

How to detect orientation of object in an image?