Closed Zaifat closed 1 year ago
The line on the stream is only a visual representation of the border, and it can be changed by modifying cv2.line(frame, (0, H // 2), (W, H // 2), (0, 0, 0), 3)
. However, in order for it to work (detecting if the centroid is passing through), you would need to modify if direction < 0 and centroid[1] < H // 2:
and elif direction > 0 and centroid[1] > H // 2:
as at the moment it calculates whether centroid passed half height of the image ( H // 2).
good afternoon, is it possible to somehow change the line according to the example of the screenshot? Thank you