Table of Contents

isdetected()

Function Definition: isdetected(landmark_number = 1, pose_number = 1)

Parameters

NameTypeDescriptionExpected ValuesDefault Value
landmark_numberintThe landmark point for which the X position is required.0-161
pose_numberintThe pose number for which the landmark position is required.1-1001

Description

The function tells whether the human pose is detected or not.

Example

The examples show how to use Pose Recognition in PictoBlox to count the number of body parts detected in the body in Python Coding Environment.

Code

sprite = Sprite('Tobi')
pose = Posenet()

pose.video("on", 0)
pose.enablebox()

while True:
  pose.analysecamera()
  bodyPartCount = 0
  
  for i in range(21):
    if pose.isdetected(i, 1):
      bodyPartCount += 1
  
  sprite.say(str(bodyPartCount) + " Parts Detected")

Output

Read More
All articles loaded
No more articles to load