OpenCV
5.0.0alpha
Open Source Computer Vision
|
Functions | |
GMat | cv::gapi::BackgroundSubtractor (const GMat &src, const cv::gapi::video::BackgroundSubtractorParams &bsParams) |
Gaussian Mixture-based or K-nearest neighbours-based Background/Foreground Segmentation Algorithm. The operation generates a foreground mask. | |
std::tuple< GArray< GMat >, GScalar > | cv::gapi::buildOpticalFlowPyramid (const GMat &img, const Size &winSize, const GScalar &maxLevel, bool withDerivatives=true, int pyrBorder=BORDER_REFLECT_101, int derivBorder=BORDER_CONSTANT, bool tryReuseInputImage=true) |
Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK. | |
std::tuple< GArray< Point2f >, GArray< uchar >, GArray< float > > | cv::gapi::calcOpticalFlowPyrLK (const GArray< GMat > &prevPyr, const GArray< GMat > &nextPyr, const GArray< Point2f > &prevPts, const GArray< Point2f > &predPts, const Size &winSize=Size(21, 21), const GScalar &maxLevel=3, const TermCriteria &criteria=TermCriteria(TermCriteria::COUNT|TermCriteria::EPS, 30, 0.01), int flags=0, double minEigThresh=1e-4) |
std::tuple< GArray< Point2f >, GArray< uchar >, GArray< float > > | cv::gapi::calcOpticalFlowPyrLK (const GMat &prevImg, const GMat &nextImg, const GArray< Point2f > &prevPts, const GArray< Point2f > &predPts, const Size &winSize=Size(21, 21), const GScalar &maxLevel=3, const TermCriteria &criteria=TermCriteria(TermCriteria::COUNT|TermCriteria::EPS, 30, 0.01), int flags=0, double minEigThresh=1e-4) |
Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids. | |
GMat | cv::gapi::KalmanFilter (const GMat &measurement, const GOpaque< bool > &haveMeasurement, const cv::gapi::KalmanParams &kfParams) |
GMat | cv::gapi::KalmanFilter (const GMat &measurement, const GOpaque< bool > &haveMeasurement, const GMat &control, const cv::gapi::KalmanParams &kfParams) |
Standard Kalman filter algorithm http://en.wikipedia.org/wiki/Kalman_filter. | |
GMat cv::gapi::BackgroundSubtractor | ( | const GMat & | src, |
const cv::gapi::video::BackgroundSubtractorParams & | bsParams ) |
#include <opencv2/gapi/video.hpp>
Gaussian Mixture-based or K-nearest neighbours-based Background/Foreground Segmentation Algorithm. The operation generates a foreground mask.
src | input image: Floating point frame is used without scaling and should be in range [0,255]. |
bsParams | Set of initialization parameters for Background Subtractor kernel. |
std::tuple< GArray< GMat >, GScalar > cv::gapi::buildOpticalFlowPyramid | ( | const GMat & | img, |
const Size & | winSize, | ||
const GScalar & | maxLevel, | ||
bool | withDerivatives = true, | ||
int | pyrBorder = BORDER_REFLECT_101, | ||
int | derivBorder = BORDER_CONSTANT, | ||
bool | tryReuseInputImage = true ) |
#include <opencv2/gapi/video.hpp>
Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.
img | 8-bit input image. |
winSize | window size of optical flow algorithm. Must be not less than winSize argument of calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels. |
maxLevel | 0-based maximal pyramid level number. |
withDerivatives | set to precompute gradients for the every pyramid level. If pyramid is constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally. |
pyrBorder | the border mode for pyramid layers. |
derivBorder | the border mode for gradients. |
tryReuseInputImage | put ROI of input image into the pyramid if possible. You can pass false to force data copying. |
std::tuple< GArray< Point2f >, GArray< uchar >, GArray< float > > cv::gapi::calcOpticalFlowPyrLK | ( | const GArray< GMat > & | prevPyr, |
const GArray< GMat > & | nextPyr, | ||
const GArray< Point2f > & | prevPts, | ||
const GArray< Point2f > & | predPts, | ||
const Size & | winSize = Size(21, 21), | ||
const GScalar & | maxLevel = 3, | ||
const TermCriteria & | criteria = TermCriteria(TermCriteria::COUNT|TermCriteria::EPS, 30, 0.01), | ||
int | flags = 0, | ||
double | minEigThresh = 1e-4 ) |
#include <opencv2/gapi/video.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::tuple< GArray< Point2f >, GArray< uchar >, GArray< float > > cv::gapi::calcOpticalFlowPyrLK | ( | const GMat & | prevImg, |
const GMat & | nextImg, | ||
const GArray< Point2f > & | prevPts, | ||
const GArray< Point2f > & | predPts, | ||
const Size & | winSize = Size(21, 21), | ||
const GScalar & | maxLevel = 3, | ||
const TermCriteria & | criteria = TermCriteria(TermCriteria::COUNT|TermCriteria::EPS, 30, 0.01), | ||
int | flags = 0, | ||
double | minEigThresh = 1e-4 ) |
#include <opencv2/gapi/video.hpp>
Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.
See [36] .
prevImg | first 8-bit input image (GMat) or pyramid (GArray<GMat>) constructed by buildOpticalFlowPyramid. |
nextImg | second input image (GMat) or pyramid (GArray<GMat>) of the same size and the same type as prevImg. |
prevPts | GArray of 2D points for which the flow needs to be found; point coordinates must be single-precision floating-point numbers. |
predPts | GArray of 2D points initial for the flow search; make sense only when OPTFLOW_USE_INITIAL_FLOW flag is passed; in that case the vector must have the same size as in the input. |
winSize | size of the search window at each pyramid level. |
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. |
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). |
flags | operation flags:
|
minEigThresh | 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. |
GMat cv::gapi::KalmanFilter | ( | const GMat & | measurement, |
const GOpaque< bool > & | haveMeasurement, | ||
const cv::gapi::KalmanParams & | kfParams ) |
#include <opencv2/gapi/video.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The case of Standard Kalman filter algorithm when there is no control in a dynamic system. In this case the controlMatrix is empty and control vector is absent.
measurement | input matrix: 32-bit or 64-bit float 1-channel matrix containing measurements. |
haveMeasurement | dynamic input flag that indicates whether we get measurements at a particular iteration. |
kfParams | Set of initialization parameters for Kalman filter kernel. |
GMat cv::gapi::KalmanFilter | ( | const GMat & | measurement, |
const GOpaque< bool > & | haveMeasurement, | ||
const GMat & | control, | ||
const cv::gapi::KalmanParams & | kfParams ) |
#include <opencv2/gapi/video.hpp>
Standard Kalman filter algorithm http://en.wikipedia.org/wiki/Kalman_filter.
measurement | input matrix: 32-bit or 64-bit float 1-channel matrix containing measurements. |
haveMeasurement | dynamic input flag that indicates whether we get measurements at a particular iteration . |
control | input matrix: 32-bit or 64-bit float 1-channel matrix contains control data for changing dynamic system. |
kfParams | Set of initialization parameters for Kalman filter kernel. |
If measurement matrix is given (haveMeasurements == true), corrected state will be returned which corresponds to the pipeline cv::KalmanFilter::predict(control) -> cv::KalmanFilter::correct(measurement). Otherwise, predicted state will be returned which corresponds to the call of cv::KalmanFilter::predict(control).