The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The image.dlib package allows to quickly obtain image features (SURF and HOG features) and to do image matching.
library(magick)
library(image.dlib)
## Read 2 images
<- image_read("input_0.png")
img1 <- image_read("input_1.png")
img2 <- image_info(img1)$height height
## Get the surf descriptors
<- image_surf(image_data(img1, channels = "rgb"), max_points = 50)
sp1 <- image_surf(image_data(img2, channels = "rgb"), max_points = 50)
sp2
## Match surf points
library(FNN)
<- get.knnx(sp1$surf, sp2$surf, k = 1)
knn
## Plot the 2 images and the top 15 matches of the SURF points
<- image_append(c(img1, img2), stack = TRUE)
combined <- image_draw(combined)
plt points(sp1$x, sp1$y, col = "red", pch = 20)
points(sp2$x, sp2$y + height, col = "blue", pch = 20)
for(i_from in head(order(knn$nn.dist), 15)){
<- knn$nn.index[i_from]
i_to lines(x = c(sp1$x[i_to], sp2$x[i_from]), y = c(sp1$y[i_to], sp2$y[i_from] + height), col = "red")
}dev.off()
plt
help(package = image.dlib)
Need support in image recognition? Contact BNOSAC: http://www.bnosac.be
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.