Ask Your Question

anatrong's profile - activity

2018-10-12 00:11:02 -0500 received badge  Notable Question (source)
2017-02-22 15:30:44 -0500 received badge  Popular Question (source)
2015-03-03 14:18:22 -0500 asked a question 16bit raw file stream analysis


I would like to analyse binary stream data. Data is 16-bit binary stream of 256x256 grayscale images with 256 bytes gaps stored in one long stream file. This is effectively video. Can you give me any advice how such file can be loaded to to openCV? Also files might be very big (>8GB), so I would be grateful if someone can point me to a way how to access this file sequentially.

I can imagine, this can be done on video files, but I did not find any codec supporting 16bit grayscale and I would actually like to avoid any conversion. Though 16bit can be possibly remapped into 24bit rgb space, but this looks highly speculative.

I included example of 16bit 256x256 file with 2 images, there is 256 bytes heather and 256 bytes gap between them.

C:\fakepath\2images.jpg (this is not jpg, only raw file)