mirror of
https://github.com/gosticks/body-pose-animation.git
synced 2025-10-16 11:45:42 +00:00
fix: initial camera position for viewer
This commit is contained in:
parent
377dd5ab39
commit
0bcdabb039
3
TODO.md
3
TODO.md
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
- [ ] Camera 2d projection (PyTorch pinhole camera)
|
- [ ] Camera 2d projection (PyTorch pinhole camera)
|
||||||
- [ ] 3D transformation rewrite using PyTorch or SciPy
|
- [ ] 3D transformation rewrite using PyTorch or SciPy
|
||||||
- [ ] PyRenderer camera initial location + position (?)
|
- [x] PyRenderer camera initial location + position (?)
|
||||||
- [ ] Setup Pose PyTorch module (W)
|
- [ ] Setup Pose PyTorch module (W)
|
||||||
|
|
||||||
- [ ] pose cost function
|
- [ ] pose cost function
|
||||||
|
|
||||||
## Nice to have
|
## Nice to have
|
||||||
|
|
||||||
- [ ]
|
|
||||||
- [ ] add original input image to scene
|
- [ ] add original input image to scene
|
||||||
- [ ] Render a camera to the scene for projection visualization
|
- [ ] Render a camera to the scene for projection visualization
|
||||||
- [ ] Vposer or other technique for mesh intersection priors
|
- [ ] Vposer or other technique for mesh intersection priors
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from utils import render_model, render_points
|
from utils import render_model, render_points
|
||||||
import pyrender
|
import pyrender
|
||||||
|
from scipy.spatial.transform import Rotation as R
|
||||||
|
|
||||||
|
|
||||||
class Renderer:
|
class Renderer:
|
||||||
@ -17,10 +18,12 @@ class Renderer:
|
|||||||
if camera is None:
|
if camera is None:
|
||||||
camera = pyrender.OrthographicCamera(ymag=1, xmag=1)
|
camera = pyrender.OrthographicCamera(ymag=1, xmag=1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if camera_pose is None:
|
if camera_pose is None:
|
||||||
camera_pose = np.eye(4)
|
camera_pose = np.eye(4)
|
||||||
camera_pose[:3, 3] = np.array([0, 0, -2])
|
camera_pose[:3, :3] = R.from_rotvec(np.pi/2 * np.array([0, 0, 0])).as_matrix()
|
||||||
camera_pose[0, 0] *= -1.0
|
camera_pose[:3, 3] = np.array([0, 0, 4])
|
||||||
|
|
||||||
self.groups = {
|
self.groups = {
|
||||||
"body": [],
|
"body": [],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user