How to save thermal camera video temperature data as 16bit grayscale using ffmpeg

I want to record temperature data from every pixel in the field of view from a radiometric thermal camera (InfiRay P2 Pro). One of the video streams is 256×384 and is a combination of a grayscale scene at the top 256×192, and as I understand the raw temperature data of the scene at the bottom 256×192 (which appears green).
The pixel_format=yuyv422

Using ffmpeg and ffplay I can see the combined image, and can crop to just the bottom data. I then want to save that data as 16 bit grayscale.

This command saves the bottom half but the video is still green and when I open in Matlab the data is 8bit.

ffmpeg -f dshow -video_size 256x384 -i video="USB Camera" -vf "crop=h=(ih/2):y=(ih/2)" -pixel_format gray16le -video_size 256x192 out.avi

How can I save this data from the bottom half of the combined stream into a grayscale video which will store the full 16bit information for later analysis?

Read more here: Source link