subImage | R Documentation |
subImage
extracts a portion of an Image
and
returns it as an Image
object.
subImage(image, x, y, width, height, target = "new")
image |
An |
x , y |
The coordinates of the bottom-left corner of the subimage within the original image. |
width |
The width of the subimage. Ignored if |
height |
The height of the subimage. Ignored if |
target |
The location where the results should be stored. It can take 2 values:
|
If target="new"
, the function returns an Image
object. If target
is an Image
object, the function
returns nothing and modifies that Image
object in place.
Simon Garnier, garnier@njit.edu
Image
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_sub <- subImage(balloon, 290, 170, 150, 150)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.