  The core theme of X-ray crystallography is reconstructing the electron
density distribution of crystals under the constraints of observed diffraction
data. Nevertheless, the reconstruction of electron density distribution by
straightforward Fourier synthesis is usually hindered due to the well-known
phase problem and finite resolution of diffraction data. In analogy with
optical imaging system, the reconstructed electron density map may be regarded
as the image of the real electron density distribution in crystals. Inspired by
image definition evaluation functions applied in auto-focusing process, we
proposed two evaluation functions for the reconstructed electron density
images. One of them is based on atomicity of electron density distribution and
properties of Fourier synthesis. Tests were performed on synthetic data of
known structures, and it was found that this evaluation function can
distinguish the correctly reconstructed electron density image from wrong ones
when diffraction data of atomic resolution is available. An algorithm was
established based on this evaluation function and applied in reconstructing the
electron density image from synthetic data of known structures. The other
evaluation function, which is based on the positivity of electron density and
constrained entropy maximization, was designed for cases where only diffraction
data of rather limited resolution is available. Tests on synthetic data
indicate that this evaluation function may identify the correct phase set even
for a dataset at the resolution as low as 3.5 {\AA}. Though no algorithm of
structure solution has been figured out based on the latter function, the
results presented here provide a new perspective on the phase problem.
