Build a background estimation and subtraction module using OpenCV and apply it to a video
Budget: $20 – $40 USD
I need this to be done within the next 8 hours
The main goal of this thread is to keep an updated B_background , which is the background frame that will be used during execution
The algorithm is listed below:
1- Divide the video frame into NxM blocks.
2- For each block, every 30 seconds, check the absolute difference between the current frame (T) and the same block in the frame that is 30 seconds before it.
3- If the absolute different is less than Tth , then the background block has not been changed.
4- Otherwise, it is a candidate of change, or a temporary object may have been hiding the background
a. Repeat step 2 with a frame rate of 1 frame/sec for 30 frames. So repeat the subtraction with the original frame for 30 frames which corresponds to the 30 seconds.
b. If the absolute different is grater than Tth for the 30 frames, then a background update is needed. Otherwise, go to step 2
i. Check for the absolute difference between current frame and previous frame (with frame rate 1 frame/sec)
ii. If the absolute difference keeps below Tth for 30 seconds, then update the Bbackground frame with the latest frame.
iii. Go to step 2
We can make some modifications to the algorithm based on the output
This task should take around 3 hours, not more than that if you are familiar with computer vision
I have 4 videos on Google drive that I want them to be processed and get good results out of them
Please make the code available on Google colab
The main goal of this thread is to keep an updated B_background , which is the background frame that will be used during execution
The algorithm is listed below:
1- Divide the video frame into NxM blocks.
2- For each block, every 30 seconds, check the absolute difference between the current frame (T) and the same block in the frame that is 30 seconds before it.
3- If the absolute different is less than Tth , then the background block has not been changed.
4- Otherwise, it is a candidate of change, or a temporary object may have been hiding the background
a. Repeat step 2 with a frame rate of 1 frame/sec for 30 frames. So repeat the subtraction with the original frame for 30 frames which corresponds to the 30 seconds.
b. If the absolute different is grater than Tth for the 30 frames, then a background update is needed. Otherwise, go to step 2
i. Check for the absolute difference between current frame and previous frame (with frame rate 1 frame/sec)
ii. If the absolute difference keeps below Tth for 30 seconds, then update the Bbackground frame with the latest frame.
iii. Go to step 2
We can make some modifications to the algorithm based on the output
This task should take around 3 hours, not more than that if you are familiar with computer vision
I have 4 videos on Google drive that I want them to be processed and get good results out of them
Please make the code available on Google colab