1. An image processing apparatus comprising: a binary image generating unit that generates a binary image from a multi-value image; a ruled line candidate extracting unit that extracts ruled line candidate pixels that constitute a ruled line from the binary image; an edge detecting unit that determines from the multi-value image a target pixel that is positioned near a ruled line candidate pixel from among the ruled line candidate pixels and detects edge information indicative of whether the target pixel constitutes an edge, and repeats determination of the target pixel and detection of the edge information for a plurality of pixels from among the ruled line candidate pixels; and a ruled line obtaining unit that obtains a ruled line from the multi-value image based on the edge information detected by the edge detecting unit.