The resulting file is reported as codec: FFV1, ColorSpace: Y, BitDepth/String: 16 by MediaInfo so I think it looks ok. And the images I use to create the video are truly 16 bit png files. I can load them into OpenCV (IMREAD_ANYDEPTH)) and read their 16-bit value.
Now, I am trying to read the video sequence with videocapture:
which gives me an 8UC3 image that can be shown, but the precision is lost (only 8 upper bits remain).
If I try for example
then I get a 16UC1 image, but it is filled with a constant value of 52685.
How can I get the real 16-bit value from the video? I am using Windows 10 and OpenCV 4.4.0 and C++. I think I did not compile it with OpenNI support, but since I am not connecting a device i doubt it matters.
Any advice will be appreciated.