Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Feature Detection » cvHoughLinesP


Finds lines segments in a binary image using probabilistic Hough transform.

Name Type Range Description
inImage Image UINT8, single-channel input image.
inRho Real 0.0 - Distance resolution of the accumulator in pixels.
inTheta Real 0.0 - Angle resolution of the accumulator in degrees.
inThreshold Integer 1 - Accumulator threshold parameter.
inMinLineLength Real Minimum line length. Line segments shorter than that are rejected.
inMaxLineGap Real Maximum allowed gap between points on the same line to link them.
outLines Segment2DArray Output array of segments.


This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Input image must be UINT8 single-channel in cvHoughLinesP.
DomainError inRho, inTheta and inThreshold must be positive in cvHoughLinesP.

Complexity Level

This filter is available on Basic Complexity Level.