Table of Contents

Class Image2BlobParams

Namespace
OpenCvSharp.Dnn
Assembly
OpenCvSharp.dll

Processing params of image to blob. It includes all possible image processing operations and corresponding parameters.

public class Image2BlobParams
Inheritance
Image2BlobParams
Inherited Members

Constructors

Image2BlobParams()

Creates parameters with default values.

public Image2BlobParams()

Image2BlobParams(Scalar, Size, Scalar, bool, MatType?, DataLayout, ImagePaddingMode, Scalar)

Creates parameters with the specified values.

public Image2BlobParams(Scalar scaleFactor, Size size = default, Scalar mean = default, bool swapRB = false, MatType? depth = null, DataLayout dataLayout = DataLayout.NCHW, ImagePaddingMode paddingMode = ImagePaddingMode.NULL, Scalar borderValue = default)

Parameters

scaleFactor Scalar

multiplier for input image values.

size Size

spatial size for output image.

mean Scalar

scalar with mean values which are subtracted from channels.

swapRB bool

flag which indicates that swap first and last channels.

depth MatType?

depth of output blob. Choose CV_32F or CV_8U.

dataLayout DataLayout

order of output dimensions.

paddingMode ImagePaddingMode

element of image processing mode.

borderValue Scalar

border value used with the LETTERBOX padding mode.

Properties

BorderValue

border value used with the LETTERBOX padding mode.

public Scalar BorderValue { get; set; }

Property Value

Scalar

DataLayout

order of output dimensions.

public DataLayout DataLayout { get; set; }

Property Value

DataLayout

Depth

depth of output blob. Choose CV_32F or CV_8U.

public MatType Depth { get; set; }

Property Value

MatType

Mean

scalar with mean values which are subtracted from channels.

public Scalar Mean { get; set; }

Property Value

Scalar

PaddingMode

element of image processing mode.

public ImagePaddingMode PaddingMode { get; set; }

Property Value

ImagePaddingMode

ScaleFactor

scalefactor multiplier for input image values.

public Scalar ScaleFactor { get; set; }

Property Value

Scalar

Size

spatial size for output image.

public Size Size { get; set; }

Property Value

Size

SwapRB

flag which indicates that swap first and last channels.

public bool SwapRB { get; set; }

Property Value

bool

Methods

BlobRectToImageRect(Rect, Size)

Get rectangle coordinates in original image system from rectangle in blob coordinates.

public Rect BlobRectToImageRect(Rect rBlob, Size size)

Parameters

rBlob Rect

rect in blob coordinates.

size Size

original input image size.

Returns

Rect

rectangle in original image coordinates.

BlobRectsToImageRects(IEnumerable<Rect>, Size)

Get rectangle coordinates in original image system from rectangles in blob coordinates.

public Rect[] BlobRectsToImageRects(IEnumerable<Rect> rBlob, Size size)

Parameters

rBlob IEnumerable<Rect>

rect in blob coordinates.

size Size

original input image size.

Returns

Rect[]

rectangles in original image coordinates.

See Also