make tmpRow proper size before copyTo to avoid reallocated tmpCol (#10860)

* make tmpRow proper size before copyTo to avoid reallocated tmpCol

* do the transposition without creating temporary array; replace TAB with spaces.

* revert the previous commit
This commit is contained in:
PalkoNazar 2018-02-20 15:55:25 +02:00 committed by Vadim Pisarevsky
parent a0c2718adb
commit 470d34ddbb

View File

@ -117,6 +117,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const std::vector<Point2f>
Mat tmpRow = dists.row(minIdx);
Mat tmpCol = dists.col(minIdx);
cv::min(dists.row(minLoc.x), dists.row(minLoc.y), tmpRow);
tmpRow = tmpRow.t();
tmpRow.copyTo(tmpCol);
clusters[minIdx].splice(clusters[minIdx].end(), clusters[maxIdx]);