DSP课程设计报告-人脸识别

begY=i-pixelnum;

f=endY;

endY=i; }

}

e=begY;

} curnum=0; }

//计算框内白像素百分比 /*

b=(d-c)*(f-e); for(j=e;j

for(i=c;i

if (*(Uint8 *)(tmpYbuffer+i*numPixels+j)==0xff) } }

g=(double)a/(double)b; if(g!=0) { if(g<0.25) else } else h=3;

20

a++; h=2; h=1;

g=f-e;

else h=2;

*)(capYbuffer + i * numPixels),

*)(tmpYbuffer + i * numPixels),

*)(capCbbuffer + i * (numPixels >> 1)),

*)(tmpCbbuffer + i * (numPixels >> 1)),

numPixels>>1);

*)(capCrbuffer + i * (numPixels >> 1)),

*)(tmpCrbuffer + i * (numPixels >> 1)),

numPixels>>1);

//////////////////////

*/

if(g<10)h=3;

else if(g>210)h=1;

for(i=0;i

DAT_copy((void

(void numPixels); /*传送Cb缓冲区*/ DAT_copy((void (void

/*传送Cr缓冲区*/ DAT_copy((void (void

}

NAME(64,200,h);

/*画框*/ //画横线

for

(i=begX;i

21

*)(tmpYbuffer+(begY+j)*720+i)=0xff; *)(tmpYbuffer+(begY+j)*720+numLines*numPixels/2+i)=0xff; *)(tmpYbuffer+(endY+j)*720+i)=0xff; *)(tmpYbuffer+(endY+j)*720+numLines*numPixels/2+i)=0xff;

*)(tmpYbuffer+j*720+(begX+i))=0xff;

*)(tmpYbuffer+j*720+(endX+i))=0xff;

*)(tmpYbuffer + i * numPixels),

*)(disYbuffer + i * numPixels),

22

{

for(j=0;j<5;j++) { //上边沿

*(Uint8

*(Uint8 //下边沿 *(Uint8 *(Uint8 }

}

//画竖线

for(j=begY;j

for(i=0;i<5;i++) {

//左边沿 *(Uint8 //右边沿 *(Uint8 } }

/*图像显示*/

for(i=0;i

*)(tmpCbbuffer + i * (numPixels >> 1)),

*)(disCbbuffer + i * (numPixels >> 1)),

numPixels>>1);

*)(tmpCrbuffer + i * (numPixels >> 1)),

*)(disCrbuffer + i * (numPixels >> 1)),

numPixels>>1);

/*----------------------------------------------------------*/

}

void NAME(int init_lie, int init_hang,int wenzi) {

unsigned

test_word=0x80,tre_coast=0x00;

23

/*传送Cb缓冲区*/ DAT_copy((void (void

/*传送Cr缓冲区*/ DAT_copy((void (void

}

} } for(;;) {}

/*采集与回放*/

int i=0,j=0, num=0,n=0; //static unsigned int num; unsigned

char

//while(F16x16[num]!='\\0')

for(i=init_hang;i

for(j=init_lie;j

if(j==init_lie||(n%8==0)) {

联系客服:779662525#qq.com(#替换为@)