pub struct OcrDetector { /* private fields */ }Expand description
Adapts any OcrEngine into a Detector.
Text mode sorts spans top-to-bottom then left-to-right and joins them with
\n into DetectorOutput::Text; an empty span list becomes
DetectorOutput::None, so, under Mode::Change, “text appeared” is the
None -> Text transition.
Number mode additionally parses the joined text; parse failures and
non-finite values become DetectorOutput::None (the never-NaN invariant).
Implementations§
Trait Implementations§
Source§impl Detector for OcrDetector
impl Detector for OcrDetector
fn evaluate( &mut self, view: &FrameView<'_>, ) -> Result<DetectorOutput, DetectorError>
Auto Trait Implementations§
impl !RefUnwindSafe for OcrDetector
impl !Sync for OcrDetector
impl !UnwindSafe for OcrDetector
impl Freeze for OcrDetector
impl Send for OcrDetector
impl Unpin for OcrDetector
impl UnsafeUnpin for OcrDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more