HeadPoseFilter

class HeadPoseFilter(minCutoff: Double = 1.0, beta: Double = 0.007, dCutoff: Double = 1.0)

Filter that smoothes 3D head pose angles (yaw, pitch, roll) over time using OneEuroFilter.

This filter eliminates angular jitter from MediaPipe BlazeFace 2D keypoints across camera frames while preserving low-latency tracking responsiveness during active head-movement challenges.

Constructors

Link copied to clipboard
constructor(minCutoff: Double = 1.0, beta: Double = 0.007, dCutoff: Double = 1.0)

Functions

Link copied to clipboard
fun filter(yaw: Float, pitch: Float, roll: Float, timestampMillis: Long): Triple<Float, Float, Float>

Filters the raw yaw, pitch, and roll angles measured at timestampMillis.

Link copied to clipboard
fun reset()

Resets all internal angle filters. Should be called when a face tracking track is interrupted or no face was detected for multiple frames.