1. An image processing device, comprising a processor, wherein the processor comprises: an extracting unit configured to extract boundaries of a document in a first direction and roughly-detected document corners of the document in a document image captured for the document; a determining unit configured to determine candidate page corners of the document on the boundaries of the document in the first direction around the roughly-detected document corners; and a selecting unit configured to select the candidate page corners with the closest intra-page area pixel feature to a page corner pixel feature of the document among the candidate page corners as document corners of the document, wherein the first direction is a horizontal direction or a vertical direction of the document image, wherein the extracting unit comprises: a first processing sub-unit configured to obtain a foreground area of the document image in a global binarization method to obtain edges of the foreground area and to determine intersections between the adjacent edges of the foreground area as the roughly-detected document corners of the document; and a second processing sub-unit configured to detect boundaries between the roughly-detected document corners of the document in the first direction in a dynamic programming method as the boundaries of the document in the first direction.