登录 | 首页 -> 华新鲜事 -> 社会百科 | 切换到:传统版 / sForum | 树形列表
请教openCV高手
<<始页  [1]  末页>> 

请教openCV高手怎样使用 void cvCalcOpticalFlowPyrLK
(IplImage* imgA, IplImage* imgB, IplImage* pyrA,
IplImage* pyrB, CvPoint2D32f* featuresA, CvPoint2D32f* featuresB, int
count, CvSize winSize, int level, char* status, float* error,
CvTermCriteria criteria, int flags );

这个method?就是apply Locus-Kanade到image pryamid上的那个。我是按照它的这个API来的,可是关于status这个argument,它的介绍是:

status ------ Array. Every element of the array is set to 1 if the flow for the
corresponding feature has been found, 0 otherwise

但是当我运行完这个method后试着打印出status里的值时,结果却全是null,既不是1也不是0。请教是不是这个method根本没有真正运行起来呢?那位大侠用过这个method,执教一下应该怎么用?有什么特别要注意的地方么?不胜感谢。
[wjyms (11-2 10:32, Long long ago)] [ 传统版 | sForum ][登录后回复]1楼

did you initilize status as a char array?[逃课专家 (11-2 11:32, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼

(引用 逃课专家:did you initilize status as a char array?)yes[wjyms (11-2 13:59, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼

did you pass ur status by reference?[黑色星期天 (11-3 17:42, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼

(引用 黑色星期天:did you pass ur status by reference?)yes[wjyms (11-3 19:20, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼

did you initialize and store all the features points in Array featuresA?Anyway, try to check the opencv source code, if you still can't figure out what is wrong.

PS. Are you doing cs4243 project?............:p.......
[这就是生活 (11-4 1:51, Long long ago)] [ 传统版 | sForum ][登录后回复]6楼

cannot find any sample code online?[黑色星期天 (11-4 14:32, Long long ago)] [ 传统版 | sForum ][登录后回复]7楼

(引用 这就是生活:did you initialize and store all the features points in Array featuresA?Anyway, try to check the opencv source code, if you stil...)en,i know who u r now... :p[wjyms (11-4 18:00, Long long ago)] [ 传统版 | sForum ][登录后回复]8楼


<<始页  [1]  末页>> 
登录 | 首页 -> 华新鲜事 -> 社会百科 | [刷新本页] | 切换到:传统版 / sForum