Systems and methods for dark current compensation in single photon avalanche diode imagery
A system for dark current compensation in SPAD imagery is configurable to capture an image frame with the SPAD array and generate a temporally filtered image by performing a temporal filtering operation using the image frame and at least one preceding image frame. The at least one preceding image frame is captured by the SPAD array at a timepoint that temporally precedes a timepoint associated with the image frame. The system is also configurable to obtain a dark current image frame. The dark current image frame includes data indicating one or more SPAD pixels of the plurality of SPAD pixels that detect an avalanche event without detecting a corresponding photon. The system is also configurable to generate a dark current compensated image by performing a subtraction operation on the temporally filtered image or the image frame based on the dark current image frame.
1. A system for compensating for dark current in single photon avalanche diode (SPAD) imagery, the system comprising:
a SPAD array comprising a plurality of SPAD pixels;
one or more processors; and
one or more hardware storage devices storing instructions that are executable by the one or more processors to configure the system to:
capture an image frame with the SPAD array;
generate a temporally filtered image by performing a temporal filtering operation based on the image frame and at least one preceding image frame, the at least one preceding image frame having been captured by the SPAD array at a timepoint that temporally precedes a timepoint associated with the image frame;
obtain a dark current image frame, the dark current image frame comprising data indicating coordinates of one or more SPAD pixels of the plurality of SPAD pixels that detect an avalanche event without detecting a corresponding photon; and
generate a dark current compensated image by performing a subtraction operation on the temporally filtered image or the image frame based on the dark current image frame.
2. The system of claim 1 , wherein generating the dark current compensated image comprises performing the subtraction operation on the temporally filtered image based on the dark current image frame.
3. The system of claim 2 , wherein the temporal filtering operation comprises:
generating at least one aligned preceding image frame by using motion data associated with the SPAD array to spatially align the at least one preceding image frame with the image frame; and
compositing the image frame with the aligned at least one preceding image frame.
4. The system of claim 2 , wherein the temporal filtering operation is based on an optical flow estimation generated based on the at least one preceding image frame and the image frame.
5. The system of claim 2 , wherein the dark current image frame is based on one or more image frames captured while the SPAD array is covered to prevent photons from reaching the SPAD array.
6. The system of claim 5 , wherein the instructions are executable by the one or more processors to further configure the system to obtain a dark current factor indicating an amount of dark current associated with the image frame.
7. The system of claim 6 , wherein the dark current image frame is one of a plurality of dark current image frames captured while the SPAD array is covered to prevent photons from reaching the SPAD array, and wherein the instructions are executable by the one or more processors to further configure the system to select the dark current image frame from the plurality of dark current image frames based on the dark current factor.
8. The system of claim 7 , wherein:
each of the plurality of dark current image frames is associated with a different temperature or range of temperatures, and
the dark current factor is based on a runtime temperature detected in association with the capturing of the image frame, such that the selection of the dark current image frame from the plurality of dark current image frames is based on the runtime temperature.
9. The system of claim 8 , wherein the instructions are executable by the one or more processors to configure the system to generate an interpolated dark current image frame based on the runtime temperature and at least two dark current image frames of the plurality of dark current image frames, and wherein the dark current image frame used for generating the dark current compensated image comprises the interpolated dark current image frame.
10. The system of claim 6 , wherein the plurality of SPAD pixels of the SPAD array comprises a plurality of unexposed SPAD pixels that are covered during the capturing of the dark current image frame and during the capturing of the image frame.
11. The system of claim 10 , wherein the dark current factor is based on (i) a quantity of avalanche events detected by the plurality of unexposed SPAD pixels during the capturing of the dark current image frame and (ii) a quantity of avalanche events detected by the plurality of unexposed SPAD pixels during the capturing of the image frame.
12. The system of claim 11 , wherein the subtraction operation comprises:
generating a scaled dark current image frame by modifying the dark current image frame using the dark current factor; and
subtracting the scaled dark current image frame from the image frame.
13. The system of claim 12 , wherein the dark current factor is determined by comparing (i) an average intensity detected by the plurality of unexposed SPAD pixels during the capturing of the dark current image frame and (ii) an average intensity detected by the plurality of unexposed SPAD pixels during the capturing of the image frame.
14. The system of claim 12 , wherein:
the dark current factor comprises a plurality of dark current factor components,
each dark current factor component is associated with a respective subset of unexposed SPAD pixels of the plurality of unexposed SPAD pixels, and
generating the scaled dark current image frame comprises using each of the plurality of dark current factor components to modify corresponding regions of the dark current image frame.
15. The system of claim 2 , wherein the instructions are executable by the one or more processors to further configure the system to perform a pixel binning operation on the dark current compensated image.
16. The system of claim 2 , wherein the instructions are executable by the one or more processors to further configure the system to apply a median filter to the dark current compensated image.
17. A system for compensating for dark current in single photon avalanche diode (SPAD) imagery, the system comprising:
a SPAD array comprising a plurality of SPAD pixels;
one or more processors; and
one or more hardware storage devices storing instructions that are executable by the one or more processors to configure the system to:
capture an image frame with the SPAD array while obscuring a plurality of unexposed SPAD pixels from the plurality of SPAD pixels;
identify a region of the image frame that corresponds to the plurality of unexposed SPAD pixels which are obscured during the capturing of the image frame to prevent photons from reaching the plurality of unexposed SPAD pixels;
determine a dark current value based on a quantity of photons detected by the plurality of unexposed SPAD pixels during the capturing of the dark current image frame; and
generate a dark current compensated image by performing a subtraction operation based on the image frame and on the dark current value, wherein the subtraction operation comprises subtracting the dark current value from one or more SPAD pixels of the plurality of SPAD pixels determined to generate dark current based on a previously performed calibration operation, while refraining from subtracting the dark current value from other SPAD pixels of the plurality of SPAD pixels that are separate from the one or more SPAD pixels.
18. The system of claim 17 , wherein the dark current value is determined as an average intensity based on the quantity of photons detected by the plurality of unexposed SPAD pixels during the capturing of the image frame.
19. A method for compensating for dark current in single photon avalanche diode (SPAD) imagery, the method comprising:
capturing an image frame with a SPAD array, the SPAD array comprising a plurality of SPAD pixels;
generating a temporally filtered image by performing a temporal filtering operation based on the image frame and at least one preceding image frame, the preceding image frame having been captured by the SPAD array at a timepoint that temporally precedes a timepoint associated with the image frame;
obtaining a dark current image frame, the dark current image frame comprising data indicating coordinates of one or more SPAD pixels of the plurality of SPAD pixels that detect an avalanche event without detecting a corresponding photon; and
generating a dark current compensated image by performing a subtraction operation on the temporally filtered image or the image frame based on the dark current image frame.