1. An image processing apparatus comprising: an input unit for taking image data including a document region as input; a first candidate detector for detecting a first candidate of an edge point constituting a boundary line of said document region by scanning binarized image of said image data with a predetermined detection pattern along a line parallel to a prescribed direction of said image data; a second candidate detector for detecting a second candidate of an edge point based on differential value of pixels adjoining each other along said lines; and an edge point determination unit for determining said second candidate as an edge point when said second candidate is positioned more inside of said document region than said first candidate, and otherwise determining said first candidate as an edge point.