In this example there is one big population peak at a low disparity and three smaller peaks at higher disparities. The big peak corresponds to the background whereas each of the smaller peaks corresponds to one of the people in line. The portion of the original left image corresponding to each of these peaks in shown on the left hand side of the figure. Reliably finding these peaks involves several steps. First of all, there may be extraneous objects in the scene at the same distance as the people in line.
Stores often have magazine racks and candy displays along the aisles, for instance.
To eliminate these items, we use a reference depth histogram taken when no one is standing in line. We chose to use a histogram instead of a depth map as a reference because it is much more robust to small camera changes. This histogram is then subtracted off from all succeeding histograms. In this way we can get rid of the large background peak in the graph above. Sometimes, however, if customers are standing very close together the peaks are still partially merged.