Ask Your Question
1

Apply foreground mask to frames before pedestrian detection

asked 2015-06-09 09:03:12 -0600

erogol2 gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-06-09 10:08:17 -0600

You should test (for pedestrian) only foreground part of your image: get the bounding box of each connected component and apply detect on each of them. This should considerably speed up your detection, as long as the connected component extraction is not slower than the detection.

Also keep in mind that if you are not using the multi-scale approach, you have to keep connected components of (almost) the same size as the size of pedestrian you are expected.

edit flag offensive delete link more

Comments

Thanks for the return. Which tool gives me the connecteComponents. Do you mean finding contours?

erogol2 gravatar imageerogol2 ( 2015-06-10 08:57:30 -0600 )edit

You could use find contours, or a blob detector, or a hand made approach, it depends on the quality of your background subtraction, and the morphological operations you may have applied.

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2015-06-11 01:36:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-09 09:03:12 -0600

Seen: 310 times

Last updated: Jun 09 '15