The present invention aims to avoid problems such as not detecting
line-shaped noises or erasing images on the sheet by erroneously
detecting line-shaped noises. A copy machine 1 refers to a judgment table
50b to determine a color corresponding to values of RGB color components
read in Step S101 (Step S102). The copy machine 1 selects thresholds and
coring levels corresponding to matched RGB color components (Step S104).
The copy machine 1 sets the selected thresholds and coring levels to an
image processing unit 48 (Step S106). The copy machine 1 judges whether a
difference between RGB color components of a target pixel and its
neighboring pixels is greater than the thresholds that has been set in
Step S106 (Step S107). If judging affirmatively, the copy machine 1
stores the address of the target pixel as a line-shaped noise candidate
pixel into a line-shaped noise address storing area 49b (Step s108), and
extract a series of line-shaped noise candidate pixels as line-shaped
noise pixels (Step S110).