A method for acquiring three-dimensional maps for use in an autonomous vehicle or a driver assistance system in a vehicle, comprising: a. analyzing images acquired by a passive sensor to identify a plurality of objects in the images, wherein the passive sensor is an image sensor configured to acquire images; b. classifying each of the plurality of objects as a non-stationary object or a stationary object; c. (i) selecting a non-stationary object, (ii) estimating a distance to the selected non-stationary object (iii) determining whether to actively measure, by an active sensor, a distance to the selected non-stationary object, wherein it is determined to actively measure the distance to the selected non-stationary object if the estimated distance to the selected non-stationary object is below a predefined threshold and wherein it is determined not to actively measure the distance to the selected non-stationary object otherwise; d. if it is determined to actively measure the distance to the selected non-stationary object, actively measuring, by the active sensor, a distance to the selected non-stationary object, wherein the active sensor is configured to illuminate light beams in specific directions and to detect the light beams reflected off of objects in the scene; e. if it is determined not to actively measure the distance to the selected non-stationary object, saving the estimated distance in memory as the distance to the object; and f. generating a 3D map of a scene based on fusion of passive and active measurements. a. analyzing images acquired by a passive sensor to identify a plurality of objects in the images, wherein the passive sensor is an image sensor configured to acquire images; b. classifying each of the plurality of objects as a non-stationary object or a stationary object; c. (i) selecting a non-stationary object, (ii) estimating a distance to the selected non-stationary object (iii) determining whether to actively measure, by an active sensor, a distance to the selected non-stationary object, wherein it is determined to actively measure the distance to the selected non-stationary object if the estimated distance to the selected non-stationary object is below a predefined threshold and wherein it is determined not to actively measure the distance to the selected non-stationary object otherwise; (i) selecting a non-stationary object, (ii) estimating a distance to the selected non-stationary object (iii) determining whether to actively measure, by an active sensor, a distance to the selected non-stationary object, wherein it is determined to actively measure the distance to the selected non-stationary object if the estimated distance to the selected non-stationary object is below a predefined threshold and wherein it is determined not to actively measure the distance to the selected non-stationary object otherwise; d. if it is determined to actively measure the distance to the selected non-stationary object, actively measuring, by the active sensor, a distance to the selected non-stationary object, wherein the active sensor is configured to illuminate light beams in specific directions and to detect the light beams reflected off of objects in the scene; e. if it is determined not to actively measure the distance to the selected non-stationary object, saving the estimated distance in memory as the distance to the object; and f. generating a 3D map of a scene based on fusion of passive and active measurements.