mirror of
https://github.com/opencv/opencv.git
synced 2024-12-12 15:19:11 +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])
|
v = K @ (rmat @ Kinv @ np.array([x*z, y*z, z]).T + tmat[:, 0])
|
||||||
|
|
||||||
|
if z > 0:
|
||||||
projected[y, x, :] = v[:]
|
projected[y, x, :] = v[:]
|
||||||
|
|
||||||
return projected
|
return projected
|
||||||
@ -105,6 +106,6 @@ def outFile(path, ptsimg):
|
|||||||
outObj = False
|
outObj = False
|
||||||
if outObj:
|
if outObj:
|
||||||
objdir = "/path/to/objdir/"
|
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))
|
outFile(objdir + "rotated.obj", reprojectRt(srcDepth, K, depthFactor, rmat, tmat))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user