Description Usage Arguments Details Value Examples
Divide an image into a number of smaller images
1 | divideImage(image, columns, rows)
|
image |
A raster image |
columns |
The number of columns to divide the image into. |
rows |
The number of rows to divide the image into. |
It can be useful to examine sections of an image separately. This function allows images to be broken down for such analysis. Note that if the image cannot be divided exactly into the number of rows and columns specified, some images may have different dimensions from others.
A matrix of raster images. Elements of the matrix must be accessed using [[.
1 2 3 4 5 6 7 | library(CulturalAnalytics)
library(jpeg)
imgdir<-paste(system.file(package = "CulturalAnalytics"), "images", sep = "/")
imgs<-paste(imgdir, dir(path = imgdir, pattern = ".jpg"), sep = "/")
img<-readJPEG(imgs[1])
tiles<-divideImage(img, 3, 3)
t13<-tiles[[1,3]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.