Commit 287a5e52 authored by iindovina's avatar iindovina Committed by Alexander Alekhin

Merge pull request #1994 from iindovina:expose_line_descriptor_python

Expose line descriptor python (#1994)

* Created wrappers for other line_descriptor functions/classes

* Changes to expose LSD and EDLines params in Python and make line descriptor available in Python
parent 320e633f
......@@ -51,6 +51,11 @@ Ptr<LSDDetector> LSDDetector::createLSDDetector()
return Ptr<LSDDetector>( new LSDDetector() );
}
Ptr<LSDDetector> LSDDetector::createLSDDetector(LSDParam params)
{
return Ptr<LSDDetector>( new LSDDetector(params) );
}
/* compute Gaussian pyramid of input image */
void LSDDetector::computeGaussianPyramid( const Mat& image, int numOctaves, int scale )
{
......@@ -145,7 +150,10 @@ void LSDDetector::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& keyline
lsd->computeGaussianPyramid( image, numOctaves, scale );
/* create an LSD extractor */
cv::Ptr<cv::LineSegmentDetector> ls = cv::createLineSegmentDetector( cv::LSD_REFINE_ADV );
cv::Ptr<cv::LineSegmentDetector> ls = cv::createLineSegmentDetector(
cv::LSD_REFINE_ADV, params.scale, params.sigma_scale,
params.quant, params.ang_th, params.log_eps,
params.density_th, params.n_bins);
/* prepare a vector to host extracted segments */
std::vector<std::vector<cv::Vec4f> > lines_lsd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment