1. An image processing device configured to divide an image imaged by imaging means into a plurality of regions, said image processing device comprising: processing means configured to group, in a case that a difference of pieces of image data between a single pixel within said image and a pixel adjacent thereto is less than a predetermined first threshold, said single pixel and said adjacent pixel, and to divide said image into a plurality of regions with finally obtained each group as each region of said image; and average-value calculating means configured to calculate an average value of said image data within said group including said single pixel; wherein said processing means compares the image data of said single pixel, and an average value calculated at said average-value calculating means regarding said group to which said adjacent pixel belongs to, and wherein in a case that the difference thereof is equal to or greater than a predetermined second threshold, do not group said single pixel and said adjacent pixel.