Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

How change the position of 3D object

Open Resays opened this issue 7 years ago • 5 comments

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 ? objts

Resays avatar Nov 07 '19 13:11 Resays

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.

griegler avatar Nov 07 '19 13:11 griegler

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?

Resays avatar Nov 07 '19 14:11 Resays

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?

Frame-12-with-objects

Resays avatar Nov 07 '19 14:11 Resays

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.

griegler avatar Nov 07 '19 15:11 griegler

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 ?

Resays avatar Nov 07 '19 15:11 Resays