How to get information about whether bone points are blocked

I use the following code to get the bone points of the left hand and map them to the 2D image:
for bone in armature.bones:
if ‘LeftHand’ in
hand_point = np.array(bone.head)
hand_point = np.r_[hand_point,[1]]
hand_point = final_matrix @ hand_point
P = Vector((hand_point[0], hand_point[1], hand_point[2]))
proj_p = project_3d_point(camera=camera, p=P, render=render), proj_p…

But sometimes the key points of the left hand are blocked by the human body.

My question is, how can I get the status of whether each key point is blocked?

here is the normal result:

And in this png, hand is blocked by body, how can I get the blocked status of each key point?

Perhaps a ray cast from the camera origin to the points could be used:

It worked! thank you! :smiley: