OV7670 Raw output Bayer decoding

Source: Internet
Author: User

Today finally took care of OV7670 raw output, excitement!!

Reference Links:

Https://pikacode.com/liplianin/s2-liplianin/commit/dab97f5d6e3b

http://www.amobbs.com/forum.php?mod=viewthread&tid=4736337

Http://www.52rd.com/bbs/Detail_RD.BBS_263309_86_1_1.html

  1. #define Rgb565_mask_red 0xf800
  2. #define Rgb565_mask_green 0X07E0
  3. #define Rgb565_mask_blue 0x001f
  4. void Rgb565_2_rgb24 (BYTE *rgb24, WORD rgb565)
  5. {
  6. //extract RGB
  7. RGB24[2] = (rgb565 & rgb565_mask_red) >> 11;
  8. RGB24[1] = (rgb565 & rgb565_mask_green) >> 5;
  9. Rgb24[0] = (rgb565 & rgb565_mask_blue);
  10. //amplify the image
  11. RGB24[2] <<= 3;
  12. RGB24[1] <<= 2;
  13. Rgb24[0] <<= 3;
  14. }

OV7670 Raw output Bayer decoding

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.