I’ll start of by saying that I’m new to python, as my main language is PHP.
I’m building a camera feed script and all was going well, but I’ve started noticing a weird flickering bug on the displayed text and traced it back to the VideoStream read method. Even by getting the frame directly after reading
frame = videoStream.read()
cv2.imshow("rawframe", frame)
the image shows with the text that is added to the frame, but only later in the flow.
also, other additions to the image are being repeated on the new frame.
This wouldn’t be a problem, but the goal of the script is motion detection, which gets thrown off by these flickers.
While writing this question, I did manage to solve the problem by adding
frame = frame.copy()
but still, I’d be glad if someone could help me understand why this occured.