I used BackgroundSubtractorMOG2 for foreground detection and obtain a mask to apply frames before pedestrian detection by HOG. However, I could not see any argument in the detect() method of HOG. How can I use this mask to reduce the computation time of the detection process?