# Image Processing Library Based on 'CImg'

## Documentation for package ‘imager’ version 0.41.2

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D E F G H I L M N P R S T V W X Y Z misc

imager-package | imager: an R library for image processing, based on CImg

## -- A --

add | Combining images
add.color | Add colour channels to a grayscale image or pixel set
add.colour | Add colour channels to a grayscale image or pixel set
as.cimg | Convert to cimg object
as.cimg.array | Turn an numeric array into a cimg object
as.cimg.cimg | Convert to cimg object
as.cimg.data.frame | Create an image from a data.frame
as.cimg.double | Convert to cimg object
as.cimg.function | Create an image by sampling a function
as.cimg.logical | Convert to cimg object
as.cimg.matrix | Convert to cimg object
as.cimg.numeric | Convert to cimg object
as.cimg.pixset | Methods to convert various objects to pixsets
as.cimg.raster | Convert a raster object to a cimg object
as.cimg.RasterLayer | Convert a RasterLayer/RasterBrick to a cimg image/image list
as.cimg.vector | Convert to cimg object
as.data.frame.cimg | Convert a pixel image to a data.frame
as.data.frame.imlist | Convert image list to data.frame
as.data.frame.pixset | Methods to convert pixsets to various objects
as.igraph.cimg | Form a graph from an image
as.igraph.pixset | Form an adjacency graph from a pixset
as.imlist | Convert various objects to image lists
as.imlist.cimg | Convert various objects to image lists
as.imlist.imlist | Convert various objects to image lists
as.imlist.list | Convert various objects to image lists
as.imlist.RasterStackBrick | Convert a RasterLayer/RasterBrick to a cimg image/image list
as.pixset | Methods to convert various objects to pixsets
as.pixset.cimg | Methods to convert various objects to pixsets
as.raster.cimg | Convert a cimg object to a raster object for plotting
at | Return or set pixel value at coordinates
at<- | Return or set pixel value at coordinates
autocrop | Autocrop image region
average | Combining images

## -- B --

B | Various shortcuts for extracting colour channels, frames, etc
B<- | Replace part of an image with another
bbox | Compute the bounding box of a pixset
blur_anisotropic | Blur image anisotropically, in an edge-preserving way.
boats | Photograph of sailing boats from Kodak set
boundary | Find the boundary of a shape in a pixel set
boxblur | Blur image with a box filter (square window)
boxblur_xy | Blur image with a box filter.
bucketfill | Bucket fill

## -- C --

cannyEdges | Canny edge detector
capture.plot | Capture the current R plot device as a cimg image
Cc | Coordinates as images
center.stencil | Center stencil at a location
channel | Various shortcuts for extracting colour channels, frames, etc
channel<- | Replace part of an image with another
channels | Split a colour image into a list of separate channels
ci | Concatenation for image lists
cimg | Create a cimg object
cimg.dimensions | Image dimensions
cimg.extract | Various shortcuts for extracting colour channels, frames, etc
cimg.use.openmp | Control CImg's parallelisation
cimg2im | Convert cimg to spatstat im object
circles | Add circles to plot
clean | Clean up and fill in pixel sets (morphological opening and closing)
color.at | Return or set pixel value at coordinates
color.at<- | Return or set pixel value at coordinates
colorise | Fill in a colour in an area given by a pixset
common_pixsets | Various useful pixsets
contours | Return contours of image/pixset
convert_pixset | Methods to convert pixsets to various objects
convolve | Correlation/convolution of image by filter
coord.index | Coordinates from pixel index
correlate | Correlation/convolution of image by filter
crop.bbox | Compute the bounding box of a pixset
crop.borders | Crop the outer margins of an image

## -- D --

depth | Image dimensions
deriche | Apply recursive Deriche filter.
diffusion_tensors | Compute field of diffusion tensors for edge-preserving smoothing.
dilate | Erode/dilate image by a structuring element.
dilate_rect | Erode/dilate image by a structuring element.
dilate_square | Erode/dilate image by a structuring element.
displacement | Estimate displacement field between two images.
display | Display object using CImg library
display.cimg | Display image using CImg library
display.list | Display image list using CImg library
distance_transform | Compute Euclidean distance function to a specified value.
draw_circle | Draw circle on image
draw_rect | Draw rectangle on image
draw_text | Draw text on an image

