Commit edab3916 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3696 from Dmitry-Me:shouldPassByReference

parents 7164f223 c3f8fc41
...@@ -66,7 +66,7 @@ void drawPoints(const std::vector<Point2f> &points, Mat &outImage, int radius = ...@@ -66,7 +66,7 @@ void drawPoints(const std::vector<Point2f> &points, Mat &outImage, int radius =
} }
#endif #endif
void CirclesGridClusterFinder::hierarchicalClustering(const std::vector<Point2f> points, const Size &patternSz, std::vector<Point2f> &patternPoints) void CirclesGridClusterFinder::hierarchicalClustering(const std::vector<Point2f> &points, const Size &patternSz, std::vector<Point2f> &patternPoints)
{ {
#ifdef HAVE_TEGRA_OPTIMIZATION #ifdef HAVE_TEGRA_OPTIMIZATION
if(tegra::hierarchicalClustering(points, patternSz, patternPoints)) if(tegra::hierarchicalClustering(points, patternSz, patternPoints))
...@@ -135,7 +135,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const std::vector<Point2f> ...@@ -135,7 +135,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const std::vector<Point2f>
} }
} }
void CirclesGridClusterFinder::findGrid(const std::vector<cv::Point2f> points, cv::Size _patternSize, std::vector<Point2f>& centers) void CirclesGridClusterFinder::findGrid(const std::vector<cv::Point2f> &points, cv::Size _patternSize, std::vector<Point2f>& centers)
{ {
patternSize = _patternSize; patternSize = _patternSize;
centers.clear(); centers.clear();
......
...@@ -62,10 +62,10 @@ public: ...@@ -62,10 +62,10 @@ public:
squareSize = 1.0f; squareSize = 1.0f;
maxRectifiedDistance = (float)(squareSize / 2.0); maxRectifiedDistance = (float)(squareSize / 2.0);
} }
void findGrid(const std::vector<cv::Point2f> points, cv::Size patternSize, std::vector<cv::Point2f>& centers); void findGrid(const std::vector<cv::Point2f> &points, cv::Size patternSize, std::vector<cv::Point2f>& centers);
//cluster 2d points by geometric coordinates //cluster 2d points by geometric coordinates
void hierarchicalClustering(const std::vector<cv::Point2f> points, const cv::Size &patternSize, std::vector<cv::Point2f> &patternPoints); void hierarchicalClustering(const std::vector<cv::Point2f> &points, const cv::Size &patternSize, std::vector<cv::Point2f> &patternPoints);
private: private:
void findCorners(const std::vector<cv::Point2f> &hull2f, std::vector<cv::Point2f> &corners); void findCorners(const std::vector<cv::Point2f> &hull2f, std::vector<cv::Point2f> &corners);
void findOutsideCorners(const std::vector<cv::Point2f> &corners, std::vector<cv::Point2f> &outsideCorners); void findOutsideCorners(const std::vector<cv::Point2f> &corners, std::vector<cv::Point2f> &outsideCorners);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment