A method for processing imaging data from a set of pixels comprising a first pixel and a second pixel, wherein each of the first pixel and the second pixel comprises: a photon sensor; a memory (102a, 102b) an accumulator; and a mask memory connected to the photon sensor or the accumulator providing a logic signal to the photon sensor or the accumulator, wherein if the mask memory is connected to the photon sensor, the method comprises: receiving a clock signal at the set of pixels, whereupon the first pixel performs the actions of: allowing or stopping the photon sensor from sensing depending on the logic signal from the mask memory; collecting a first photon information value from the photon sensor; storing the first photon information value in the accumulator; adding a second photon information value from the memory of the first pixel into the accumulator to obtain a third photon information value; storing the third photon information value in the memory of the second pixel; and resetting the photon sensor and the accumulator to zero, wherein if the mask memory is connected to the accumulator, the method comprises: receiving a clock signal at the set of pixels, whereupon the first pixel performs the actions of: collecting a first photon information value from the photon sensor; allowing or stopping the accumulator to accumulate the first photon information value depending on the logic signal from the mask memory; adding a second photon information value from the memory of the first pixel into the accumulator to obtain a third photon information value; storing the third photon information value in the memory of the second pixel; and resetting the photon sensor and the accumulator to zero. a photon sensor; a memory (102a, 102b) an accumulator; and a mask memory connected to the photon sensor or the accumulator providing a logic signal to the photon sensor or the accumulator, wherein if the mask memory is connected to the photon sensor, the method comprises: receiving a clock signal at the set of pixels, whereupon the first pixel performs the actions of: allowing or stopping the photon sensor from sensing depending on the logic signal from the mask memory; collecting a first photon information value from the photon sensor; storing the first photon information value in the accumulator; adding a second photon information value from the memory of the first pixel into the accumulator to obtain a third photon information value; storing the third photon information value in the memory of the second pixel; and resetting the photon sensor and the accumulator to zero, allowing or stopping the photon sensor from sensing depending on the logic signal from the mask memory; collecting a first photon information value from the photon sensor; storing the first photon information value in the accumulator; adding a second photon information value from the memory of the first pixel into the accumulator to obtain a third photon information value; storing the third photon information value in the memory of the second pixel; and resetting the photon sensor and the accumulator to zero, wherein if the mask memory is connected to the accumulator, the method comprises: receiving a clock signal at the set of pixels, whereupon the first pixel performs the actions of: collecting a first photon information value from the photon sensor; allowing or stopping the accumulator to accumulate the first photon information value depending on the logic signal from the mask memory; adding a second photon information value from the memory of the first pixel into the accumulator to obtain a third photon information value; storing the third photon information value in the memory of the second pixel; and resetting the photon sensor and the accumulator to zero. collecting a first photon information value from the photon sensor; allowing or stopping the accumulator to accumulate the first photon information value depending on the logic signal from the mask memory; adding a second photon information value from the memory of the first pixel into the accumulator to obtain a third photon information value; storing the third photon information value in the memory of the second pixel; and resetting the photon sensor and the accumulator to zero.