Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting 3-D world coordinae for all the pixels using D435 #3862

Closed
kyrs opened this issue Apr 28, 2019 · 6 comments
Closed

Extracting 3-D world coordinae for all the pixels using D435 #3862

kyrs opened this issue Apr 28, 2019 · 6 comments

Comments

@kyrs
Copy link

kyrs commented Apr 28, 2019


Required Info
Camera Model D400
Firmware Version 5.09.02
Operating System & Version Win 10
Platform PC
SDK Version 2.17.1
Language python
Segment Robot

Issue Description

Hey,
I am trying to extract the 3d world coordinates for each of the pixel captured by the camera.
Currently, I am doing so by looping over each of the pixel value and saving the corresponding world coordinate.

                                row,col = depth_image.shape
				zthImage = np.zeros((row,col,3))
				for i in range(row):
					for j in range(col):
						depth = aligned_depth_frame.get_distance(i,j)
						print(depth)
						zthImage[i,j] = rs.rs2_deproject_pixel_to_point(
		                                depth_intrin, [i,j], depth)
						print(i,j)
				print(zthImage)		
				depthOfImage.append(zthImage)		

It works but drastically impact the frame processing rate of the camera.
Is there any way of getting 3-D coordinates for all the pixel values without affecting the frame rate.Something similar to get_data function in aligned_depth_frame.get_data() ??

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 28, 2019

I wonder if Intel's Python tutorial on converting RGBD data from a bag file to a 3D point cloud with XYZ coordinates may be a helpful reference for you.

https://github.com/dorodnic/binder_test/blob/master/pointcloud.ipynb

@RealSenseCustomerSupport
Copy link
Collaborator


Hi kyrs,

As MartyG-RealSense suggested, not sure did it help? Any update?

Thanks!

@RealSenseCustomerSupport
Copy link
Collaborator


Hi kyrs,

Do you have any update on this one? Still need help?

Thanks!

@kyrs
Copy link
Author

kyrs commented May 23, 2019

@RealSenseCustomerSupport I am still experimenting it out, will update it in couple of days.

@Resays
Copy link

Resays commented Jun 10, 2019

Here is an example to get RGB data from point how to get XYZ RGB data from RealSense

@RealSenseCustomerSupport
Copy link
Collaborator


@kyrs Any good news now? Looking forward to your update. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants