dougsm / ggcnn

Generative Grasping CNN from "Closing the Loop for Robotic Grasping: A Real-time, Generative Grasp Synthesis Approach" (RSS 2018)
BSD 3-Clause "New" or "Revised" License
499 stars 140 forks source link

Something wrong when I converted pcd files to depth images, using the python script #32

Closed Zhangeaky closed 4 years ago

Zhangeaky commented 4 years ago

@dougsm Thank you for your code and paper first! when I used the file generate_cornell_depth.py with the commandline "python -m utils.dataset_processing.generate_cornell_depth ", the result depth picture is strange,all result depth
images look the same,just like this 2020-08-07 15-56-02屏幕截图

dougsm commented 4 years ago

Hey @Zhangeaky I've seen this before. I think the problem isn't that the files are incorrect, but rather the image viewer (e.g. the default viewer in ubuntu) doesn't know how to interpret the floating point data.

To test, you can try and visualise it using matplotlib instead:

import matplotlib.pyplot as plt
import imageio

img = imageio.imread("<path_to_img.tiff>")
plt.imshow(img)
plt.show()

Hopefully that will show that the correct data has been saved. Otherwise, shoot me a reply and I'll take another look.

Zhangeaky commented 4 years ago

Thanks! I just solved it by your solution