Module opencv::ximgproc[][src]

Expand description

Extended Image Processing

Structured forests for fast edge detection

This module contains implementations of modern structured edge detection algorithms, i.e. algorithms which somehow takes into account pixel affinities in natural images.

EdgeBoxes

Filters

Superpixels

Image segmentation

Fast line detector

EdgeDrawing

EDGE DRAWING LIBRARY FOR GEOMETRIC FEATURE EXTRACTION AND VALIDATION

Edge Drawing (ED) algorithm is an proactive approach on edge detection problem. In contrast to many other existing edge detection algorithms which follow a subtractive approach (i.e. after applying gradient filters onto an image eliminating pixels w.r.t. several rules, e.g. non-maximal suppression and hysteresis in Canny), ED algorithm works via an additive strategy, i.e. it picks edge pixels one by one, hence the name Edge Drawing. Then we process those random shaped edge segments to extract higher level edge features, i.e. lines, circles, ellipses, etc. The popular method of extraction edge pixels from the thresholded gradient magnitudes is non-maximal supression that tests every pixel whether it has the maximum gradient response along its gradient direction and eliminates if it does not. However, this method does not check status of the neighboring pixels, and therefore might result low quality (in terms of edge continuity, smoothness, thinness, localization) edge segments. Instead of non-maximal supression, ED points a set of edge pixels and join them by maximizing the total gradient response of edge segments. Therefore it can extract high quality edge segments without need for an additional hysteresis step.

Fourier descriptors

Binary morphology on run-length encoded image

These functions support morphological operations on binary images. In order to be fast and space efficient binary images are encoded with a run-length representation. This representation groups continuous horizontal sequences of “on” pixels together in a “run”. A run is charactarized by the column position of the first pixel in the run, the column position of the last pixel in the run and the row position. This representation is very compact for binary images which contain large continuous areas of “on” and “off” pixels. A checkerboard pattern would be a good example. The representation is not so suitable for binary images created from random noise images or other images where little correlation between neighboring pixels exists.

The morphological operations supported here are very similar to the operations supported in the imgproc module. In general they are fast. However on several occasions they are slower than the functions from imgproc. The structuring elements of cv::MORPH_RECT and cv::MORPH_CROSS have very good support from the imgproc module. Also small structuring elements are very fast in imgproc (presumably due to opencl support). Therefore the functions from this module are recommended for larger structuring elements (cv::MORPH_ELLIPSE or self defined structuring elements). A sample application (run_length_morphology_demo) is supplied which allows to compare the speed of some morphological operations for the functions using run-length encoding and the imgproc functions for a given image.

Run length encoded images are stored in standard opencv images. Images have a single column of cv::Point3i elements. The number of rows is the number of run + 1. The first row contains the size of the original (not encoded) image. For the runs the following mapping is used (x: column begin, y: column end (last column), z: row).

The size of the original image is required for compatibility with the imgproc functions when the boundary handling requires that pixel outside the image boundary are “on”.

Modules

Structs

Class for ContourFitting algorithms. ContourFitting match two contours

inline formula

and

inline formula

minimizing distance

block formula

where

inline formula

and

inline formula

are Fourier descriptors of

inline formula

and

inline formula

and s is a scaling factor and

inline formula

is angle rotation and

inline formula

is starting point factor adjustement

Enums

Specifies the part of Hough space to calculate @details The enum specifies the part of Hough space to calculate. Each member specifies primarily direction of lines (horizontal or vertical) and the direction of angle changes. Direction of angle changes is from multiples of 90 to odd multiples of 45. The image considered to be written top-down and left-to-right. Angles are started from vertical line and go clockwise. Separate quarters and halves are written in orientation they should be in full Hough space.

Specifies to do or not to do skewing of Hough transform image @details The enum specifies to do or not to do skewing of Hough transform image so it would be no cycling in Hough transform image through borders of image.

