An imaging device comprising: an illumination unit (10, 17) adapted to irradiate a moving object with light; a detection unit having a light receiving plane on which an image of the object irradiated with the light by the illumination unit is formed; and an analysis unit (40, 42) analyzing a detected result by the detection unit, to obtain an image of the object, wherein the detection unit includes a one-dimensional line sensor (311, 323, 324, 371, 331) having a plurality of one-dimensional light receiving cells (d 1 to d N) which are arrayed in a first direction on the light receiving plane, and being configured such that a second direction perpendicular to the first direction on the light receiving plane is to be a moving direction of the image of the object, wherein each light receiving cell (d n) is long in the second direction, and wherein the detection unit receives light or does not receive light according to pseudo noise code sequences along the second direction respectively on the plurality of light receiving cells by using a mask (312, 332) having a fixed mask pattern according to the pseudo noise code sequences, to output electric signals corresponding to the respective amounts of light received on the plurality of light receiving cells, and the analysis unit (40, 42) analyzes the electric signals output respectively from the plurality of light receiving cells of the detection unit, to obtain an image of the object, and wherein the detection unit includes the mask (312, 332) having the fixed mask pattern which is disposed on the light receiving plane, the mask (312, 332) comprising a plurality of pseudo noise code sequence masks arrayed in the first direction, each pseudo noise code sequence mask disposed on a corresponding light receiving cell to transmit or block light according to the pseudo noise code sequences along the second direction, and the imaging device further comprises an optical system that focuses into an image of the object on the light receiving plane of the detection unit. an illumination unit (10, 17) adapted to irradiate a moving object with light; a detection unit having a light receiving plane on which an image of the object irradiated with the light by the illumination unit is formed; and an analysis unit (40, 42) analyzing a detected result by the detection unit, to obtain an image of the object, wherein the detection unit includes a one-dimensional line sensor (311, 323, 324, 371, 331) having a plurality of one-dimensional light receiving cells (d 1 to d N) which are arrayed in a first direction on the light receiving plane, and being configured such that a second direction perpendicular to the first direction on the light receiving plane is to be a moving direction of the image of the object, wherein each light receiving cell (d n) is long in the second direction, and wherein the detection unit receives light or does not receive light according to pseudo noise code sequences along the second direction respectively on the plurality of light receiving cells by using a mask (312, 332) having a fixed mask pattern according to the pseudo noise code sequences, to output electric signals corresponding to the respective amounts of light received on the plurality of light receiving cells, and the analysis unit (40, 42) analyzes the electric signals output respectively from the plurality of light receiving cells of the detection unit, to obtain an image of the object, and wherein the detection unit includes the mask (312, 332) having the fixed mask pattern which is disposed on the light receiving plane, the mask (312, 332) comprising a plurality of pseudo noise code sequence masks arrayed in the first direction, each pseudo noise code sequence mask disposed on a corresponding light receiving cell to transmit or block light according to the pseudo noise code sequences along the second direction, and the imaging device further comprises an optical system that focuses into an image of the object on the light receiving plane of the detection unit.