Tasks IV and V

Scan the image using a sliding window and use ApplyDetector in each of
them.
Also, prune overlapping detections.
Task V: optimized fmat (converted to sparse)