Well nothing mayor, i have tried the usual:
print("Saving Images to file.")
color_mat = cv2.resize(color_mat,(640,480))
depth_mat = cv2.resize(depth_mat,(640,480))
cv2.imwrite('color000.jpeg',color_mat)
cv2.imwrite('depth000.png',depth_mat)
This for the color image i get the following:
color000.jpeg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 640x480, frames 3
and for the depth image its more problematic cuz when i open the png i get a black image not the real image i see.
depth000.png: PNG image data, 640 x 480, 8-bit/color RGB, non-interlaced
I would like to save them in the other formats.
I have seen the command
convertTo
but not sure how to use it .
for example if i do:
gray_image = cv2.cvtColor(depth_mat, cv2.COLOR_BGR2GRAY)
this is the output:
depth000.png: PNG image data, 640 x 480, 8-bit grayscale, non-interlaced
not sure how to make it 16-bits, still the image is completely black so there most be a way to save a depth image
this displays the image as expected:
cv2.imshow('DepthMap', depth_mat)