From c3f8fc41b7ed113e28aea0606b4461959cf1c1a6 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 12 Feb 2015 17:32:43 +0300 Subject: [PATCH] Parameters should have been passed by reference --- modules/calib3d/src/circlesgrid.cpp | 4 ++-- modules/calib3d/src/circlesgrid.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/calib3d/src/circlesgrid.cpp b/modules/calib3d/src/circlesgrid.cpp index ea169bdd72..bda50c05fa 100644 --- a/modules/calib3d/src/circlesgrid.cpp +++ b/modules/calib3d/src/circlesgrid.cpp @@ -66,7 +66,7 @@ void drawPoints(const std::vector &points, Mat &outImage, int radius = } #endif -void CirclesGridClusterFinder::hierarchicalClustering(const std::vector points, const Size &patternSz, std::vector &patternPoints) +void CirclesGridClusterFinder::hierarchicalClustering(const std::vector &points, const Size &patternSz, std::vector &patternPoints) { #ifdef HAVE_TEGRA_OPTIMIZATION if(tegra::hierarchicalClustering(points, patternSz, patternPoints)) @@ -135,7 +135,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const std::vector } } -void CirclesGridClusterFinder::findGrid(const std::vector points, cv::Size _patternSize, std::vector& centers) +void CirclesGridClusterFinder::findGrid(const std::vector &points, cv::Size _patternSize, std::vector& centers) { patternSize = _patternSize; centers.clear(); diff --git a/modules/calib3d/src/circlesgrid.hpp b/modules/calib3d/src/circlesgrid.hpp index fae6b3cac7..fd1389298c 100644 --- a/modules/calib3d/src/circlesgrid.hpp +++ b/modules/calib3d/src/circlesgrid.hpp @@ -62,10 +62,10 @@ public: squareSize = 1.0f; maxRectifiedDistance = (float)(squareSize / 2.0); } - void findGrid(const std::vector points, cv::Size patternSize, std::vector& centers); + void findGrid(const std::vector &points, cv::Size patternSize, std::vector& centers); //cluster 2d points by geometric coordinates - void hierarchicalClustering(const std::vector points, const cv::Size &patternSize, std::vector &patternPoints); + void hierarchicalClustering(const std::vector &points, const cv::Size &patternSize, std::vector &patternPoints); private: void findCorners(const std::vector &hull2f, std::vector &corners); void findOutsideCorners(const std::vector &corners, std::vector &outsideCorners);