View source: R/utils_mapedit.R
image_view | R Documentation |
This function allows users to interactively edit and analyze an image using mapview and mapedit packages.
image_view(
img,
object = NULL,
r = 1,
g = 2,
b = 3,
alpha = 0.7,
attribute = "area",
title = "Edit the image",
show = c("rgb", "index"),
index = "B",
max_pixels = 1e+06,
downsample = NULL,
color_regions = custom_palette(),
quantiles = c(0, 1),
domain = NULL,
...
)
img |
An |
object |
(Optional). An object computed with |
r, g, b |
The layer for the Red, Green and Blue band, respectively.
Defaults to |
alpha |
The transparency level of the rectangles' color (between 0 and 1). |
attribute |
The name of the quantitative variable in the
|
title |
The title of the map view. Use to provide short orientations to the user. |
show |
The display option for the map view. Options are "rgb" for RGB view and "index" for index view. |
index |
The index to use for the index view. Defaults to "B". |
max_pixels |
integer > 0. Maximum number of cells to use for the plot.
If |
downsample |
integer; for each dimension the number of
pixels/lines/bands etc that will be skipped; Defaults to |
color_regions |
The color palette for displaying index values. Default
is |
quantiles |
the upper and lower quantiles used for color stretching. If
set to |
domain |
the upper and lower values used for color stretching. This is
used only if |
... |
Additional arguments to be passed to |
An sf
object, the same object returned by mapedit::editMap()
.
if(interactive()){
# Example usage:
img <- image_pliman("sev_leaf.jpg")
image_view(img)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.