crop: Crop an Image to Visible Pixels

View source: R/crop.R

cropR Documentation

Crop an Image to Visible Pixels

Description

Crop a grayscale or binary Image object to contain only non-zero values plus a given border

Usage

crop(img, border = 1, fill = 0)

Arguments

img

A grayscale or binary Image object of two dimensions

border

Single integer value of border to add to cropped image

bg

Background value for border

Details

Non-zero pixels on the edge of the image are removed, leaving a border of border pixels of bg color.

Value

A cropped image with the specified border


ornelles/EBImageExtra documentation built on Aug. 10, 2022, 11:44 p.m.