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

image_surf only returns one non-zero dimension #9

Closed
cfredemb opened this issue Apr 15, 2018 · 2 comments
Closed

image_surf only returns one non-zero dimension #9

cfredemb opened this issue Apr 15, 2018 · 2 comments

Comments

@cfredemb
Copy link

All images I have tried image_surf on return a surf vector of 64 dimension, but only the first dimension has a non-zero value. The function runs without warning or errors, and I have successfully used the exact same images to run the image_fhog function in the same package

This is true as well for the example code you give in the "computer vision for R users" presentation:

f <- system.file("extdata", "cruise_boat.bmp", package="image.dlib")
surf_blobs <- image_surf(f, max_points = 10000, detection_threshold = 50)

e.g., on the above example, from skimr
skim(as.data.frame(surf_blobs$surf))

Variable type: numeric
variable missing complete n mean sd p0 p25 median p75 p100 hist
V1 0 296 296 0.018 0.055 -0.089 0 0 0 0.32 ▁▇▁▁▁▁▁▁
V10 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V11 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V12 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V13 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V14 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V15 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V16 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V17 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V18 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V19 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V2 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V20 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V21 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V22 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V23 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V24 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V25 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V26 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V27 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V28 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V29 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V3 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V30 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V31 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V32 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V33 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V34 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V35 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V36 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V37 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V38 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V39 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V4 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V40 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V41 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V42 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V43 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V44 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V45 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V46 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V47 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V48 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V49 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V5 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V50 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V51 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V52 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V53 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V54 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V55 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V56 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V57 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V58 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V59 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V6 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V60 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V61 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V62 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V63 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V64 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V7 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V8 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁
V9 0 296 296 0 0 0 0 0 0 0 ▁▁▁▇▁▁▁▁

@cfredemb
Copy link
Author

actually found the error. In your rcpp_surf.cpp the following line:

ip_surf[i,j] = sp[i].des(j, 1);

should be

ip_surf(i,j) = sp[i].des(j, 1);

(parentheses, not square brackets)

cheers

jwijffels added a commit that referenced this issue Apr 16, 2018
@jwijffels
Copy link
Contributor

Complete correct. Thanks for pointing out! Fixed now.

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