[Learning opencv Article 5] Hough Line Transformation

Source: Internet
Author: User

Hof transform is a method for finding straight lines, circles, and other simple shapes in an image. Opencv supports two different Hof transformations: Standard Hof Transformation (SHT) and cumulative probability Hof Transformation (ppht ). In opencv, you can use the same function to use two algorithms.

The related functions are as follows:

Cvseq * cvhonghlines2 (cvarr * image, void * line_storage, int mehtodd, double ROV, double Theta, int threshold, double param1 = 0, double param2 = 0 );
ImageInput 8-bit, single-channel (Binary) Image
Line_storage stores the detected line segments, which can be sequences or single-row/single-column matrices.
MehtoddHough variable
Rock
Distance Precision of pixel-related units

ThetaAngle accuracy of radian Measurement ThresholdThreshold parameter. If the cumulative value is greater than threshold, the line segment returned by the function
Param1 and param2 are parameters related to the transformation method

# Include "stdafx. H "# include <cv. h> # include 

Running result:

Reference learning opencv

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.