Finding angle of rotation of an image after comparing with the target image

Currently I am using opencv contour and minarearectangle to find the rotated boundong box and than match template function matching. But this approach gives different contours all than because of various reason like light, reflection and hence the rotated angle from minarear rectangle is not stable.Any suggestion how can i find the top point of the images.?