Skip to contents

Image class

The core R6 class for image data.

Image
Image class

Color utilities

Convert R color specifications to OpenCV BGR(A) format.

col2bgr()
Convert an R color to a BGR(A) numeric vector

Channel operations

Split and merge image channels.

split_channels()
Split an image into its individual channels
merge_channels()
Merge a list of single-channel images into a multi-channel image

Image construction

Standalone functions for creating and combining images.

concatenate()
Concatenate images side-by-side or top-to-bottom

Geometric transform helpers

Construct affine and perspective transformation matrices for use with Image$warp_affine() and Image$warp_perspective().

affine_translate()
Build an affine translation matrix
affine_scale()
Build an affine scaling matrix
affine_shear()
Build an affine shear matrix
affine_rotate()
Build an affine rotation matrix
affine_from_points()
Compute an affine transformation matrix from point correspondences
perspective_from_points()
Compute a perspective transformation matrix from point correspondences

Arithmetic and bitwise operators

S3 generics for arithmetic and bitwise operations on images.

bitwAnd() bitwOr() bitwXor() bitwNot()
Bitwise operations for Image objects

Statistical utilities

S3 generics for image statistics.

sd()
Standard deviation for Image objects
var()
Variance for Image objects

Filter utilities

Construct kernel matrices for filtering and morphology operations.

get_gabor_kernel()
Generate a Gabor filter kernel
get_structuring_element()
Generate a structuring element kernel

Thresholding utilities

Compute threshold values without modifying the image.

autothreshold_value()
Compute an automatic threshold value from an image

Drawing utilities

Measure text extents before drawing.

get_text_size()
Measure the bounding box of a text string

Display

Open an interactive display window.

display()
Display an image using R's graphics device