If an edge is detected between each pair of two mutually adjacent pixels
among three serially adjacent pixels in a digital image, a candidate
pixel selection unit in an intermediate value pixel judgment unit selects
a pixel located at the middle among the three pixels as a candidate
pixel. A pixel value comparison unit compares the pixel values of the
three pixels, which are used for selecting the candidate pixel, with each
other. Only if the pixel values of the three pixels monotonically
increase or monotonically decrease along the arrangement direction of the
pixels, a judgment unit judges that the candidate pixel is an
intermediate value pixel.