1. An image processing device for processing an image obtained by an imaging unit having an image sensor which has two or more types of photo detectors for different colors, the image processing device generating a color image having brightness information of a plurality of colors for each pixel using a color mosaic image having monochromatic brightness information for each pixel obtained from the imaging unit, the image processing device performing an image transformation, and wherein the image processing device comprises: a color plane decomposition module that disassembles said color mosaic image into two or more color planes, each of the color planes including only brightness information for one color; a motion detecting module that generates a motion correction value to compensate a relative motion between a photographic subject and an imaging unit for each pixel coordinate in said color mosaic image; a sampling-coordinates calculation module that calculates sampling coordinates in said color mosaic image by applying a coordinate transformation to respective pixel positions of said color image wherein said image transformation is performed for the pixel position of said color image using said motion correction value in said coordinate transformation; a sampling module that calculates 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; and a color generation module that composes pixel values interpolated by said sampling module at sampling coordinates of each color plane, and generates a pixel signal of said color image.