Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vcaesar/gcv
Go robot OpenCV function
https://github.com/vcaesar/gcv
go gocv golang opencv robot
Last synced: 19 days ago
JSON representation
Go robot OpenCV function
- Host: GitHub
- URL: https://github.com/vcaesar/gcv
- Owner: vcaesar
- License: bsd-3-clause
- Created: 2021-10-09T13:30:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T21:43:43.000Z (about 1 month ago)
- Last Synced: 2024-10-14T21:57:52.762Z (about 1 month ago)
- Topics: go, gocv, golang, opencv, robot
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 17
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# gcv
[![Build Status](https://github.com/vcaesar/gcv/workflows/Go/badge.svg)](https://github.com/vcaesar/gcv/commits/master)
[![Build Status](https://travis-ci.org/vcaesar/gcv.svg)](https://travis-ci.org/vcaesar/gcv)
[![CircleCI Status](https://circleci.com/gh/vcaesar/gcv.svg?style=shield)](https://circleci.com/gh/vcaesar/gcv)
[![codecov](https://codecov.io/gh/vcaesar/gcv/branch/master/graph/badge.svg)](https://codecov.io/gh/vcaesar/gcv)
[![Go Report Card](https://goreportcard.com/badge/github.com/vcaesar/gcv)](https://goreportcard.com/report/github.com/vcaesar/gcv)
[![GoDoc](https://godoc.org/github.com/vcaesar/gcv?status.svg)](https://godoc.org/github.com/vcaesar/gcv)
[![Release](https://github-release-version.herokuapp.com/github/vcaesar/gcv/release.svg?style=flat)](https://github.com/vcaesar/gcv/releases/latest)## Install
You should make sure Golang, GCC, and [OpenCV](https://gocv.io/getting-started/linux/) installed correctly before starting.
## Use
```go
package mainimport (
"fmt""github.com/go-vgo/robotgo"
"github.com/vcaesar/gcv"
)func main() {
img, _ := robotgo.CaptureImg()
img1, _ := robotgo.CaptureImg(18, 4, 20, 20)
rs := gcv.FindAllImg(img1, img)
fmt.Println("find: ", rs[0].TopLeft.Y, rs[0].Rects.TopLeft.X, rs[0].ImgSize.H)
fmt.Println("find: ", rs)m1, _ := gcv.ImgToMat(img)
m2, _ := gcv.ImgToMat(img1)
rs = gcv.FindAllTemplate(m1, m2, 0.8)
fmt.Println("find: ", rs)
}
```