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

if no method is specified in keypoints, it crashes #32

Open
rmflight opened this issue Dec 23, 2020 · 2 comments
Open

if no method is specified in keypoints, it crashes #32

rmflight opened this issue Dec 23, 2020 · 2 comments

Comments

@rmflight
Copy link

I included an example in #31

# this generates an error, when it really shouldn't
mona <- ocv_read('https://jeroen.github.io/images/monalisa.jpg')
mona <- ocv_resize(mona, width = 320, height = 477)
pts <- ocv_keypoints(mona, method = "FAST")

This errors on the latest dev of opencv, and R 4.0.0.

@jwijffels
Copy link
Contributor

I'm not getting a crash, just an error about switch

> mona <- ocv_read('https://jeroen.github.io/images/monalisa.jpg')
trying URL 'https://jeroen.github.io/images/monalisa.jpg'
Content type 'image/jpeg' length 947984 bytes (925 KB)
downloaded 925 KB

> mona <- ocv_resize(mona, width = 320, height = 477)
> 
> # FAST-9
> pts <- ocv_keypoints(mona, method = "FAST")
Error in switch(params$type, TYPE_5_8 = 0L, TYPE_7_12 = 1L, TYPE_9_16 = 2L) : 
  EXPR must be a length 1 vector

@rmflight
Copy link
Author

Sorry, yes, it doesn't crash, but generates an error.

Functions should work with default arguments.

Hence the pull request.

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

2 participants