go-vgo / robotgo

RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
Apache License 2.0
9.6k stars 879 forks source link

gcv.FindX 查找图像不存在时 程序会崩溃 #627

Closed HaiboLee closed 9 months ago

HaiboLee commented 9 months ago

`bg := robotgo.CaptureImg()

img, _, err := robotgo.DecodeImg("wx.png")

if err != nil {
    panic(err)
}

x, y := gcv.FindX(img, bg)
fmt.Println(x, y)`

当bg中没有目标图像时 程序会崩溃 gocv.io/x/gocv v0.35.0