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

renamed gpu namespace -> cuda

This commit is contained in:
Vladislav Vinogradov
2013-08-28 15:45:13 +04:00
parent e12496d150
commit e895b7455e
343 changed files with 3882 additions and 3882 deletions
+6 -6
View File
@@ -742,9 +742,9 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1,
KeypointBasedMotionEstimatorGpu::KeypointBasedMotionEstimatorGpu(Ptr<MotionEstimatorBase> estimator)
: ImageMotionEstimatorBase(estimator->motionModel()), motionEstimator_(estimator)
{
detector_ = gpu::createGoodFeaturesToTrackDetector(CV_8UC1);
detector_ = cuda::createGoodFeaturesToTrackDetector(CV_8UC1);
CV_Assert(gpu::getCudaEnabledDeviceCount() > 0);
CV_Assert(cuda::getCudaEnabledDeviceCount() > 0);
setOutlierRejector(new NullOutlierRejector());
}
@@ -757,16 +757,16 @@ Mat KeypointBasedMotionEstimatorGpu::estimate(const Mat &frame0, const Mat &fram
}
Mat KeypointBasedMotionEstimatorGpu::estimate(const gpu::GpuMat &frame0, const gpu::GpuMat &frame1, bool *ok)
Mat KeypointBasedMotionEstimatorGpu::estimate(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, bool *ok)
{
// convert frame to gray if it's color
gpu::GpuMat grayFrame0;
cuda::GpuMat grayFrame0;
if (frame0.channels() == 1)
grayFrame0 = frame0;
else
{
gpu::cvtColor(frame0, grayFrame0_, COLOR_BGR2GRAY);
cuda::cvtColor(frame0, grayFrame0_, COLOR_BGR2GRAY);
grayFrame0 = grayFrame0_;
}
@@ -777,7 +777,7 @@ Mat KeypointBasedMotionEstimatorGpu::estimate(const gpu::GpuMat &frame0, const g
optFlowEstimator_.run(frame0, frame1, pointsPrev_, points_, status_);
// leave good correspondences only
gpu::compactPoints(pointsPrev_, points_, status_);
cuda::compactPoints(pointsPrev_, points_, status_);
pointsPrev_.download(hostPointsPrev_);
points_.download(hostPoints_);
+6 -6
View File
@@ -62,7 +62,7 @@ void SparsePyrLkOptFlowEstimator::run(
SparsePyrLkOptFlowEstimatorGpu::SparsePyrLkOptFlowEstimatorGpu()
{
CV_Assert(gpu::getCudaEnabledDeviceCount() > 0);
CV_Assert(cuda::getCudaEnabledDeviceCount() > 0);
}
@@ -88,8 +88,8 @@ void SparsePyrLkOptFlowEstimatorGpu::run(
void SparsePyrLkOptFlowEstimatorGpu::run(
const gpu::GpuMat &frame0, const gpu::GpuMat &frame1, const gpu::GpuMat &points0,
gpu::GpuMat &points1, gpu::GpuMat &status, gpu::GpuMat &errors)
const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, const cuda::GpuMat &points0,
cuda::GpuMat &points1, cuda::GpuMat &status, cuda::GpuMat &errors)
{
optFlowEstimator_.winSize = winSize_;
optFlowEstimator_.maxLevel = maxLevel_;
@@ -98,8 +98,8 @@ void SparsePyrLkOptFlowEstimatorGpu::run(
void SparsePyrLkOptFlowEstimatorGpu::run(
const gpu::GpuMat &frame0, const gpu::GpuMat &frame1, const gpu::GpuMat &points0,
gpu::GpuMat &points1, gpu::GpuMat &status)
const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, const cuda::GpuMat &points0,
cuda::GpuMat &points1, cuda::GpuMat &status)
{
optFlowEstimator_.winSize = winSize_;
optFlowEstimator_.maxLevel = maxLevel_;
@@ -109,7 +109,7 @@ void SparsePyrLkOptFlowEstimatorGpu::run(
DensePyrLkOptFlowEstimatorGpu::DensePyrLkOptFlowEstimatorGpu()
{
CV_Assert(gpu::getCudaEnabledDeviceCount() > 0);
CV_Assert(cuda::getCudaEnabledDeviceCount() > 0);
}
+4 -4
View File
@@ -123,7 +123,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat
#ifdef HAVE_OPENCV_GPUWARPING
void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const gpu::GpuMat &frame, gpu::GpuMat &result)
void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result)
{
CV_Assert(motions_ && stabilizationMotions_);
@@ -141,12 +141,12 @@ void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const gpu::GpuMat
Mat ML = S1 * getMotion(k1, idx, *motions2_) * getMotion(k1, idx, *motions_).inv() * S1.inv();
Mat MR = S1 * getMotion(idx, k2, *motions2_).inv() * getMotion(idx, k2, *motions_) * S1.inv();
gpu::calcWobbleSuppressionMaps(k1, idx, k2, frame.size(), ML, MR, mapx_, mapy_);
cuda::calcWobbleSuppressionMaps(k1, idx, k2, frame.size(), ML, MR, mapx_, mapy_);
if (result.data == frame.data)
result = gpu::GpuMat(frame.size(), frame.type());
result = cuda::GpuMat(frame.size(), frame.type());
gpu::remap(frame, result, mapx_, mapy_, INTER_LINEAR, BORDER_REPLICATE);
cuda::remap(frame, result, mapx_, mapy_, INTER_LINEAR, BORDER_REPLICATE);
}