Detect marker orientation inside an image
In essence, you are looking for a way to do planar object detection. 

Well, the most basic approach is to find a correspondence between your planar template and the image using a feature extractor, such as SIFT. You could then cast the detection problem as finding the subset of points, which have similar descriptors. OpenCV has that implemented already:
http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_feature_homography/py_feature_homography.html

http://docs.opencv.org/trunk/dc/dc3/tutorial_py_matcher.html

The next thing is to use template matching kind of approaches. For severe viewpoint this might be hard to achieve, but there are ways, such as this one. 

If you can also design a marker in the image space, then there are approaches which let you to read a randomly generated marker. For example:


  T. Birdal, I. Dobryden, S. Ilic  X-Tag: A Fiducial Tag for Flexible
  and Accurate Bundle Adjustment  International Conference on 3DVision
  (3DV), Stanford University, California, USA, October 2016
  http://campar.in.tum.de/pub/tbirdal20163dv/tbirdal20163dv.pdf


Take a look at the related work section of the references I gave here. This could broaden your knowledge in the field. You might also like to read a survey in the field, such as:
http://www.irisa.fr/lagadic/pdf/2012_fcv_uchiyama.pdf