From 185c253a821986f3a376d649c1cc4578a91ba45e Mon Sep 17 00:00:00 2001 From: vcaesar Date: Tue, 12 Oct 2021 10:18:15 -0400 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++++++++++ README_zh.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index 72977c4..8d71643 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ import ( "fmt" "github.com/go-vgo/robotgo" + "github.com/vcaesar/gcv" ) func main() { @@ -233,6 +234,21 @@ func main() { robotgo.SaveBitmap(bitmap, "test.png") } + +func opencv() { + name := "test.png" + name1 := "test_001.png" + robotgo.SaveCapture(name, 10, 10, 30, 30) + robotgo.SaveCapture(name1) + + fmt.Print("gcv find image: ") + fmt.Println(gcv.FindImgFile(name, name1)) + + bit := robotgo.OpenBitmap(name) + defer robotgo.FindBitmap(bit) + fmt.Print("find bitmap: ") + fmt.Println(robotgo.FindBitmap(bit)) +} ``` #### [Event](https://github.com/go-vgo/robotgo/blob/master/examples/gohook/main.go) diff --git a/README_zh.md b/README_zh.md index 38163dd..253a2b3 100644 --- a/README_zh.md +++ b/README_zh.md @@ -207,6 +207,7 @@ import ( "fmt" "github.com/go-vgo/robotgo" + "github.com/vcaesar/gcv" ) func main() { @@ -231,6 +232,21 @@ func main() { robotgo.SaveBitmap(bitmap, "test.png") } + +func opencv() { + name := "test.png" + name1 := "test_001.png" + robotgo.SaveCapture(name, 10, 10, 30, 30) + robotgo.SaveCapture(name1) + + fmt.Print("gcv find image: ") + fmt.Println(gcv.FindImgFile(name, name1)) + + bit := robotgo.OpenBitmap(name) + defer robotgo.FindBitmap(bit) + fmt.Print("find bitmap: ") + fmt.Println(robotgo.FindBitmap(bit)) +} ``` #### [事件](https://github.com/go-vgo/robotgo/blob/master/examples/gohook/main.go)