from numpy to open3d.image #3825
Replies: 11 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@sanskar107 Indeed, it works with I have juste seen in the tutorial rgbd_image that it seems to have multiple dataset format,I will look into that ... |
Beta Was this translation helpful? Give feedback.
-
It is weird that in the tutorial, it says that depth is in 16-bit but when I look into the data it is only uint8 ... Does not really matter, so I am trying to cast my data to 8-bit (with |
Beta Was this translation helpful? Give feedback.
-
After that I have write a custom function to cast my data to 8-bit and finally be able to send it to |
Beta Was this translation helpful? Give feedback.
-
This looks like int overflow. You have to compress the depth range (e.g.: divide by |
Beta Was this translation helpful? Give feedback.
-
This result may be OK. You can estimate the quantization error in |
Beta Was this translation helpful? Give feedback.
-
@ssheorey Could setting artificially the value of the background (that is currently equal to zero) to the maximum value of the interesting depth will help to compress the depth range and then may allow reduce the depth accuracy in the point cloud ? (I have to try it ^^) Just about the accuracy, I clearly need to have a better definition/resolution, just look at this side face 😄 : It may be a matter of displaying but I don't have this if I save a .ply and display it in an other viewer tool like CloudCompare : |
Beta Was this translation helpful? Give feedback.
-
Also it is unclear that your depth data should be an uint8, I feels that it is quite restrictive. It says here that 'depth (open3d.geometry.Image) – The input depth image can be either a float image, or a uint16_t image.' ==> If I use float the depth is filled with zero ... Does someone know how to cast it to a uint16_t ? (is it the same as uint16 or a uint8 ?) |
Beta Was this translation helpful? Give feedback.
-
If someone has a full toy example on a point cloud generation from numpy to open3D, it will also be quite useful to understand all the insights and how to do it correctly ! 👍 |
Beta Was this translation helpful? Give feedback.
-
Open3D typically uses |
Beta Was this translation helpful? Give feedback.
-
The depth scale (units / mm) is determined by the camera -- check camera docs for best settings for your environment. The background value of zero means invalid data and is used by some algorithms to skip processing it. The first image actually looks distorted - the nose is too long (?). You are also seeing depth quantization artifacts. Converting to float and smoothing the depth data should help. Some display software may be doing this automatically. |
Beta Was this translation helpful? Give feedback.
-
___________________________ Description ___________________________
In python, I want to create a point cloud from numpy rgb image and depth image. But it is quite unclear how to do it as function o3d.geometry.Image() return confusing results for me. I am using images from IntelRealSense D415 :
To this point, if I display my data with matplotlib everything looks normal (blurred on purpose) :
Then I convert it to open3d.Image object and call create_from_color_and_depth and display it content. What I don't understand is that the depth image is then fill of zeros ... :
Then an other problem I have is that I also would like to rotate my images before working with open3d, like following:
And now, if I convert it to open3d.Image, I have the rgb image that seems to have rows et columns reverse or something like that (see below) and the depth image conversion is not working at all as I have the error RuntimeError: Image can only be initialized from c-style buffer.
From what I see and what @qianyizh said in #417, I feel that it is a problem of column-major array but I did not find real solution to my problem ...
Does someone ever encounter this problem and could help me ?
Thank you !
___________________________ Environment ___________________________
Beta Was this translation helpful? Give feedback.
All reactions