Метод | Описание | |
---|---|---|
BM ( Byte>.Image |
Calculates optical flow for overlapped blocks block_size.width * 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)
|
|
Farneback ( Byte>.Image |
Computes dense optical flow using Gunnar Farneback's algorithm
|
|
HS ( Byte>.Image |
Computes flow for every pixel of the first input image using Horn & Schunck algorithm
|
|
LK ( Byte>.Image |
Computes flow for every pixel of the first input image using Lucas & Kanade algorithm
|
|
PyrLK ( Byte>.Image |
Calculates optical flow for a sparse feature set using iterative Lucas-Kanade method in pyramids
|
|
PyrLK ( Byte>.Image |
Calculates optical flow for a sparse feature set using iterative Lucas-Kanade method in pyramids
|
public static BM ( Byte>.Image |
||
prev | Byte>.Image | First image |
curr | Byte>.Image | Second image |
blockSize | Size of basic blocks that are compared. | |
shiftSize | Block coordinate increments. | |
maxRange | Size of the scanned neighborhood in pixels around block. | |
usePrevious | bool | Uses previous (input) velocity field. |
velx | Single>.Image | Horizontal component of the optical flow of floor((prev->width - block_size.width)/shiftSize.width) x floor((prev->height - block_size.height)/shiftSize.height) size. |
vely | Single>.Image | Vertical component of the optical flow of the same size velx. |
Результат | void |
public static Farneback ( Byte>.Image |
||
prev0 | Byte>.Image | The first 8-bit single-channel input image |
next0 | Byte>.Image | The second input image of the same size and the same type as prevImg |
flowX | Single>.Image | The computed flow image for x-velocity; will have the same size as prevImg |
flowY | Single>.Image | The computed flow image for y-velocity; will have the same size as prevImg |
pyrScale | double | Specifies the image scale (!1) to build the pyramids for each image. pyrScale=0.5 means the classical pyramid, where each next layer is twice smaller than the previous |
levels | int | The number of pyramid layers, including the initial image. levels=1 means that no extra layers are created and only the original images are used |
winSize | int | The averaging window size; The larger values increase the algorithm robustness to image noise and give more chances for fast motion detection, but yield more blurred motion field |
iterations | int | The number of iterations the algorithm does at each pyramid level |
polyN | int | Size of the pixel neighborhood used to find polynomial expansion in each pixel. The larger values mean that the image will be approximated with smoother surfaces, yielding more robust algorithm and more blurred motion field. Typically, poly n=5 or 7 |
polySigma | double | Standard deviation of the Gaussian that is used to smooth derivatives that are used as a basis for the polynomial expansion. For poly n=5 you can set poly sigma=1.1, for poly n=7 a good value would be poly sigma=1.5 |
flags | CvEnum | The operation flags |
Результат | void |
public static HS ( Byte>.Image |
||
prev | Byte>.Image | First image, 8-bit, single-channel |
curr | Byte>.Image | Second image, 8-bit, single-channel |
usePrevious | bool | Uses previous (input) velocity field |
velx | Single>.Image | Horizontal component of the optical flow of the same size as input images, 32-bit floating-point, single-channel |
vely | Single>.Image | Vertical component of the optical flow of the same size as input images, 32-bit floating-point, single-channel |
lambda | double | Lagrangian multiplier |
criteria | Criteria of termination of velocity computing | |
Результат | void |
public static LK ( Byte>.Image |
||
prev | Byte>.Image | First image |
curr | Byte>.Image | Second image |
winSize | Size of the averaging window used for grouping pixels | |
velx | Single>.Image | Horizontal component of the optical flow of the same size as input images |
vely | Single>.Image | Vertical component of the optical flow of the same size as input images |
Результат | void |
public static PyrLK ( Byte>.Image |
||
prev | Byte>.Image | First frame, at time t |
curr | Byte>.Image | Second frame, at time t + dt |
prevPyrBuffer | Byte>.Image | Buffer for the pyramid for the first frame. If it is not NULL, the buffer must have a sufficient size to store the pyramid from level 1 to level #level ; the total size of (image_width+8)*image_height/3 bytes is sufficient |
currPyrBuffer | Byte>.Image | Similar to prev_pyr, used for the second frame |
prevFeatures | Array of points for which the flow needs to be found | |
winSize | Size of the search window of each pyramid level | |
level | int | Maximal pyramid level number. If 0 , pyramids are not used (single level), if 1 , two levels are used, etc |
criteria | Specifies when the iteration process of finding the flow for each point on each pyramid level should be stopped | |
flags | Emgu | Flags |
currFeatures | Array of 2D points containing calculated new positions of input features in the second image | |
status | Byte | Array. Every element of the array is set to 1 if the flow for the corresponding feature has been found, 0 otherwise |
trackError | float | Array of double numbers containing difference between patches around the original and moved points |
Результат | void |
public static PyrLK ( Byte>.Image |
||
prev | Byte>.Image | First frame, at time t |
curr | Byte>.Image | Second frame, at time t + dt |
prevFeatures | Array of points for which the flow needs to be found | |
winSize | Size of the search window of each pyramid level | |
level | int | Maximal pyramid level number. If 0 , pyramids are not used (single level), if 1 , two levels are used, etc |
criteria | Specifies when the iteration process of finding the flow for each point on each pyramid level should be stopped | |
currFeatures | Array of 2D points containing calculated new positions of input features in the second image | |
status | Byte | Array. Every element of the array is set to 1 if the flow for the corresponding feature has been found, 0 otherwise |
trackError | float | Array of double numbers containing difference between patches around the original and moved points |
Результат | void |