A method of processing an image by an image processing apparatus comprising a camera, a high-pass filter, a low-pass filter and an image compositing unit, the camera comprising a solid-state image sensor having imaging pixels aligned periodically, comprising: - an in-focus image capturing step of capturing by the camera in-focus an image displayed by a display panel, the display panel having pixels aligned periodically; - a first image generation step of generating, by the high-pass filter, a first image by applying a high-pass filter to the image captured in the in-focus image capturing step to thereby remove or reduce a spatial frequency component wherein moiré appears in the captured image, the moiré being caused by a misalignment occurring between the period in which the pixels of the display panel are aligned and the period in which the imaging pixels of the solid-state image sensor are aligned; - an out-of-focus image capturing step of capturing by the camera out-of-focus the image displayed by the display panel; - a second image generation step of generating, by the low-pass filter, a second image by applying a low-pass filter to the image captured in the out-of-focus image capturing step; and - a third image generation step of generating, by the image composing unit, a third image in which the moiré is eliminated or reduced, by compositing the first image and the second imager wherein a sum of a transmittance of the high-pass filter and a transmittance of the low-pass filter is a constant value at any spatial frequency, wherein, in the in-focus and out-of-focus image capturing steps, the optical system of the camera is set such that the pitch of the images of the pixels of the display formed on the image plane of the solid-state image sensor is close to an integer multiple and an integer fraction of the imaging pixel pitch of the solid-state image sensor. - an in-focus image capturing step of capturing by the camera in-focus an image displayed by a display panel, the display panel having pixels aligned periodically; - a first image generation step of generating, by the high-pass filter, a first image by applying a high-pass filter to the image captured in the in-focus image capturing step to thereby remove or reduce a spatial frequency component wherein moiré appears in the captured image, the moiré being caused by a misalignment occurring between the period in which the pixels of the display panel are aligned and the period in which the imaging pixels of the solid-state image sensor are aligned; - an out-of-focus image capturing step of capturing by the camera out-of-focus the image displayed by the display panel; - a second image generation step of generating, by the low-pass filter, a second image by applying a low-pass filter to the image captured in the out-of-focus image capturing step; and - a third image generation step of generating, by the image composing unit, a third image in which the moiré is eliminated or reduced, by compositing the first image and the second imager wherein a sum of a transmittance of the high-pass filter and a transmittance of the low-pass filter is a constant value at any spatial frequency, wherein, in the in-focus and out-of-focus image capturing steps, the optical system of the camera is set such that the pitch of the images of the pixels of the display formed on the image plane of the solid-state image sensor is close to an integer multiple and an integer fraction of the imaging pixel pitch of the solid-state image sensor.