In RF3, the CPU 40 determines whether a pixel position, which is apart downstream for the predetermined quantity of, e.g., 11, pixels from a most downstream pixel position in the main-scanning direction MD among the pixel positions contained in the current objective edge group TEG is located downstream along the main-scanning direction MD from the most downstream leading-end position DHP. If the pixel position, which is apart downstream for 11 pixels from the most downstream pixel position in the main-scanning direction MD among the pixel positions contained in the current objective edge group TEG is located downstream along the main-scanning direction MD from the most downstream leading-end position DHP (RF3: YES), the CPU 40 proceeds to RF4. If the pixel position, which is apart downstream for 11 pixels from the most downstream pixel position in the main-scanning direction MD among the pixel positions contained in the current objective edge group TEG is not located downstream along the main-scanning direction MD from the most downstream leading-end position DHP (RF3: NO), the CPU 40 returns to RF 1.
In RF4, the CPU 40 calculates a variance value HLDV based on the linear edge positions LEP. In particular, the CPU 40 may repeat RF1-RF3 to extract every liner edge position LEP in the range and calculates inclination of each line between adjoining two pixel positions within the extracted linear edge positions LEP, and a sample variance value in the calculated inclinations may be obtained as the variance value HLDV.