OpenCV 线段检测器

OpenCV Line Segment Detector

根据LSD class reference,默认构造函数在line_descriptor下。但是查看模块会发现这是它的内容。

# encoding: utf-8
# module cv2.line_descriptor
# from /Users/****/anaconda/lib/python2.7/site-packages/cv2.so
# by generator 1.144
# no doc
# no imports

# Variables with simple values

DrawLinesMatchesFlags_DEFAULT = 0

DrawLinesMatchesFlags_DRAW_OVER_OUTIMG = 1

DrawLinesMatchesFlags_NOT_DRAW_SINGLE_LINES = 2

DRAW_LINES_MATCHES_FLAGS_DEFAULT = 0

DRAW_LINES_MATCHES_FLAGS_DRAW_OVER_OUTIMG = 1

DRAW_LINES_MATCHES_FLAGS_NOT_DRAW_SINGLE_LINES = 2

# no functions
# no classes

调查 xfeatures2d 也没有结果。

不过根据 this 示例,该模块确实存在。在 Python 哪里可以找到这个模块?

我正在使用 OpenCV 3.2.0

根据 OpenCv 3.0 文档,它是

cv2.createLineSegmentDetector([_refine[, _scale[, _sigma_scale[, _quant[, _ang_th[, _log_eps[, _density_th[, _n_bins]]]]]]]]) → retval

http://docs.opencv.org/3.0-beta/modules/imgproc/doc/feature_detection.html#createlinesegmentdetector