bowling-analysis-system
Version:
A comprehensive system for analyzing bowling techniques using video processing and metrics calculation
149 lines (145 loc) • 3.13 kB
JavaScript
/**
* @module constants/MetricsDependencyMap
* @description Defines the metrics that should be calculated in each phase
*/
/**
* Phase one metrics are calculated directly from the keypoint data
*/
const PHASE_ONE_METRICS = {
angles: [
'armAngle',
'elbowFlexion',
'shoulderRotation',
'shoulderTilt',
'hipRotation',
'kneeFlexion',
'spineTwist',
'trunkLean',
'wristAngle',
'ankleFlexion',
'spineAngle',
'neckAngle',
'hipFlexion',
'shoulderFlexion',
'trunkFlexion'
],
velocity: [
'armVelocity',
'shoulderVelocity',
'elbowVelocity',
'wristVelocity',
'hipVelocity',
'kneeVelocity',
'legVelocity',
'torsoVelocity',
'approachVelocity',
'ballVelocity',
'angularVelocity',
'headVelocity',
'ankleVelocity',
'spineVelocity',
'rotationalVelocity'
],
position: [
'footPosition',
'releasePosition',
'approachPosition',
'balancePosition',
'headPosition',
'shoulderPosition',
'hipPosition',
'kneePosition',
'wristPosition',
'elbowPosition'
],
acceleration: [
'armAcceleration',
'shoulderAcceleration',
'hipAcceleration',
'legAcceleration',
'wristAcceleration',
'elbowAcceleration',
'torsoAcceleration',
'headAcceleration',
'ankleAcceleration',
'spineAcceleration'
],
balance: [
'stabilityIndex',
'weightDistribution',
'centerOfMass',
'posturalSway',
'lateralBalance',
'anteriorBalance',
'dynamicStability'
],
power: [
'powerGeneration',
'energyTransfer',
'kineticEnergy',
'potentialEnergy',
'workDone',
'powerEfficiency',
'totalEnergy',
'momentum',
'impulse'
]
};
/**
* Phase two metrics are calculated from phase one metrics
*/
const PHASE_TWO_METRICS = {
timing: [
'approachTiming',
'releaseTiming',
'followThroughTiming',
'totalDeliveryTime',
'backswingTime',
'forwardSwingTime',
'releaseToFollowThroughTime'
],
consistency: [
'approachConsistency',
'releaseConsistency',
'angleConsistency',
'velocityConsistency',
'positionConsistency',
'timingConsistency',
'overallConsistency'
],
efficiency: [
'energyEfficiency',
'movementEfficiency',
'powerTransfer',
'momentumConservation',
'kinematicChain',
'overallEfficiency'
]
};
/**
* Phase three metrics are calculated from phase one and two metrics
*/
const PHASE_THREE_METRICS = {
performance: [
'overallPerformance',
'techniqueScore',
'efficiencyScore',
'consistencyScore',
'powerScore',
'balanceScore',
'timingScore'
],
recommendations: [
'techniqueRecommendations',
'efficiencyRecommendations',
'consistencyRecommendations',
'powerRecommendations',
'balanceRecommendations',
'timingRecommendations'
]
};
module.exports = {
PHASE_ONE_METRICS,
PHASE_TWO_METRICS,
PHASE_THREE_METRICS
};