cimg2im: Convert cimg to spatstat im object

cimg2imR Documentation

Convert cimg to spatstat im object

Description

The spatstat library uses a different format for images, which have class "im". This utility converts a cimg object to an im object. spatstat im objects are limited to 2D grayscale images, so if the image has depth or spectrum > 1 a list is returned for the separate frames or channels (or both, in which case a list of lists is returned, with frames at the higher level and channels at the lower one).

Usage

cimg2im(img, W = NULL)

Arguments

img

an image of class cimg

W

a spatial window (see spatstat doc). Default NULL

Value

an object of class im, or a list of objects of class im, or a list of lists of objects of class im

Author(s)

Simon Barthelme

See Also

im, as.im


imager documentation built on May 29, 2024, 1:38 a.m.