Open
Description
The function bool FastLineDetectorImpl::mergeSegments
allows to merge small segments into a longer one based on the distance between these segments and their orientation.
Currently, two segments on the same line with two different directions (angle of 180° and -180° for example) are not merge as the difference between their two angles is computed as:
float angdiff = fabs(seg1.angle - seg2.angle);
The difference should be computed as:
float angdiff = fabs(seg1.angle - seg2.angle) % 180.0f ;