Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Open 16 bit video file (proprietary format) with OpenCV

I would very much like to import in OpenCV a video file which is in a proprietary format - from a Xenics-Gobi infrared camera - file extension *.xvi.

The file is a 16 bit video format and with the image processing program that came with the camera i can export frames as 16 bit png frames that contain thermal information.

Would it be possible somehow to open the video files in OpenCV and process the frames?

Thank you for your time.

Open 16 bit video file (proprietary format) with OpenCV

I would very much like to import in OpenCV a video file which is in a proprietary format - from a Xenics-Gobi infrared camera - file extension *.xvi.

The file is a 16 bit video format and with the image processing program that came with the camera i can export frames as 16 bit png frames that contain thermal information.

Would it be possible somehow to open the video files in OpenCV and process the frames?

Thank you for your time.

I've just found out how the .xvi file is structured:

The first 1024 bytes of an .XVI file is reserved for header information. After this block of 1kb you have raw frame data in the following format: Pixel(x,y) = block[ x+(y*width) ] Where each pixel is represented by an integer scaled up to the nearest CPU representation. For example, if the bit size is 12, you will get a 16bit integer. For bit sizes larger than 16 you will get a 32 bit integer, followed by a 64 bit representation (and so on ...) Note: All integers used are in Intel byte order.

Maybe with the above information someone could help me import the file in openCV (python code).

Thank you again