object_split_shp | R Documentation |
Here, image_shp()
is used to create a shape file based on the desired
number of rows and columns. Then, using the object coordinates, a list of
Image
objects is created.
object_split_shp(
img,
nrow = 1,
ncol = 1,
buffer_x = 0,
buffer_y = 0,
interactive = FALSE,
viewer = get_pliman_viewer(),
only_shp = FALSE,
...
)
img |
An object of class |
nrow |
The number of desired rows in the grid. Defaults to |
ncol |
The number of desired columns in the grid. Defaults to |
buffer_x, buffer_y |
Buffering factor for the width and height, respectively, of each individual shape's side. A value between 0 and 0.5 where 0 means no buffering and 0.5 means complete buffering (default: 0). A value of 0.25 will buffer the shape by 25% on each side. |
interactive |
If |
viewer |
The viewer option. If not provided, the value is retrieved
using |
only_shp |
If |
... |
Other arguments passed on to |
A list of Image
objects
if(interactive()){
library(pliman)
flax <- image_pliman("flax_leaves.jpg", plot = TRUE)
objects <- object_split_shp(flax, nrow = 3, ncol = 5)
image_combine(objects$imgs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.