A CMOS range camera based on Single Photon Avalanche Diode