Note that there are some explanatory texts on larger screens.

plurals
  1. PODrawing Euler Angles rotational model on a 2d image
    text
    copied!<p>I'm currently attempting to draw a 3d representation of euler angles within a 2d image (no opengl or 3d graphic windows). The image output can be similar to as below.</p> <p><img src="https://i.stack.imgur.com/uaT1k.png" alt="euler angles"></p> <p>Essentially I am looking for research or an algorithm which can take a Rotation Matrix or a set of Euler angles and then output them onto a 2d image, like above. This will be implemented in a C++ application that uses OpenCV. It will be used to output annotation information on a OpenCV window based on the state of the object.</p> <p>I think I'm over thinking this because I should be able to decompose the unit vectors from a rotation matrix and then extract their x,y components and draw a line in cartesian space from (0,0). Am i correct in this thinking?</p> <p>EDIT: I'm looking for an Orthographic Projection. You can assume the image above has the correct camera/viewing angle.</p> <p>Any help would be appreciated.</p> <p>Thanks,</p> <p>EDIT: The example source code can now be found in my repo. Header: <a href="https://bitbucket.org/jluzwick/tennisspindetector/src/6261524425e8d80772a58fdda76921edb53b4d18/include/projection_matrix.h?at=master" rel="nofollow noreferrer">https://bitbucket.org/jluzwick/tennisspindetector/src/6261524425e8d80772a58fdda76921edb53b4d18/include/projection_matrix.h?at=master</a></p> <p>Class Definitions: <a href="https://bitbucket.org/jluzwick/tennisspindetector/src/6261524425e8d80772a58fdda76921edb53b4d18/src/projection_matrix.cpp?at=master" rel="nofollow noreferrer">https://bitbucket.org/jluzwick/tennisspindetector/src/6261524425e8d80772a58fdda76921edb53b4d18/src/projection_matrix.cpp?at=master</a></p> <p>It's not the best code but it works and shows the steps necessary to get the projection matrix described in the accepted answer.</p> <p>Also here is a youtube vid of the projection matrix in action (along with scale and translation added): <a href="http://www.youtube.com/watch?v=mSgTFBFb_68" rel="nofollow noreferrer">http://www.youtube.com/watch?v=mSgTFBFb_68</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload