mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #21277 from alalek:backport_21267
This commit is contained in:
commit
f071207463
@ -1821,7 +1821,9 @@ void ONNXImporter::parseUnsqueeze(LayerParams& layerParams, const opencv_onnx::N
|
||||
}
|
||||
CV_Assert(axes.getIntValue(axes.size()-1) <= dims.size());
|
||||
for (int j = 0; j < axes.size(); j++) {
|
||||
dims.insert(dims.begin() + axes.getIntValue(j), 1);
|
||||
const int idx = axes.getIntValue(j);
|
||||
CV_Assert(idx <= dims.size());
|
||||
dims.insert(dims.begin() + idx, 1);
|
||||
}
|
||||
|
||||
Mat out = input.reshape(0, dims);
|
||||
|
@ -881,6 +881,8 @@ void QRCodeEncoderImpl::findAutoMaskType()
|
||||
total_modules += 1;
|
||||
}
|
||||
}
|
||||
if (total_modules == 0)
|
||||
continue; // TODO: refactor, extract functions to reduce complexity
|
||||
int modules_percent = dark_modules * 100 / total_modules;
|
||||
int lower_bound = 45;
|
||||
int upper_bound = 55;
|
||||
|
Loading…
Reference in New Issue
Block a user