Specifies binary operations. @details The enum specifies binary operations, that is such ones which involve two operands. Formally, a binary operation @f$ f @f$ on a set @f$ S @f$ is a binary relation that maps elements of the Cartesian product @f$ S \times S @f$ to @f$ S @f$: @f[ f: S \times S \to S @f] @ingroup MinUtils_MathOper

Specifies the binarization method to use in cv::ximgproc::niBlackThreshold

Specifies the degree of rules validation. @details The enum specifies the degree of rules validation. This can be used, for example, to choose a proper way of input arguments validation.

Specifies weight types of weighted median filter.

Constants

Classic Niblack binarization. See Niblack1985 .

NICK technique. See Khurshid2009 .

Sauvola’s technique. See Sauvola1997 .

Wolf’s technique. See Wolf2004 .

Skip validations of image borders.

Validate each rule in a proper way.

inline formula

inline formula

inline formula

inline formula

inline formula

unweighted

Traits

Interface for Adaptive Manifold Filter realizations.

Class for ContourFitting algorithms. ContourFitting match two contours

inline formula

and

inline formula

minimizing distance

block formula

where

inline formula

and

inline formula

are Fourier descriptors of

inline formula

and

inline formula

and s is a scaling factor and

inline formula

is angle rotation and

inline formula

is starting point factor adjustement

Interface for realizations of Domain Transform filter.

Main interface for all disparity map filters.

Disparity map filter based on Weighted Least Squares filter (in form of Fast Global Smoother that is a lot faster than traditional Weighted Least Squares filter implementations) and optional use of left-right-consistency-based confidence to refine the results in half-occlusions and uniform areas.

Sparse match interpolation algorithm based on modified locally-weighted affine estimator from Revaud2015 and Fast Global Smoother as post-processing filter.

Class implementing EdgeBoxes algorithm from ZitnickECCV14edgeBoxes :

Class implementing the ED (EdgeDrawing) topal2012edge, EDLines akinlar2011edlines, EDPF akinlar2012edpf and EDCircles akinlar2013edcircles algorithms

Interface for implementations of Fast Bilateral Solver.

Interface for implementations of Fast Global Smoother filter.

@include samples/fld_lines.cpp

Graph Based Segmentation Algorithm. The class implements the algorithm described in PFF2004 .

Interface for realizations of Guided Filter.

! Helper class for training part of [P. Dollar and C. L. Zitnick. Structured Forests for Fast Edge Detection, 2013].

Sparse match interpolation algorithm based on modified piecewise locally-weighted affine estimator called Robust Interpolation method of Correspondences or RIC from Hu2017 and Variational and Fast Global Smoother as post-processing filter. The RICInterpolator is a extension of the EdgeAwareInterpolator. Main concept of this extension is an piece-wise affine model based on over-segmentation via SLIC superpixel estimation. The method contains an efficient propagation mechanism to estimate among the pieces-wise models.

Applies Ridge Detection Filter to an input image. Implements Ridge detection similar to the one in Mathematica using the eigen values from the Hessian Matrix of the input image using Sobel Derivatives. Additional refinement can be done using Skeletonization and Binarization. Adapted from segleafvein and M_RF

Selective search segmentation algorithm The class implements the algorithm described in uijlings2013selective.

Strategie for the selective search segmentation algorithm The class implements a generic stragery for the algorithm described in uijlings2013selective.

Color-based strategy for the selective search segmentation algorithm The class is implemented from the algorithm described in uijlings2013selective.

Fill-based strategy for the selective search segmentation algorithm The class is implemented from the algorithm described in uijlings2013selective.

Regroup multiple strategies for the selective search segmentation algorithm

Size-based strategy for the selective search segmentation algorithm The class is implemented from the algorithm described in uijlings2013selective.

Texture-based strategy for the selective search segmentation algorithm The class is implemented from the algorithm described in uijlings2013selective.

Main interface for all filters, that take sparse matches as an input and produce a dense per-pixel matching (optical flow) as an output.

Class implementing edge detection algorithm from Dollar2013 :

