Yinghao-Li / 3DMM-fitting

Fit 3DMM to front and side face images simultaneously.
216 stars 53 forks source link

Fix get_affine_transform, render_affine and extract_tecture #4

Closed francoisruty closed 4 years ago

francoisruty commented 5 years ago

Without those fixes, none of those functions work

render_affine: fixed a typo in bounding box index

extract_tecture: changed float to int in indices (else code crashes)

get_affine_transform: the function does not work, for example "dst" is not referenced anywhere. Since cv2 is already a dependency, better to just use the cv2 function IMO

francoisruty commented 5 years ago

Also, in raster_triangle_affine, I added the depth test which was missing I added a constraint on the for loop to make sure we only consider pixels inside the triangles (and not all the triangle bounding box pixels)

Without those 2 fixes, the extract_tecture function returns garbage (doesn't crash but returns garbage)