## -- E --

enorm | Combining images
equal | Combining images
erode | Erode/dilate image by a structuring element.
erode_rect | Erode/dilate image by a structuring element.
erode_square | Erode/dilate image by a structuring element.
extract_patches | Extract image patches and return a list
extract_patches3D | Extract image patches and return a list

## -- F --

FFT | Compute the Discrete Fourier Transform of an image
fill | Clean up and fill in pixel sets (morphological opening and closing)
flatten.alpha | Flatten alpha channel
frame | Various shortcuts for extracting colour channels, frames, etc
frame<- | Replace part of an image with another
frames | Split a video into separate frames

## -- G --

G | Various shortcuts for extracting colour channels, frames, etc
G<- | Replace part of an image with another
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.
get_hessian | Return image hessian.
grab | Select image regions interactively
grabLine | Select image regions interactively
grabPoint | Select image regions interactively
grabRect | Select image regions interactively
grayscale | Convert an RGB image to grayscale
grow | Grow/shrink a pixel set
gsdim | Grayscale dimensions of image

## -- H --

haar | Compute Haar multiscale wavelet transform.
height | Image dimensions
highlight | Highlight pixel set on image
hough_circle | Circle detection using Hough transform
hough_line | Hough transform for lines
HSItoRGB | Colour space conversions in imager
HSLtoRGB | Colour space conversions in imager
HSVtoRGB | Colour space conversions in imager

## -- I --

idply | Split an image along axis, apply function, return a data.frame
iiply | Split an image, apply function, recombine the results as an image
ilply | Split an image along axis, apply function, return a list
im2cimg | Convert an image in spatstat format to an image in cimg format
imager | imager: an R library for image processing, based on CImg
imager.colourspaces | Colour space conversions in imager
imager.combine | Combining images
imager.replace | Replace part of an image with another
imager.subset | Array subset operator for cimg objects
imappend | Combine a list of images into a single image
imchange | Modify parts of an image
imcol | Various shortcuts for extracting colour channels, frames, etc
imcoord | Coordinates as images
imdirac | Generates a "dirac" image, i.e. with all values set to 0 except one.
imdraw | Draw image on another image
imeval | Evaluation in an image context
imfill | Create an image of custom size by filling in repeated values
imgradient | Compute image gradient
imhessian | Compute image hessian.
iminfo | Return information on image file
imlap | Compute image Laplacian
imlist | Image list
imnoise | Generate (Gaussian) white-noise image
implot | Plot objects on image using base graphics
imrep | Replicate images
imresize | Resize image uniformly
imrotate | Rotate an image along the XY plane.
imrow | Various shortcuts for extracting colour channels, frames, etc
imsharpen | Sharpen image.
imshift | Shift image content.
imsplit | Split an image along a certain axis (producing a list)
imsub | Select part of an image
imwarp | Image warping
im_split | Split an image along a certain axis (producing a list)
index.coord | Linear index in internal vector from pixel coordinates
inpaint | Fill-in NA values in an image
interact | Build simple interactive interfaces using imager
interp | Interpolate image values
is.cimg | Checks that an object is a cimg object
is.imlist | Check that an object is an imlist object
is.pixset | Check that an object is a pixset object
isoblur | Blur image isotropically.

## -- L --

label | Label connected components.
LabtoRGB | Colour space conversions in imager
LabtosRGB | Colour space conversions in imager
LabtoXYZ | Colour space conversions in imager
liply | Apply function to each element of a list, then combine the result as an image by appending along specified axis
load.dir | Load all images in a directory
load.example | Load example image
load.image | Load image from file or URL
load.video | Load a video using ffmpeg

## -- M --

