View source: R/utils_mapedit.R
image_prepare | R Documentation |
This function aligns and crops the image using either base or mapview
visualization. This is useful to prepare the images to be analyzed with
analyze_objects_shp()
image_prepare(
img,
viewer = get_pliman_viewer(),
downsample = NULL,
max_pixels = 1e+06
)
img |
An optional |
viewer |
The viewer option. If not provided, the value is retrieved
using |
downsample |
integer; for each dimension the number of
pixels/lines/bands etc that will be skipped; Defaults to |
max_pixels |
integer > 0. Maximum number of cells to use for the plot.
If |
The alighed/cropped image for further visualization or analysis.
# Example usage:
if(interactive()){
img <- image_pliman("mult_leaves.jpg")
image_prepare(img, viewer = "mapview")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.