Class IplConvKernel
Represents a rectangular convolution kernel used for morphological operations.
Namespace: OpenCV.Net
Assembly: OpenCV.Net.dll
Syntax
public class IplConvKernel : SafeHandleZeroOrMinusOneIsInvalid
Constructors
| Improve this Doc View SourceIplConvKernel(Int32, Int32, Int32, Int32, StructuringElementShape)
Initializes a new instance of the IplConvKernel class with the specified size, anchor and shape for the structuring element.
Declaration
public IplConvKernel(int cols, int rows, int anchorX, int anchorY, StructuringElementShape shape)
Parameters
Type | Name | Description |
---|---|---|
Int32 | cols | The width of the structuring element. |
Int32 | rows | The height of the structuring element. |
Int32 | anchorX | The x-coordinate of the anchor. |
Int32 | anchorY | The y-coordinate of the anchor. |
StructuringElementShape | shape | The shape of the structuring element. |
IplConvKernel(Int32, Int32, Int32, Int32, StructuringElementShape, Int32[])
Initializes a new instance of the IplConvKernel class with the specified size, anchor, shape and optionally custom kernel values for the structuring element.
Declaration
public IplConvKernel(int cols, int rows, int anchorX, int anchorY, StructuringElementShape shape, int[] values)
Parameters
Type | Name | Description |
---|---|---|
Int32 | cols | The width of the structuring element. |
Int32 | rows | The height of the structuring element. |
Int32 | anchorX | The x-coordinate of the anchor. |
Int32 | anchorY | The y-coordinate of the anchor. |
StructuringElementShape | shape | The shape of the structuring element. |
Int32[] | values | The kernel values that specify the custom shape of the structuring element, when
|
Properties
| Improve this Doc View SourceAnchor
Gets the anchor position within the element. The default value (-1, -1) means that the anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates how much the result of the morphological operation is shifted.
Declaration
public Point Anchor { get; }
Property Value
Type | Description |
---|---|
Point |
Size
Gets the size of the convolution kernel.
Declaration
public Size Size { get; }
Property Value
Type | Description |
---|---|
Size |
Methods
| Improve this Doc View SourceReleaseHandle()
Executes the code required to free the native IplConvKernel handle.
Declaration
protected override bool ReleaseHandle()
Returns
Type | Description |
---|---|
Boolean | true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. |