Cleared warnings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user