Skip to content

Commit

Permalink
fix uv process
Browse files Browse the repository at this point in the history
  • Loading branch information
yfeng95 committed Jul 20, 2018
1 parent 305a7dd commit f7a7759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/7_generate_uv_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from face3d.morphable_model import MorphabelModel

def process_uv(uv_coords, uv_h = 256, uv_w = 256):
uv_coords[:,0] = uv_coords[:,0]*(uv_h - 1)
uv_coords[:,0] = uv_coords[:,0]*(uv_w - 1)
uv_coords[:,1] = uv_coords[:,1]*(uv_h - 1)
uv_coords[:,1] = uv_h - uv_coords[:,1] - 1
uv_coords = np.hstack((uv_coords, np.zeros((uv_coords.shape[0], 1)))) # add z
Expand Down
2 changes: 1 addition & 1 deletion examples/8_generate_posmap_300WLP.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from face3d.morphable_model import MorphabelModel

def process_uv(uv_coords, uv_h = 256, uv_w = 256):
uv_coords[:,0] = uv_coords[:,0]*(uv_h - 1)
uv_coords[:,0] = uv_coords[:,0]*(uv_w - 1)
uv_coords[:,1] = uv_coords[:,1]*(uv_h - 1)
uv_coords[:,1] = uv_h - uv_coords[:,1] - 1
uv_coords = np.hstack((uv_coords, np.zeros((uv_coords.shape[0], 1)))) # add z
Expand Down

0 comments on commit f7a7759

Please sign in to comment.