Learn R Programming

⚠️There's a newer version (1.0.3) of this package.Take me there.

imager (version 0.14)

Image Processing Library Based on CImg

Description

Fast image processing for images in up to 4 dimensions (two spatial dimensions, one time/depth dimension, one colour dimension). Provides most traditional image processing tools (filtering, morphology, transformations, etc.) as well as various functions for easily analysing image data using R.

Copy Link

Version

Install

install.packages('imager')

Monthly Downloads

12,098

Version

0.14

License

LGPL

Maintainer

Simon Barthelme

Last Published

September 18th, 2015

Functions in imager (0.14)

at

Return pixel value at coordinates
imdirac

Generates a "dirac" image, i.e. with all values set to 0 except one.
label

Label connected components.
capture.plot

Capture the current R plot device as a cimg image
extract_patches

Return image patches
as.raster.cimg

Convert a cimg object to a raster object
mirror

Mirror image content along specified axis
displacement

Estimate displacement field between two images.
interp

Interpolate image values
cimg2im

Convert cimg to spatstat im object
save.image

Save image
boats

Photograph of sailing boats from Kodak set
idply

Split an image along axis, apply function, return a data.frame
rotate_xy

Rotate image by an arbitrary angle, around a center point.
as.cimg.data.frame

Create an image from a data.frame
channels

Split a colour image into a list of separate channels
periodic.part

Compute the periodic part of an image, using the periodic/smooth decomposition of Moisan (2009)
cimg

Create a cimg object
distance_transform

Compute Euclidean distance function to a specified value.
imsplit

Split an image along a certain axis (producing a list)
autocrop

Autocrop image region
im_split

Split an image along a certain axis (producing a list)
FFT

Compute the Discrete Fourier Transform of an image
cimg.dimensions

Image dimensions
imager.combine

Combining images
correlate

Correlation of image by filter
resize

Resize image to new dimensions. If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).
add.colour

Add colour channels to an grayscale image
ilply

Split an image along axis, apply function, return a list
grayscale

Convert an RGB image to grayscale
isoblur

Blur image isotropically.
as.cimg

Convert to cimg object
bucketfill

Bucket fill
center.stencil

Center stencil at a location
display_list

Display image list using CImg library
frames

Split a video into separate frames
imwarp

Image warping
pad

Pad image with n pixels along specified axis
iiply

Split an image, apply function, recombine the results as an image
as.data.frame.cimg

Convert a pixel image to a data.frame
im2cimg

Convert an image in spatstat format to an image in cimg format
liply

Apply function to each element of a list, then combine the result as an image by appending along specified axis
diffusion_tensors

Compute field of diffusion tensors for edge-preserving smoothing.
imrotate

Rotate image by an arbitrary angle.
load.image

Load image from file or URL
imsharpen

Sharpen image.
get.stencil

Return pixel values in a neighbourhood defined by a stencil
permute_axes

Permute image axes
play

Play a video
selectSimilar

Select a region of homogeneous colour
imnoise

Generate (Gaussian) white-noise image
threshold

Threshold grayscale image
watershed

Compute watershed transform.
stencil.cross

A cross-shaped stencil
blur_anisotropic

Blur image anisotropically, in an edge-preserving way.
haar

Compute Haar multiscale wavelet transform.
boxblur_xy

Blur image with a box filter.
imfill

Create an image of custom size by filling in repeated values
plot.cimg

Display an image using base graphics
warp

Warp image
deriche

Apply recursive Deriche filter.
resize_doubleXY

Resize image uniformly
squeeze

Remove empty dimensions from an array
display

Display image using CImg library
medianblur

Blur image with the median filter.
subim

Select part of an image
[.cimg

Array subset operator for cimg objects
as.cimg.array

Turn an numeric array into a cimg object
imappend

Combine a list of images into a single image
cimg.extract

Various shortcuts for extracting colour channels, frames, etc
erode

Erode/dilate image by a structuring element.
imager

imager: an R library for image processing, based on CImg
pixel.index

Linear index in internal vector from pixel coordinates
boxblur

Blur image with a box filter (square window)
convolve

Convolve image by filter.
imhessian

Compute image hessian.
get_hessian

Return image hessian.
get.locations

Return coordinates of subset of pixels
imgradient

Compute image gradient
imdraw

Draw image on another image
imshift

Shift image content.
pixel.grid

Returns the pixel grid for an image
as.cimg.function

Create an image by sampling a function
get_gradient

Compute image gradient.
RGBtoHSL

Colour space conversions in imager
renorm

Renormalise image
vanvliet

Van Vliet recursive Gaussian filter.