detection_result builds

This commit is contained in:
Henry Schimke
2022-12-20 16:29:21 -06:00
parent 8a0cc78c61
commit 925d9338e5
13 changed files with 967 additions and 657 deletions

View File

@@ -16,13 +16,14 @@
use std::fmt::Display;
use super::{BoundingBox, Codeword};
use super::{BoundingBox, Codeword, DetectionRXingResultRowIndicatorColumn};
const MAX_NEARBY_DISTANCE: u32 = 5;
/**
* @author Guenther Grau
*/
#[derive(Clone)]
pub struct DetectionRXingResultColumn<'a> {
boundingBox: BoundingBox<'a>,
codewords: Vec<Option<Codeword>>,
@@ -83,6 +84,12 @@ impl<'a> DetectionRXingResultColumn<'_> {
pub fn getCodewords(&self) -> &[Option<Codeword>] {
&self.codewords
}
pub(super) fn getCodewordsMut(&mut self) -> &mut [Option<Codeword>] {
&mut self.codewords
}
pub fn as_row_indicator(&self) -> DetectionRXingResultRowIndicatorColumn {
DetectionRXingResultRowIndicatorColumn::new(&self.boundingBox, false)
}
}
impl Display for DetectionRXingResultColumn<'_> {