OpenCV  4.5.2
Open Source Computer Vision
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
cv::ximgproc::EdgeDrawing Class Referenceabstract

Class implementing the ED (EdgeDrawing) [248], EDLines [4], EDPF [5] and EDCircles [6] algorithms. More...

#include <opencv2/ximgproc/edge_drawing.hpp>

Inheritance diagram for cv::ximgproc::EdgeDrawing:
cv::Algorithm

Classes

struct  Params
 

Public Types

enum  GradientOperator {
  PREWITT = 0,
  SOBEL = 1,
  SCHARR = 2,
  LSD = 3
}
 

Public Member Functions

virtual ~EdgeDrawing ()
 
virtual void detectEdges (InputArray src)=0
 Detects edges and prepares them to detect lines and ellipses. More...
 
virtual void detectEllipses (OutputArray ellipses)=0
 Detects circles and ellipses. More...
 
virtual void detectLines (OutputArray lines)=0
 Detects lines. More...
 
virtual void getEdgeImage (OutputArray dst)=0
 
virtual void getGradientImage (OutputArray dst)=0
 
virtual std::vector< std::vector< Point > > getSegments ()=0
 
void setParams (const EdgeDrawing::Params &parameters)
 sets parameters. More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage. More...
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage. More...
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Public Attributes

Params params
 

Additional Inherited Members

- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 
- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

Detailed Description

Class implementing the ED (EdgeDrawing) [248], EDLines [4], EDPF [5] and EDCircles [6] algorithms.

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 supressiun 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.

Member Enumeration Documentation

◆ GradientOperator

Enumerator
PREWITT 
SOBEL 
SCHARR 
LSD 

Constructor & Destructor Documentation

◆ ~EdgeDrawing()

virtual cv::ximgproc::EdgeDrawing::~EdgeDrawing ( )
inlinevirtual

Member Function Documentation

◆ detectEdges()

virtual void cv::ximgproc::EdgeDrawing::detectEdges ( InputArray  src)
pure virtual
Python:
None=cv.ximgproc_EdgeDrawing.detectEdges(src)

Detects edges and prepares them to detect lines and ellipses.

Parameters
srcinput image

◆ detectEllipses()

virtual void cv::ximgproc::EdgeDrawing::detectEllipses ( OutputArray  ellipses)
pure virtual
Python:
ellipses=cv.ximgproc_EdgeDrawing.detectEllipses([, ellipses])

Detects circles and ellipses.

Parameters
ellipsesoutput Vec<6d> contains center point and perimeter for circles.
Note
you should call detectEdges() method before call this.

◆ detectLines()

virtual void cv::ximgproc::EdgeDrawing::detectLines ( OutputArray  lines)
pure virtual
Python:
lines=cv.ximgproc_EdgeDrawing.detectLines([, lines])

Detects lines.

Parameters
linesoutput Vec<4f> contains start point and end point of detected lines.
Note
you should call detectEdges() method before call this.

◆ getEdgeImage()

virtual void cv::ximgproc::EdgeDrawing::getEdgeImage ( OutputArray  dst)
pure virtual
Python:
dst=cv.ximgproc_EdgeDrawing.getEdgeImage([, dst])

◆ getGradientImage()

virtual void cv::ximgproc::EdgeDrawing::getGradientImage ( OutputArray  dst)
pure virtual
Python:
dst=cv.ximgproc_EdgeDrawing.getGradientImage([, dst])

◆ getSegments()

virtual std::vector<std::vector<Point> > cv::ximgproc::EdgeDrawing::getSegments ( )
pure virtual
Python:
retval=cv.ximgproc_EdgeDrawing.getSegments()

◆ setParams()

void cv::ximgproc::EdgeDrawing::setParams ( const EdgeDrawing::Params parameters)
Python:
None=cv.ximgproc_EdgeDrawing.setParams(parameters)

sets parameters.

this function is meant to be used for parameter setting in other languages than c++.

Member Data Documentation

◆ params

Params cv::ximgproc::EdgeDrawing::params

The documentation for this class was generated from the following file: