Learn R Programming

imager (version 0.14)

autocrop: Autocrop image region

Description

Autocrop image region

Usage

autocrop(im, color, axes = "zyx")

Arguments

im
an image
color
Color used for the crop. If 0, color is guessed.
axes
Axes used for the crop.

Examples

Run this code
#Add pointless padding
padded <- pad(boats,30,"xy")
plot(padded)
#Remove padding
autocrop(padded,color=c(0,0,0)) %>% plot

Run the code above in your browser using DataLab