|
楼主 |
发表于 2012-12-6 11:33:22
|
显示全部楼层
这张图是摄像头对着屋顶上的灯看到的。好像是采集图片把图像给分开了,有大神知道需要调整哪些寄存器?????
以下是我的配置:
uint16_t Raw800x600Init[] =
{
0x3212,0x23 //start group 3
//pLL
//,0x303B,0x18 //PLL
//,0x303C,0x11 //PLL
,0x3037, 0x13 //Divided by 2 0x13
,0x3108, 0x01 //SCLK = pll_clki/2 0x01
//,0x300e, 0x41 //DVP enable
// ,0x3036,0x46 //PLL
// ,0x3037,0x13 //PLL
// ,0x3108,0x01 //LHJ
// ,0x3824,0x01
// Windowing Timing
,0x3800,0x00 // x_addr_st high byte HS 0x3800,0x00
,0x3801,0x00 // x_addr_st low byte HS
,0x3802,0x00 // y_addr_st high byte VS
,0x3803,0x04 // y_addr_st low byte VS
,0x3804,0x0a // x_addr_end high byte HW=1631 0x3804,0x06
,0x3805,0x3f // x_addr_end low byte HW 0x3805,0x5f
,0x3806,0x07 // y_addr_end high byte VH=1207
,0x3807,0x9b // y_addr_end low byte VH
,0x3808,0x03 // x_output_size high byte DVPHO = 800 ,0x3808,0x03
,0x3809,0x20 // x_output_size low byte DVPHO ,0x3809,0x20
,0x380a,0x02 // y_output_size high byte DVPVO = 600 ,0x380a,0x02
,0x380b,0x58 // y_output_size low byte DVPVO ,0x380b,0x58
,0x380c,0x07 // total horizontal size high byte HTS = 1300
,0x380d,0x68 // total horizontal size low byte HTS
,0x380e,0x03 // total vertical size high byte VTS = 616
,0x380f,0x68 // total vertical size low byte VTS
,0x3810,0x00 // x_offset high byte 0x3810,0x00
,0x3811,0x08 // x_offset low byte H offset 0x3811,0x08
,0x3812,0x00 // y_offset high byte V 0x3812,0x00
,0x3813,0x02 // y_offset low byte H offset 0x3813,0x02
//,0x3000,0x20 //reset timing
,0x3814,0x31 // x inc (0x31) for svga 0x31 V offset
,0x3815,0x31 // y inc (0x31) for svga V offset
};
uint16_t CamRegInit[] =
{
// 0x3103, 0x11 //PLL Clock Select
0x3008,0x82 // software reset 0x0103,0x01
// delay 2ms
,0x3103, 0x03 // PLL Clock Select 重要
,0x3017, 0xff // set Frex, Vsync, Href, PCLK, D[9:6] output enable LHJ ,0x3018, 0xf4
,0x3018, 0xff //D[5:0] output enable
,0x300e, 0x41 //DVP enable
,0x3630, 0x36 //unkonw
,0x3631, 0x0e
,0x3632, 0xe2
,0x3633, 0x12
,0x3621, 0xe0
,0x3704, 0xa0
,0x3703, 0x5a
,0x3715, 0x78
,0x3717, 0x01
,0x370b, 0x60
,0x3705, 0x1a
,0x3905, 0x02
,0x3906, 0x10
,0x3901, 0x0a
,0x3731, 0x12 //unkonw
,0x302d ,0x60 //System Control Registers
// ,0x3620 ,0x52 //unkonw
// ,0x371b ,0x20
// ,0x471c ,0x50 //unkonw
//
// ,0x3635 ,0x13 //unkonw
// ,0x3636 ,0x03
// ,0x3634 ,0x40
// ,0x3622 ,0x01 //unkonw
//mirror, flip, binning
,0x3820,0x41 // flip, binning Horizontal binning on 0x3820,0x80
,0x3821,0x01 // mirror, binning 0x3821,0x00
// ,0x3618 ,0x00 //unkonw
// ,0x3612 ,0x29
// ,0x3708 ,0x64
// ,0x3709 ,0x52
// ,0x370c ,0x03 //unkonw
// ,0x300e ,0x58 //DVP enable 0x45 MIPI
// ,0x302e ,0x00
//,0x3007, 0x02 //Enable VFIFO PCLK clock
,0x4300, 0xf8 //Raw
//,0x460c, 0x20 // VFIFO, PCLK auto
,0x4837, 0x16 //PCLK period
,0x4300 ,0xf8 //RAW
,0x501f ,0x03 //ISP
// ,0x4713 ,0x03 //JPEG mode 3
// ,0x4407 ,0x04 //Quantization scale JPEG
,0x440e ,0x00 //unkonw
,0x460b ,0x37 //Debug Mode
//ISP
,0x5001, 0x30 // SDE on, scale off, UV average off, CMX on, AWB on 0x5001, 0x83
,0x5000, 0x06 // ISP, Gamma, AWB statistic, AWB gain, Lenc, LCD adjustment, BPC, WPC 0x5000,0x83
//,0x501f, 0x03 //Format select ISP RAW (DPC)
// AEC
,0x3503,0x03 // AGC off, AEC off 相同
,0x3501,0x08 // 2048 / 16 = 128 lines to start with 相同
// DVP CTRL02, sync polarity
,0x4740,0x01 // undocumented 0x4708,0x02
//,0x3008, 0x02
//,0x3035 ,0x21
}
我现在主要在调整这个CamRegInit[]数组里面的配置,但怎么配置都没有明显的效果,有哪个高手给指点指点一二啊!!!!!!!! |
|