-
Notifications
You must be signed in to change notification settings - Fork 81
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
Changing colorized depth image back into depth map (or point cloud) #135
Comments
Hi, 1) See this example pyk4a/example/viewer_point_cloud.py Line 33 in 0554de5
2) |
Thank you!
The remaining problem is I see two identical figures side-by-side when there should only be one. Could this be due to the fact that the images were recorded on a different Kinect than the one hooked up currently and so the calibration is different? How would I correct for it? |
I don't understand. Can you share more context? The calibration object must be associated to the Kinect that was used to capture. |
Sure -- sorry I wasn't clear. I have a directory full of rgb and depth images that were taken by a colleague several weeks ago with Kinect A. I am currently trying to take those images and generate point clouds, while Kinect B is connected to my computer. The plan when we recorded the images was to use Open3D's Unbeknownst to me, the colorized depth images were what got saved, and the Open3D function above won't use the transformed depth image. It may also be worth mentioning that I have an intrinsic.json file saved from Kinect A under similar conditions to these images. |
Probably you can recreate the calibration A with the intrinsics.json file. See the various calibration functions related to that. I'm not super familiar with this part of the library. What do you mean by colorized depth image? You mean transformed depth? If so, depth to point cloud requires a regular depth image iirc. It is possible to specify that the depth is transformed already but we would need to modify depth_to_point_cloud |
No it's already implemented. See argument calibration_type_depth |
Yes, depth images that have been saved after applying the transform that changes it from looking mostly black to being false colored (for humans). How do I undo that transformation? Hmmm... setting calibration_type_depth=True didn't seem to help, but maybe that is because of the transformed image? |
Set it to false |
depth_image_to_point_cloud returns nothing when I set calibration_type_depth=False. Sorry to be a bother. |
Ok not sure why it doesn't work. This might be a bug in the corresponding function pyk4a.cpp We dont have functions to transform back transformed-depth into regular depth. Since the transformation would lose information. In your case you don't need that though. The point cloud function should work properly with color reference I think. |
I see lots of people wanting to make false-color depth images, but it doesn't seem anyone wants to go the other way. Go figure. |
@lpasselin @mbusch-regis @shagren Is there any method to transform the depth image(*png) to point cloud ? |
@wangmiaowei , You need also calibration. You can get calibration from opened device or saved mkv file. |
@shagren Thanks for your suggestion. I am really a freshman to the pyk4a. Another problem appears:is there any method to project the point cloud back to depth image? |
@wangmiaowei , like as there is no enough method |
We have to look into this. It is the reason why I assigned label Bug. |
I have a rather large number of frames that were split into standard color and colorized depth images and I've been asked to find a way to convert them to point clouds.
I did try using the
depth_image_to_point_cloud
transformation function and then loading it into an Open3D PointCloud:But the result looks nothing like the original.
How do I "un-colorize" the transformed depth images so that I can use Open3D to convert the pair to a point cloud?
Sorry for what is probably a basic question. I'm an image-processing noob.
The text was updated successfully, but these errors were encountered: