1. An image processing device comprising: an edge image generation part configured to detect an edge in an original image and to generate an edge image constituted from the detected edge; a connected pixel extraction part configured to extract connected pixel groups in the edge image; a binary image generation part configured to classify the connected pixel groups under respective colors of the connected pixel groups and to generate a character image being a binary image, for each of the colors; a background image generation part configured to generate a background image of the original image on the basis of the character image; and an image compression part configured to respectively compress image data of the character image and image data of the background image by compression manners that are different from each other; wherein the background image generation part generates the background image in which a pixel value at a position of the character image in the original image is set by an average value of the pixel values in the original image with regard to at least a portion of pixels around a rectangle circumscribing the connected pixel groups.