remove_black_bars: Remove horizontal black bars from an image vector

View source: R/remove_black_bars.R

remove_black_barsR Documentation

Remove horizontal black bars from an image vector

Description

remove_black_bars takes a matchr_image vector, a pixel array, or a list of pixel arrays and removes black bars at the top and bottom of the images, if any are identified.

Usage

remove_black_bars(x, ...)

## S3 method for class 'matchr_image'
remove_black_bars(x, ...)

## S3 method for class 'list'
remove_black_bars(x, ...)

## S3 method for class 'array'
remove_black_bars(x, ...)

## S3 method for class 'logical'
remove_black_bars(x, ...)

Arguments

x

Vector of class matchr_image, pixel array, or list of pixel arrays.

...

Not used.

Value

Object of the same class and length as the input x, but with black bars removed.

Examples

## Not run: 
# Setup
img <- load_image(test_urls)

# Use remove_black_bars on matchr_image vectors
remove_black_bars(img)

# Or on raw pixel arrays, singly or in a list
remove_black_bars(get_array(img))
remove_black_bars(get_array(img)[[13]])

## End(Not run)

UPGo-McGill/matchr documentation built on July 19, 2023, 1:02 p.m.