dcv.core.image

Module implements Image utility class, and basic API for image manipulation.

Image class encapsulates image properties with minimal functionality. It is primarily designed to be used as I/O unit. For any image processing needs, image data can be sliced to mir.ndslice.slice.Slice.

Public Imports

mir.ndslice.slice
public import mir.ndslice.slice;

Members

Classes

Image
class Image

Image abstraction type.

Enums

BitDepth
enum BitDepth

Bit depth of a pixel in an image.

ImageFormat
enum ImageFormat

Image (pixel) format.

Functions

asImage
Image asImage(Slice!(kind, packs, T*) slice, ImageFormat format)

Convert a ndslice object to an Image, with defined image format.

asImage
Image asImage(Slice!(kind, packs, T*) slice)

Convert ndslice object into an image, with default format setup, regarding to slice dimension.

Variables

data
auto data;
Undocumented in source.
depth
auto depth;
Undocumented in source.
format
auto format;
Undocumented in source.
height
auto height;
Undocumented in source.
imageFormatChannelCount
size_t[] imageFormatChannelCount;
Undocumented in source.
width
auto width;
Undocumented in source.

Examples

Image image = new Image(32, 32, ImageFormat.IF_MONO, BitDepth.BD_32);

Slice!(Contiguous, [3], float*) slice = image.sliced!float; // slice image data, considering the data is of float type.

assert(image.height == slice.length!0 && image.width == slice.length!1);
assert(image.channels == 1);

image = slice.asImage(ImageFormat.IF_MONO); // create the image back from sliced data.

Meta

Authors

Relja Ljubobratovic

License

$(LINK3 http://www.boost.org/LICENSE_1_0.txt, Boost Software License - Version 1.0).