How change the position of 3D object
I have few objects in 3D generated from RGB + Depth image using create_rgbd_image_from_color_and_depth method
now I want to change the position of objects from one place to another like this
how can i move them to the left or right ?
You can use translate on the PointCloud. It also depends in which dimension you want to move it. For a visual help you could also display a coordinate frame, see here.
Thanks, Can you give me any example ? its easy for me to follow the examples. like i am displaying objetc using two images
rgbd_image = create_rgbd_image_from_color_and_depth(color_raw, depth_raw) pcd = create_point_cloud_from_rgbd_image(rgbd_image, pinhole_camera_intrinsic) draw_geometries([pcd])
if i want to move the objects to the left ... what should i do? any example?
Well, Basically i want to adjust the objects on its place like in the picture, objects (Books, Clock, Bottle) are in one objects.ply file and 2nd file is scene.ply, I want to place the objects in their place. looks like they are not on the right place, got it?
As I already mentioned, you can use translate.
pcd = o3d.io.read_point_cloud('objects.ply')
pcd.translate([x,y,z])
You have to figure out x,y,z, there is not really an automatic way to do that.
Yeah, i got the xyz points .. so should I do some addition or subtraction in x plan to move the objects from right to left ?