Extract black and white image from android camera's NV21 format

前端 未结 6 1749
你的背包
你的背包 2020-11-28 02:18

I have done some google-ing around and couldn\'t find enough information about this format. It is the default format for camera preview. Can anyone suggest good sources of i

6条回答
  •  遥遥无期
    2020-11-28 02:35

    I also had lots of headache because of this preview format.

    The best I could find are these:

    http://www.fourcc.org/yuv.php#NV21

    http://v4l2spec.bytesex.org/spec/r5470.htm

    It seems that the Y component is the first width*height bytes int the array you get.

    Some more informational links:

    http://msdn.microsoft.com/en-us/library/ms867704.aspx#yuvformats_yuvsampling

    http://msdn.microsoft.com/en-us/library/ff538197(v=vs.85).aspx

    Hope this helps.

提交回复
热议问题