Skip to content

Commit 4c2283f

Browse files
bit1002lstAleksandrPanov
authored andcommitted
fix the bug that cannot detect multi qrcode when use_nn_detector is false
1 parent f30e80e commit 4c2283f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cquery.cacheDirectory": "${workspaceFolder}/.vscode/cquery_cached_index/"
3+
}

modules/wechat_qrcode/src/decodermgr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ int DecoderMgr::decodeImage(cv::Mat src, bool use_nn_detector, vector<string>& r
4545
}
4646
int ret = TryDecode(source, zx_results);
4747
if (!ret) {
48-
for(unsigned int i=0; i<zx_results.size(); i++){
49-
results.emplace_back(zx_result->getText()->getText());
48+
for(unsigned int k=0; k<zx_results.size(); k++){
49+
results.emplace_back(zx_results[k]->getText()->getText());
5050
vector<Point2f> tmp_qr_points;
51-
auto tmp_zx_points = zx_results[i]->getResultPoints();
51+
auto tmp_zx_points = zx_results[k]->getResultPoints();
5252
for(int i = 0; i < tmp_zx_points->size() / 4; i++) {
5353
const int ind = i * 4;
5454
for (int j = 1; j < 4; j++){

0 commit comments

Comments
 (0)