Ask Your Question
1

Work with function calcOpticalFlowPyrLK

asked Nov 23 '12

FreeVMS gravatar image

Can we use «MatOfPoint2f prevPts» an array of all the points MatOfPoint2f[] in method Video.calcOpticalFlowPyrLK as an input parameter, like in OpenCV for Windows?

For Android I only can do the following:

Video.calcOpticalFlowPyrLK(Cadr_Prev,Cadr_Current,
 Point_PrevPts[iindex],
 Point_CurrentPts[iindex],
 _bstatus[iindex], 
 _trackError[iindex]);

P.S. I run in cycle the function calcOpticalFlowPyrLK for each point and it affects on productivity.

Preview: (hide)

2 answers

Sort by » oldest newest most voted
2

answered Nov 23 '12

Andrey Pavlenko gravatar image

You can create MatOfPoint2f from Point[] array via MatOfPoint2f::fromArray() method. Is this what you mean?

Preview: (hide)

Comments

Its work. Thank you very much!

FreeVMS gravatar imageFreeVMS (Nov 26 '12)edit
0

answered Dec 14 '12

V.G. gravatar image

If you believe, that this issue has been resolved, could you please accept the most appropriate answer (even if it's your own one) and close this question. It would greatly improve navigation and overall experience with OpenCV Q&A.

Thanks.

Preview: (hide)

Question Tools

Stats

Asked: Nov 23 '12

Seen: 882 times

Last updated: Dec 14 '12