US 7,567,708 B2
Apparatus and method for image processing
Kunihiro Yamamoto, Kanagawa (Japan)
Assigned to Canon Kabushiki Kaisha, Tokyo (Japan)
Filed on Aug. 22, 2007, as Appl. No. 11/843,481.
Application 11/843481 is a division of application No. 10/375195, filed on Feb. 28, 2003, granted, now 7,321,687.
Claims priority of application No. 2002-062299 (JP), filed on Mar. 07, 2002; application No. 2002-188352 (JP), filed on Jun. 27, 2002; and application No. 2002-188353 (JP), filed on Jun. 27, 2002.
Prior Publication US 2007/0297671 A1, Dec. 27, 2007
Int. Cl. G06K 9/34 (2006.01); G06K 9/36 (2006.01)
U.S. Cl. 382—175  [382/286] 10 Claims
OG exemplary drawing
 
1. An image processing method for detecting a rectangular area from an image, comprising:
using an image processing apparatus to perform image processing steps as follows:
a binarizing step of binarizing an original image to obtain a binary image;
a histogram creation step of creating histograms of numbers of black pixels of the binary image, in each of a horizontal direction and a vertical direction;
a rectangle extent detection step of performing a trapezoidal approximation to the histograms so as to detect an extent of a rectangular area in said binary image; and
an inclination direction detection step of detecting an inclination direction of said rectangular area in said extent,
wherein said rectangle extent detection step includes the steps of:
using a hypothesis that said rectangular area is a rectangle;
applying a linear approximation by regression analysis to right and left hypotenuses of the trapezoidal approximation so that a shape of the histogram becomes a trapezoid whose right and left hypotenuses are symmetric;
comparing precisions of the linear approximation applied to the right and left hypotenuses; and
correcting data of one hypotenuse based on data of the other hypotenuse wherein the precision of the linear approximation of said one hypotenuse is better than that of said other hypotenuse.