高级会员

- 积分
- 755

- 威望
- 376
- 贡献
- 225
- 兑换币
- 237
- 注册时间
- 2014-5-2
- 在线时间
- 77 小时
- 毕业学校
- 济南大学
|
推荐

楼主 |
发表于 2016-5-22 19:22:56
|
只看该作者
实现代码如下
static void UserApp(void)
{
uint32_t i,j;
// static uint32_t cnt;
uint8_t A,B,C,D;
A=0;B=0;C=0;D=0;
for(i=0;i<OV7620_H;i++)
{
for(j=0;j<OV7620_W;j++)
{ A=CCDBuffer[i][j];
B=CCDBuffer[i][j+1];
C=CCDBuffer[i+1][j];
D=CCDBuffer[i+1][j+1];
CCDBuffer[i][j]=(int8_t)(ABS(D-A)+ABS(C-B));
if(CCDBufferw[i][j]>255)CCDBuffer[i][j]=255;
ili9320_write_pixel(OV7620_H - i, OV7620_W- j, RGB2COLOR(CCDBuffer[i][j], CCDBuffer[i][j], CCDBuffer[i][j]));
//printf("%d",(CCDBuffer[i][j]) );
}
}
} |
|