1. A line sensor, comprising: a plurality of pixels which is arranged linearly, the number of the plurality of pixels including the number depending on a resolution; a first pixel group which is provided to a center portion of the plurality of pixels arranged linearly and has a pixel pitch shorter than a length corresponding to a pixel pitch calculated from the resolution; and a second pixel group which is provided to each of both side portions of the center portion, and has a pixel pitch longer than the length corresponding to the pixel pitch calculated from the resolution.