Class CvXImgProc.RL
- Namespace
- OpenCvSharp.XImgProc
- Assembly
- OpenCvSharp.dll
run_length_morphology.hpp
public static class CvXImgProc.RL
- Inheritance
-
CvXImgProc.RL
- Inherited Members
Methods
CreateRLEImage(IEnumerable<Point3i>, OutputArray, Size?)
Creates a run-length encoded image from a vector of runs (column begin, column end, row)
public static void CreateRLEImage(IEnumerable<Point3i> runs, OutputArray res, Size? size = null)
Parameters
runsIEnumerable<Point3i>vector of runs
resOutputArrayresult
sizeSize?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, Point?)
Dilates an run-length encoded binary image by using a specific structuring element.
public static void Dilate(InputArray rlSrc, OutputArray rlDest, InputArray rlKernel, Point? anchor = null)
Parameters
rlSrcInputArrayinput image
rlDestOutputArrayresult
rlKernelInputArraykernel
anchorPoint?position of the anchor within the element; default value (0, 0) is usually the element center.
Erode(InputArray, OutputArray, InputArray, bool, Point?)
Erodes an run-length encoded binary image by using a specific structuring element.
public static void Erode(InputArray rlSrc, OutputArray rlDest, InputArray rlKernel, bool bBoundaryOn = true, Point? anchor = null)
Parameters
rlSrcInputArrayinput image
rlDestOutputArrayresult
rlKernelInputArraykernel
bBoundaryOnboolindicates 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)
anchorPoint?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.
public static Mat GetStructuringElement(MorphShapes shape, Size ksize)
Parameters
shapeMorphShapesElement shape that can be one of cv::MorphShapes
ksizeSizeSize of the structuring element.
Returns
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)
public static bool IsRLMorphologyPossible(InputArray rlStructuringElement)
Parameters
rlStructuringElementInputArray
Returns
MorphologyEx(InputArray, OutputArray, MorphTypes, InputArray, bool, Point?)
Applies a morphological operation to a run-length encoded binary image.
public static void MorphologyEx(InputArray rlSrc, OutputArray rlDest, MorphTypes op, InputArray rlKernel, bool bBoundaryOnForErosion = true, Point? anchor = null)
Parameters
rlSrcInputArrayinput image
rlDestOutputArrayresult
opMorphTypesall operations supported by cv::morphologyEx (except cv::MORPH_HITMISS)
rlKernelInputArraykernel
bBoundaryOnForErosionboolindicates 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)
anchorPoint?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.
public static void Paint(InputOutputArray image, InputArray rlSrc, Scalar value)
Parameters
imageInputOutputArrayimage to paint into (currently only single channel images).
rlSrcInputArrayrun length encoded image
valueScalarall 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.
public static void Threshold(InputArray src, OutputArray rlDest, double thresh, ThresholdTypes type)
Parameters
srcInputArrayinput array (single-channel).
rlDestOutputArrayresulting run length encoded image.
threshdoublethreshold value.
typeThresholdTypesthresholding type (only cv::THRESH_BINARY and cv::THRESH_BINARY_INV are supported)