Skip to content

YChuan1115/EdgesSubPix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sub-Pixel Edge Detection using OpenCV

Description

  • Edge detection operator return subpixel level edge position.
  • Using Canny filter as differential operator.
  • Implementing according to Carsten Steger's method.
  • Interpolation of second partial derivatives with Facet Model method.

API

struct Contour
{
    std::vector<cv::Point2f> points;  // edge location
    std::vector<float> direction;     // direction of the gradient in edge point, 
                                      // starting from y axis, counter-clockwise
    std::vector<float> response;      // amptitude of the gradient in edge point
};
// gray             - only support 8-bit grayscale
// hierarchy, mode  - have the same meanings as in cv::findContours
CV_EXPORTS void EdgesSubPix(cv::Mat &gray, double alpha, int low, int high,
                            std::vector<Contour> &contours, cv::OutputArray hierarchy,
                            int mode);

// mode = RETR_LIST
CV_EXPORTS void EdgesSubPix(cv::Mat &gray, double alpha, int low, int high, 
                           std::vector<Contour> &contours);

License

3-clause BSD License

About

Sub-Pixel Edge Detection Using OpenCV

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.0%
  • CMake 5.0%