Closed JiSuanJiDaWang closed 3 years ago
Originally, I used h-1-lm[:,1] to ensure that the point with zero value correspond to the last pixel of the image. However, a more accurate way should neither be h-1-lm[:,1] nor h-lm[:,1], but h-0.5-lm[:,1]. Let's just consider the pixel (0,0) on the image. It is actually a box of length 1 which centered at (0.5,h-0.5). Therefore, we should really use h-0.5-lm[:,1] to transfer between landmark coordinates and pixel coordinates.
Hi , I couldn't understand why minus 1 in
lm = np.stack([lm[:,0],h0 - 1 - lm[:,1]], axis = 1)
in functionalign_img(img,lm,lm3D)
. From my points of view, itslm = np.stack([lm[:,0],h0 - lm[:,1]], axis = 1)
. Thanks.