Read-only recognition match result returned by region.find* helpers.
Syntax
MatchThis class cannot be constructed directly.
Parameters
None
Returns
—Behavior / side effects
Read-only recognition match result returned by region.find* helpers. In a recognition Success branch, Recognition.result points to the active Match or MatchList.
Execution
- Blocking: Conditional
- Thread safety: Not guaranteed
- Parallel execution: Conditional
Execution cost and waits depend on the documented operation. Keep mutable values in their owning flow; sharing arbitrary objects between flows has no general thread-safety guarantee.
Example
m = Region(100, 200, 300, 400).find("btn", 3000)
if m.found:
click(m)
conf = m.confidence
# Recognition.result is only available in Python for the Recognition success branch.
if Recognition.result.found:
click(Recognition.result, random=0)Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Related APIs
None
Fields
| Name | Description |
|---|---|
nameString? | Matched target name. Template matches use the template name without extension, OCR uses the matched target text, and color matches use Color. |
foundBoolean | Whether a match was found. |
confidenceNumber | Confidence score from 0.0 to 1.0. |
confNumber | Alias of confidence; returns the same score from 0.0 to 1.0. |
pointPoint? | list[Point] | Match point. Image/OCR/object recognition usually returns Point; image matches below threshold can still return the best candidate point when bounds are available. Color and multi-target recognition can return list[Point] so match.point[0].x/y works for the best point. |
boundsRegion? | Bounding box of the matched area. Image matches below threshold can still expose the best candidate bounds. |
regionRegion? | Alias of bounds; returns the same matched Region or None. |
inference_infodict? | Model or color metadata when available. TFLite metadata includes backend, class_id, class_name, preprocess_ms, inference_ms, postprocess_ms, total_ms, input_width, input_height, optional debug image dimensions, and capture telemetry. Detailed debug_result rows are shown only in the inference debug dialog. Color metadata includes backend=color, target_color, sampled_color, point, max_channel_delta, confidence, interval, match_count, and matches. |
m = Region(100, 200, 300, 400).find("btn", 3000)
target_name = m.name
is_found = m.found
score = m.confidence
short_score = m.conf
center = m.point
box = m.bounds
same_box = m.region
info = m.inference_info
info_class_id = info.class_id
info_class_name = info.class_name
color_hit = Region(0, 0, 1080, 1920).find_color("#FFFFFF", tolerance=4)
color_name = color_hit.name
first_color_point = color_hit.point[0]
# In the Recognition success branch:
current = Recognition.result
if current.found:
text(current.name)
current.highlight(color="yellow", auto_hide_ms=800)