函數(shù)形式

int cvMeanShift( const CvArr* prob_image, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp );

參數(shù)

??prob_image

??目標(biāo)直方圖的反向投影(見 cvCalcBackProject).

??window

??初始搜索窗口

??criteria

??確定窗口搜索停止的準(zhǔn)則

??comp

??生成的結(jié)構(gòu),包含收斂的搜索窗口坐標(biāo) (comp->rect 字段) 與窗口內(nèi)部所有象素點(diǎn)的和 (comp->area 字段).

函數(shù)說明

函數(shù) cvMeanShift 在給定反向投影和初始搜索窗口位置的情況下,用迭代方法尋找目標(biāo)中心。當(dāng)搜索窗口中心的移動小于某個(gè)給定值時(shí)或者函數(shù)已經(jīng)達(dá)到最大迭代次數(shù)時(shí)停止迭代。函數(shù)返回迭代次數(shù)。