In RF2, the CPU 40 extracts the linear edge position LEP. In particular, the CPU 40 may hypothetically arrange the 11 edge positions EP in the objective edge group TEG sequentially in the order along the conveying direction FD from upstream to downstream, and extract the main-scanning position MDP and the edge position EP of the pixel position at a center within the sequentially arranged 11 edge positions EP and the main-scanning position MDP associated with the edge position EP as the linear edge position LEP. Thus, with the linear edge position LEP being based the pixel position of the edge position EP at the center within the objective edge group TEG even when some of the edge positions EP are misjudged due to, for example, imaging noise, the linear edge position LEP may be extracted substantially accurately based on the centricity among the 11 edge positions.