91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

dm642上使用meanshift算法實現目標跟蹤

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?“stdio.h“
#include?“rectangle.h“
#include?“NewStruct.h“

//////////////////////////////////////////////////跟蹤參數//////////////////////////////////////
#define?winwidth?40//窗口寬度
#define?winheight?40//窗口高度
#define?epsiternum?50//迭代次數
#define?epsdist?10//步長閾值
///////////////////////////////////////////////////////////////////////////////////////////////////

extern?int?EXTERNALHEAP;


dsp_point?dpoint(short?x?short?y)
{
??dsp_point?temp;
??temp.x?=?x;
??temp.y?=?y;
??return?temp;
}

VPORT_PortParams?EVMDM642_vDisParamsPort?
??=?EVMDM642_DIS_PARAMS_PORT_DEFAULT;


static?VPORTDIS_Params?EVMDM642_vDisParamsChan?
?? =?EVMDM642_DIS_PARAMS_CHAN_BT656_DEFAULT(PAL);

static?SAA7105_ConfParams?EVMDM642_vDisParamsSAA7105?
?? =?EVMDM642_DIS_PARAMS_SAA7105_SDTV_DEFAULT(PAL720?SVIDEO);

static?VPORTCAP_Params?EVMDM642_vCapParamsChan?
?? =?EVMDM642_CAP_PARAMS_CHAN_embedDED_DEFAULT(PAL720);

FVID_Handle??disChan;

void?VideoLoopbackInit()
{
????Int?status;
????EVMDM642_vDisParamsChan.segId?=?EXTERNALHEAP;
????EVMDM642_vDisParamsSAA7105.hI2C?=?DM642_I2C_hI2C;
????/******************************************************/
????/*?initialization?of?display?driver???????????????????*/
????/******************************************************/
????disChan?=?FVID_create(“/VP1DISPLAY“?IOM_OUTPUT
????????&status?(Ptr)&EVMDM642_vDisParamsChan?NULL);

????FVID_control(disChan?VPORT_CMD_EDC_base?+?EDC_CONFIG?
????????(Ptr)&EVMDM642_vDisParamsSAA7105);
????????
}

void?VideoLoopbackStart()
{
????FVID_control(disChan?VPORT_CMD_START?NULL);??
}

void?tskVideoLoopback()
{
????
????Int?i;
SCOM_Handle?fromInput1toDISfromDIStoInput1;
////////////////////////////////////函數聲明&變量定義////////////////////////////////////////
Int?newobjectmode;//新目標標志位
Int?initrackmode;//初始跟蹤標志位
Int?iternum;//迭代次數
Int?trackmode;//跟蹤標志
dsp_point?firstpoint;//目標中心點
dsp_point?nextpoint;//跟蹤下一點
dsp_point?calcpoint;//計算目標中心點
double?objecthist[256];//目標區域權重直方圖
double?nexthist[256];//候選目標區域權重直方圖

void?drawRect(Uint8*?Imageshort?image_width?short?image_height?dsp_point?point?short?objectW?short?objectH);//畫矩形框
void?calc_colorhist(Uint8*?imageYdsp_point?ppointdouble*?qu);//計算權重直方圖
dsp_point?calc_location(Uint8*?imageYdsp_point?spointdouble*?qdouble*?p);//定位計算

/////////////////////////////////////////////////////////////////////////////////////////////////
????FVID_frame?*disframeBuf;
????FVID_frame?*capframeBuf;??
????Int?numLinesDis?=?EVMDM642_vDisParamsChan.imgVSizeFld1;
????
????Int?numLinesCap?=?EVMDM642_vCapParamsChan.fldYStop1?-
??????????????????????EVMDM642_vCapParamsChan.fldYStrt1+1;


????Int?numLines?=?(numLinesDis?>?numLinesCap)???numLi

評論

共有 條評論