Skip to main content...
CV Depth: the Measurement Pipeline
25 min

Day 59: Pixel measurements from pose: the math

Assembling a measurement vector

Combine yesterday's distances into the set of measurements a size recommendation needs — shoulder width, chest/torso width, arm length, torso height, hip width — each in pixels for now, each carrying a confidence derived from the visibility of the keypoints it used. This measurement vector is the pipeline's core numeric output, still in pixels until calibration (Days 77–79) converts it to centimeters.

A measurement vector with per-measurement confidence
def measurement(a_lm, b_lm, w, h):
    a, b = point(a_lm, w, h), point(b_lm, w, h)
    conf = min(a_lm.visibility, b_lm.visibility)   # weakest link
    return {"px": dist(a, b), "confidence": round(conf, 3)}

measurements = {
    "shoulder_width": measurement(L.LEFT_SHOULDER, L.RIGHT_SHOULDER, w, h),
    "torso_height":   measurement(L.LEFT_SHOULDER, L.LEFT_HIP, w, h),
    "arm_length":     {"px": arm_length_px, "confidence": round(min(vis_ls, vis_le, vis_lw), 3)},
    "hip_width":      measurement(L.LEFT_HIP, L.RIGHT_HIP, w, h),
}

Confidence propagates through the pipeline

A measurement is only as trustworthy as its least-visible keypoint, so confidence takes the minimum. These per-measurement confidences will combine into the single '91%' the engine reports (Day 81). Threading uncertainty through every step — rather than bolting on a fake confidence at the end — is what makes the final number honest.

Key terms

Measurement vector
The set of body measurements (shoulder, torso, arm, hip...) the size recommendation consumes.
Confidence propagation
Carrying and combining per-step uncertainty through the pipeline so the final output reflects true reliability.

Why does a derived measurement take the minimum visibility of its contributing keypoints as its confidence, rather than the average?

We use cookies

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Learn more

    Day 59: Pixel measurements from pose: the math | RBTechIconX