Class implementing the LSC (Linear Spectral Clustering) superpixels algorithm described in LiCVPR2015LSC.

Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm described in VBRV14 .

Class implementing the SLIC (Simple Linear Iterative Clustering) superpixels algorithm described in Achanta2012.

Functions

Simple one-line Adaptive Manifold Filter call.

Performs anisotropic diffusion on an image.

Applies the bilateral texture filter to an image. It performs structure-preserving texture filter. For more details about this filter see Cho2014.

C++ default parameters

Compares a color template against overlapped color image regions.

Function for computing the percent of “bad” pixels in the disparity map (pixels where error is higher than a specified threshold)

Function for computing mean square error for disparity maps

Contour sampling .

Computes the estimated covariance matrix of an image using the sliding window forumlation.

Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines.

create ContourFitting algorithm object

Convenience factory method that creates an instance of DisparityWLSFilter and sets up all the relevant filter parameters automatically based on the matcher instance. Currently supports only StereoBM and StereoSGBM.

More generic factory method, create instance of DisparityWLSFilter and execute basic initialization routines. When using this method you will need to set-up the ROI, matchers and other parameters by yourself.

Factory method, create instance of DTFilter and produce initialization routines.

Factory method that creates an instance of the EdgeAwareInterpolator.

Creates a Edgeboxes

Creates a smart pointer to a EdgeDrawing object and initializes it

Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.

Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.

Creates a smart pointer to a FastLineDetector object and initializes it

Creates a graph based segmentor

Factory method, create instance of GuidedFilter and produce initialization routines.

creates a quaternion image.

Factory method that creates an instance of the RICInterpolator.

Convenience method to set up the matcher for computing the right-view disparity map that is required in case of filtering with confidence.

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

Create a new SelectiveSearchSegmentation class.

Create a new color-based strategy

Create a new fill-based strategy

Create a new multiple strategy

Create a new multiple strategy and set one subtrategy

Create a new multiple strategy and set two subtrategies, with equal weights

Create a new multiple strategy and set three subtrategies, with equal weights

Create a new multiple strategy and set four subtrategies, with equal weights

Create a new size-based strategy

Create a new size-based strategy

!

Class implementing the LSC (Linear Spectral Clustering) superpixels

Initializes a SuperpixelSEEDS object.

Initialize a SuperpixelSLIC object

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

Simple one-line Domain Transform filter call. If you have multiple images to filter with the same guided image then use DTFilter interface to avoid extra computations on initialization stage.

Smoothes an image using the Edge-Preserving filter.

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

Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same guide then use FastBilateralSolverFilter interface to avoid extra computations.

Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same guide then use FastGlobalSmootherFilter interface to avoid extra computations.

Calculates 2D Fast Hough transform of an image.

Fourier descriptors for planed closed curves

Function for creating a disparity map visualization (clamped CV_8U image)

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

Applies X Deriche filter to an image.

Applies Y Deriche filter to an image.

Applies Paillou filter to an image.

Simple one-line Guided Filter call.

Calculates coordinates of line segment corresponded by point in Hough space.

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)

Applies the joint bilateral filter to an image.

Global image smoothing via L0 gradient minimization.

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

Performs thresholding on input images using Niblack’s technique or some of the popular variations it inspired.

Paint run length encoded binary image into an image.

Calculates an affine transformation that normalize given image using Pei&Lin Normalization.

Calculates an affine transformation that normalize given image using Pei&Lin Normalization.

calculates conjugate of a quaternion image.

Performs a forward or inverse Discrete quaternion Fourier transform of a 2D quaternion array.

Calculates the per-element quaternion product of two arrays

divides each element by its modulus.

Function for reading ground truth disparity maps. Supports basic Middlebury and MPI-Sintel formats. Note that the resulting disparity map is scaled by 16.

Applies the rolling guidance filter to an image.

Applies a binary blob thinning operation, to achieve a skeletization of the input image.

Applies a fixed-level threshold to each array element.

transform a contour

Applies weighted median filter to an image.