標籤

二元樹 (1) 字串常數池 (1) 投資 (3) 每月損益 (37) 例外處理 (1) 泛型 (2) 股票 (15) 指標 (5) 英文 (8) 基本資料型別 (1) 期貨 (1) 程式交易 (10) 量化投資 (5) 亂亂寫 (3) 概念 (3) 資料結構 (3) 演算法 (3) 數學 (3) 轉型 (1) AMA (1) ArrayList (1) assert (1) BeautifulSoup (1) C/C++ (8) casting (1) ClassCastException (1) classpath (1) Collection (4) Comparable (1) comparTo() (1) constructor (1) database (3) Debian (1) Dropbox (2) EA (2) enum (1) equals() (2) exception (3) extends (1) ffmpeg (1) final (1) Git (1) HashMap (1) HashSet (1) hasNext() (1) HTS (3) instanceof (1) IS-A (1) Iterator (1) JAVA (43) length (1) Linux (31) List (1) Mac (6) Map (1) ML (2) MT4 (6) MySQL (2) next() (1) NullPointerException (1) Number (1) Numpy (2) OpenCart (1) OpenCV (3) OSX (1) overloading (1) overriding (3) pandas (2) PHP (8) PriorityQueue (1) Python (11) Queue (1) random() (1) reverse() (1) Samba (1) SCJP (21) sqrt() (1) synchronized (1) talib (1) ufw (1) uTorrent (1) var-args (2) VHF (1) vim (2) Yhoo知識+ (4)

2013年10月23日 星期三

cvHoughLines2


HoughLines

Finds lines in a binary image using the standard Hough transform.
C++: void HoughLines(InputArray image, OutputArray lines, double rho, double theta, intthreshold, double srn=0, double stn=0 )
Python: cv2.HoughLines(image, rho, theta, threshold[, lines[, srn[, stn]]]) → lines
C: CvSeq* cvHoughLines2(CvArr* image, void* line_storage, int method, double rho, double theta, int threshold, double param1=0, double param2=0 )
Python: cv.HoughLines2(image, storage, method, rho, theta, threshold, param1=0, param2=0) → lines
Parameters:
  • image – 8-bit, single-channel binary source image. The image may be modified by the function.
  • lines – Output vector of lines. Each line is represented by a two-element vector (\rho, \theta) . \rho is the distance from the coordinate origin (0,0) (top-left corner of the image). \theta is the line rotation angle in radians ( 0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line} ).
  • rho – Distance resolution of the accumulator in pixels.
  • theta – Angle resolution of the accumulator in radians.
  • threshold – Accumulator threshold parameter. Only those lines are returned that get enough votes ( >\texttt{threshold} ).
  • srn – For the multi-scale Hough transform, it is a divisor for the distance resolution rho . The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn . If both srn=0 andstn=0 , the classical Hough transform is used. Otherwise, both these parameters should be positive.
  • stn – For the multi-scale Hough transform, it is a divisor for the distance resolution theta.
  • method –
    One of the following Hough transform variants:
    • CV_HOUGH_STANDARD classical or standard Hough transform. Every line is represented by two floating-point numbers (\rho, \theta) , where \rho is a distance between (0,0) point and the line, and \theta is the angle between x-axis and the normal to the line. Thus, the matrix must be (the created sequence will be) of CV_32FC2 type
    • CV_HOUGH_PROBABILISTIC probabilistic Hough transform (more efficient in case if the picture contains a few long linear segments). It returns line segments rather than the whole line. Each segment is represented by starting and ending points, and the matrix must be (the created sequence will be) of the CV_32SC4 type.
    • CV_HOUGH_MULTI_SCALE multi-scale variant of the classical Hough transform. The lines are encoded the same way asCV_HOUGH_STANDARD.
  • param1 –
    First method-dependent parameter:
    • For the classical Hough transform, it is not used (0).
    • For the probabilistic Hough transform, it is the minimum line length.
    • For the multi-scale Hough transform, it is srn.
  • param2 –
    Second method-dependent parameter:
    • For the classical Hough transform, it is not used (0).
    • For the probabilistic Hough transform, it is the maximum gap between line segments lying on the same line to treat them as a single line segment (that is, to join them).
    • For the multi-scale Hough transform, it is stn.
The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm for a good explanation of Hough transform. See also the example in HoughLinesP() description.

沒有留言:

張貼留言