This paper proposes a kind of energy minimization based extended depth-of-field method
which uses a measure of contrast to compose source images. The innovation point is that it makes use of the spatial consistency afforded by the energy minimization via graph-cut to solve the problem of composite artifacts
and uses the max-flaw algorithm to solve the graph-cut problem. In the end of the paper
we present the result
and then compare it with the result of the algorithm without spatial consistency. The result shows that the method can produce more perfect effect within an acceptable execution time.