Three detections occupy two cells on a grid with six rows and eight columns.
Three detections produce two location reports because two detections share a cell.

Filtering small changes

A webcam picks up small changes even when the scene looks still. I used OpenCV to compare each frame with a background model, then filtered out small regions before highlighting the remaining movement.

Reporting a location

I mapped each remaining detection to a cell on a 6 × 8 grid. If a moving object produced several fragments in one cell, the program grouped them into one report for that frame. That made the output easier to interpret.

Working with grid boundaries

Two separate movements in the same cell produce a single location report. To assess that trade-off, I would record the same movement in the centre of a cell and across its edge, then repeat the comparison under different lighting.