大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE稳定放心使用
之前调过一款摄像头,是MT9V034, 最近在调的是OV7725摄像头,感觉OV7725摄像头比MT9V034要难,特别是寄存器配置,要想玩转一款摄像头,必须要熟悉它的寄存器配置,而且要亲自去调试,然后才能对它有很好的理解。下面是自己的一点见解,可能不完全对,不过希望对初学者有所帮助吧。
一、将所有寄存器的值复位到默认值状态。
寄存器地址 寄存器名称 寄存器值
0x12 COM7 0x80 //复位
二、 设置图像输出格式。
寄存器地址 寄存器名称 寄存器值
0x12 COM7 0X40 //QVGA(320*240 ),YUV输出格式
0x29 HOutSize 0X50 // QVGA(320*240), 0x28 (160)
0x2C VOutSize 0X78 // QVGA (320*240),0x3C (120)
0x17 HSTART 0X3F //QVGA(320*240 )
0X18 HSIZE 0X50 //QVGA(320*240 )
0X19 VSTRT 0X03 //QVGA(320*240 )
0X20 VSIZE 0X78 //QVGA(320*240 )
———————————————————————————————————————————-
12 | COM7 | 00 | RW | Common Control 7 Bit[7]: SCCB Register Reset 0: No change 1: Resets all registers to default values Bit[6]: Resolution selection 0: VGA 1: QVGA Bit[5]: BT.656 protocol ON/OFF selection Bit[4]: Sensor RAW Bit[3:2]: RGB output format control 00: GBR4:2:2 01: RGB565 10: RGB555 11: RGB444 Bit[1:0]: Output format control 00: YUV 01: Processed Bayer RAW 10: RGB 11: Bayer RAW |
——————————————————————————————————————————-
三、和图片曝光强弱有关的寄存器
1、自动曝光
寄存器地址 寄存器名称 寄存器值
0X0D COM4 0X40 //整个窗口进行自动曝光
————————————————————————————————————————–
0D | COM4 | 41 | RW | Common Control 4 Bit[7:6]: PLL frequency control 00: Bypass PLL 01: PLL 4x 10: PLL 6x 11: PLL 8x Bit[5:4]: AEC evaluate window 00: Full window 01: 1/2 window 10: 1/4 window 11: Low 2/3 window Bit[3:0]: Reserved |
————————————————————————————————————————-
0x13 COM8 0XFF // 打开自动增益(AGC)、自动白平衡(AWB)、自动曝光(AEC)
————————————————————————————————————————-
13 | COM8 | 8F | RW | Common Control 8 Bit[7]: Enable fast AGC/AEC algorithm Bit[6]: AEC – Step size limit 0: Step size is limited to vertical blank 1: Unlimited step size Bit[5]: Banding filter ON/OFF Bit[4]: Enable AEC below banding value Bit[3]: Fine AEC ON/OFF control Bit[2]: AGC Enable Bit[1]: AWB Enable Bit[0]: AEC Enable |
———————————————————————————————————————————–
0X24 AEW 0X40 //控制自动曝光强弱
———————————————————————————————————————————————
24 | AEW | 75 | RW | AGC/AEC – Stable Operating Region (Upper Limit) |
———————————————————————————————————————————————-
0X25 AEB 0X15 //控制自动曝光的强弱
—————————————————————————————————————————————————-
25 | AEB | 63 | RW | AGC/AEC – Stable Operating Region (Lower Limit) |
——————————————————————————————————————————————————
0X26 VPT 0X32 //快速模式工作区
—————————————————————————————————————————————————————
26 | VPT | D4 | RW | AGC/AEC Fast Mode Operating Region Bit[7:4]: High nibble of upper limit of fast mode control zone Bit[3:0]: High nibble of lower limit of fast mode control zone |
—————————————————————————————————————————————————————–
0XA6 SDE 0X24 //使能控制图片亮暗的寄存器
—————————————————————————————————————————————
A6 | SDE | 00 | RW | Special Digital Effect Control Bit[7]: Reserved Bit[6]: Negative image enable Bit[5]: Gray scale image enable Bit[4]: V fixed value enable Bit[3]: U fixed value enable Bit[2]: Contrast/Brightness enable Bit[1]: Saturation enable Bit[0]: Hue enable |
—————————————————————————————————————————————-
0X9B BRIGHT 0X08 //定义自动曝光时图片的亮度增益,此值越大,图片越亮
————————————————————————————————————————–
9B | BRIGHT | 00 | RW | Brightness Control |
————————————————————————————————————————–
0XAB SIGN 0X06 //定义BRIGHT 的高位是正数,还是负数,如果为0x0e,则图片亮度是负的;0-255,图片越来越亮;0 ~ -127,图片越来越亮
———————————————————————————————————————————–
AB | SIGN | 06 | RW | Sign Bit for Hue and Brightness Bit[7:4]: Reserved Bit[3]: Brightness sign bit Bit[2]: Reserved Bit[1]: Sign bit for HueSin (in Cr’ equation) Bit[0]: Sign bit for HueSin (in Cb’ equation) |
————————————————————————————————————————————–
2、手动曝光
寄存器地址 寄存器名称 寄存器值
0X0D COM4 0X40 //整个窗口进行自动曝光
———————————————————————————————————————–
0D | COM4 | 41 | RW | Common Control 4 Bit[7:6]: PLL frequency control 00: Bypass PLL 01: PLL 4x 10: PLL 6x 11: PLL 8x Bit[5:4]: AEC evaluate window 00: Full window 01: 1/2 window 10: 1/4 window 11: Low 2/3 window Bit[3:0]: Reserved
|
———————————————————————————————————————–
0x13 COM8 0Xcc // 关闭自动曝光(AEC)
————————————————————————————————————————————
13 | COM8 | 8F | RW | Common Control 8 Bit[7]: Enable fast AGC/AEC algorithm Bit[6]: AEC – Step size limit 0: Step size is limited to vertical blank 1: Unlimited step size Bit[5]: Banding filter ON/OFF Bit[4]: Enable AEC below banding value Bit[3]: Fine AEC ON/OFF control Bit[2]: AGC Enable Bit[1]: AWB Enable Bit[0]: AEC Enable
|
——————————————————————————————————————————————
0x08 AECH 0X00 //曝光值得高8位 ,改变AECH和AEC的值,可以改变图片亮度
—————————————————————————————————————————————————
08 | AECH | 00 | RW | Exposure Value – AEC MSBs Bit[7:0]: AEC[15:8] (see register AECfor AEC[7:0 Automatically updated based on chip output format |
—————————————————————————————————————————————————-
0x10 AEC 0X40 //曝光值得低8位
—————————————————————————————————————————————————
10 | AEC | 40 | RW | Exposure Value Bit[7:0]: AEC[7:0] (see register AECHfor AEC[15:8]) |
——————————————————————————————————————————————————-
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/190166.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...