2017-05-30 130 views
1

根據LSD class reference,默認的構造函數在line_descriptor之下。但是窺視這個模塊可以揭示出它的內容。OpenCV線段檢測器

# 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

回答

2

據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

+0

感謝您的回答。如果可以,請跟進一個問題。我正在嘗試使用[createBinaryDescriptor](http://docs.opencv.org/3.0-beta/modules/line_descriptor/doc/binary_descriptor.html?highlight=createbinarydescriptor)類和[keyline](http:///docs.opencv.org/trunk/d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html),但我似乎無法找到他們的Python等價物。他們只是顯示C++版本。這是否意味着沒有可用的Python API?我真的已經嘗試過搜索,但他們似乎都指向C++版本甚至回到版本3.0 – eshirima

+0

我知道聲明'lsd = cv2.createLineSegmentDetector()'使'lsd'成爲binaryDetector。但是如果我想明確使用它們的基本binaryDetector類呢? – eshirima

+0

不確定,所以只是猜測:binaryDetector可能只是一個沒有實現的虛擬類。 – Micka