Restoration is ultimately a problem of statistical estimation. An optimal filter is estimated to restore binary fax images. The filter is an approximation of the binary conditional expectation that minimizes the expected absolute error between the degraded image and the ideal image. It is implemented as a morphological hit-or-miss filter. Estimation methodology employs a model-based simulation of the degradation due to the fax process. Simulated images are used to generate data from which the filter is estimated. The methodology presented can be used for other classes of images. Restoration examples are given.