1 | initial version |
Depth image is generally 16 bit (unsigned short) data. Most image and video formats don't support this.
The best solution is to use compatible image formats, like TIF or PNG. I think imwrite
supports CV_16U
type for these formats (anyway, check the type of the depth matrix).
Another solution would be to dump the raw data into a binary file. A bit more work, but it will surely work.