Loading...
Searching...
No Matches
Ximgproc_run_length_morphology

Functions

void cv::ximgproc::rl::createRLEImage (const std::vector< cv::Point3i > &runs, OutputArray res, Size size=Size(0, 0))
 Creates a run-length encoded image from a vector of runs (column begin, column end, row)
 
void cv::ximgproc::rl::dilate (InputArray rlSrc, OutputArray rlDest, InputArray rlKernel, Point anchor=Point(0, 0))
 Dilates an run-length encoded binary image by using a specific structuring element.
 
void cv::ximgproc::rl::erode (InputArray rlSrc, OutputArray rlDest, InputArray rlKernel, bool bBoundaryOn=true, Point anchor=Point(0, 0))
 Erodes an run-length encoded binary image by using a specific structuring element.
 
cv::Mat cv::ximgproc::rl::getStructuringElement (int shape, Size ksize)
 Returns a run length encoded structuring element of the specified size and shape.
 
bool cv::ximgproc::rl::isRLMorphologyPossible (InputArray rlStructuringElement)
 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)
 
void cv::ximgproc::rl::morphologyEx (InputArray rlSrc, OutputArray rlDest, int op, InputArray rlKernel, bool bBoundaryOnForErosion=true, Point anchor=Point(0, 0))
 Applies a morphological operation to a run-length encoded binary image.
 
void cv::ximgproc::rl::paint (InputOutputArray image, InputArray rlSrc, const cv::Scalar &value)
 Paint run length encoded binary image into an image.
 
void cv::ximgproc::rl::threshold (InputArray src, OutputArray rlDest, double thresh, int type)
 Applies a fixed-level threshold to each array element.
 

Detailed Description

Function Documentation

◆ createRLEImage()

void cv::ximgproc::rl::createRLEImage ( const std::vector< cv::Point3i > &  runs,
OutputArray  res,
Size  size = Size(0, 0) 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Creates a run-length encoded image from a vector of runs (column begin, column end, row)

Parameters
runsvector of runs
resresult
sizeimage 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()

void cv::ximgproc::rl::dilate ( InputArray  rlSrc,
OutputArray  rlDest,
InputArray  rlKernel,
Point  anchor = Point(0, 0) 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Dilates an run-length encoded binary image by using a specific structuring element.

Parameters
rlSrcinput image
rlDestresult
rlKernelkernel
anchorposition of the anchor within the element; default value (0, 0) is usually the element center.

◆ erode()

void cv::ximgproc::rl::erode ( InputArray  rlSrc,
OutputArray  rlDest,
InputArray  rlKernel,
bool  bBoundaryOn = true,
Point  anchor = Point(0, 0) 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Erodes an run-length encoded binary image by using a specific structuring element.

Parameters
rlSrcinput image
rlDestresult
rlKernelkernel
bBoundaryOnindicates 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)
anchorposition of the anchor within the element; default value (0, 0) is usually the element center.

◆ getStructuringElement()

cv::Mat cv::ximgproc::rl::getStructuringElement ( int  shape,
Size  ksize 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Returns a run length encoded structuring element of the specified size and shape.

Parameters
shapeElement shape that can be one of cv::MorphShapes
ksizeSize of the structuring element.

◆ isRLMorphologyPossible()

bool cv::ximgproc::rl::isRLMorphologyPossible ( InputArray  rlStructuringElement)

#include <opencv2/ximgproc/run_length_morphology.hpp>

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)

Parameters
rlStructuringElementmask to be tested

◆ morphologyEx()

void cv::ximgproc::rl::morphologyEx ( InputArray  rlSrc,
OutputArray  rlDest,
int  op,
InputArray  rlKernel,
bool  bBoundaryOnForErosion = true,
Point  anchor = Point(0, 0) 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Applies a morphological operation to a run-length encoded binary image.

Parameters
rlSrcinput image
rlDestresult
opall operations supported by cv::morphologyEx (except cv::MORPH_HITMISS)
rlKernelkernel
bBoundaryOnForErosionindicates 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)
anchorposition of the anchor within the element; default value (0, 0) is usually the element center.

◆ paint()

void cv::ximgproc::rl::paint ( InputOutputArray  image,
InputArray  rlSrc,
const cv::Scalar value 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Paint run length encoded binary image into an image.

Parameters
imageimage to paint into (currently only single channel images).
rlSrcrun length encoded image
valueall foreground pixel of the binary image are set to this value

◆ threshold()

void cv::ximgproc::rl::threshold ( InputArray  src,
OutputArray  rlDest,
double  thresh,
int  type 
)

#include <opencv2/ximgproc/run_length_morphology.hpp>

Applies a fixed-level threshold to each array element.

Parameters
srcinput array (single-channel).
rlDestresulting run length encoded image.
threshthreshold value.
typethresholding type (only cv::THRESH_BINARY and cv::THRESH_BINARY_INV are supported)