1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge remote-tracking branch 'origin/2.4'

Conflicts:
	3rdparty/ffmpeg/ffmpeg_version.cmake
	cmake/OpenCVFindLibsGrfmt.cmake
	cmake/templates/cvconfig.h.cmake
	modules/bioinspired/doc/retina/index.rst
	modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst
	modules/calib3d/src/precomp.hpp
	modules/contrib/src/inputoutput.cpp
	modules/contrib/src/precomp.hpp
	modules/core/include/opencv2/core/internal.hpp
	modules/core/include/opencv2/core/types_c.h
	modules/core/src/drawing.cpp
	modules/core/src/precomp.hpp
	modules/core/src/system.cpp
	modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst
	modules/features2d/doc/common_interfaces_of_feature_detectors.rst
	modules/features2d/include/opencv2/features2d/features2d.hpp
	modules/features2d/src/precomp.hpp
	modules/flann/src/precomp.hpp
	modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst
	modules/gpu/doc/image_filtering.rst
	modules/gpu/doc/image_processing.rst
	modules/gpu/doc/video.rst
	modules/gpu/perf/perf_imgproc.cpp
	modules/gpu/perf4au/main.cpp
	modules/gpu/src/imgproc.cpp
	modules/gpu/src/precomp.hpp
	modules/gpu/test/test_imgproc.cpp
	modules/highgui/CMakeLists.txt
	modules/highgui/test/test_precomp.hpp
	modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst
	modules/imgproc/src/precomp.hpp
	modules/java/generator/src/cpp/Mat.cpp
	modules/legacy/src/precomp.hpp
	modules/ml/doc/k_nearest_neighbors.rst
	modules/ml/src/precomp.hpp
	modules/nonfree/doc/feature_detection.rst
	modules/nonfree/src/precomp.hpp
	modules/objdetect/include/opencv2/objdetect/objdetect.hpp
	modules/objdetect/src/cascadedetect.cpp
	modules/objdetect/src/hog.cpp
	modules/objdetect/src/precomp.hpp
	modules/objdetect/test/test_latentsvmdetector.cpp
	modules/ocl/src/hog.cpp
	modules/ocl/src/opencl/objdetect_hog.cl
	modules/ocl/src/precomp.hpp
	modules/photo/src/precomp.hpp
	modules/stitching/src/precomp.hpp
	modules/superres/perf/perf_precomp.hpp
	modules/superres/src/optical_flow.cpp
	modules/superres/src/precomp.hpp
	modules/superres/test/test_precomp.hpp
	modules/ts/include/opencv2/ts.hpp
	modules/video/src/precomp.hpp
	modules/videostab/src/precomp.hpp
	modules/world/src/precomp.hpp
This commit is contained in:
Roman Donchenko
2013-08-06 13:56:49 +04:00
119 changed files with 3713 additions and 2281 deletions
@@ -58,6 +58,7 @@ namespace cv
CV_EXPORTS Ptr<DenseOpticalFlowExt> createOptFlow_Farneback();
CV_EXPORTS Ptr<DenseOpticalFlowExt> createOptFlow_Farneback_GPU();
CV_EXPORTS Ptr<DenseOpticalFlowExt> createOptFlow_Farneback_OCL();
CV_EXPORTS Ptr<DenseOpticalFlowExt> createOptFlow_Simple();
+2 -3
View File
@@ -46,7 +46,6 @@
#include "opencv2/ocl.hpp"
using namespace std;
using namespace std::tr1;
using namespace testing;
using namespace perf;
using namespace cv;
@@ -113,8 +112,8 @@ PERF_TEST_P(Size_MatType, SuperResolution_BTVL1_OCL,
declare.time(5 * 60);
const Size size = get<0>(GetParam());
const int type = get<1>(GetParam());
const Size size = std::tr1::get<0>(GetParam());
const int type = std::tr1::get<1>(GetParam());
Mat frame(size, type);
declare.in(frame, WARMUP_RNG);
+74
View File
@@ -909,4 +909,78 @@ Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_DualTVL1_OCL()
return new DualTVL1_OCL;
}
///////////////////////////////////////////////////////////////////
// FarneBack
namespace
{
class FarneBack_OCL : public oclOpticalFlow
{
public:
AlgorithmInfo* info() const;
FarneBack_OCL();
void collectGarbage();
protected:
void impl(const cv::ocl::oclMat& input0, const cv::ocl::oclMat& input1, cv::ocl::oclMat& dst1, cv::ocl::oclMat& dst2);
private:
double pyrScale_;
int numLevels_;
int winSize_;
int numIters_;
int polyN_;
double polySigma_;
int flags_;
ocl::FarnebackOpticalFlow alg_;
};
CV_INIT_ALGORITHM(FarneBack_OCL, "DenseOpticalFlowExt.FarneBack_OCL",
obj.info()->addParam(obj, "pyrScale", obj.pyrScale_);
obj.info()->addParam(obj, "numLevels", obj.numLevels_);
obj.info()->addParam(obj, "winSize", obj.winSize_);
obj.info()->addParam(obj, "numIters", obj.numIters_);
obj.info()->addParam(obj, "polyN", obj.polyN_);
obj.info()->addParam(obj, "polySigma", obj.polySigma_);
obj.info()->addParam(obj, "flags", obj.flags_));
FarneBack_OCL::FarneBack_OCL() : oclOpticalFlow(CV_8UC1)
{
pyrScale_ = alg_.pyrScale;
numLevels_ = alg_.numLevels;
winSize_ = alg_.winSize;
numIters_ = alg_.numIters;
polyN_ = alg_.polyN;
polySigma_ = alg_.polySigma;
flags_ = alg_.flags;
}
void FarneBack_OCL::impl(const cv::ocl::oclMat& input0, const cv::ocl::oclMat& input1, cv::ocl::oclMat& dst1, cv::ocl::oclMat& dst2)
{
alg_.pyrScale = pyrScale_;
alg_.numLevels = numLevels_;
alg_.winSize = winSize_;
alg_.numIters = numIters_;
alg_.polyN = polyN_;
alg_.polySigma = polySigma_;
alg_.flags = flags_;
alg_(input0, input1, dst1, dst2);
}
void FarneBack_OCL::collectGarbage()
{
alg_.releaseMemory();
oclOpticalFlow::collectGarbage();
}
}
Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_Farneback_OCL()
{
return new FarneBack_OCL;
}
#endif