Learn R Programming

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

imager (version 0.15)

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.15

License

LGPL

Maintainer

Simon Barthelme

Last Published

January 7th, 2016

Functions in imager (0.15)

cimg.dimensions

Image dimensions
imager.replace

Replace part of an image with another
boats

Photograph of sailing boats from Kodak set
selectSimilar

Select a region of homogeneous colour
save.image

Save image
squeeze

Remove empty dimensions from an array
blur_anisotropic

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

Compute image gradient.
get_hessian

Return image hessian.
autocrop

Autocrop image region
frames

Split a video into separate frames
imshift

Shift image content.
renorm

Renormalise image
imwarp

Image warping
as.cimg.data.frame

Create an image from a data.frame
stencil.cross

A cross-shaped stencil
grayscale

Convert an RGB image to grayscale
cimg2im

Convert cimg to spatstat im object
[.cimg

Array subset operator for cimg objects
convolve

Convolve image by filter.
imhessian

Compute image hessian.
get.stencil

Return pixel values in a neighbourhood defined by a stencil
as.raster.cimg

Convert a cimg object to a raster object
imdraw

Draw image on another image
idply

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

Combining images
imrotate

Rotate image by an arbitrary angle.
cimg.extract

Various shortcuts for extracting colour channels, frames, etc
resize_doubleXY

Resize image uniformly
permute_axes

Permute image axes
im_split

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

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

Compute Haar multiscale wavelet transform.
FFT

Compute the Discrete Fourier Transform of an image
displacement

Estimate displacement field between two images.
extract_patches

Return image patches
play

Play a video
as.cimg.function

Create an image by sampling a function
imnoise

Generate (Gaussian) white-noise image
add.colour

Add colour channels to an grayscale image
imgradient

Compute image gradient
display

Display image using CImg library
medianblur

Blur image with the median filter.
boxblur

Blur image with a box filter (square window)
at

Return pixel value at coordinates
get.locations

Return coordinates of subset of pixels
threshold

Threshold grayscale image
deriche

Apply recursive Deriche filter.
bucketfill

Bucket fill
im2cimg

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

Combine a list of images into a single image
correlate

Correlation of image by filter
isoblur

Blur image isotropically.
imsub

Select part of an image
boxblur_xy

Blur image with a box filter.
imfill

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

Sharpen image.
RGBtoHSL

Colour space conversions in imager
watershed

Compute watershed transform.
center.stencil

Center stencil at a location
load.image

Load image from file or URL
erode

Erode/dilate image by a structuring element.
liply

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

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

Interpolate image values
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).
pad

Pad image with n pixels along specified axis
plot.cimg

Display an image using base graphics
mirror

Mirror image content along specified axis
periodic.part

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

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

Convert a pixel image to a data.frame
capture.plot

Capture the current R plot device as a cimg image
ilply

Split an image along axis, apply function, return a list
pixel.grid

Return the pixel grid for an image
label

Label connected components.
rotate_xy

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

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

Turn an numeric array into a cimg object
channels

Split a colour image into a list of separate channels
pixel.index

Linear index in internal vector from pixel coordinates
as.cimg

Convert to cimg object
distance_transform

Compute Euclidean distance function to a specified value.
imsplit

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

Young-Van Vliet recursive Gaussian filter.
cimg

Create a cimg object
warp

Warp image
imdirac

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