#pragma once #include #include #include #include #include namespace fangjia { struct Box { float x1{}; float y1{}; float x2{}; float y2{}; float score{}; int trackId{}; }; struct Keypoint { float x{}; float y{}; float score{}; }; struct PersonPose { Box box; std::array keypoints{}; }; enum class LimbState { Observed, Provisional, Recovered, Reassigned, Interpolated, PredictedShort, ReachableMedium, ReachableLong, }; inline char const* limbStateName(LimbState state) { switch (state) { case LimbState::Observed: return "observed"; case LimbState::Provisional: return "provisional"; case LimbState::Recovered: return "recovered"; case LimbState::Reassigned: return "reassigned"; case LimbState::Interpolated: return "interpolated"; case LimbState::PredictedShort: return "predicted_short"; case LimbState::ReachableMedium: return "reachable_medium"; case LimbState::ReachableLong: return "reachable_long"; } return "unknown"; } struct LimbObservation { int trackId{}; bool left{}; LimbState state{LimbState::ReachableLong}; Keypoint elbow{}; Keypoint wrist{}; std::array hand{}; Box personBox{}; bool handValid{}; bool alarmEligible{}; float handQuality{}; }; // Exact pre-V2 hand evidence consumed by the Python risk stage. These points // come from raw/isolated fusion before temporal reconstruction. struct GlobalHand { int personId{}; int trackId{}; bool left{}; std::string source; std::string state; bool distanceEligible{}; bool alarmEligible{}; float score{}; float spanPx{}; std::array keypoints{}; std::vector> aliases; }; struct FusionMeta { bool limbConsensus{}, handValid{}, distanceEligible{}, alarmEligible{}; double handScore{}; std::string handSource, handState; }; struct PoseFrameResult { std::vector> metadata; std::vector selectedPeople; std::vector smoothedPeople; std::vector v2People; std::vector limbs; std::vector globalHands; }; } // namespace fangjia