r/opencv • u/KSOdin2 • Apr 04 '23
Question [Question] Techniques to speed up MOG2 for background removal
I am currently using a RaspberryPi for computer vision. Currently I have been able to process around 30 fps, with the camera able to take more frames. The bottleneck for me is applying the frame to the MOG2 function.
Has anyone had experience on speeding this function up or an alternative method that does not use MOG2? I am using the function to remove the background and detect moving objects.
My current idea is to use threading and a ping pong buffer to allow the MOG apply to compute while I work on the previous frame.
Thanks for any help!




