Class CvXImgProc.RL
run_length_morphology.hpp
Inheritance
Inherited Members
Namespace: OpenCvSharp.XImgProc
Assembly: OpenCvSharp.dll
Syntax
public static class RL
Methods
| Improve this Doc View SourceCreateRLEImage(IEnumerable<Point3i>, OutputArray, Nullable<Size>)
Creates a run-length encoded image from a vector of runs (column begin, column end, row)
Declaration
public static void CreateRLEImage(IEnumerable<Point3i> runs, OutputArray res, Size? size = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<OpenCvSharp.Point3i> | runs | vector of runs |
OutputArray | res | result |
System.Nullable<OpenCvSharp.Size> | size | image size (to be used if an "on" boundary should be used in erosion, using the default means that the size is computed from the extension of the input) |
Dilate(InputArray, OutputArray, InputArray, Nullable<Point>)
Dilates an run-length encoded binary image by using a specific structuring element.
Declaration
public static void Dilate(InputArray rlSrc, OutputArray rlDest, InputArray rlKernel, Point? anchor = null)
Parameters
Type | Name | Description |
---|---|---|
InputArray | rlSrc | input image |
OutputArray | rlDest | result |
InputArray | rlKernel | kernel |
System.Nullable<OpenCvSharp.Point> | anchor | position of the anchor within the element; default value (0, 0) is usually the element center. |
Erode(InputArray, OutputArray, InputArray, Boolean, Nullable<Point>)
Erodes an run-length encoded binary image by using a specific structuring element.
Declaration
public static void Erode(InputArray rlSrc, OutputArray rlDest, InputArray rlKernel, bool bBoundaryOn = true, Point? anchor = null)
Parameters
Type | Name | Description |
---|---|---|
InputArray | rlSrc | input image |
OutputArray | rlDest | result |
InputArray | rlKernel | kernel |
System.Boolean | bBoundaryOn | indicates whether pixel outside the image boundary are assumed to be on (True: works in the same way as the default of cv::erode, False: is a little faster) |
System.Nullable<OpenCvSharp.Point> | anchor | position of the anchor within the element; default value (0, 0) is usually the element center. |
GetStructuringElement(MorphShapes, Size)
Returns a run length encoded structuring element of the specified size and shape.
Declaration
public static Mat GetStructuringElement(MorphShapes shape, Size ksize)
Parameters
Type | Name | Description |
---|---|---|
MorphShapes | shape | Element shape that can be one of cv::MorphShapes |
OpenCvSharp.Size | ksize | Size of the structuring element. |
Returns
Type | Description |
---|---|
Mat |
IsRLMorphologyPossible(InputArray)
Check whether a custom made structuring element can be used with run length morphological operations. (It must consist of a continuous array of single runs per row)
Declaration
public static bool IsRLMorphologyPossible(InputArray rlStructuringElement)
Parameters
Type | Name | Description |
---|---|---|
InputArray | rlStructuringElement |
Returns
Type | Description |
---|---|
System.Boolean |
MorphologyEx(InputArray, OutputArray, MorphTypes, InputArray, Boolean, Nullable<Point>)
Applies a morphological operation to a run-length encoded binary image.
Declaration
public static void MorphologyEx(InputArray rlSrc, OutputArray rlDest, MorphTypes op, InputArray rlKernel, bool bBoundaryOnForErosion = true, Point? anchor = null)
Parameters
Type | Name | Description |
---|---|---|
InputArray | rlSrc | input image |
OutputArray | rlDest | result |
MorphTypes | op | all operations supported by cv::morphologyEx (except cv::MORPH_HITMISS) |
InputArray | rlKernel | kernel |
System.Boolean | bBoundaryOnForErosion | indicates whether pixel outside the image boundary are assumed to be on for erosion operations (True: works in the same way as the default of cv::erode, False: is a little faster) |
System.Nullable<OpenCvSharp.Point> | anchor | position of the anchor within the element; default value (0, 0) is usually the element center. |
Paint(InputOutputArray, InputArray, Scalar)
Paint run length encoded binary image into an image.
Declaration
public static void Paint(InputOutputArray image, InputArray rlSrc, Scalar value)
Parameters
Type | Name | Description |
---|---|---|
InputOutputArray | image | image to paint into (currently only single channel images). |
InputArray | rlSrc | run length encoded image |
OpenCvSharp.Scalar | value | all foreground pixel of the binary image are set to this value |
Threshold(InputArray, OutputArray, Double, ThresholdTypes)
Applies a fixed-level threshold to each array element.
Declaration
public static void Threshold(InputArray src, OutputArray rlDest, double thresh, ThresholdTypes type)
Parameters
Type | Name | Description |
---|---|---|
InputArray | src | input array (single-channel). |
OutputArray | rlDest | resulting run length encoded image. |
System.Double | thresh | threshold value. |
ThresholdTypes | type | thresholding type (only cv::THRESH_BINARY and cv::THRESH_BINARY_INV are supported) |