magick | Convert a magick image to a cimg image or image list
magick2cimg | Convert a magick image to a cimg image or image list
magick2imlist | Convert a magick image to a cimg image or image list
make.video | Make/save a video using ffmpeg
map2_il | Type-stable map for use with the purrr package
map_il | Type-stable map for use with the purrr package
mclosing | Erode/dilate image by a structuring element.
mclosing_square | Erode/dilate image by a structuring element.
medianblur | Blur image with the median filter. In a window of size n x n centered at pixel (x,y), compute median pixel value over the window. Optionally, ignore values that are too far from the value at current pixel.
mirror | Mirror image content along specified axis
mopening | Erode/dilate image by a structuring element.
mopening_square | Erode/dilate image by a structuring element.
mult | Combining images

## -- N --

nfline | Plot a line, Hesse normal form parameterisation
nPix | Image dimensions

## -- P --

pad | Pad image with n pixels along specified axis
parall | Combining images
parany | Combining images
parmax | Combining images
parmax.abs | Combining images
parmed | Combining images
parmin | Combining images
parmin.abs | Combining images
parorder | Combining images
parrank | Combining images
parsd | Combining images
parsort | Combining images
parvar | Combining images
patchstat | Return image patch summary
patch_summary_cimg | Extract a numerical summary from image patches, using CImg's mini-language Experimental feature.
periodic.part | Compute the periodic part of an image, using the periodic/smooth decomposition of Moisan (2011)
permute_axes | Permute image axes
pixel.grid | Return the pixel grid for an image
pixset | Pixel sets (pixsets)
play | Play a video
plot.cimg | Display an image using base graphics
plot.imlist | Plot an image list
pmap_il | Type-stable map for use with the purrr package
px.all | Various useful pixsets
px.borders | Various useful pixsets
px.bottom | Various useful pixsets
px.circle | Various useful pixsets
px.diamond | Various useful pixsets
px.flood | Select a region of homogeneous colour
px.left | Various useful pixsets
px.na | A pixset for NA values
px.none | Various useful pixsets
px.right | Various useful pixsets
px.square | Various useful pixsets
px.top | Various useful pixsets

## -- R --

R | Various shortcuts for extracting colour channels, frames, etc
R<- | Replace part of an image with another
RasterPackage | Convert a RasterLayer/RasterBrick to a cimg image/image list
renorm | Renormalise image
resize | Resize image
resize_doubleXY | Resize image uniformly
resize_halfXY | Resize image uniformly
resize_tripleXY | Resize image uniformly
resize_uniform | Resize image uniformly
RGBtoHSI | Colour space conversions in imager
RGBtoHSL | Colour space conversions in imager
RGBtoHSV | Colour space conversions in imager
RGBtoLab | Colour space conversions in imager
RGBtosRGB | Colour space conversions in imager
RGBtoXYZ | Colour space conversions in imager
RGBtoYCbCr | Colour space conversions in imager
RGBtoYUV | Colour space conversions in imager
rm.alpha | Remove alpha channel and store as attribute
rotate_xy | Rotate image by an arbitrary angle, around a center point.

## -- S --

save.image | Save image
save.video | Make/save a video using ffmpeg
shrink | Grow/shrink a pixel set
spectrum | Image dimensions
split_connected | Split pixset into connected components
squeeze | Remove empty dimensions from an array
sRGBtoLab | Colour space conversions in imager
sRGBtoRGB | Colour space conversions in imager
stencil.cross | A cross-shaped stencil
subim | Select part of an image

## -- T --

threshold | Threshold grayscale image

## -- V --

vanvliet | Young-Van Vliet recursive Gaussian filter.

## -- W --

warp | Warp image
watershed | Compute watershed transform.
where | Return locations in pixel set
which.parmax | Combining images
which.parmin | Combining images
width | Image dimensions
wsum | Combining images

## -- X --

Xc | Coordinates as images
XYZtoLab | Colour space conversions in imager
XYZtoRGB | Colour space conversions in imager

## -- Y --

Yc | Coordinates as images
YCbCrtoRGB | Colour space conversions in imager
YUVtoRGB | Colour space conversions in imager

## -- Z --

Zc | Coordinates as images

## -- misc --

%inr% | Check that value is in a range