The goal is to expedite detection using the sliding window approach. In other words, an object classifier is known and I need to find where the possible locations of this object are in an image. This is a general problem in object detection.

We are given an intensity map (positive values - could be detection scores) on a rectangular grid (e.g. MxN intensity image). The goal is to find the bounding box (i.e. a rectangle of size mxn, where m and n are known and greater than 1) where the average intensity in the bounding box is maximum among all boxes. The brute-force algorithm would be to evaluate this value for all boxes (i.e. linear filtering) and take the maximum. Are there any more efficient ways to do this? how about approximate algorithms?

This question was for one choice of m and n. But now there's a finite set of m's and n's that I needed to find optimal locations for in the image. Do I rerun the previous algorithm for each choice of m and n independently or can I do something more efficiently?

Thanks

closing vote powernumber of magic points. $\endgroup$