Patent ID: 7961984

Claim:
An image processing apparatus having a CPU, comprising: an image acquisition section of the CPU that acquires a code pattern image from a surface of a recording medium on which the code pattern is formed, the code pattern in which N unit images are selectively placed in M reference positions that are arranged at predetermined intervals in two directions orthogonal to each other where M≧4 and 2≦N<M; a combination detection section of the CPU that detects pairs of the unit images based on the predetermined intervals and respective positions of the unit images contained in the code pattern image acquired by the image acquisition section; and an angle detection section of the CPU that detects an arbitrary rotation angle of the code pattern image with respect to a predetermined reference axis based on an inclination of a line, with respect to the predetermined reference axis, connecting the unit images of each pair detected by the combination detection section, wherein the combination detection section detects plural pairs of the unit images based on a distribution of distances from each of the unit images to another unit image closest thereto.