Cleared warnings

This commit is contained in:
Gabriel Low
2026-09-09 22:48:06 +08:00
parent 981071ef74
commit 7cf217488a
22 changed files with 126 additions and 140 deletions
@@ -41,7 +41,7 @@ data class SmoothedLandmark(val x: Float, val y: Float, val inFrameLikelihood: F
* while still keeping up with a fast bowling arm swing.
*/
class PoseLandmarkSmoother(
private val smoothingFactor: Float = 0.4f
private val smoothingFactor: Float = 0.4f,
) {
private val previous = mutableMapOf<Int, SmoothedLandmark>()
@@ -59,10 +59,10 @@ class PoseLandmarkSmoother(
SmoothedLandmark(landmark.position.x, landmark.position.y, landmark.inFrameLikelihood)
} else {
SmoothedLandmark(
x = prev.x + smoothingFactor * (landmark.position.x - prev.x),
y = prev.y + smoothingFactor * (landmark.position.y - prev.y),
x = prev.x + (smoothingFactor * (landmark.position.x - prev.x)),
y = prev.y + (smoothingFactor * (landmark.position.y - prev.y)),
inFrameLikelihood = prev.inFrameLikelihood +
smoothingFactor * (landmark.inFrameLikelihood - prev.inFrameLikelihood)
(smoothingFactor * (landmark.inFrameLikelihood - prev.inFrameLikelihood)),
)
}
previous[landmark.landmarkType] = next