Hello together,
at the moment I'm working on a detection program. The program continuous checks a video stream. When a certain event occurs in the video stream the prorgam starts saving the stream as long as the event taking place. I'm using an VideoWriter object called "video" and this small code snippet. "detect" is the Mat-object from the video stream.
if (blackPixel < 10000) {
video.write(detect); }
I don't want to save the complete stream, so at the moment I am searching for an idea how to safe the video stream just a few seconds before the event starts and after the event is finished. Does anyone have an idea how to do it?