You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.
10
-
* @param name Function name
11
-
* @param prevImg First 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.
12
-
* @param nextImg Second input image or pyramid of the same size and the same type as prevImg.
13
-
* @param prevPts Vector of 2D points for which the flow needs to be found; point coordinates must be single-precision floating-point numbers.
14
-
* @param nextPts Output vector of 2D points (with single-precision floating-point coordinates) containing the calculated new positions of input features in the second image; when OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.
15
-
* @param status Output status vector (of unsigned chars); each element of the vector is set to 1 if the flow for the corresponding features has been found, otherwise, it is set to 0.
16
-
* @param err Output vector of errors; each element of the vector is set to an error for the corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't found then the error is not defined (use the status parameter to find such cases).
17
-
* @param winSize Size of the search window at each pyramid level.
18
-
* @param maxLevel 0-based maximal pyramid level number; if set to 0, pyramids are not used (single level), if set to 1, two levels are used, and so on; if pyramids are passed to input then algorithm will use as many levels as pyramids have but no more than maxLevel.
19
-
* @param criteria Parameter, specifying the termination criteria of the iterative search algorithm (after the specified maximum number of iterations criteria.maxCount or when the search window moves by less than criteria.epsilon).
20
-
* @param flags Operation flags:
21
-
* * OPTFLOW_USE_INITIAL_FLOW uses initial estimations, stored in nextPts; if the flag is not set, then prevPts is copied to nextPts and is considered the initial estimate.
22
-
* * OPTFLOW_LK_GET_MIN_EIGENVALS use minimum eigen values as an error measure (see minEigThreshold description); if the flag is not set, then L1 distance between patches around the original and a moved point, divided by number of pixels in a window, is used as a error measure.
23
-
* @param minEigThreshold The algorithm calculates the minimum eigen value of a 2x2 normal matrix of optical flow equations (this matrix is called a spatial gradient matrix in [36]), divided by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding feature is filtered out and its flow is not processed, so it allows to remove bad points and get a performance boost.
24
-
*/
25
-
invoke(
26
-
name: 'calcOpticalFlowPyrLK',
27
-
prevImg: Mat,
28
-
nextImg: Mat,
29
-
prevPts: Mat,
30
-
nextPts: Mat,
31
-
status: Mat,
32
-
err: Mat,
33
-
winSize?: Size,
34
-
maxLevel?: number,
35
-
criteria?: TermCriteria,
36
-
flags?: OpticalFlowFlags,
37
-
minEigThreshold?: number
38
-
): void;
39
-
40
5
/**
41
6
* Compares a template against overlapped image regions
0 commit comments