Recently, popularity of 3D technology has been growing significantly and it has many application parts in the various fields of industry. In order to overcome the limitations of 2D machine vision technologies based on 2D image, we need the 3D measurement technologies. There are many 3D measurement methods as such scanning probe microscope, phase shifting interferometry, confocal scanning microscope, white-light scanning interferometry, and so on. In this paper, we have used the extended depth of focus (EDF) algorithm among 3D measurement methods. The EDF algorithm is the method which extracts the 3D information from 2D images acquired by short range depth camera. In this paper, we propose the EDF algorithm using the edge informations of images and the average values of all pixel on z-axis to improve the performance of conventional method. To verify the performance of the proposed method, we use the various synthetic images made by point spread function(PSF) algorithm. We can correctly make a comparison between the performance of proposed method and conventional one because the depth information of these synthetic images was known. Through the experimental results, the PSNR of the proposed algorithm was improved about 1 ~ 30 dB than conventional method.