port: rMQR: improve detection rate by using finder sub pattern

677fc21c7d
This commit is contained in:
Henry Schimke
2024-01-14 17:14:55 -06:00
parent 1a9cc55d80
commit 30f9ed8976
4 changed files with 132 additions and 15 deletions

View File

@@ -309,15 +309,6 @@ impl<T: Reader> AbstractBlackBoxTestCase<T> {
log::fine(format!("could not read at rotation {rotation} w/TH: {e:?}"));
}
}
// try {
// if (decode(bitmap, rotation, expectedText, expectedMetadata, true)) {
// tryHarderCounts[x]+=1;
// } else {
// tryHarderMisreadCounts[x]+=1;
// }
// } catch (ReaderException ignored) {
// log::fine(format!("could not read at rotation {} w/TH", rotation));
// }
}
}

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
use rxing::{qrcode::cpp_port::QrReader, BarcodeFormat, MultiUseMultiFormatReader};
use rxing::{
qrcode::cpp_port::QrReader, BarcodeFormat, MultiFormatReader, MultiUseMultiFormatReader,
};
mod common;
@@ -316,13 +318,19 @@ fn cpp_qrcode_black_box7_test_case() {
fn cpp_rmqr_blackbox_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/cpp/rmqrcode-1",
QrReader,
MultiFormatReader::default(),
BarcodeFormat::RECTANGULAR_MICRO_QR_CODE,
);
tester.add_test(2, 2, 0.0);
tester.add_test(1, 1, 90.0);
tester.add_test(1, 1, 180.0);
tester.add_test(1, 1, 270.0);
// tester.ignore_pure = true;
tester.add_test(3, 3, 0.0);
tester.add_test(3, 3, 90.0);
tester.add_test(3, 3, 180.0);
tester.add_test(3, 3, 270.0);
tester.add_hint(
rxing::DecodeHintType::ALSO_INVERTED,
rxing::DecodeHintValue::AlsoInverted(true),
);
tester.test_black_box();
}