Skip to content
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

Return Matched Rect Info #14

Closed
wanjungao opened this issue Oct 11, 2017 · 2 comments
Closed

Return Matched Rect Info #14

wanjungao opened this issue Oct 11, 2017 · 2 comments

Comments

@wanjungao
Copy link

It would be cool if the rect info can be returned to the JS.

I tried sample project with Ionic3, seems working. There are one compiling error for IOS ( compare NSNumber with int).

Adding the plugin into a new Ionic3 project generated error of missing packaging.json.

@Udanita
Copy link

Udanita commented Oct 13, 2017

Right now the plugin is amazing and, yes, it saved my life but, if could be possible to get the position of detected area, will be perfect. Someone has inspected the code and know where to get that data from? Anyways, great job guys!

@a31859
Copy link
Contributor

a31859 commented Oct 22, 2017

@wanjungao That error was fixed thanks to Antoine38660 so it should not show anymore. The plugin was updated and now returns the coordinates of the rect in the isDetecting success callback. You'll get something like this:

{
  "message": "pattern detected", 
  "index": 0,
  "coords": {
    "1": { "x": 170.839401, "y": 181.510239 }, 
    "2": { "x": 293.745239, "y": 180.525345 }, 
    "3": { "x": 301.409363, "y": 352.518280 }, 
    "4": { "x": 171.494492, "y": 360.808655 }
  }, 
  "center": {
    "x": 234.956223, "y": 268.231842
  }
}

@a31859 a31859 closed this as completed Nov 19, 2017
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