mirror of
https://github.com/opencv/opencv.git
synced 2025-06-27 23:11:57 +08:00

- kernel added to a cv::gapi::video namespace - tests to check a kernels (based on cv::video tests for cv::buildOpticalFlowPyramid()) - tests for a combined G-API-pipeline (buildOpticalFlowPyramid() -> calcOpticalFlowPyrLK()) - tests for internal purposes added - custom function for comparison in tests implemented
57 lines
2.7 KiB
C++
57 lines
2.7 KiB
C++
// This file is part of OpenCV project.
|
|
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
// of this distribution and at http://opencv.org/license.html.
|
|
//
|
|
// Copyright (C) 2020 Intel Corporation
|
|
|
|
|
|
#include "precomp.hpp"
|
|
|
|
#include <opencv2/gapi/video.hpp>
|
|
|
|
namespace cv { namespace gapi {
|
|
using namespace video;
|
|
|
|
GBuildPyrOutput buildOpticalFlowPyramid(const GMat &img,
|
|
const Size &winSize,
|
|
const GScalar &maxLevel,
|
|
bool withDerivatives,
|
|
int pyrBorder,
|
|
int derivBorder,
|
|
bool tryReuseInputImage)
|
|
{
|
|
return GBuildOptFlowPyramid::on(img, winSize, maxLevel, withDerivatives, pyrBorder,
|
|
derivBorder, tryReuseInputImage);
|
|
}
|
|
|
|
GOptFlowLKOutput calcOpticalFlowPyrLK(const GMat &prevImg,
|
|
const GMat &nextImg,
|
|
const cv::GArray<cv::Point2f> &prevPts,
|
|
const cv::GArray<cv::Point2f> &predPts,
|
|
const Size &winSize,
|
|
const GScalar &maxLevel,
|
|
const TermCriteria &criteria,
|
|
int flags,
|
|
double minEigThresh)
|
|
{
|
|
return GCalcOptFlowLK::on(prevImg, nextImg, prevPts, predPts, winSize, maxLevel,
|
|
criteria, flags, minEigThresh);
|
|
}
|
|
|
|
GOptFlowLKOutput calcOpticalFlowPyrLK(const cv::GArray<cv::GMat> &prevPyr,
|
|
const cv::GArray<cv::GMat> &nextPyr,
|
|
const cv::GArray<cv::Point2f> &prevPts,
|
|
const cv::GArray<cv::Point2f> &predPts,
|
|
const Size &winSize,
|
|
const GScalar &maxLevel,
|
|
const TermCriteria &criteria,
|
|
int flags,
|
|
double minEigThresh)
|
|
{
|
|
return GCalcOptFlowLKForPyr::on(prevPyr, nextPyr, prevPts, predPts, winSize, maxLevel,
|
|
criteria, flags, minEigThresh);
|
|
}
|
|
|
|
} //namespace gapi
|
|
} //namespace cv
|