The OpenMV Cam uses MicroPython, so you can't use OpenCV. Refer to their API or their forums for solutions. I'm pretty sure it doesn't have BackgroundSubtractor
To get the trash level, I would go for a simpler method, like an ultrasonic distance sensor.