Skip to main content

Body to Screen Ratio

The Body to Screen Ratio node detects the distance of the body from the screen and determines whether it is in the specified range or not. The distance is measured using the ratio of the body's length (from the center of the hips to the neck) to the screen's height. This node is useful for pose estimation purposes. Generally, a ratio of 0.3 is sufficient for full-body keypoint detection.

Input

NameData TypeDescription
EnterExecTriggers the execution of this node
DetectStringThe body to detect. "Body 1" represents the first person to appear in the scene and "Body 2" represents the second.
Minimum RatioNumberThe desired minimum body-to-screen ratio. This sets the farthest distance the body can be from the screen.
Maximum RatioNumberThe desired maximum body-to-screen ratio. This sets the closest distance the body can be from the screen.

Output

NameData TypeDescription
Within RangeExecExecutes the next node if the body is detected within the specified range
Out of RangeExecExecutes the next node if there is no body detected, keypoints are incomplete, or the body is out of the specified range
RatioNumberThe ratio of the detected body's height relative to the screen's height. It returns 0 if no body is detected.