Reconstructing an image from its edge representation