一.opencv 中的光流法函数
[cpp] view plaincopyprint?
1. calcOpticalFlowPyrLK
2. CalculatesanopticalflowforasparsefeaturesetusingtheiterativeLucas-
Kanademethodwithpyramids.
3.
4. voidcalcOpticalFlowPyrLK(InputArrayprevImg,InputArraynextImg,InputArrayp
revPts,
5. InputOutputArraynextPts,OutputArraystatus,OutputArrayerr,
6. SizewinSize=Size(15,15),intmaxLevel=3,TermCriteriacrite-
7. ria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,0.01),
8. doublederivLambda=0.5,intflags=0)
9.
10. Parameters
11. prevImg–First8-bitsingle-channelor3-channelinputimage.
12. nextImg–SecondinputimageofthesamesizeandthesametypeasprevImg.
13. prevPts–Vectorof2Dpointsforwhichtheflowneedstobefound.Thepoint
coordinates
14. mustbesingle-precisionfloating-pointnumbers.
15. nextPts–Outputvectorof2Dpoints(withsingle-precisionfloating-pointcoo
rdinates)
16. containingthecalculatednewpositionsofinputfeaturesinthesecondimage.
When
17. OPTFLOW_USE_INITIAL_FLOWflagispassed,thevectormusthavethesamesizeas
inthe
18. input.
19. status–Outputstatusvector.Eachelementofthevectorissetto1ifthef
lowforthe
20. correspondingfeatureshasbeenfound.Otherwise,itissetto0.
21. err–Outputvectorthatcontainsthedifferencebetweenpatchesaroundtheor
iginaland
22. movedpoints.
23. winSize–Sizeofthesearchwindowateachpyramidlevel.
24.
25. maxLevel–0-basedmaximalpyramidlevelnumber.Ifsetto0,pyramidsarenot
used
26. (singlelevel).Ifsetto1,twolevelsareused,andsoon.
27. criteria–Parameterspecifyingtheterminationcriteriaoftheiterativesear
chalgorithm
28. (afterthespecifiedmaximumnumberofiterationscriteria.maxCountorwhenth
esearch
29. windowmovesbylessthancriteria.epsilon.
30. derivLambda–Notused.
评论0
最新资源