### Navigation

- index
- next |
- previous |
- OpenCV 3.0.0-dev documentation »
- OpenCV API Reference »
- ximgproc. 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.

## StructuredEdgeDetection

class `StructuredEdgeDetection` : public `Algorithm`

Class implementing edge detection algorithm from [Dollar2013]

    /*! \class StructuredEdgeDetection
    Prediction part of [P. Dollar and C. L. Zitnick. Structured Forests for Fast Edge Detection, 2013].
    */
    class CV_EXPORTS_W StructuredEdgeDetection : public Algorithm
    {
    public:

        /*!
        * The function detects edges in src and draw them to dst
        *
        * \param src : source image (RGB, float, in [0;1]) to detect edges
        * \param dst : destination image (grayscale, float, in [0;1])
        *              where edges are drawn
        */
        CV_WRAP virtual void detectEdges(const Mat src, Mat dst) = 0;
    };

    /*!
    * The only available constructor loading data from model file
    *
    * \param model : name of the file where the model is stored
    */
    CV_EXPORTS_W Ptr<StructuredEdgeDetection> createStructuredEdgeDetection(const String &model);

### StructuredEdgeDetection::detectEdges

C++:`` void `detectEdges`(const Mat src, Mat dst)

  The function detects edges in src and draw them to dst. The algorithm underlies this function is much more robust to texture presence, than common approaches, e.g. Sobel

  Parameters: | src – source image (RGB, float, in [0;1]) to detect edges dst – destination image (grayscale, float, in [0;1]) where edges are drawn

See also

`Sobel()`, `Canny()`

### createStructuredEdgeDetection

C++:`` Ptr<cv::StructuredEdgeDetection> `createStructuredEdgeDetection`(String model)

  The only available constructor

  Parameters: | model – model file name

[Dollar2013] | P. Dollár, C. L. Zitnick, “Structured forests for fast edge detection”, IEEE International Conference on Computer Vision (ICCV), 2013, pp. 1841-1848. DOI

## Help and Feedback

You did not find what you were looking for?

- Ask a question on the Q&A forum.
- If you think something is missing or wrong in the documentation, please file a bug report.

### Navigation

- index
- next |
- previous |
- OpenCV 3.0.0-dev documentation »
- OpenCV API Reference »
- ximgproc. Extended Image Processing »