mirror of
https://github.com/opencv/opencv.git
synced 2024-12-12 07:09:12 +08:00
depth generator fixed at absent values
This commit is contained in:
parent
6b2d1033bd
commit
44c0b58258
@ -49,6 +49,7 @@ def reprojectRtProject(image, K, depthFactor, rmat, tmat):
|
||||
|
||||
v = K @ (rmat @ Kinv @ np.array([x*z, y*z, z]).T + tmat[:, 0])
|
||||
|
||||
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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user