mirror of
https://github.com/opencv/opencv.git
synced 2025-06-21 02:20:50 +08:00
Merge pull request #13327 from allnes:qrcode_modifications
This commit is contained in:
commit
3fe70d5cd5
@ -968,8 +968,7 @@ bool QRDecode::samplingForVersion()
|
|||||||
const int delta_rows = cvRound((postIntermediate.rows * 1.0) / version_size);
|
const int delta_rows = cvRound((postIntermediate.rows * 1.0) / version_size);
|
||||||
const int delta_cols = cvRound((postIntermediate.cols * 1.0) / version_size);
|
const int delta_cols = cvRound((postIntermediate.cols * 1.0) / version_size);
|
||||||
|
|
||||||
vector<double> listFrequencyElem(version_size * version_size, 0);
|
vector<double> listFrequencyElem;
|
||||||
int k = 0;
|
|
||||||
for (int r = 0; r < postIntermediate.rows; r += delta_rows)
|
for (int r = 0; r < postIntermediate.rows; r += delta_rows)
|
||||||
{
|
{
|
||||||
for (int c = 0; c < postIntermediate.cols; c += delta_cols)
|
for (int c = 0; c < postIntermediate.cols; c += delta_cols)
|
||||||
@ -978,7 +977,7 @@ bool QRDecode::samplingForVersion()
|
|||||||
Range(r, min(r + delta_rows, postIntermediate.rows)),
|
Range(r, min(r + delta_rows, postIntermediate.rows)),
|
||||||
Range(c, min(c + delta_cols, postIntermediate.cols)));
|
Range(c, min(c + delta_cols, postIntermediate.cols)));
|
||||||
const double frequencyElem = (countNonZero(tile) * 1.0) / tile.total();
|
const double frequencyElem = (countNonZero(tile) * 1.0) / tile.total();
|
||||||
listFrequencyElem[k] = frequencyElem; k++;
|
listFrequencyElem.push_back(frequencyElem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user