Table of Contents

Method EnsureImageFormat

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

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 IplImage

The 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 Size

The pixel-accurate size of the image.

depth IplDepth

The bit depth format for each pixel in the image.

channels int

The number of channels in the image.

Returns

IplImage

An IplImage object matching the specified size and format parameters. If output matches all the parameters, the same reference is returned without modification.