bbox {imager} | R Documentation |
Compute the bounding box of a pixset
Description
This function returns the bounding box of a pixset as another pixset. If the image has more than one frame, a bounding cube is returned. If the image has several colour channels, the bounding box is computed separately in each channel. crop.bbox crops an image using the bounding box of a pixset.
Usage
bbox(px)
crop.bbox(im, px)
Arguments
px |
a pixset |
im |
an image |
Value
a pixset object
Functions
-
crop.bbox()
: crop image using the bounding box of pixset px
Author(s)
Simon Barthelme
Examples
im <- grayscale(boats)
px <- im > .85
plot(im)
highlight(bbox(px))
highlight(px,col="green")
crop.bbox(im,px) %>% plot
[Package imager version 1.0.2 Index]