Skip to content

gcv.FindX error exception #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
bylkamar opened this issue Jun 29, 2023 · 2 comments
Open
1 task

gcv.FindX error exception #1

bylkamar opened this issue Jun 29, 2023 · 2 comments

Comments

@bylkamar
Copy link

bylkamar commented Jun 29, 2023

  • gcv version (or commit ref): v0.33.0
  • Go version: 1.20.5
  • Operating system and bit: Windows 10
    • Not relevant
  • Provide example code:
package main

import (
	"github.com/go-vgo/robotgo"
	"github.com/vcaesar/gcv"
)

func main() {

	img := robotgo.CaptureImg()
	checkGameOpen, _, _ := robotgo.DecodeImg("test.png")
	x,y:= gcv.FindX(checkGameOpen, img)
	println(x,y)
}
  • Log gist:

Description

The code above is working when image is found on screen but there no possibility to handle the error when the image is not available on the screen. The function does not return any error just only two int can you add possibility to catch the error ?

@bylkamar bylkamar changed the title gcv.FindX gcv.FindX error exception Jun 29, 2023
@a13x212
Copy link

a13x212 commented Apr 24, 2024

I’m running into the same issue so tracked it down to:

https://github.com/vcaesar/gcv/blob/main/cv.go#L129-L140
Function FindAll which will eventually call FindAllSift and SIGSEGV.

If no image is found, res = 0 in Function FindAll.

I’m not familiar with opencv swift so it’s unclear why FindAllSift is called if res = 0. Maybe @vcaesar can offer some input here.

@txj-xyz
Copy link

txj-xyz commented Dec 15, 2024

Having same issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants