Closed mabrao closed 2 years ago
FIX:
Added try statements when the pose detector method was being called.
if self.pose:
try:
#find pose landmarks and do not draw them
self.frame = self.detector.findPose(self.frame, draw=False)
#get all landmark data and do not draw bounding box
lmList, bboxInfo = self.detector.findPosition(self.frame, draw = False)
#create customized figure
self.detector.drawCustomizedFigure(self.frame, self.lmDraw, drawRacket=False)
except:
pass
if self.poseBackground:
width, height = self.get_dims()
self.blankImg = np.zeros((height, width, 3), np.uint8)
if self.pose:
try:
#find pose landmarks and do not draw them
self.frame = self.detector.findPose(self.frame, draw=False)
#get all landmark data and do not draw bounding box
lmList, bboxInfo = self.detector.findPosition(self.frame, draw = False)
#create customized figure
self.detector.drawCustomizedFigure(self.frame, self.lmDraw, drawRacket=False, blankImg = self.blankImg, drawExtra=True)
except:
pass
self.frame = self.blankImg
App crashes when this happens.