depth generator fixed at absent values

This commit is contained in:
Rostislav Vasilikhin 2022-06-29 23:45:33 +02:00
parent 6b2d1033bd
commit 44c0b58258

View File

@ -49,7 +49,8 @@ def reprojectRtProject(image, K, depthFactor, rmat, tmat):
v = K @ (rmat @ Kinv @ np.array([x*z, y*z, z]).T + tmat[:, 0])
projected[y, x, :] = v[:]
if z > 0:
projected[y, x, :] = v[:]
return projected
@ -105,6 +106,6 @@ def outFile(path, ptsimg):
outObj = False
if outObj:
objdir = "/path/to/objdir/"
outFile(objdir + "reproj_rot_proj.obj", reproject(im2, depthFactor, K))
outFile(objdir + "reproj_rot_proj.obj", reproject(dstDepth, depthFactor, K))
outFile(objdir + "rotated.obj", reprojectRt(srcDepth, K, depthFactor, rmat, tmat))