changed block detector to use a moving average of the difference in
light values.