We present a digital image processing heuristic for the removal of the twin-image in inline digital holograms. Typically, the unwanted twin manifests itself as visible corruptive noise in the reconstruction plane. We reconstruct the unwanted twin-image at its in-focus plane and suppress it by first finding the boundary of the object, and then removing the optical energy within this boundary. In this plane, the wanted twin-image optical energy is largely dispersed outside this boundary and so it is retained. The heuristic's effectiveness is demonstrated using a digital hologram of a real-world object. Â© 2008 IOP Publishing Ltd.