ผลการจับคู่การจดจำแบบอ่านอย่างเดียวที่ส่งคืนโดยผู้ช่วยเหลือ Region.find* ในสาขาความสำเร็จของการจดจำ Recognition.result ชี้ไปที่ Match หรือ MatchList ที่ใช้งานอยู่
รูปแบบคำสั่ง
Matchไม่สามารถสร้างคลาสนี้โดยตรงได้
พารามิเตอร์
ไม่มี
ค่าที่ส่งกลับ
—พฤติกรรม / ผลข้างเคียง
ผลการจับคู่การจดจำแบบอ่านอย่างเดียวที่ส่งคืนโดยผู้ช่วยเหลือ Region.find* ในสาขาความสำเร็จของการจดจำ Recognition.result ชี้ไปที่ Match หรือ MatchList ที่ใช้งานอยู่
การทำงาน
- รอให้เสร็จ: ขึ้นอยู่กับเงื่อนไข
- ความปลอดภัยเมื่อทำงานพร้อมกัน: ไม่รับประกัน
- การทำงานแบบขนาน: ขึ้นอยู่กับเงื่อนไข
ระยะเวลาประมวลผลและการรอขึ้นอยู่กับการทำงานที่อธิบายไว้ เก็บค่าที่เปลี่ยนแปลงได้ไว้ในโฟลว์เจ้าของ ไม่มีการรับประกันความปลอดภัยทั่วไปเมื่อแชร์ออบเจ็กต์ระหว่างโฟลว์
ตัวอย่าง
m = Region(100, 200, 300, 400).find("btn", 3000)
if m.found:
click(m)
conf = m.confidence
# Recognition.result ใช้ได้เฉพาะใน Python ของกิ่งสำเร็จการรับรู้เท่านั้น
if Recognition.result.found:
click(Recognition.result, random=0)ข้อผิดพลาด / ข้อจำกัด
ไม่มีข้อจำกัดเพิ่มเติมที่ระบุไว้ ให้ปฏิบัติตามพารามิเตอร์และพฤติกรรมข้างต้น
API ที่เกี่ยวข้อง
ไม่มี
ฟิลด์
| ชื่อ | คำอธิบาย |
|---|---|
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 | ชื่อแทนของ confidence ซึ่งคืนค่าคะแนนเดียวกันตั้งแต่ 0.0 ถึง 1.0 |
pointPoint? | list[Point] | จุดของผลการจับคู่ โดยปกติการจดจำภาพ/OCR/วัตถุจะคืนค่า Point; การจับคู่ภาพที่ต่ำกว่า threshold ยังสามารถคืนจุดผู้สมัครที่ดีที่สุดได้เมื่อมี bounds การจดจำสีและหลายเป้าหมายอาจคืนค่า list[Point] เพื่อให้ match.point[0].x/y อ่านจุดที่ดีที่สุดได้ |
boundsRegion? | กรอบ bounds ของพื้นที่ที่จับคู่ การจับคู่ภาพที่ต่ำกว่า threshold ยังสามารถแสดง bounds ของผู้สมัครที่ดีที่สุดได้ |
regionRegion? | ชื่อแทนของ bounds ซึ่งคืนค่า Region ที่ตรงกันเดียวกันหรือ None |
inference_infodict? | ข้อมูลเมตาของโมเดลหรือสีเมื่อมี สำหรับ TFLite จะมี backend, class_id, class_name, preprocess_ms, inference_ms, postprocess_ms, total_ms, input_width, input_height, ขนาดภาพดีบักแบบไม่บังคับ และข้อมูลการจับภาพ ส่วนแถว debug_result แบบละเอียดจะแสดงเฉพาะในหน้าต่างดีบัก inference เท่านั้น ข้อมูลสีจะมี backend=color, target_color, sampled_color, point, max_channel_delta, confidence, interval, match_count และ 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]
# ในกิ่งสำเร็จการรับรู้:
current = Recognition.result
if current.found:
text(current.name)
current.highlight(color="yellow", auto_hide_ms=800)