Method and device for detecting straight line
First Claim
1. A method for detecting a straight line, comprising:
- acquiring a Histogram of Oriented Gradients (HOG) feature set for each respective pixel point in an image, wherein the HOG feature set is configured to reflect straight line characteristics of a localized portion where the pixel point locates;
determining at least one candidate direction of a straight line to be detected according to the HOG feature sets of the respective pixel points;
generating at least one scan line paralleled to the candidate direction for each of the candidate directions;
calculating a matching distance of each scan line respectively, wherein the matching distance of the scan line is configured to reflect a degree of proximity of the scan line to the straight line to be detected;
selecting the scan line having a minimum matching distance as a candidate straight line; and
detecting the direction and the position of the straight line to be detected according to the candidate straight line.
1 Assignment
0 Petitions
Accused Products
Abstract
The present disclosure relates to a method and a device for detecting a straight line. The method includes: acquiring a Histogram of Oriented Gradients (HOG) feature set for each respective pixel point in an image, wherein the HOG feature set is configured to reflect straight line characteristics of a localized portion where the pixel point locates; determining at least one candidate direction of a straight line to be detected according to the HOG feature sets of the respective pixel points; and detecting a direction and a position of the straight line precisely according to the candidate direction. The present disclosure efficiently avoids the errors caused by binarization, and increases the accuracy of the detection of straight line.
-
Citations
17 Claims
-
1. A method for detecting a straight line, comprising:
-
acquiring a Histogram of Oriented Gradients (HOG) feature set for each respective pixel point in an image, wherein the HOG feature set is configured to reflect straight line characteristics of a localized portion where the pixel point locates; determining at least one candidate direction of a straight line to be detected according to the HOG feature sets of the respective pixel points; generating at least one scan line paralleled to the candidate direction for each of the candidate directions; calculating a matching distance of each scan line respectively, wherein the matching distance of the scan line is configured to reflect a degree of proximity of the scan line to the straight line to be detected; selecting the scan line having a minimum matching distance as a candidate straight line; and detecting the direction and the position of the straight line to be detected according to the candidate straight line. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A device for detecting a straight line, comprising:
-
a processor; and a memory for storing instructions executable by the processor, for performing; acquiring a Histogram of Oriented Gradients (HOG) feature set for each respective pixel point in an image, wherein the HOG feature set is configured to reflect straight line characteristics of a localized portion where the pixel point locates; determining at least one candidate direction of a straight line to be detected according to the HOG feature sets of the respective pixel points; generating at least one scan line paralleled to the candidate direction for each of the candidate directions; calculating a matching distance of each scan line respectively, wherein the matching distance of the scan line is configured to reflect a degree of proximity of the scan line to the straight line to be detected; selecting the scan line having a minimum matching distance as a candidate straight line; and detecting the direction and the position of the straight line to be detected according to the candidate straight line. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory readable storage medium comprising instructions, executable by a processor in a device, for performing a method for detecting a straight line, wherein the method comprises:
-
acquiring a Histogram of Oriented Gradients (HOG) feature set for each respective pixel point in an image, wherein the HOG feature set is configured to reflect straight line characteristics of a localized portion where the pixel point locates; determining at least one candidate direction of a straight line to be detected according to the HOG feature sets of the respective pixel points; generating at least one scan line paralleled to the candidate direction for each of the candidate directions; calculating a matching distance of each scan line respectively, wherein the matching distance of the scan line is configured to reflect a degree of proximity of the scan line to the straight line to be detected; selecting the scan line having a minimum matching distance as a candidate straight line; and detecting the direction and the position of the straight line to be detected according to the candidate straight line.
-
Specification