I was involved in driver development for a sensor there I faced this problem of viewing raw data:
ffmpeg -t 30 -f v4l2 -channel 0 -video_size 752×480 -i /dev/video0 -pix_fmt nv12 -r 30 -b:v 64k -c:v copy Desktop/raw.nut
save the raw file to play the raw file with vlc use below command
“C:\Program Files (x86)\VideoLAN\VLC\vlc.exe” –colorthres-saturationthres=0 “C:\Users\nandan\Desktop\raw.nut”
run raw2_video.nut with vlc and change the saturation to zero.
in vlc Goto:
tools>effects and filter>video effects>
tick image adjust
set saturaion to 0.
For raw image viewing yuv toolkit is really good tried both on Ubuntu and windows
set resolution to your image size. If the image name has resolution in it yuv toolkit can pick that. Set Image format 8bit grayscale or whatever.