detector builds but does not work

This commit is contained in:
Henry Schimke
2023-03-20 12:12:25 -05:00
parent 3d75de7183
commit 0df86d4fd4
8 changed files with 233 additions and 122 deletions

View File

@@ -29,12 +29,12 @@ impl BitMatrix {
pub fn findBoundingBox(
&self,
left: &mut u32,
top: &mut u32,
width: &mut u32,
height: &mut u32,
left: u32,
top: u32,
width: u32,
height: u32,
minSize: u32,
) -> bool {
) -> (bool, u32, u32, u32, u32) {
todo!()
// let right;
// let bottom;

View File

@@ -177,7 +177,7 @@ pub trait BitMatrixCursorTrait {
todo!()
}
fn readPatternFromBlack<T>(&self, maxWhitePrefix: i32, range: Option<u32>) -> Option<T> {
fn readPatternFromBlack<T>(&mut self, maxWhitePrefix: i32, range: Option<u32>) -> Option<T> {
let range = range.unwrap_or(0);
if (maxWhitePrefix != 0
&& self.isWhite()

View File

@@ -8,6 +8,7 @@ pub mod edge_tracer;
pub mod fast_edge_to_edge_counter;
pub mod matrix;
pub mod pattern;
mod qr_formatinformation;
pub mod regression_line;
pub mod regression_line_trait;
pub mod step_result;

View File

@@ -0,0 +1,22 @@
use crate::qrcode::decoder::FormatInformation;
impl FormatInformation {
pub fn DecodeMQR(formatInfoBits: u32) -> Self {
unimplemented!()
// // We don't use the additional masking (with 0x4445) to work around potentially non complying MicroQRCode encoders
// auto fi = FindBestFormatInfo(0, FORMAT_INFO_DECODE_LOOKUP_MICRO, {formatInfoBits, MirrorBits(formatInfoBits)});
// constexpr uint8_t BITS_TO_VERSION[] = {1, 2, 2, 3, 3, 4, 4, 4};
// // Bits 2/3/4 contain both error correction level and version, 0/1 contain mask.
// fi.ecLevel = ECLevelFromBits((fi.index >> 2) & 0x07, true);
// fi.dataMask = static_cast<uint8_t>(fi.index & 0x03);
// fi.microVersion = BITS_TO_VERSION[(fi.index >> 2) & 0x07];
// fi.isMirrored = fi.bitsIndex == 1;
// return fi;
}
pub fn isValid(&self) -> bool {
unimplemented!()
}
}