我用dm6437,在做车道线识别,现在可以检测直线了,但是会出现卡屏问题, for ( n=0 ;; n++ )
{
CcdcallocFB[n % NO_OF_BUFFERS] = FBAddr;
/* grab a fresh video input frame */
FVID_exchange(CcdcHandle,&FBAddr);
pWork = (Uint8 *)(FBAddr->frame.frameBufferPtr);
//U,Y,V,Y
for ( i = 0 ; i < inputHeight ; i ++ )
{
for(j = 0 ; j < inputWidth ; j++)
{
/* remove the color information */
*pWork = 0x80;pWork+=2;
}
}
/* Set as input buffer to Encoder: */
memcpy(displayFramBuff,(Uint8 *)(FBAddr->frame.frameBufferPtr), sizeof(displayFramBuff));
src = (Uint8 *)displayFramBuff;
dst = (Uint8 *)(FBAddr->frame.frameBufferPtr);
/* Write back and invalidate cache */
Memory_cacheWbInv(src, framesize);
/* get black-white result */
ICETEKDM6437B2sobel(src,dst,inputWidth, inputHeight);
// lane(dst, inputWidth, inputHeight);
//if(fun_line)
// lane1((unsigned short *)dst, inputWidth, inputHeight);
if(fun_Hough)
Hough(src,dst, inputWidth, inputHeight,&R,&Th);
if(fun_Houghline)
Houghline(dst,inputWidth, inputHeight,(float)R,(float)Th);
/* Write back and invalidate cache */
Memory_cacheWbInv(dst, framesize);
/* display the video frame */
此帖出自
小平头技术问答
一周热门 更多>