arFilterTransMat
IntroductionProvides filtering of transformation matrices (pose estimates). DiscussionHigh frequency noise ("jitter") can be an undesirable property in optical tracking systems like ARToolKit. These functions implement a first-order low-pass filter for both the position and orientation components of the pose estimate transformation matrices. Usage: Functions
arFilterTransMatFilters the supplied pose estimate transformation matrix in-place. int arFilterTransMat( ARFilterTransMatInfo *ftmi, ARdouble m[3][4], const int reset); Parameters
Return Value0 No error. DiscussionThis performs the filter function for a single transformation matrix. arFilterTransMatFinalFinalise a filter. void arFilterTransMatFinal( ARFilterTransMatInfo *ftmi); ParametersDiscussionWhen all filter use has completed, this function should be called to dispose of the filter structure. arFilterTransMatInitInitialise a filter for a single transformation matrix (pose estimate). ARFilterTransMatInfo *arFilterTransMatInit( const ARdouble sampleRate, const ARdouble cutoffFreq); Parameters
Return ValuePointer to an ARFilterTransMatInfo structure, which should be passed to other filter functions dealing with the same transformation matrix, or NULL in case of error. DiscussionIn order to filter a pose estimate, this function should be called to setup filter data structures. Each ARFilterTransMatInfo structure should be used only with a single transformation matrix. For example, if you have 5 pose estimates to filter, you would call this function 5 times, once for each pose, and keep the pose data and filter data paired. The structure produced should be passed to other filter functions dealing with the same transformation matrix. arFilterTransMatSetParamsSet the filter parameters. int arFilterTransMatSetParams( ARFilterTransMatInfo *ftmi, const ARdouble sampleRate, const ARdouble cutoffFreq); Parameters
Return Value0 The filter parameters were set without error. DiscussionThis convenience function allows adjustment of the initial filter parameters. Macro Definitions
AR_FILTER_TRANS_MAT_CUTOFF_FREQ_DEFAULTDefault cutoff frequency (in Hertz). #define AR_FILTER_TRANS_MAT_CUTOFF_FREQ_DEFAULT 15.0 DiscussionThis value provides a default value for the cutoffFreq parameter in arFilterTransMatInit(). AR_FILTER_TRANS_MAT_SAMPLE_RATE_DEFAULTDefault sample rate (in Hertz). #define AR_FILTER_TRANS_MAT_SAMPLE_RATE_DEFAULT 30.0 DiscussionThis value provides a default value for the sampleRate parameter in arFilterTransMatInit(). |