Accessor Functions Requiring MOMENT
#python self.subscription.subscribe(playmotion.SERVICE_MOMENT)
functions
float VisionInput::getPrincipalAxisAngle()
Returns the angle of the long axis of the segmentation in degrees from 0 (pointing directly right) to 180 (pointing directly left). Positive angles are counterclockwise.
float VisionInput::getSkewness()
Returns the skewness of the segmentation along its long axis. Positive values mean the segmentation is lopsided towards (that is, biggest near) the top of the image, whereas negative values mean it's lopsided towards bottom of the image.
This is useful for distinguishing between mirror images; for more information, see Wikipedia: Skewness.
about SERVICE_MOMENT
The moment service uses OpenCV to compute the 1st-3rd order spatial and central moments for the output image from the filtergraph. The spatial moment is the moment about the origin (is that the center of the screen, or the upperlefthand corner?) and the central moment is the moment about the centroid (1st spatial moment). Statistically, the first moment is the mean, the second is the variance and the third is the skewness. But none of this is really important, since through the playmotion service you can access the centroid, principal axis angle and skewness without any messy computations.
getPrincipalAxisAngle returns the angle in degrees of the segmentation's major axis, taking positive angles as counterclockwise. Exercise caution when switching between Playmotion's coordinate system and that of your graphics library.
