Running examples in ‘image.dlib-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: image_surf
> ### Title: Find SURF points in an image
> ### Aliases: image_surf
> 
> ### ** Examples
> 
> library(magick)
Linking to ImageMagick 6.9.11.60
Enabled features: fontconfig, freetype, fftw, heic, lcms, pango, webp, x11
Disabled features: cairo, ghostscript, raw, rsvg
Using 3 threads
> f <- system.file("extdata", "cruise_boat.png", package = "image.dlib")
> x <- image_read(f)
> x
  format width height colorspace matte filesize density
1    PNG   654    400       sRGB FALSE   273271   28x28
> surf_blobs <- image_data(x, channels = "rgb")
> surf_blobs <- as.integer(surf_blobs, transpose = FALSE)
> surf_blobs <- image_surf(surf_blobs, max_points = 10000, detection_threshold = 50)
> str(surf_blobs)
List of 8
 $ points       : num 150
 $ x            : num [1:150] 161 161 164 196 260 ...
 $ y            : num [1:150] 279 280 258 255 266 ...
 $ angle        : num [1:150] -3.09 3.14 2.39 2.12 -1.45 ...
 $ pyramid_scale: num [1:150] 3.67 3.8 2.09 2.23 2.24 ...
 $ score        : num [1:150] 948 884 631 545 491 ...
 $ laplacian    : num [1:150] -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
 $ surf         : num [1:150, 1:64] 0.00473 0.00974 -0.04304 -0.00386 0.01034 ...
> 
> library(magick)
> plt <- image_draw(x)
> points(surf_blobs$x, surf_blobs$y, col = "red", pch = 20)
> dev.off()
pdf 
  2 
> plt
  format width height colorspace matte filesize density
1    PNG   654    400       sRGB  TRUE        0   28x28
> ## Not run: 
> ##D ## Plot the points
> ##D "as.cimg.magick-image" <- function(x){
> ##D   out <- lapply(x, FUN=function(frame){
> ##D     frame <- as.integer(frame[[1]])[, , 1:3] # dropping the alpha channel
> ##D     dim(frame) <- append(dim(frame), 1, after = 2)
> ##D     frame
> ##D   })
> ##D   out$along <- 3
> ##D   out <- do.call(abind::abind, out)
> ##D   out <- imager::as.cimg(out)
> ##D   out <- imager::permute_axes(out, "yxzc")
> ##D   out
> ##D }
> ##D library(imager)
> ##D library(magick)
> ##D library(abind)
> ##D img <- image_read(path = f)
> ##D plot(as.cimg(img), main = "SURF points")
> ##D points(surf_blobs$x, surf_blobs$y, col = "red", pch = 20)
> ## End(Not run)
> 
> library(magick)
> img1   <- image_scale(logo, "x300")
> img2   <- image_flip(img1)
> height <- image_info(img1)$height
> sp1 <- image_surf(image_data(img1, channels = "rgb"), max_points = 50)
> sp2 <- image_surf(image_data(img2, channels = "rgb"), max_points = 50)
> 
> ## Match surf points and plot matches
> library(FNN)
> k <- get.knnx(sp1$surf, sp2$surf, k = 1)
Error in get.knnx(sp1$surf, sp2$surf, k = 1) : 
  DLL requires the use of native symbols
Execution halted