Add part which search for the maximum pixel of each spot.