To attain line segmentation without preliminarily or individually judging a line direction even when the line direction of a document picture is not clear.
When a line direction is not clear, or when the line direction is a first direction, a line segmenting device 10 produces a first direction divided area, generates a first direction projective distribution by scanning the above area, and segments a first divided line, based on this distribution. Meanwhile, when the line direction is not clear, or when the line direction is a second direction, this line segmenting device 10 produces a second direction divided area, generates a second direction projective distribution by scanning the above area, and segments a second divided line, based on this distribution. Then, when the line direction is not clear, the line direction is judged by using the information of the first and second divided lines, and the divided lines in the judged line direction are connected with each other so that a line can be segmented.