patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.89k stars 596 forks source link

How to get and set pose parameters (roll/pitch/yaw angles) in python demo.py? #258

Closed huntkao closed 5 years ago

huntkao commented 5 years ago

I successfully built the python module. The demo.py worked fine that I can see the isomap it generated. However there is two questions:

  1. Why is the isomap rotated CCW 90 degrees?
  2. how can I get and set the pose parameters (RPY) in demo.py eos.fitting.fit_shape_and_pose()?

I appreciate this great project and your help!

patrikhuber commented 5 years ago

Hi,

1.: I think this may just be a case of what library you use to display it. It may interpret the data as row-major storage when it is col-major, or vice versa. If you use cv2.imshow(...), I think it should display correctly.

2.: In demo.py they're contained in the returned pose variable (link). This is an instance of the class RenderingParameters and it has getters to get the rotation or the model-view and projection matrices. I think if on a Python console you do help(pose) or help(eos.fitting.RenderingParameters) you should get a documentation.

I'm going to close this, feel free to re-open if you discover that there is a bug or issue with the eos library or the Python bindings.