Problem reading images via #6376
-
Hello, I'm new to Open3D so this might be a beginner's question, but when trying to create a RGBD image using a 2D RGB image and a Depth Map generated by MiDaS I keep getting the same error. To read the images I'm using the following: image_rgb = o3d.io.read_image("cube_resized.png") THis leads to the following error: [Open3D WARNING] Read PNG failed: unable to parse header. I tried using a 640x425 image as example and it worked, then I resized my image using cv2.resize and it worked. However doing the same resize for another image I get the same error for both my RGB and Depth images. I've tried another solutions I found online like setting the full path to the images, and changing the uint but nothing worked. Is there any limitations (dimension, file size, ...) to what images can I read ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Please share the images so we can test. Also, share how you installed open3d, python version, operating system info. |
Beta Was this translation helpful? Give feedback.
@OtavioPalamoni Your image is named
.png
but it hasjpeg
format. Open3d doesnt have functionality to check image metadata, it uses extension to use the appropriate decoder which is why it failed to decode image.Furthermore, since image read failed, it returned a
0x0
size color image which didnt match depth image size.See below how I noticed and verified using
file
andconvert
:-