An apparatus comprising: a camera module, comprising two cameras (111, 115), configured to generate a first image and a second image, wherein the first image and second image are taken from offset positions with partially overlapping fields of view; at least one ToF SPAD based range detecting module configured to generate at least one distance determination between the apparatus and an object within the partially overlapping fields of view; and a processor configured to, receive the first image and the second image from the camera module and the at least one distance determination from the ToF SPAD based range detecting module and, using at least one of (i) depth information obtained from processing the first image and second image from the camera module, and (ii) the at least one distance determination from the ToF SPAD based range detecting module, determine a depth map, wherein the processor is configured to determine the depth map in different modes of operation dependent on a range to the object from the apparatus, as follows: 1) determine the depth map using (ii) the at least one distance determination from the ToF SPAD based range detecting module when the range to the object is a macro distance or near distance; 2) determine the depth map using (i) the depth information obtained from processing the first image and the second image from the camera module when the range to the object is a far distance; and 3) determine the depth map using a combination of (ii) the at least one distance determination from the ToF SPAD based range detecting module and (i) the depth information obtained from processing the first image and the second image from the camera module, when the range to the object is between the near distance and the far distance, wherein the macro distance is shorter than the near distance, and the near distance is shorter than the far distance. a camera module, comprising two cameras (111, 115), configured to generate a first image and a second image, wherein the first image and second image are taken from offset positions with partially overlapping fields of view; at least one ToF SPAD based range detecting module configured to generate at least one distance determination between the apparatus and an object within the partially overlapping fields of view; and a processor configured to, receive the first image and the second image from the camera module and the at least one distance determination from the ToF SPAD based range detecting module and, using at least one of (i) depth information obtained from processing the first image and second image from the camera module, and (ii) the at least one distance determination from the ToF SPAD based range detecting module, determine a depth map, wherein the processor is configured to determine the depth map in different modes of operation dependent on a range to the object from the apparatus, as follows: 1) determine the depth map using (ii) the at least one distance determination from the ToF SPAD based range detecting module when the range to the object is a macro distance or near distance; 2) determine the depth map using (i) the depth information obtained from processing the first image and the second image from the camera module when the range to the object is a far distance; and 3) determine the depth map using a combination of (ii) the at least one distance determination from the ToF SPAD based range detecting module and (i) the depth information obtained from processing the first image and the second image from the camera module, when the range to the object is between the near distance and the far distance, 1) determine the depth map using (ii) the at least one distance determination from the ToF SPAD based range detecting module when the range to the object is a macro distance or near distance; 2) determine the depth map using (i) the depth information obtained from processing the first image and the second image from the camera module when the range to the object is a far distance; and 3) determine the depth map using a combination of (ii) the at least one distance determination from the ToF SPAD based range detecting module and (i) the depth information obtained from processing the first image and the second image from the camera module, when the range to the object is between the near distance and the far distance, wherein the macro distance is shorter than the near distance, and the near distance is shorter than the far distance.