1. An image processing device wherein image is obtained by an image sensor which has two or more types of photo detectors for different colors and that generates a color image having brightness information of a plurality of colors for each pixel using the obtained mosaic image which has monochromatic brightness information for each pixel, which image processing device performs a predetermined image transformations, and which comprises a color plane decomposition module which disassembles said color mosaic image into two or more color planes, each including only brightness information for one color, a motion detecting module which generates a correction value to compensate the relative motion between said photographic subject and said imaging unit for each pixel coordinate in said color mosaic image, a sampling-coordinates calculation module to set up sampling coordinates in said color mosaic image that match with a pixel position of said color image wherein said image transformation is performed for the pixel position of said color image using said motion compensation value, and a sampling module which calculate the pixel values at said sampling coordinates by interpolating pixel values in said color planes for each of the two or more color planes decomposed by said color plane decomposition module, a color generation module which composes pixel values interpolated by said sampling module at sampling coordinates of each color plane, and generates a pixel signal of said color image.