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
RockDistance 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