1. A computer-system-implemented method for generating at least one descriptor for an object, the method comprising: receiving extracted line segments aligned with edge pixels associated with the object in an image; determining orientations for the line segments; identifying a subset of the line segments, wherein the subset includes an integer number k of the line segments that are proximate to a given line segment in the line segments; using the computer system, calculating pairs of angles representing relative displacement and relative orientation of pairs of line segments in the subset, wherein a given pair of angles for a given pair of line segments in the subset includes: a first angle at a location on a first line segment in the given pair of line segments between the first line segment and a line t connected between the first line segment and a second line segment in the given pair of line segments, and a second angle at a location on the second line segment between the second line segment and the line; and generating the at least one descriptor for the object by computing a 2-dimensional (2D) histogram of the pairs of angles based on cells defined by angular quantization values.