Remove all using directives for STL namespace and members
Made all STL usages explicit to be able automatically find all usages of particular class or function.
This commit is contained in:
@@ -42,8 +42,6 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace cv {
|
||||
|
||||
Stitcher Stitcher::createDefault(bool try_use_gpu)
|
||||
@@ -90,11 +88,11 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
|
||||
|
||||
Stitcher::Status Stitcher::estimateTransform(InputArray images)
|
||||
{
|
||||
return estimateTransform(images, vector<vector<Rect> >());
|
||||
return estimateTransform(images, std::vector<std::vector<Rect> >());
|
||||
}
|
||||
|
||||
|
||||
Stitcher::Status Stitcher::estimateTransform(InputArray images, const vector<vector<Rect> > &rois)
|
||||
Stitcher::Status Stitcher::estimateTransform(InputArray images, const std::vector<std::vector<Rect> > &rois)
|
||||
{
|
||||
images.getMatVector(imgs_);
|
||||
rois_ = rois;
|
||||
@@ -113,7 +111,7 @@ Stitcher::Status Stitcher::estimateTransform(InputArray images, const vector<vec
|
||||
|
||||
Stitcher::Status Stitcher::composePanorama(OutputArray pano)
|
||||
{
|
||||
return composePanorama(vector<Mat>(), pano);
|
||||
return composePanorama(std::vector<Mat>(), pano);
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +119,7 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
|
||||
{
|
||||
LOGLN("Warping images (auxiliary)... ");
|
||||
|
||||
vector<Mat> imgs;
|
||||
std::vector<Mat> imgs;
|
||||
images.getMatVector(imgs);
|
||||
if (!imgs.empty())
|
||||
{
|
||||
@@ -137,8 +135,8 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
|
||||
seam_est_imgs_[i] = img.clone();
|
||||
}
|
||||
|
||||
vector<Mat> seam_est_imgs_subset;
|
||||
vector<Mat> imgs_subset;
|
||||
std::vector<Mat> seam_est_imgs_subset;
|
||||
std::vector<Mat> imgs_subset;
|
||||
|
||||
for (size_t i = 0; i < indices_.size(); ++i)
|
||||
{
|
||||
@@ -156,11 +154,11 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
|
||||
int64 t = getTickCount();
|
||||
#endif
|
||||
|
||||
vector<Point> corners(imgs_.size());
|
||||
vector<Mat> masks_warped(imgs_.size());
|
||||
vector<Mat> images_warped(imgs_.size());
|
||||
vector<Size> sizes(imgs_.size());
|
||||
vector<Mat> masks(imgs_.size());
|
||||
std::vector<Point> corners(imgs_.size());
|
||||
std::vector<Mat> masks_warped(imgs_.size());
|
||||
std::vector<Mat> images_warped(imgs_.size());
|
||||
std::vector<Size> sizes(imgs_.size());
|
||||
std::vector<Mat> masks(imgs_.size());
|
||||
|
||||
// Prepare image masks
|
||||
for (size_t i = 0; i < imgs_.size(); ++i)
|
||||
@@ -186,7 +184,7 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
|
||||
w->warp(masks[i], K, cameras_[i].R, INTER_NEAREST, BORDER_CONSTANT, masks_warped[i]);
|
||||
}
|
||||
|
||||
vector<Mat> images_warped_f(imgs_.size());
|
||||
std::vector<Mat> images_warped_f(imgs_.size());
|
||||
for (size_t i = 0; i < imgs_.size(); ++i)
|
||||
images_warped[i].convertTo(images_warped_f[i], CV_32F);
|
||||
|
||||
@@ -227,7 +225,7 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
|
||||
if (!is_compose_scale_set)
|
||||
{
|
||||
if (compose_resol_ > 0)
|
||||
compose_scale = min(1.0, sqrt(compose_resol_ * 1e6 / full_img.size().area()));
|
||||
compose_scale = std::min(1.0, std::sqrt(compose_resol_ * 1e6 / full_img.size().area()));
|
||||
is_compose_scale_set = true;
|
||||
|
||||
// Compute relative scales
|
||||
@@ -325,7 +323,7 @@ Stitcher::Status Stitcher::stitch(InputArray images, OutputArray pano)
|
||||
}
|
||||
|
||||
|
||||
Stitcher::Status Stitcher::stitch(InputArray images, const vector<vector<Rect> > &rois, OutputArray pano)
|
||||
Stitcher::Status Stitcher::stitch(InputArray images, const std::vector<std::vector<Rect> > &rois, OutputArray pano)
|
||||
{
|
||||
Status status = estimateTransform(images, rois);
|
||||
if (status != OK)
|
||||
@@ -372,14 +370,14 @@ Stitcher::Status Stitcher::matchImages()
|
||||
{
|
||||
if (!is_work_scale_set)
|
||||
{
|
||||
work_scale_ = min(1.0, sqrt(registr_resol_ * 1e6 / full_img.size().area()));
|
||||
work_scale_ = std::min(1.0, std::sqrt(registr_resol_ * 1e6 / full_img.size().area()));
|
||||
is_work_scale_set = true;
|
||||
}
|
||||
resize(full_img, img, Size(), work_scale_, work_scale_);
|
||||
}
|
||||
if (!is_seam_scale_set)
|
||||
{
|
||||
seam_scale_ = min(1.0, sqrt(seam_est_resol_ * 1e6 / full_img.size().area()));
|
||||
seam_scale_ = std::min(1.0, std::sqrt(seam_est_resol_ * 1e6 / full_img.size().area()));
|
||||
seam_work_aspect_ = seam_scale_ / work_scale_;
|
||||
is_seam_scale_set = true;
|
||||
}
|
||||
@@ -388,7 +386,7 @@ Stitcher::Status Stitcher::matchImages()
|
||||
(*features_finder_)(img, features_[i]);
|
||||
else
|
||||
{
|
||||
vector<Rect> rois(rois_[i].size());
|
||||
std::vector<Rect> rois(rois_[i].size());
|
||||
for (size_t j = 0; j < rois_[i].size(); ++j)
|
||||
{
|
||||
Point tl(cvRound(rois_[i][j].x * work_scale_), cvRound(rois_[i][j].y * work_scale_));
|
||||
@@ -421,9 +419,9 @@ Stitcher::Status Stitcher::matchImages()
|
||||
|
||||
// Leave only images we are sure are from the same panorama
|
||||
indices_ = detail::leaveBiggestComponent(features_, pairwise_matches_, (float)conf_thresh_);
|
||||
vector<Mat> seam_est_imgs_subset;
|
||||
vector<Mat> imgs_subset;
|
||||
vector<Size> full_img_sizes_subset;
|
||||
std::vector<Mat> seam_est_imgs_subset;
|
||||
std::vector<Mat> imgs_subset;
|
||||
std::vector<Size> full_img_sizes_subset;
|
||||
for (size_t i = 0; i < indices_.size(); ++i)
|
||||
{
|
||||
imgs_subset.push_back(imgs_[indices_[i]]);
|
||||
@@ -461,7 +459,7 @@ void Stitcher::estimateCameraParams()
|
||||
(*bundle_adjuster_)(features_, pairwise_matches_, cameras_);
|
||||
|
||||
// Find median focal length and use it as final image scale
|
||||
vector<double> focals;
|
||||
std::vector<double> focals;
|
||||
for (size_t i = 0; i < cameras_.size(); ++i)
|
||||
{
|
||||
LOGLN("Camera #" << indices_[i] + 1 << ":\n" << cameras_[i].K());
|
||||
@@ -476,7 +474,7 @@ void Stitcher::estimateCameraParams()
|
||||
|
||||
if (do_wave_correct_)
|
||||
{
|
||||
vector<Mat> rmats;
|
||||
std::vector<Mat> rmats;
|
||||
for (size_t i = 0; i < cameras_.size(); ++i)
|
||||
rmats.push_back(cameras_[i].R);
|
||||
detail::waveCorrect(rmats, wave_correct_kind_);
|
||||
|
Reference in New Issue
Block a user