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
is there any chance, you can access the video from your proprietary api ? once you have a pixel buffer, and image dimensions, it's a breeze to make a cv::Mat from that.
Hi and thank you for the answer. The SDK/API costs a lot like 1000 eur and have not bought it with the camera (stupid mistake). So looking now for some shortcut maybe someone here has used a xenics infrared camera with opencv?