[問題] opencv cvpyrmeanshift 的用法
- PyrMeanShiftFiltering -
void cvPyrMeanShiftFiltering( const CvArr* src, CvArr* dst,
double sp, double sr, int max_level=1,
CvTermCriteria termcrit =
cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1));
有說明:
src
輸入的8-比特,3-通道圖象.
dst
和源圖象相同大小,相同格式的輸出圖象.
sp
The spatial window radius.
空間窗的半徑
sr
The color window radius.
色彩窗的半徑
max_level
Maximum level of the pyramid for the segmentation.
termcrit
Termination criteria: when to stop meanshift iterations.
------------------------------------------------------------------
我已經把每個參數都用值替代進去了
但是最後一個 termcrit一直沒有辦法成功
想要問問看有沒有人會用這個function的 ~"~
CvTermCriteria termcrit = cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1)
cvPyrMeanShiftFiltering(cv_img_src,cv_mean_shift,3,3,1,termcrit);
cv_img_src 是 source image
cv_mean_shift 是 destination image
半徑跟窗口大小我是先隨便用
最後一個就會顯示 Declaration syntax error
把termcrit 改成 cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1)也沒有用 @@
麻煩大家幫幫忙了
卡關有點久 >""< 也找不太到example code
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.51.123
推
04/07 15:15, , 1F
04/07 15:15, 1F
→
04/07 15:16, , 2F
04/07 15:16, 2F
→
04/07 15:21, , 3F
04/07 15:21, 3F
→
04/07 15:23, , 4F
04/07 15:23, 4F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章