From 87bbcccea50368d0d0988b01491addfebaf58fc1 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Tue, 14 Feb 2012 10:27:33 +0000 Subject: [PATCH] fixed orb bug commited by mistake --- modules/gpu/include/opencv2/gpu/gpu.hpp | 2 +- modules/gpu/src/orb.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/gpu/include/opencv2/gpu/gpu.hpp b/modules/gpu/include/opencv2/gpu/gpu.hpp index 8440ef2cc..421252a8a 100644 --- a/modules/gpu/include/opencv2/gpu/gpu.hpp +++ b/modules/gpu/include/opencv2/gpu/gpu.hpp @@ -1664,7 +1664,7 @@ private: GpuMat pattern_; std::vector imagePyr_; - cv::Ptr> maskPyr_; + std::vector maskPyr_; GpuMat buf_; diff --git a/modules/gpu/src/orb.cpp b/modules/gpu/src/orb.cpp index f0c17815c..2854404b4 100644 --- a/modules/gpu/src/orb.cpp +++ b/modules/gpu/src/orb.cpp @@ -493,7 +493,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas CV_Assert(mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size())); imagePyr_.resize(params_.n_levels_); - maskPyr_->resize(params_.n_levels_); + maskPyr_.resize(params_.n_levels_); for (int level = 0; level < static_cast(params_.n_levels_); ++level) { @@ -502,8 +502,8 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas Size sz(cvRound(image.cols * scale), cvRound(image.rows * scale)); ensureSizeIsEnough(sz, image.type(), imagePyr_[level]); - ensureSizeIsEnough(sz, CV_8UC1, (*maskPyr_)[level]); - (*maskPyr_)[level].setTo(Scalar::all(255)); + ensureSizeIsEnough(sz, CV_8UC1, maskPyr_[level]); + maskPyr_[level].setTo(Scalar::all(255)); // Compute the resized image if (level != static_cast(params_.first_level_)) @@ -528,7 +528,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas image.copyTo(imagePyr_[level]); if (!mask.empty()) - mask.copyTo((*maskPyr_)[level]); + mask.copyTo(maskPyr_[level]); } // Filter keypoints by image border @@ -537,7 +537,7 @@ void cv::gpu::ORB_GPU::buildScalePyramids(const GpuMat& image, const GpuMat& mas Rect inner(params_.edge_threshold_, params_.edge_threshold_, sz.width - 2 * params_.edge_threshold_, sz.height - 2 * params_.edge_threshold_); buf_(inner).setTo(Scalar::all(255)); - bitwise_and((*maskPyr_)[level], buf_, (*maskPyr_)[level]); + bitwise_and(maskPyr_[level], buf_, maskPyr_[level]); } } @@ -573,7 +573,7 @@ void cv::gpu::ORB_GPU::computeKeyPointsPyramid() for (int level = 0; level < static_cast(params_.n_levels_); ++level) { - keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], (*maskPyr_)[level]); + keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], maskPyr_[level]); ensureSizeIsEnough(3, keyPointsCount_[level], CV_32FC1, keyPointsPyr_[level]); @@ -752,7 +752,7 @@ void cv::gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, std:: void cv::gpu::ORB_GPU::release() { imagePyr_.clear(); - maskPyr_->clear(); + maskPyr_.clear(); buf_.release();