Learn R Programming

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

imager (version 0.13)

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

7,797

Version

0.13

License

LGPL

Maintainer

Simon Barthelme

Last Published

August 26th, 2015

Functions in imager (0.13)

display_list

Display image list using CImg library
frames

Split a video into separate frames
cimg2im

Convert cimg to spatstat im object
renorm

Renormalise image
ilply

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

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

Return image patches
grayscale

Convert an RGB image to grayscale
load.image

Load image from file
display

Display image using CImg library
as.cimg.data.frame

Create an image from a data.frame
im2cimg

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

Correlation of image by filter
imdirac

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

imager: an R library for image processing, based on CImg
imfill

Create an image of custom size by filling in repeated values
imshift

Shift image content.
imhessian

Compute image hessian.
cimg.dimensions

Image dimensions
imager.combine

Combining images
label

Label connected components.
mirror

Mirror image content along specified axis
medianblur

Blur image with the median filter.
as.cimg.function

Create an image by sampling a function
selectSimilar

Select a region of homogeneous colour
erode

Erode/dilate image by a structuring element.
squeeze

Remove empty dimensions from an array
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).
subim

Select part of an image
rotate_xy

Rotate image by an arbitrary angle, around a center point.
imnoise

Generate (Gaussian) white-noise image
imsharpen

Sharpen image.
imappend

Combine a list of images into a single image
play

Play a video
boxblur_xy

Blur image with a box filter.
imsplit

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

Van Vliet recursive Gaussian filter.
as.cimg

Convert to cimg object
autocrop

Autocrop image region
pad

Pad image with n pixels along specified axis
RGBtoHSL

Colour space conversions in imager
save.image

Save image
at

Return pixel value at coordinates
boxblur

Blur image with a box filter (square window)
displacement

Estimate displacement field between two images.
get.locations

Return coordinates of subset of pixels
get.stencil

Return pixel values in a neighbourhood defined by a stencil
get_gradient

Compute image gradient.
FFT

Compute the Discrete Fourier Transform of an image
haar

Compute Haar multiscale wavelet transform.
interp

Interpolate image values
[.cimg

Array subset operator for cimg objects
warp

Warp image
threshold

Threshold grayscale image
as.raster.cimg

Convert a cimg object to a raster object
plot.cimg

Display an image using base graphics
convolve

Convolve image by filter.
stencil.cross

A cross-shaped stencil
idply

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

Return image hessian.
capture.plot

Capture the current R plot device as a cimg image
cimg

Create a cimg object
pixel.index

Linear index in internal vector from pixel coordinates
permute_axes

Permute image axes
center.stencil

Center stencil at a location
im_split

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

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

Compute image gradient
imwarp

Image warping
channels

Split a colour image into a list of separate channels
add.colour

Add colour channels to an grayscale image
cimg.extract

Various shortcuts for extracting colour channels, frames, etc
deriche

Apply recursive Deriche filter.
boats

Photograph of sailing boats from Kodak set
periodic.part

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

Rotate image by an arbitrary angle.
as.cimg.array

Turn an numeric array into a cimg object
as.data.frame.cimg

Convert a pixel image to a data.frame
bucketfill

Bucket fill
distance_transform

Compute Euclidean distance function to a specified value.
iiply

Split an image, apply function, recombine the results as an image
imdraw

Draw image on another image
isoblur

Blur image isotropically.
liply

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

Returns the pixel grid for an image
watershed

Compute watershed transform.
resize_doubleXY

Resize image uniformly