felixchenfy/ros_detect_planes_from_depth_img

Format of depth image

Closed this issue · 4 comments

exnx commented

Hi, I'm a little new to working with depth data. I have an image coming the Realsense D435 camera, and saved it as an inverse colorization png. But that doesn't seem to work (not 2 channels). Do you have tips on how to get it in the right format? Thanks so much!

Eric

exnx commented

Oh ok, I am using the realsense library directly into my Python script, and processing with OpenCV.

I'm curious how you save your depth data? As a grayscale? Is there a way to save it in opencv format? I tried taking the raw depth output from realsense:
frames = pipeline.wait_for_frames()
depth_frame = frames.get_depth_frame()

and then converting to a numpy array. I then normalized to be between 0-255, and dtype=np.uint8, but that doesn't let me save the image in that format. Would love to see how you saved it?

Thanks again!

Eric

exnx commented

great got it to work on a single image! Looks good!