image_modify_local {plothelper} | R Documentation |
Modify Only a Subregion of an Image
Description
The function allows you to modify a subregion of your image (or, the opposite, keep the subregion unchanged while modifying other parts). You can set the four sides of the subregion or an irregular polygon by mouse click. If it is irregular, you MUST click in order.
Usage
image_modify_local(
x,
FUN,
geometry = "click",
local = "local",
rectangle = TRUE,
trim = FALSE,
...
)
Arguments
x |
an image read into R by
|
FUN |
the function used to
modify |
geometry |
this parameter is
different from the one used in package
magick. Here, in this function, you can
set |
local |
if it is 1 or "local", only a subregion of your image will be modified. If it is 2 or "other", keep the subregion unchanged while modifying other parts. If it is 3 or "subregion", the result is only the modified subregion, not the whole image. |
rectangle |
if it is TRUE (default), the subregion is a rectangle. If it is FALSE, the subregion can be an irregular polygon designated by your mouse click. |
trim |
whether to trim the subregion.
This is only used when |
... |
extra parameters used by
|