Calculates the optical flow for two images by using the block matching method.
void cvCalcOpticalFlowBM
(const CvArr* prev, const CvArr* curr, CvSize block_size, CvSize shift_size, CvSize max_range, int use_previous, CvArr* velx, CvArr* vely)¶
cv.
CalcOpticalFlowBM
(prev, curr, blockSize, shiftSize, max_range, usePrevious, velx, vely) → None¶Parameters: |
|
---|
The function calculates the optical flow for overlapped blocks block_size.width x block_size.height
pixels each, thus the velocity fields are smaller than the original images. For every block in prev
the functions tries to find a similar block in curr
in some neighborhood of the original block or shifted by (velx(x0,y0), vely(x0,y0))
block as has been calculated by previous function call (if use_previous=1
)
Calculates the optical flow for two images using Horn-Schunck algorithm.
void cvCalcOpticalFlowHS
(const CvArr* prev, const CvArr* curr, int use_previous, CvArr* velx, CvArr* vely, double lambda, CvTermCriteria criteria)¶
cv.
CalcOpticalFlowHS
(prev, curr, usePrevious, velx, vely, lambda, criteria) → None¶Parameters: |
|
---|
The function computes the flow for every pixel of the first input image using the Horn and Schunck algorithm [Horn81]. The function is obsolete. To track sparse features, use calcOpticalFlowPyrLK()
. To track all the pixels, use calcOpticalFlowFarneback()
.
Calculates the optical flow for two images using Lucas-Kanade algorithm.
void cvCalcOpticalFlowLK
(const CvArr* prev, const CvArr* curr, CvSize win_size, CvArr* velx, CvArr* vely)¶
cv.
CalcOpticalFlowLK
(prev, curr, winSize, velx, vely) → None¶Parameters: |
|
---|
The function computes the flow for every pixel of the first input image using the Lucas and Kanade algorithm [Lucas81]. The function is obsolete. To track sparse features, use calcOpticalFlowPyrLK()
. To track all the pixels, use calcOpticalFlowFarneback()
.