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
scaleFactorScalarmultiplier for input image values.
sizeSizespatial size for output image.
meanScalarscalar with mean values which are subtracted from channels.
swapRBboolflag which indicates that swap first and last channels.
depthMatType?depth of output blob. Choose CV_32F or CV_8U.
dataLayoutDataLayoutorder of output dimensions.
paddingModeImagePaddingModeelement of image processing mode.
borderValueScalarborder value used with the LETTERBOX padding mode.
Properties
BorderValue
border value used with the LETTERBOX padding mode.
public Scalar BorderValue { get; set; }
Property Value
DataLayout
order of output dimensions.
public DataLayout DataLayout { get; set; }
Property Value
Depth
depth of output blob. Choose CV_32F or CV_8U.
public MatType Depth { get; set; }
Property Value
Mean
scalar with mean values which are subtracted from channels.
public Scalar Mean { get; set; }
Property Value
PaddingMode
element of image processing mode.
public ImagePaddingMode PaddingMode { get; set; }
Property Value
ScaleFactor
scalefactor multiplier for input image values.
public Scalar ScaleFactor { get; set; }
Property Value
Size
spatial size for output image.
public Size Size { get; set; }
Property Value
SwapRB
flag which indicates that swap first and last channels.
public bool SwapRB { get; set; }
Property Value
Methods
BlobRectToImageRect(Rect, Size)
Get rectangle coordinates in original image system from rectangle in blob coordinates.
public Rect BlobRectToImageRect(Rect rBlob, Size size)
Parameters
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
rBlobIEnumerable<Rect>rect in blob coordinates.
sizeSizeoriginal input image size.
Returns
- Rect[]
rectangles in original image coordinates.