Fixed getSubset method to support Nx3 1-channel matrices as input (3xN 1-channel matrices doesn't supported at all).

This commit is contained in:
Alexander Karsakov
2016-01-12 12:14:19 +03:00
parent 0c9c7d5f3b
commit e784ea7178
3 changed files with 23 additions and 23 deletions

View File

@@ -109,9 +109,9 @@ public:
cv::AutoBuffer<int> _idx(modelPoints);
int* idx = _idx;
int i = 0, j, k, iters = 0;
int esz1 = (int)m1.elemSize(), esz2 = (int)m2.elemSize();
int d1 = m1.channels() > 1 ? m1.channels() : m1.cols;
int d2 = m2.channels() > 1 ? m2.channels() : m2.cols;
int esz1 = (int)m1.elemSize1()*d1, esz2 = (int)m2.elemSize1()*d2;
int count = m1.checkVector(d1), count2 = m2.checkVector(d2);
const int *m1ptr = m1.ptr<int>(), *m2ptr = m2.ptr<int>();