Video Capture formats

Source: Internet
Author: User

These days, a student is debugging video capture.ProgramEncountered a problem. When he uses the capgetvideoformat function to obtain the video format, he finds that m_bmp info.bmiheader.bibitcount is 16, which he thinks is a 16-bit RGB format. However, no matter whether the format is rgb565 or rgb555, it is found that the converted YUV file is incorrect. Run his program on my Sony notebook. The value of m_bmp info.bmiheader.bicompression is 1498831189, which indicates that the data collected by the camera in the notebook is not in the normal 16-bit RGB data format, it is in uyvy format. The uyvy format is a variant of the YUV format. You can find detailed instructions on the Internet and will not go into details here.

To know how many values bicompression has, you can refer to: http://files.codes-sources.com/fichier.aspx? Id = 45735 & F = src/org/hypik/webcamlib/codecs. java. The encoding of various video compression is listed in detail here.

 

How can I know the output format supported by my camera? You can use the capdlgvideoformat function: 

Capdlgvideoformat (m_wndvideo );

 

This function activates the video format Setting dialog box of the camera driver, as shown in.

 

My camera supports two output formats: uyvy and yuv2. If you set m_bmp info.bmiheader.bicompression to a value other than the two types, and then use capsetvideoformat to change the output format, the driver will not succeed because it is not supported.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.