In in-line digital holographic microscopy (DHM), twin-image artifacts pose a significant challenge, and reduction or complete elimination is essential for object reconstruction.Aim: To facilitate object reconstruction using a single hologram, significantly reduce inaccuracies, and avoid iterative processing, a digital holographic reconstruction algorithm called phase-support constraint on phase-only function (PCOF) is presented.Approach: In-line DHM simulations and tabletop experiments employing the sliding-window approach are used to compute the arithmetic mean and variance of the phase values in the reconstructed image. A support constraint mask, through variance thresholding, effectively enabled twin-image artifacts.Results: Quantitative evaluations using metrics such as mean squared error, peak signal-to-noise ratio, and mean structural similarity index show PCOF's superior capability in eliminating twin-image artifacts and achieving high-fidelity reconstructions compared with conventional methods such as angular spectrum and iterative phase retrieval methods.Conclusions: PCOF stands as a promising approach to in-line digital holographic reconstruction, offering a robust solution to mitigate twin-image artifacts and enhance the fidelity of reconstructed objects.