Patent ID: 8456619

Claim:
An image processing apparatus comprising: acquisition unit configured to acquire at least one diffraction image obtained by sensing the image of an object, using an image sensing unit, obtained via a diffraction grating, an imaging optical system and a RGB filter; a real-image detection unit configured to detect a real image in the diffraction images; a virtual image detection unit configured to detect at least one virtual image corresponding to the respective colors R, G, B in the diffraction images; a first calculating unit configured to calculate distances between the real image and each of the virtual images; a determination unit configured to determine whether ratios of the respective distances calculated by the first calculation unit are substantially equal to ratios of the wavelengths of the colors R, G and B; and a second calculation unit configured to calculate distance between the object and the diffraction grating using the distance calculated by the first calculating unit when the determination unit determined that the ratios of the respective distances calculated by the first calculation unit are substantially equal to the ratios of the wavelengths of the colors R, G and B.