pub struct TemplateMatch {
pub template: Vec<String>,
pub roi: Target,
pub roi_offset: Rect,
pub threshold: Vec<f64>,
pub order_by: String,
pub index: i32,
pub method: i32,
pub green_mask: bool,
}Expand description
Template matching recognition - finds images using OpenCV template matching.
The most common recognition method for “finding images” on screen.
Fields§
§template: Vec<String>Template image paths relative to image folder. Required.
roi: TargetRecognition region. Default: \[0,0,0,0\] (full screen).
roi_offset: RectOffset applied to the ROI.
threshold: Vec<f64>Matching threshold(s). Default: [0.7].
order_by: StringResult sorting: “Horizontal”, “Vertical”, “Score”, “Random”. Default: “Horizontal”.
index: i32Which result to select (0-indexed, negative for reverse). Default: 0.
method: i32OpenCV matching method (cv::TemplateMatchModes). Default: 5 (TM_CCOEFF_NORMED).
green_mask: boolUse green (0,255,0) as mask color. Default: false.
Trait Implementations§
Source§impl Clone for TemplateMatch
impl Clone for TemplateMatch
Source§fn clone(&self) -> TemplateMatch
fn clone(&self) -> TemplateMatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateMatch
impl Debug for TemplateMatch
Source§impl<'de> Deserialize<'de> for TemplateMatch
impl<'de> Deserialize<'de> for TemplateMatch
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 TemplateMatch
impl RefUnwindSafe for TemplateMatch
impl Send for TemplateMatch
impl Sync for TemplateMatch
impl Unpin for TemplateMatch
impl UnwindSafe for TemplateMatch
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