The coordinate value of point clouds from the function (create_point_cloud_from_rgbd_image) is minimal, as shown as follows.
[x, y, z]
[-1.72436984e-05 7.44663660e-05 1.82731897e-05]
[-1.73856218e-05 7.44663660e-05 1.82731897e-05]
[-1.75275453e-05 7.44663660e-05 1.82731897e-05]
[-1.76694687e-05 7.44663660e-05 1.82731897e-05]
[-1.78113921e-05 7.44663660e-05 1.82731897e-05]
[-1.79533156e-05 7.44663660e-05 1.82731897e-05]
[-1.80952390e-05 7.44663660e-05 1.82731897e-05]
But the excepted result is more than one meter for x and y.
My code
import numpy
import math
from transforms3d import quaternions
from open3d import *
if __name__ == '__main__':
R=quaternions.quat2mat([2.67334255e-20, -4.04697992e-20, -7.07950909e-01,7.06261645e-01])
t=numpy.array([-1.43e+01, 5.00e+00, -9.80e-04])
#pose of camera
extrintic=numpy.zeros([4,4])
for i in range(3):
for j in range(3):
extrintic[i][j]=R[i][j]
extrintic[3][3]=1
for m in range(3):
extrintic[3][m]=t[m]
source_color = read_image("/media/user/dataset/2020-03-19-11-21-54/image/1.png")
source_depth = read_image("/media/user/dataset/2020-03-19-11-21-54/image/1_depth.png")
rgbd_image=create_rgbd_image_from_color_and_depth(source_color, source_depth)
c_x=256/2-0.5
c_y=256/2-0.5
target_pcd =create_point_cloud_from_rgbd_image(rgbd_image, PinholeCameraIntrinsic(256,256,525,525,c_x,c_y),extrintic)
target_pcd.transform([[1,0,0,0],[0,-1,0,0],[0,0,-1,0],[0,0,0,1]])
down_pcd = voxel_down_sample(target_pcd,voxel_size=0.05)
print(down_pcd)
length=len(target_pcd.points)
for l in range(length):
print(target_pcd.points[l])
draw_geometries([down_pcd])
Environment (please complete the following information):
- OS: Ubuntu 16.04
- Python version: 3.5.5
- Open3D version: 0.9
- Is this remote workstation?: no
- How did you install Open3D?: conda
Have I done wrong somewhere?