move allocMatFromBuf function to farneback.cpp:

* it is the only place, where it is used
* no need to make this function public
This commit is contained in:
Vladislav Vinogradov
2014-12-18 18:02:58 +03:00
parent fd6ef87c32
commit 9210d8e542
3 changed files with 10 additions and 10 deletions

View File

@@ -95,6 +95,16 @@ namespace cv { namespace cuda { namespace device { namespace optflow_farneback
}}}} // namespace cv { namespace cuda { namespace cudev { namespace optflow_farneback
namespace
{
GpuMat allocMatFromBuf(int rows, int cols, int type, GpuMat& mat)
{
if (!mat.empty() && mat.type() == type && mat.rows >= rows && mat.cols >= cols)
return mat(Rect(0, 0, cols, rows));
return mat = GpuMat(rows, cols, type);
}
}
void cv::cuda::FarnebackOpticalFlow::prepareGaussian(
int n, double sigma, float *g, float *xg, float *xxg,