Class IplImageHelper
Provides helper functions to create and manipulate the format of cached image buffers.
public static class IplImageHelper
- Inheritance
-
IplImageHelper
- Inherited Members
Methods
EnsureColorCopy(IplImage, IplImage)
Copies the original image pixels into a cached image buffer, with optional color conversion in the case where the original image is grayscale.
public static IplImage EnsureColorCopy(IplImage output, IplImage image)
Parameters
output
IplImageThe current cached image buffer. If the value is null, or if the cached image parameters do not match the size of the source image, a new image buffer will be allocated.
image
IplImageThe image storing the original pixel values.
Returns
- IplImage
An IplImage object matching the size and bit depth of
image
pixels, and where the number of channels is always three. Pixel values fromimage
will be either copied or converted from grayscale to BGR, depending on the number of channels.
EnsureImageFormat(IplImage, Size, IplDepth, int)
Ensures the cached image buffer is allocated and has the specified size and format parameters.
public static IplImage EnsureImageFormat(IplImage output, Size size, IplDepth depth, int channels)
Parameters
output
IplImageThe current cached image buffer. If the value is null, or if the cached image parameters do not match the specified size and format, a new image buffer will be allocated.
size
SizeThe pixel-accurate size of the image.
depth
IplDepthThe bit depth format for each pixel in the image.
channels
intThe number of channels in the image.