Skip to main content
. 2022 Feb 27;22(5):1875. doi: 10.3390/s22051875
Algorithm 4. Fragment of the Python code: drawing setPoint on screen cv2.circle() and self.PID().
# only proceed if the radius meets a minimum size
if radius > 10:⋯# length of min 10 pixel
# draw setpoint on screen—5 pixel red dot
cv2.circle(frame, (int(self.setPointX), int(self.setPointY)), 5, (0, 0, 255), −1)
self.PID(self.setPointX, self.setPointY, x, y)
# PID setpoint actual position in x, y,