Accessor Functions Requiring HOUGHLINES
#python self.subscription.subscribe(playmotion.SERVICE_HOUGHLINES)
float VisionInput::getAverageAngleInRadians()
Returns the average angle of edgels (pixels in an edge detection of the raw camera image) in radians. The lines are computed using the Probabilistic Hough Transform for efficiency. The lines are filtered by orientation in the range specified by parameters [angleFilterLowerBound, angleFilterUpperBound]. The aggregate angle returned by getAverageAngleInRadians is the average angle of filtered lines weighted by their length (longer lines are more important than shorter ones).
Positive angles are counterclockwise. Reference frame in general is identical to the unit circle where up is pi/2, right is 0 or 2pi, left is pi, down is 3pi/2.
//move me to the xml reference
Service Parameters
cannyThreshold1: type="xs:nonNegativeInteger" default="113"
If larger than cannyThreshold2, used for finding initial segments of strong edges.
If smaller than cannyThreshold1, used for edge linking.
cannyThreshold2: type="xs:nonNegativeInteger" default="83"
If larger than cannyThreshold1, used for finding initial segments of strong edges.
If smaller than cannyThreshold2, used for edge linking.
rhoResolution: type="xs:float" default="1"
Distance resolution in pixels. The larger the setting, the smaller the hough space and therefore the faster it runs (but with less accurate line estimation).
thetaResolution: type="xs:float" default="6.1"
Angle resolution in radians. The larger the setting the smaller the hough space and therefore the faster it runs (but with less accurate line estimation).
accumulatorThreshold: type="xs:nonNegativeInteger" default="2"
A line is returned by the function if the corresponding accumulator value is greater than accumulatorThreshold. Increase to have few lines and decrease to have more lines.
minLineLength type="xs:float" default="1"
The minimum length a line must be to be counted in the overall lean angle estimate.
maxGapBetweenLines: type="xs:float" default="2"
Lines will fit across edgels with a gap less than maxGapBetweenLines. Increase to handle more body contours with wide gaps.
smoothingTimeInFrames: type="xs:nonNegativeInteger" default="10"
The averageAngleInRadians returned by getAverageAngleInRadians is smoothed over a window of the past N frames where N = smoothingTimeInFrames. Increase this window for a less noisy but potentially laggier lean estimate.
angleFilterUpperBound: type="xs:float" default="150"
Lines with angle greater than angleFilterUpperBound are not counted in the averageAngleInRadians estimate returned by getAverageAngleInRadians.
angleFilterLowerBound: type="xs:float" default="30"
Lines with angle less than angleFilterUpperBound are not counted in the averageAngleInRadians estimate returned by getAverageAngleInRadians.
