pub struct OCR {
pub expected: Vec<String>,
pub roi: Target,
pub roi_offset: Rect,
pub threshold: f64,
pub replace: Vec<Vec<String>>,
pub order_by: String,
pub index: i32,
pub only_rec: bool,
pub model: String,
}Expand description
Optical character recognition - finds and reads text.
Uses OCR model to detect and recognize text in the specified region.
Fields§
§expected: Vec<String>Expected text patterns (supports regex). Default: match all.
roi: TargetRecognition region. Default: \[0,0,0,0\] (full screen).
roi_offset: RectOffset applied to the ROI.
threshold: f64Model confidence threshold. Default: 0.3.
replace: Vec<Vec<String>>Text replacement pairs [[from, to], …] for fixing OCR errors.
order_by: StringResult sorting method. Default: “Horizontal”.
index: i32Which result to select. Default: 0.
only_rec: boolRecognition only (skip detection, requires precise ROI). Default: false.
model: StringModel folder path relative to model/ocr. Default: root.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OCR
impl<'de> Deserialize<'de> for OCR
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OCR
impl RefUnwindSafe for OCR
impl Send for OCR
impl Sync for OCR
impl Unpin for OCR
impl UnwindSafe for OCR
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