Patent ID: 7865094

Claim:
An image forming apparatus that forms an image on a recording target medium, comprising: an image forming unit; a medium sensor configured to determine a type of a recording target medium; a determining unit configured to convert an output of the medium sensor to grammage, and classify and determine a grammage value within a predetermined range among a plurality of predetermined grammage ranges, each predetermined grammage range separated by a boundary, and where the medium sensor is susceptible to medium classification error; and a control unit configured to change an image forming condition in accordance with the grammage range determined by the determining unit; wherein the boundary between each predetermined grammage range is set at a grammage value that minimizes the possibility of medium classification error by the medium sensor, the boundary determined by 1) extracting one or more extracted areas from a table of media type grammage available, each extracted area defined as a range of grammage values between neighboring available media types on the table with a difference in grammage value of 20 g/m 2 or more between the neighboring media types, and where no available media type has a grammage value that falls within the one or more extracted areas; and 2) setting the boundary between predetermined grammage ranges at the center of the one or more extracted areas.