From 71ff91fee304386f65c10e58100e344933e20253 Mon Sep 17 00:00:00 2001 From: "xucong.053" Date: Sun, 23 Oct 2022 16:52:23 +0800 Subject: [PATCH] change: update the ocr scope of the FindText function --- hrp/pkg/uixt/ocr_vedem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrp/pkg/uixt/ocr_vedem.go b/hrp/pkg/uixt/ocr_vedem.go index 1bae01ad..3f456045 100644 --- a/hrp/pkg/uixt/ocr_vedem.go +++ b/hrp/pkg/uixt/ocr_vedem.go @@ -170,7 +170,7 @@ func (s *veDEMOCRService) FindText(text string, imageBuf []byte, options ...Data Y: int(ocrResult.Points[2].Y), }, } - if rect.Min.X > data.Scope[0] && rect.Max.X < data.Scope[2] && rect.Min.Y > data.Scope[1] && rect.Max.Y < data.Scope[3] { + if rect.Min.X >= data.Scope[0] && rect.Max.X <= data.Scope[2] && rect.Min.Y >= data.Scope[1] && rect.Max.Y <= data.Scope[3] { ocrTexts = append(ocrTexts, ocrResult.Text) // not contains text