In Gonzales' book Digital Image Processing in the section Local Histogram Processing, he writes, for a 2D image:
At each location, the histogram of the points in the neighborhood is computed and either a histogram equalization or histogram specification function is computed and either a histogram equalization or histogram specification transformation function is obtained. This function is then used to map the intensity of the pixel centered in the neighborhood. The center of the neighborhood region is then moved to an adjacent pixel location and the procedure is repeated.
He then writes:
Because only one row or column of the neighborhood changes during a pixel-to-pixel translation of the neighborhood, updating the histogram obtained in the previous location with the new data introduced at each motion step is possible. This approach has the obvious advantages over repeatedly computing the histogram of all pixels in the neighborhood each time the region is moved over one pixel location.
This last statement I am not clear about. Given a neighborhood, say a 3 by 3 patch centered at a pixel location $(x,y)$, if we shift the neighborhood over by one pixel to the right say, so it is now centered at $(x+1,y)$, in this case the letmost 3 by 1 column from the previous neighbourhood will not be in the new patch, and a new 3 by 1 column on the right of the previous patch will be present in the new patch.
What does the author mean when he says that this approach has the obvious advantages over repeatedly computing the histogram of all pixels in the neighborhood region each time the region is moved one pixel location?