bbox: Compute the bounding box of a pixset

Description Usage Arguments Value Functions Author(s) Examples

View source: R/pixset.R

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

1
2
3
bbox(px)

crop.bbox(im, px)

Arguments

px

a pixset

im

an image

Value

a pixset object

Functions

Author(s)

Simon Barthelme

Examples

1
2
3
4
5
6
im <- grayscale(boats)
px <- im > .85
plot(im)
highlight(bbox(px))
highlight(px,col="green")
crop.bbox(im,px) %>% plot

imager documentation built on May 30, 2018, 9:04 a.m.