Functions | |
cvbres_t | OptFlowCreateColorfulOrientationPlot (IMG ImgV, float MaxVectorLength, cvbval_t ScaleSize, IMG &COPImage) |
Creates colorful orientation plot. More... | |
cvbres_t | OptFlowLKCalculate (OPTFLOWLK OpticalFlowHandle, IMG Img1, cvbdim_t Img1Index, IMG Img2, cvbdim_t Img2Index, PIXELLIST &result) |
Calculates optical flow for an image pair. More... | |
cvbres_t | OptFlowLKCalculateSeq (OPTFLOWLK OpticalFlowHandle, IMG Img, cvbdim_t ImgIndex, PIXELLIST &result) |
Calculates optical flow. More... | |
OPTFLOWLK | OptFlowLKCreate (cvbdim_t Width, cvbdim_t Height) |
Creates a handle for calculating the optical flow based on the pyramidal Lucas-Kanade algorithm. More... | |
cvbres_t | OptFlowLKGetDistanceThreshold (OPTFLOWLK OpticalFlowHandle, float &Threshold) |
Gets the distance threshold for maximal movement vector length. More... | |
cvbres_t | OptFlowLKGetFeatureThreshold (OPTFLOWLK OpticalFlowHandle, float &Threshold) |
Gets minimal Eigen value for a point being considered as a feature. More... | |
cvbres_t | OptFlowLKGetNumGaussPyramidLevels (OPTFLOWLK OpticalFlowHandle, cvbval_t &PyrLevels) |
Gets the number of levels for the Gaussian pyramid. More... | |
cvbres_t | OptFlowLKGetNumIterationsPerPyramidLevel (OPTFLOWLK OpticalFlowHandle, cvbval_t &IterationsPerLevel) |
Gets the maximal number of iterations to be calculated on every level of the Gaussian-pyramid. More... | |
cvbres_t | OptFlowLKGetWindowSize (OPTFLOWLK OpticalFlowHandle, cvbdim_t &WindowSize) |
Gets the search window size for tracking moved feature points. More... | |
cvbres_t | OptFlowLKRecalculateFeaturePoints (OPTFLOWLK OpticalFlowHandle) |
Recalculates the feature points that are used for the optical flow calculation. More... | |
cvbres_t | OptFlowLKSetDistanceThreshold (OPTFLOWLK OpticalFlowHandle, float Threshold) |
Sets the distance threshold for the optical flow calculation. More... | |
cvbres_t | OptFlowLKSetFeatureSeparation (OPTFLOWLK OpticalFlowHandle, cvbval_t Separation) |
Sets the feature separation in pixels. More... | |
cvbres_t | OptFlowLKSetFeatureThreshold (OPTFLOWLK OpticalFlowHandle, float Threshold) |
Sets minimal Eigen value for a point being considered as a feature. More... | |
cvbres_t | OptFlowLKSetNumGaussPyramidLevels (OPTFLOWLK OpticalFlowHandle, cvbval_t PyrLevels) |
Sets the number Gaussian-pyramid levels to use. More... | |
cvbres_t | OptFlowLKSetNumIterationsPerPyramidLevel (OPTFLOWLK OpticalFlowHandle, cvbval_t IterationsPerLevel) |
Sets the maximal number of iterations to be calculated on every level of the Gaussian-pyramid. More... | |
cvbres_t | OptFlowLKSetWindowSize (OPTFLOWLK OpticalFlowHandle, cvbdim_t WindowSize) |
Sets the search window size for tracking moved feature points. More... | |
cvbres_t OptFlowCreateColorfulOrientationPlot | ( | IMG | ImgV, |
float | MaxVectorLength, | ||
cvbval_t | ScaleSize, | ||
IMG & | COPImage | ||
) |
Creates colorful orientation plot.
Calculates a colorful orientation plot to display the vector-fields of optical flow calculation. The angle of each vector is set to the hue-channel in HSV-color-model and the magnitude is set to value-channel. Afterwards the result-image is converted to the RGB color model.
[in] | ImgV | The handle velocity vector image. |
[in] | MaxVectorLength | Maximal vector length. Crops vector length with this value (> 0). |
[in] | ScaleSize | The width of the color scale around the image in pixels. Must be >= 0. |
[out] | COPImage | Handle to receive to the image that contains the colorful orientation plot of the vector field. Remember that this image will need to be released with ReleaseObject() once it is no longer needed. |
CVCError.h
cvbres_t OptFlowLKCalculate | ( | OPTFLOWLK | OpticalFlowHandle, |
IMG | Img1, | ||
cvbdim_t | Img1Index, | ||
IMG | Img2, | ||
cvbdim_t | Img2Index, | ||
PIXELLIST & | result | ||
) |
Calculates optical flow for an image pair.
This function calculates the optical flow between two images Img1 and Img2. It starts a new sequence with Img1, thus new feature points are calculated on Img1.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | Img1 | The first image. The image plane must consist of integer or floating point pixels. |
[in] | Img1Index | Plane index of ImgIn to process. |
[in] | Img2 | The second image (e.g., the one following Img1) to which the optical flow is calculated. The same restrictions as for ImgIn apply. |
[in] | Img2Index | Plane index of ImgRef to process. |
[out] | result | Four-dimensional PIXELLIST containing first the key-point from Img1 and then the motion vector to the matched key-point in Img2. Release the returned list via ReleaseObject when not needed anymore. |
CVCError.h
cvbres_t OptFlowLKCalculateSeq | ( | OPTFLOWLK | OpticalFlowHandle, |
IMG | Img, | ||
cvbdim_t | ImgIndex, | ||
PIXELLIST & | result | ||
) |
Calculates optical flow.
This function determines the optical flow between the last processed image and a new Img.
No recalculation of the feature points is done, but the old optical flow is used to estimate the new locations.
After each calculation it may happen that some feature points are not found anymore and thus are removed. Use OptFlowLKRecalculateFeaturePoints to do a full recalculation to get a fresh list of feature points.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | Img | The current image. The image plane must consist of integer or floating point pixels. |
[in] | ImgIndex | Plane index of ImgIn to process. |
[out] | result | Four-dimensional PIXELLIST containing first the key-point from the last processed image and then the motion vector to the matched key-point in Img. Release the returned list via ReleaseObject when not needed anymore. |
CVCError.h
OPTFLOWLK OptFlowLKCreate | ( | cvbdim_t | Width, |
cvbdim_t | Height | ||
) |
Creates a handle for calculating the optical flow based on the pyramidal Lucas-Kanade algorithm.
Creates an optical flow state object that can afterwards be used with the functions of the optical flow module of the Foundation Package (all functions working on the OPTFLOWLK type). Note that the object created by this function must be disposed by calling ReleaseObject from the CVCImg.dll on it.
[in] | Width | Width of the image to process in pixels. |
[in] | Height | Height of the image to process in pixels. |
cvbres_t OptFlowLKGetDistanceThreshold | ( | OPTFLOWLK | OpticalFlowHandle, |
float & | Threshold | ||
) |
Gets the distance threshold for maximal movement vector length.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[out] | Threshold | Threshold for maximal movement vector length per level. |
CVCError.h
cvbres_t OptFlowLKGetFeatureThreshold | ( | OPTFLOWLK | OpticalFlowHandle, |
float & | Threshold | ||
) |
Gets minimal Eigen value for a point being considered as a feature.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[out] | Threshold | Minimal Eigen value for a feature point. |
CVCError.h
cvbres_t OptFlowLKGetNumGaussPyramidLevels | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbval_t & | PyrLevels | ||
) |
Gets the number of levels for the Gaussian pyramid.
For detecting large optical-flow vectors it is necessary to use a larger number of Gaussian pyramid levels. Every additional level doubles the maximum magnitude that can be detected. Without additional levels, only motion vectors up to about 1 to 2 pixels can be detected (depending on the window size used for polynomial expansion).
[in] | OpticalFlowHandle | The handle of the optical flow state object. |
[out] | PyrLevels | Number of scale-levels. 0 means no additional level. |
CVCError.h
cvbres_t OptFlowLKGetNumIterationsPerPyramidLevel | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbval_t & | IterationsPerLevel | ||
) |
Gets the maximal number of iterations to be calculated on every level of the Gaussian-pyramid.
The estimation of optical-flow-vectors can be improved by repeating the calculation fore some iterations.
A higher iteration count may increase processing time during optical flow calculation.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[out] | IterationsPerLevel | Maximal number of iterations per pyramid-level. |
CVCError.h
cvbres_t OptFlowLKGetWindowSize | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbdim_t & | WindowSize | ||
) |
Gets the search window size for tracking moved feature points.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[out] | WindowSize | Search window size. |
CVCError.h
cvbres_t OptFlowLKRecalculateFeaturePoints | ( | OPTFLOWLK | OpticalFlowHandle | ) |
Recalculates the feature points that are used for the optical flow calculation.
New feature points are always calculated at the start of a new sequence (e.g. if OptFlowLKCalculate is called or one of the settings is changed). When OptFlowLKCalculateSeq is called no recalculation of the feature points is done, but the old optical flow is used to estimate the new locations.
After each calculation it may happen that some feature points are not found anymore and thus are removed. Use this function to do a full recalculation to get a fresh list of feature points.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
CVCError.h
cvbres_t OptFlowLKSetDistanceThreshold | ( | OPTFLOWLK | OpticalFlowHandle, |
float | Threshold | ||
) |
Sets the distance threshold for the optical flow calculation.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | Threshold | Threshold for maximal distance between old and new feature point per level. |
CVCError.h
cvbres_t OptFlowLKSetFeatureSeparation | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbval_t | Separation | ||
) |
Sets the feature separation in pixels.
The feature separation defines the minimal distance between feature points used for the optical flow. Locations with corners normally have a cluster of high Eigen values. To reduce the number of key points and thus to speed up processing use this value.
This setting takes effect only when a new optical flow sequence is started or OptFlowLKRecalculateFeaturePoints is called.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | Separation | The feature separation in pixels; must be larger or equal to 0. Uses the cheaper L1 distance. |
CVCError.h
cvbres_t OptFlowLKSetFeatureThreshold | ( | OPTFLOWLK | OpticalFlowHandle, |
float | Threshold | ||
) |
Sets minimal Eigen value for a point being considered as a feature.
High Eigen values indicate corner points in the image where the optical flow can be measured well.
This setting takes effect only when a new optical flow sequence is started or OptFlowLKRecalculateFeaturePoints is called.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | Threshold | Minimal Eigen value for a feature point (>= 0). |
CVCError.h
cvbres_t OptFlowLKSetNumGaussPyramidLevels | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbval_t | PyrLevels | ||
) |
Sets the number Gaussian-pyramid levels to use.
For detecting large optical-flow vectors it is necessary to use a larger number of Gaussian pyramid levels. Every additional level doubles the maximum magnitude that can be detected. Without additional levels, only motion vectors up to about 1 to 2 pixels can be detected (depending on the window size used for polynomial expansion.
[in] | OpticalFlowHandle | The handle of the optical flow state object. |
[in] | PyrLevels | Number of scale-levels. 0 means no additional level. Maximum is limited by the kernel and image size. |
CVCError.h
cvbres_t OptFlowLKSetNumIterationsPerPyramidLevel | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbval_t | IterationsPerLevel | ||
) |
Sets the maximal number of iterations to be calculated on every level of the Gaussian-pyramid.
The estimation of optical-flow-vectors can be improved by repeating the calculation. Typically, one to three iterations are sufficient.
A higher iteration count will increase processing time during optical flow calculation.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | IterationsPerLevel | Number of iterations per pyramid-level. Must be >= 1. |
CVCError.h
cvbres_t OptFlowLKSetWindowSize | ( | OPTFLOWLK | OpticalFlowHandle, |
cvbdim_t | WindowSize | ||
) |
Sets the search window size for tracking moved feature points.
Larger windows increase the processing time and reduce the accuracy, but allow larger motion vectors and may be more stable in noisy images. Use OptFlowLKSetNumIterationsPerPyramidLevel for longer motion vectors and high accuracy.
[in] | OpticalFlowHandle | Handle of the optical flow state object. |
[in] | WindowSize | Search window size. |
CVCError.h