mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
added docs for gpu::HoughLines
This commit is contained in:
parent
97731c152d
commit
a9fba14898
@ -885,3 +885,94 @@ Finds edges in an image using the [Canny86]_ algorithm.
|
||||
|
||||
.. seealso:: :ocv:func:`Canny`
|
||||
|
||||
|
||||
|
||||
gpu::HoughLines
|
||||
---------------
|
||||
Finds lines in a binary image using the classical Hough transform.
|
||||
|
||||
.. ocv:function:: void gpu::HoughLines(const GpuMat& src, GpuMat& lines, float rho, float theta, int threshold, bool doSort = false, int maxLines = 4096)
|
||||
|
||||
.. ocv:function:: void gpu::HoughLines(const GpuMat& src, GpuMat& lines, GpuMat& accum, GpuMat& buf, float rho, float theta, int threshold, bool doSort = false, int maxLines = 4096)
|
||||
|
||||
:param src: 8-bit, single-channel binary source image.
|
||||
|
||||
:param lines: Output vector of lines. Each line is represented by a two-element vector :math:`(\rho, \theta)` . :math:`\rho` is the distance from the coordinate origin :math:`(0,0)` (top-left corner of the image). :math:`\theta` is the line rotation angle in radians ( :math:`0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}` ).
|
||||
|
||||
:param rho: Distance resolution of the accumulator in pixels.
|
||||
|
||||
:param theta: Angle resolution of the accumulator in radians.
|
||||
|
||||
:param threshold: Accumulator threshold parameter. Only those lines are returned that get enough votes ( :math:`>\texttt{threshold}` ).
|
||||
|
||||
:param doSort: Performs lines sort by votes.
|
||||
|
||||
:param maxLines: Maximum number of output lines.
|
||||
|
||||
:param accum: Optional buffer for accumulator to avoid extra memory allocations (for many calls with the same sizes).
|
||||
|
||||
:param buf: Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
|
||||
|
||||
.. seealso:: :ocv:func:`HoughLines`
|
||||
|
||||
|
||||
|
||||
gpu::HoughLinesTransform
|
||||
------------------------
|
||||
Performs classical Hough transform for line detection.
|
||||
|
||||
.. ocv:function:: void gpu::HoughLinesTransform(const GpuMat& src, GpuMat& accum, GpuMat& buf, float rho, float theta)
|
||||
|
||||
:param src: 8-bit, single-channel binary source image.
|
||||
|
||||
:param accum: Output accumulator array.
|
||||
|
||||
:param buf: Buffer to avoid extra memory allocations (for many calls with the same sizes).
|
||||
|
||||
:param rho: Distance resolution of the accumulator in pixels.
|
||||
|
||||
:param theta: Angle resolution of the accumulator in radians.
|
||||
|
||||
:param threshold: Accumulator threshold parameter. Only those lines are returned that get enough votes ( :math:`>\texttt{threshold}` ).
|
||||
|
||||
.. seealso:: :ocv:func:`gpu::HoughLines`
|
||||
|
||||
|
||||
|
||||
gpu::HoughLinesGet
|
||||
------------------
|
||||
Finds lines in Hough space.
|
||||
|
||||
.. ocv:function:: void gpu::HoughLinesGet(const GpuMat& accum, GpuMat& lines, float rho, float theta, int threshold, bool doSort = false, int maxLines = 4096)
|
||||
|
||||
:param accum: Accumulator array.
|
||||
|
||||
:param lines: Output vector of lines. Each line is represented by a two-element vector :math:`(\rho, \theta)` . :math:`\rho` is the distance from the coordinate origin :math:`(0,0)` (top-left corner of the image). :math:`\theta` is the line rotation angle in radians ( :math:`0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}` ).
|
||||
|
||||
:param rho: Distance resolution of the accumulator in pixels.
|
||||
|
||||
:param theta: Angle resolution of the accumulator in radians.
|
||||
|
||||
:param threshold: Accumulator threshold parameter. Only those lines are returned that get enough votes ( :math:`>\texttt{threshold}` ).
|
||||
|
||||
:param doSort: Performs lines sort by votes.
|
||||
|
||||
:param maxLines: Maximum number of output lines.
|
||||
|
||||
.. seealso:: :ocv:func:`gpu::HoughLines`
|
||||
|
||||
|
||||
|
||||
gpu::HoughLinesDownload
|
||||
-----------------------
|
||||
Downloads results from :ocv:func:`gpu::HoughLines` to host memory.
|
||||
|
||||
.. ocv:function:: void gpu::HoughLinesDownload(const GpuMat& d_lines, OutputArray h_lines, OutputArray h_votes = noArray())
|
||||
|
||||
:param d_lines: Result of :ocv:func:`gpu::HoughLines` .
|
||||
|
||||
:param h_lines: Output host array.
|
||||
|
||||
:param h_votes: Optional output array for line's votes.
|
||||
|
||||
.. seealso:: :ocv:func:`gpu::HoughLines`
|
||||
|
Loading…
Reference in New Issue
Block a user