© 2022, The Author(s), under exclusive licence to Springer-Verlag London Ltd., part of Springer Nature.Due to the physical properties of the imaging systems, images obtained by them can be suffered from the limited depth of field. In this work, an efficient approach based on the depth map of the scene for extending the depth field of the imaging systems is proposed. Unlike previous methods where the number of source images to be taken is unknown, our approach forwards to taking only the required amount of source images by using the depth map. Firstly, the depth map of the scene is obtained and segmented based on the color camera parameters. Then, the depth map segments are used in source image acquisition and extending the depth of field process. In this work, the proposed method is evaluated on six image sets in terms of four fusion quality metrics, and the results are then compared with eight well-known image fusion techniques. Experimental results demonstrate the superiority of the proposed method over the traditional multi-focus image fusion methods in terms of both subjective and objective assessments and run time.