Apparatus and method for processing multi-valved images includes an erosion filter and a dilation filter. The erosion filter determines the frequency with which a pixel having the same value as a pixel at a first check position of a first window appears in the first window. If the frequency of appearance is equal to or less than a value predetermined for the pixel value of the first check position, the pixel value at the first check position is made null. This operation is recursively executed while scanning a multi-valved image with the first window. The dilation filter replaces any null pixel value at a second check position of a second window with a selected non-null pixel value in the second window. The selected non-null value has the maximum frequency of appearance in the second window. This operation is also recursively executed while scanning the multi-valved image with the second window.