JP4784500B2 - Image tilt correction apparatus and image tilt correction method - Google Patents

Image tilt correction apparatus and image tilt correction method Download PDF

Info

Publication number
JP4784500B2
JP4784500B2 JP2006332596A JP2006332596A JP4784500B2 JP 4784500 B2 JP4784500 B2 JP 4784500B2 JP 2006332596 A JP2006332596 A JP 2006332596A JP 2006332596 A JP2006332596 A JP 2006332596A JP 4784500 B2 JP4784500 B2 JP 4784500B2
Authority
JP
Japan
Prior art keywords
edge
image
detected
sides
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2006332596A
Other languages
Japanese (ja)
Other versions
JP2008147976A (en
Inventor
昌並 沖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2006332596A priority Critical patent/JP4784500B2/en
Publication of JP2008147976A publication Critical patent/JP2008147976A/en
Application granted granted Critical
Publication of JP4784500B2 publication Critical patent/JP4784500B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Input (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Analysis (AREA)

Description

この発明は、紙送り機構を有するスキャナ装置等において、読み取った帳票の傾き補正と帳票領域の正しい切り出し等を行うための、画像傾き補正装置及び画像傾き補正方法に関する。   The present invention relates to an image inclination correction apparatus and an image inclination correction method for correcting the inclination of a read form and correctly cutting out a form area in a scanner apparatus or the like having a paper feed mechanism.

紙送り機構を有するスキャナ装置においては、出力データがラスタ画像データであって、帳票画像の外側の領域も同時に読み込まれるため、読み取るべき帳票がスキャナ装置に対して正しく配置されていなかった場合には、出力帳票画像の外縁もラスタ画像データの外縁に対して傾いてしまう。また、スキャナ装置の紙送りが正しく行われない場合には、読み取るべき帳票が正しく配置されていた場合でも、出力帳票画像の外縁がラスタ画像データの外縁に対して傾く場合がある。   In a scanner apparatus having a paper feed mechanism, output data is raster image data, and an area outside the form image is also read at the same time. Therefore, when the form to be read is not correctly arranged with respect to the scanner apparatus The outer edge of the output form image is also inclined with respect to the outer edge of the raster image data. Further, if the paper feeding of the scanner device is not performed correctly, the outer edge of the output form image may be inclined with respect to the outer edge of the raster image data even when the form to be read is correctly arranged.

そこで、帳票画像の外側の不必要な部分を除去した画像を生成するためには、帳票画像の傾きを補正するとともに、帳票領域のみを切り出すようにする必要があるが、そのためには、帳票画像の4つのコーナーの座標を正確に検出することが必要となる。
従来、帳票の4つのコーナーの座標を検出するために、帳票画像を一旦、画像メモリに格納し、格納された帳票画像に対して主走査方向と副走査方向に探索を行って、帳票画像の上辺,下辺,左辺,右辺における、帳票画像とその外側との境界の点(エッジ点)を複数検出し、それぞれ複数のエッジ点によって定まる直線からなる4辺の交点を求めることによって、帳票画像のコーナー座標を求める方法が知られている。
Therefore, in order to generate an image in which unnecessary portions outside the form image are removed, it is necessary to correct the inclination of the form image and cut out only the form area. It is necessary to accurately detect the coordinates of the four corners.
Conventionally, in order to detect the coordinates of the four corners of a form, the form image is temporarily stored in an image memory, and the stored form image is searched in the main scanning direction and the sub-scanning direction to obtain the form image. By detecting a plurality of boundary points (edge points) between the form image and its outside on the upper side, the lower side, the left side, and the right side, and obtaining the intersection of four sides each consisting of a straight line defined by the plurality of edge points, A method for obtaining corner coordinates is known.

しかしながら、スキャナ装置の出力データはラスタ画像であって、スキャナ装置からは、帳票画像に対して主走査方向の走査を繰り返しながら、順次、垂直方向に走査位置を移動する副走査を行って得られたデータが送られてくる。そこで、上述の検出方法において、上辺及び下辺のエッジ点を検出するためには、帳票画像を一旦、画像メモリに格納し、副走査方向の探索を行って複数のエッジ点を検出しなければならないが、副走査方向の探索は主走査方向の探索に比べて処理に時間がかかるため、帳票画像のコーナー座標の検出に要する時間が長くなるという問題があった。
また、帳票のコーナーが折れ曲がっていたり、斜めにまたは丸くカットされている場合や、図17に示すように、帳票のエッジの部分に帳票画像の外側と輝度の差が少ないベタ塗り領域があるような場合には、正しく帳票領域を検出することができないという問題があった。
However, the output data of the scanner device is a raster image, and is obtained from the scanner device by performing sub-scanning that sequentially moves the scanning position in the vertical direction while repeating scanning in the main scanning direction for the form image. Data is sent. Therefore, in the above detection method, in order to detect the edge points of the upper side and the lower side, the form image must be temporarily stored in the image memory, and a plurality of edge points must be detected by searching in the sub-scanning direction. However, since the search in the sub-scanning direction takes more time than the search in the main scanning direction, there is a problem that the time required for detecting the corner coordinates of the form image becomes long.
In addition, when the corner of the form is bent or cut obliquely or roundly, or as shown in FIG. 17, there is a solid area where the difference in brightness from the outside of the form image is small. In such a case, there is a problem that the form area cannot be detected correctly.

このような問題を解決するためには、次のような手順によって帳票画像の傾き補正等を行うことが考えられる。
ラスタ画像として入力された帳票画像を主走査方向に複数の範囲に等間隔に分割し、各分割範囲内に存在する帳票部分を表す画素(白画素)数を利用して、帳票の上辺および下辺のエッジ点の位置(エッジ位置)を検出し、帳票画像が、帳票の外側部分を表す画素(黒画素)から白画素に変わる変化点と、白画素から黒画素に変わる変化点とによって、帳票の左辺および右辺のエッジ位置を検出する。そして、同一辺上の複数のエッジ点を通る直線として、複数のエッジ直線候補を求め、エッジ直線候補の傾き情報を利用して、上辺,下辺,左辺,右辺の4辺の組み合わせを生成して、その中から上辺と下辺の距離と、左辺と右辺の距離との和が最大になる4辺の組み合わせを選択し、選択された4辺の直線の交点を求めることによって、帳票のコーナー座標を検出する。そして、帳票のコーナー座標から画像の補正時に必要となるパラメータを求め、このパラメータを用いて帳票画像の傾き補正と帳票領域の切り出しとを行う。
In order to solve such a problem, it is conceivable to correct the inclination of the form image by the following procedure.
A form image input as a raster image is divided into a plurality of ranges at equal intervals in the main scanning direction, and the upper and lower sides of the form are obtained by using the number of pixels (white pixels) representing the form portion existing in each divided range. The position of the edge point (edge position) is detected, and the form image is changed according to the change point at which the pixel representing the outer portion of the form (black pixel) changes to a white pixel and the change point at which the white pixel changes to a black pixel. The edge positions of the left side and right side of are detected. Then, a plurality of edge straight line candidates are obtained as straight lines passing through a plurality of edge points on the same side, and a combination of four sides of the upper side, the lower side, the left side, and the right side is generated using the inclination information of the edge straight line candidates. Then, select the combination of the four sides that maximizes the sum of the distance between the upper side and the lower side and the distance between the left side and the right side, and calculate the corner coordinates of the form by finding the intersection of the straight lines of the selected four sides. To detect. Then, parameters necessary for correcting the image are obtained from the corner coordinates of the form, and the inclination of the form image and the cutout of the form area are performed using these parameters.

これに対して特許文献1においては、主走査方向を処理単位として、帳票画像の左エッジ点と右エッジ点の座標値を特定するとともに、この処理を副走査方向に繰り返して全ラインに対して実行することによって特定された座標値に基づいて左右のエッジ点の間隔を求め、この間隔が副走査方向に一定となる領域を安定領域とする。そして、安定領域以外の領域に存在する左エッジ点および右エッジ点の座標値に基づいて、基準位置に対する帳票画像の傾き角をを導出する技術が開示されている。
しかしながら、特許文献1においては、帳票画像を複数の範囲に等間隔に分割し、各分割範囲内に存在する帳票部分を表す白画素数を利用して、帳票の上辺,下辺のエッジ位置を検出し、検出されたエッジ位置を用いて複数のエッジ直線候補を求め、エッジ直線候補の傾きを利用して、上辺,下辺,左辺,右辺の4辺の組み合わせを生成して、その中から上辺と下辺の距離と、左辺と右辺の距離との和が最大になる4辺の組み合わせを選択し、選択された4辺の直線を用いて直線の交点を求めて帳票のコーナー座標を検出して、これによって画像の補正時に必要となるパラメータを求め、このパラメータを用いて帳票画像の補正を行うことについては記載されていない。
On the other hand, in Patent Document 1, the coordinate values of the left edge point and the right edge point of the form image are specified using the main scanning direction as a processing unit, and this processing is repeated in the sub scanning direction for all lines. An interval between the left and right edge points is obtained based on the coordinate value specified by the execution, and a region where the interval is constant in the sub-scanning direction is set as a stable region. A technique for deriving the inclination angle of the form image with respect to the reference position based on the coordinate values of the left edge point and the right edge point existing in the region other than the stable region is disclosed.
However, in Patent Document 1, a form image is divided into a plurality of ranges at equal intervals, and the edge positions of the upper and lower sides of the form are detected by using the number of white pixels representing the form portion existing in each divided range. Then, a plurality of edge straight line candidates are obtained using the detected edge positions, and a combination of four sides of the upper side, the lower side, the left side, and the right side is generated using the inclination of the edge straight line candidate. Select the combination of the four sides that maximizes the sum of the distance between the lower side and the distance between the left side and the right side, find the intersection of the lines using the selected four straight lines, detect the corner coordinates of the form, Thus, there is no description about obtaining parameters necessary for image correction and correcting the form image using these parameters.

また特許文献2においては、画像入力装置を通じて入力された用紙の画像データを画像メモリに画素単位で展開し、垂直方向または水平方向の少なくとも一方向からの走査によって、画像メモリの中で、白黒反転している座標を検出する。そして、最初の白黒反転座標を開始位置として、その位置から白黒反転座標が一方向に連続してなる直線を、用紙の外形線の一辺として検出し、その直線の傾き角度を用紙の傾き角として算出する技術が開示されている。
しかしながら、特許文献2においては、帳票画像を複数の範囲に等間隔に分割し、各分割範囲内に存在する帳票部分を表す白画素数を利用して、帳票の上辺,下辺のエッジ位置を検出し、エッジ直線候補の傾きを利用して、上辺,下辺,左辺,右辺の4辺の組み合わせを生成して、その中から上辺と下辺の距離と、左辺と右辺の距離との和が最大になる4辺の組み合わせを選択して、これから求めたパラメータを用いて帳票画像の補正を行うことについては記載されていない。
Further, in Patent Document 2, the image data of the paper input through the image input device is developed in the image memory in units of pixels, and black and white inversion is performed in the image memory by scanning from at least one direction in the vertical direction or the horizontal direction. Detect the coordinates that are being used. Then, the first black / white reversal coordinate is used as a start position, and a straight line in which the black / white reversal coordinate continues from that position in one direction is detected as one side of the outline of the paper, and the inclination angle of the straight line is used as the paper inclination angle A technique for calculating is disclosed.
However, in Patent Document 2, the form image is divided into a plurality of ranges at equal intervals, and the edge positions of the upper and lower sides of the form are detected using the number of white pixels representing the form portion existing in each divided range. Then, by using the slope of the edge straight line candidate, a combination of the upper side, the lower side, the left side, and the right side is generated, and the sum of the distance between the upper side and the lower side and the distance between the left side and the right side is maximized. There is no description about selecting a combination of four sides and correcting the form image using the parameters obtained from the combination.

また特許文献3においては、画像の各走査線の白ラン長を計測し、計測された白ラン長を所定の複数走査線内で比較して、最小の白ラン長とその走査線位置を画像端部点として抽出し、複数の画像端部点を最もよく連結できる直線を画像端部線として抽出して、画像端部線の垂直線からの傾きを算出することによって原稿の傾きを検出する技術が開示されている。
しかしながら、特許文献3においては、エッジ直線候補の傾きを利用して、上辺,下辺,左辺,右辺の4辺の組み合わせを生成して、その中から上辺と下辺の距離と、左辺と右辺の距離との和が最大になる4辺の組み合わせを選択し、選択された4辺の直線を用いて直線の交点を求めて、帳票のコーナー座標を検出することについては記載されていない。
特開平07−334618号公報(図1(a),(b) 、〔0005〕〜〔0009〕) 特開2005−165822号公報(図2、〔0026〕,〔0027〕) 特開平02−158882号公報(第1図、第580頁,左上欄第19行〜右上欄第19行) 長尾 真:画像認識論,p72〜74、コロナ社(昭和58年)
In Patent Document 3, the white run length of each scanning line of an image is measured, the measured white run lengths are compared within a predetermined plurality of scanning lines, and the minimum white run length and the scanning line position are determined. Extracts the edge of the original by extracting the straight line that can best connect a plurality of image edge points as the image edge line and calculating the inclination of the image edge line from the vertical line. Technology is disclosed.
However, in Patent Document 3, a combination of four sides of an upper side, a lower side, a left side, and a right side is generated using the slope of the edge straight line candidate, and the distance between the upper side and the lower side, and the distance between the left side and the right side from among them. There is no description about detecting a corner coordinate of a form by selecting a combination of four sides that maximizes the sum of and calculating the intersection of the straight lines using the selected straight lines of the four sides.
Japanese Patent Application Laid-Open No. 07-334618 (FIGS. 1 (a), (b), [0005] to [0009]) Japanese Patent Laying-Open No. 2005-165822 (FIG. 2, [0026], [0027]) JP 02-15882 (FIG. 1, page 580, upper left column, line 19 to upper right column, line 19) Makoto Nagao: Image recognition theory, p72-74, Corona (Showa 58)

従来の画像傾き補正装置および画像傾き補正方法では、スキャナ装置から出力されるラスタ画像を一旦、画像メモリに格納し、主走査方向の探索と、主走査方向に比べて処理に時間がかかる副走査方向の探索とを行って画像傾きの検出を行うため、帳票画像の傾きの検出に要する時間が長くなるとともに、帳票画像の傾きが小さくなるにつれて検出可能な帳票上辺および下辺のエッジ点の数が減少するため、上辺および下辺の検出のために十分なエッジ点を安定に検出できない。また、上辺および下辺のエッジ検出に際しては、安定領域の検出精度が重要であるが、帳票コーナーが折れ曲がっていたり、斜めまたは丸くカットされていた場合や、帳票のエッジの一部に輝度差が少ないベタ塗り領域がある場合には、正しく安定領域を検出できない。   In the conventional image tilt correction apparatus and image tilt correction method, the raster image output from the scanner device is temporarily stored in the image memory, and the search in the main scanning direction and the sub-scan that takes more time than the main scanning direction are processed. Since the direction of the image is detected by performing the direction search, the time required for detecting the inclination of the form image becomes longer, and the number of edge points on the upper and lower sides of the form that can be detected becomes smaller as the inclination of the form image becomes smaller. Therefore, sufficient edge points for detecting the upper side and the lower side cannot be detected stably. In addition, when detecting the upper and lower edges, the accuracy of stable area detection is important. However, if the form corner is bent or slanted or rounded, or if the edge of the form has a small difference in brightness. When there is a solid area, a stable area cannot be detected correctly.

この発明は上述の事情に鑑みてなされたものであって、紙送り機構を有するスキャナ装置において、副走査方向への探索を必要とせず、主走査方向を処理単位としてラスタ画像の入力と同時に処理を行うことができるため、高速処理が可能であるとともに、帳票画像の傾きが小さい場合でも帳票画像のコーナー座標を精度よく求めて、帳票画像の傾きを補正することができ、さらに、安定領域の検出を必要とせず、また、帳票コーナーが折れ曲がっていたり、斜めまたは丸くカットされていた場合や、帳票のエッジ部分の一部に帳票画像の外側との間で輝度の差が少ないベタ塗り領域がある場合でも正しく帳票画像の外縁を検出することが可能な、画像傾き補正装置および画像傾き補正方法を提供することを目的としている。   The present invention has been made in view of the above circumstances, and in a scanner apparatus having a paper feed mechanism, a search in the sub-scanning direction is not required, and processing is performed simultaneously with the input of a raster image in the main scanning direction as a processing unit. Therefore, even when the inclination of the form image is small, the corner coordinates of the form image can be obtained accurately, and the inclination of the form image can be corrected. Detection is not required, and when the form corner is bent or cut diagonally or rounded, there is a solid area with little difference in brightness between the outside of the form image and part of the edge of the form An object of the present invention is to provide an image tilt correction apparatus and an image tilt correction method capable of correctly detecting the outer edge of a form image even in some cases.

上記課題を解決するため、請求項1記載の発明は画像傾き補正装置に係り、入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成するエッジ位置生成部と、上記生成されたエッジ位置の情報を順次保存するエッジ位置保存メモリと、該エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、上記帳票の4辺のエッジ直線の候補として複数の直線を検出するエッジ候補検出部と、上記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択するエッジ選択部と、上記選択された4辺の組み合わせから帳票のコーナー座標を検出するコーナー検出部と、上記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成するパラメータ生成部と、上記ラインバッファの情報を順次格納して画像として保存する画像保存メモリと、上記生成されたパラメータを用いて上記画像保存メモリに保存された画像を補正する画像補正部とを備えてなると共に、上記エッジ位置生成部が、上記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する上記白画素の画素数が上記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行う上辺・下辺エッジ位置生成部と、画像データをライン方向に探索して、上記白画素が所望の幅以上連続したときは、連続する上記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する上記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行う左辺・右辺エッジ位置生成部とからなり、生成された4辺のエッジ位置の情報を上記エッジ位置保存メモリに保存するように構成されていることを特徴としている。 In order to solve the above-mentioned problem, an invention according to claim 1 relates to an image tilt correction apparatus, and uses a form read from a line buffer that temporarily stores an inputted form image for each scanning line, and uses the form. An edge position generation unit that generates the positions of the edge points of the upper side and the lower side and the positions of the edge points of the left side and the right side of the form, an edge position storage memory that sequentially stores the information of the generated edge positions, Using the edge position information stored in the edge position storage memory, an edge candidate detection unit that detects a plurality of straight lines as candidates for the edge straight lines on the four sides of the form, and the detected plurality of straight lines. An edge selection unit that selects a combination of four sides that is valid as a form from the combination of four sides, and a code that detects the corner coordinates of the form from the combination of the selected four sides. A detection unit, a parameter generation unit that generates parameters necessary for correcting the form image using the detected corner coordinates, an image storage memory that sequentially stores information of the line buffer and stores the information as an image, An image correction unit that corrects an image stored in the image storage memory using the generated parameter, and the edge position generation unit converts the image data stored in the line buffer into a plurality of ranges. When the number of white pixels defined as equal to or higher than a predetermined luminance existing in each range is first detected to be equal to or greater than a desired threshold, the middle point of the range is set to the upper side. The process of setting the number of the image data as the position of the edge point is performed for each line, and finally the number of the white pixels existing in each range is equal to or more than the desired threshold value. When it is issued, the upper side / lower side edge position generation unit that performs the process of setting the image data number for each line with the middle point of the range as the position of the lower side edge point, the image data is searched in the line direction, When white pixels continue for a desired width or more, the first pixel position of the consecutive white pixels is detected as the position of the left edge point, and the last pixel position of the consecutive white pixels is determined as the position of the right edge point. It comprises a left side / right side edge position generation unit that performs detection processing for each line, and is configured to store the generated edge position information of the four sides in the edge position storage memory .

また、請求項2記載の発明は画像傾き補正装置に係り、入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成するエッジ位置生成部と、上記生成されたエッジ位置の情報を順次保存するエッジ位置保存メモリと、該エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、上記帳票の上辺をなすエッジ直線の候補として複数の直線を検出する上辺エッジ候補検出部と、上記エッジ位置保存メモリに保存されたエッジ位置の情報と、上記上辺エッジ候補検出部で検出された上辺のエッジ直線の情報とから、帳票の下辺,左辺,右辺をなすエッジ直線の候補として複数の直線を検出する下辺,左辺,右辺エッジ候補検出部と、上記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択するエッジ選択部と、上記選択された4辺の組み合わせから帳票のコーナー座標を検出するコーナー検出部と、上記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成するパラメータ生成部と、上記ラインバッファの情報を順次格納して画像として保存する画像保存メモリと、上記生成されたパラメータを用いて上記画像保存メモリに保存された画像を補正する画像補正部とを備えてなると共に、上記エッジ位置生成部が、上記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する上記白画素の画素数が上記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行う上辺・下辺エッジ位置生成部と、画像データをライン方向に探索して、上記白画素が所望の幅以上連続したときは、連続する上記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する上記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行う左辺・右辺エッジ位置生成部とからなり、生成された4辺のエッジ位置の情報を上記エッジ位置保存メモリに保存するように構成されていることを特徴としている。 According to a second aspect of the present invention, there is provided an image tilt correction apparatus, wherein an image read from a line buffer that temporarily stores an input form image for each scanning line is used to detect the upper and lower sides of the form. An edge position generation unit that generates positions of edge points and positions of edge points on the left and right sides of the form; an edge position storage memory that sequentially stores information on the generated edge positions; and the edge position storage memory Using the stored edge position information, an upper edge candidate detection unit that detects a plurality of straight lines as edge straight line candidates forming the upper side of the form; and edge position information stored in the edge position storage memory; Detecting a plurality of straight lines as edge straight line candidates that form the lower side, left side, and right side of the form from the information on the upper side edge straight line detected by the upper side edge candidate detection unit. , Left side, right side edge candidate detection unit, an edge selection unit that selects a combination of four sides that is valid as a form from a combination of four sides generated from the detected plurality of straight lines, and the selected four sides A corner detection unit that detects corner coordinates of the form from the combination, a parameter generation unit that generates parameters necessary for correcting the form image using the detected corner coordinates, and information of the line buffer are sequentially stored. An image storage memory for storing the image, and an image correction unit for correcting the image stored in the image storage memory using the generated parameter, and the edge position generation unit is provided in the line buffer. The stored image data is divided into a plurality of ranges at equal intervals, and an image of white pixels defined as a predetermined luminance or more existing in each range. When it is first detected that the number is equal to or greater than a desired threshold, the process of setting the image data number for each line with the midpoint of the range as the position of the upper edge point is performed, and the above-mentioned existing in each range When the number of white pixels is finally detected to be equal to or more than the desired threshold, the upper and lower sides perform processing for setting the number of image data for each line with the middle point of the range as the position of the lower edge point. The edge position generator and the image data are searched in the line direction, and when the white pixels continue for a desired width or more, the first pixel position of the continuous white pixels is detected as the position of the left edge point, The left side / right side edge position generation unit that performs processing for detecting the last pixel position of the continuous white pixels as the position of the right side edge point for each line, and information on the generated edge positions of the four sides It is characterized by being configured to store in an edge position storage memory .

また、請求項記載の発明は、請求項記載の画像傾き補正装置に係り、上記エッジ候補検出部が、上記エッジ位置保存メモリに保存された4辺のエッジ位置の位置からHough変換を用いて4辺のエッジ直線の候補となる複数の直線を検出するように構成されていることを特徴としている。 The invention of claim 3, wherein relates to an image inclination correction device according to claim 1, wherein said edge candidate detection unit, using a Hough transformation from the position of the edge position of the four sides that are stored in the edge position storage memory It is characterized by detecting a plurality of straight lines that are candidates for edge straight lines on four sides.

また、請求項記載の発明は、請求項記載の画像傾き補正装置に係り、上記上辺エッジ候補検出部が、上記エッジ位置保存メモリに保存された上辺のエッジ位置の情報からHough変換を用いて上辺のエッジ直線の候補となる複数の直線を検出するように構成されていることを特徴としている。 According to a fourth aspect of the present invention, there is provided the image inclination correction apparatus according to the second aspect , wherein the upper edge candidate detection unit uses Hough transform from information on the edge position of the upper side stored in the edge position storage memory. And a plurality of straight lines that are candidates for edge straight lines on the upper side.

また、請求項記載の発明は、請求項記載の画像傾き補正装置に係り、上記下辺,左辺,右辺エッジ候補検出部が、上記エッジ位置保存メモリに保存された4辺のエッジ位置の情報からHough変換を用いて検出された4辺のエッジ直線の候補となる複数の直線と、上記上辺エッジ候補検出部で検出された上辺のエッジ直線の候補となる複数の直線とから、下辺,左辺,右辺のエッジ直線の候補となる複数の直線を検出するように構成されていることを特徴としている。 According to a fifth aspect of the present invention, there is provided the image inclination correction apparatus according to the fourth aspect , wherein the lower side, left side, and right side edge candidate detection unit is information on the edge positions of the four sides stored in the edge position storage memory. From the plurality of straight lines that are candidates for edge straight lines of four sides detected by using the Hough transform and the plurality of straight lines that are candidates for edge straight lines detected by the upper edge candidate detection unit, the lower side and the left side , A plurality of straight lines that are candidates for edge straight lines on the right side are detected.

また、請求項記載の発明は、請求項1乃至のいずれか一記載の画像傾き補正装置に係り、上記エッジ選択部が、隣り合う2辺のなす角度が同等な4辺の組み合わせをすべて検出し、検出されたすべての4辺の組み合わせのうち、上辺と下辺の距離と、左辺と右辺の距離との和が最大となる4辺の組み合わせを、上記帳票として妥当な4辺の組み合わせとして選択するように構成されていることを特徴としている。 The invention according to claim 6 relates to the image tilt correction apparatus according to any one of claims 1 to 5 , wherein the edge selection unit determines all combinations of four sides having the same angle between two adjacent sides. Among the combinations of all detected four sides, the combination of the four sides that maximizes the sum of the distance between the upper side and the lower side and the distance between the left side and the right side is regarded as a valid four-side combination as the above-mentioned form. It is characterized by being configured to select.

また、請求項記載の発明は、請求項1乃至のいずれか一記載の画像傾き補正装置に係り、上記コーナー検出部が、上記帳票として妥当な4辺の組み合わせとして選択された4辺のエッジ直線における、隣りあう2辺を構成する直線(直線の延長部分である場合を含む)の交点として帳票のコーナー座標を検出するように構成されていることを特徴としている。 According to a seventh aspect of the invention, there is provided the image inclination correction apparatus according to any one of the first to sixth aspects, wherein the corner detection unit has four sides selected as a combination of four sides that are valid as the form. It is characterized in that the corner coordinates of the form are detected as the intersection of straight lines (including the case where the straight line is an extension) of two adjacent sides in the edge straight line.

また、請求項記載の発明は、請求項1乃至のいずれか一記載の画像傾き補正装置に係り、上記パラメータ生成部が、入力画像の座標を特定の位置に移動し、特定の倍率で拡大または縮小して、特定の角度回転させたのち、回転中心を出力画像の座標の原点に合わせる演算を行って出力画像を求める変換行列の逆行列によって上記パラメータを生成するように構成されていることを特徴としている。 The invention according to claim 8 relates to the image tilt correction apparatus according to any one of claims 1 to 7 , wherein the parameter generation unit moves the coordinates of the input image to a specific position, and at a specific magnification. After the image is enlarged or reduced and rotated by a specific angle, the above parameters are generated by an inverse matrix of a transformation matrix for obtaining an output image by performing an operation for aligning the rotation center with the origin of the coordinates of the output image. It is characterized by that.

また、請求項記載の発明は、請求項1乃至のいずれか一記載の画像傾き補正装置に係り、上記画像補正部が、上記パラメータを用いて、入力帳票画像の傾きを補正するとともに、帳票画像の外側の部分を除去する補正を行うように構成されていることを特徴としている。 The invention according to claim 9 relates to the image tilt correction apparatus according to any one of claims 1 to 8 , wherein the image correction unit corrects the tilt of the input form image using the parameter, The present invention is characterized in that the correction is made so as to remove the outer portion of the form image.

また、請求項10記載の発明は画像傾き補正方法に係り、入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、エッジ位置生成手段によって、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成して、生成されたエッジ位置の情報をエッジ位置保存メモリに順次保存し、エッジ候補検出手段が、上記エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、上記帳票の4辺のエッジ直線の候補として複数の直線を検出し、エッジ選択手段が、上記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択し、コーナー検出手段が、上記選択された4辺の組み合わせから帳票のコーナー座標を検出し、パラメータ生成手段が、上記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成し、画像補正手段が、上記生成されたパラメータを用いて、上記ラインバッファの情報を順次格納して画像として保存した画像保存メモリの画像を補正すると共に、上記エッジ位置生成手段において、上辺・下辺エッジ位置生成手段が、上記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する上記白画素の画素数が上記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、左辺・右辺エッジ位置生成手段が、画像データをライン方向に探索して、上記白画素が所望の幅以上連続したときは、連続する上記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する上記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行って、生成された4辺のエッジ位置の情報を上記エッジ位置保存メモリに保存することを特徴としている。 The invention according to claim 10 relates to an image inclination correction method, wherein an edge position generation unit uses an image read from a line buffer that temporarily stores an input form image for each scanning line, The position of the edge points on the upper and lower sides of the form and the positions of the edge points on the left and right sides of the form are generated, and the generated edge position information is sequentially stored in the edge position storage memory, and the edge candidate detection means Then, using the edge position information stored in the edge position storage memory, a plurality of straight lines are detected as candidates for the edge straight lines on the four sides of the form, and the edge selecting means detects from the detected plurality of straight lines. A combination of four sides that is appropriate as a form is selected from the generated four side combinations, and the corner detection means selects the corner coordinates of the form from the selected combination of the four sides. And the parameter generation means generates parameters necessary for correcting the form image using the detected corner coordinates, and the image correction means uses the generated parameters to obtain the information of the line buffer. In addition to correcting the image stored in the image storage memory sequentially stored and stored as an image , the edge position generation unit includes the upper and lower edge position generation units configured to equidistantly store the image data stored in the line buffer in a plurality of ranges. When the number of white pixels defined as being equal to or higher than the predetermined brightness existing in each range is first detected to be equal to or greater than a desired threshold, the midpoint of the range is set to the upper edge point. The process of setting the image data number as the position is performed for each line, and finally, the number of the white pixels existing in each range is equal to or more than the desired threshold. When it is issued, the process of setting the number of the image data is performed for each line with the middle point of the range as the position of the lower edge point, and the left and right edge position generation means searches the image data in the line direction, When the white pixels are continuous for a desired width or more, the first pixel position of the continuous white pixels is detected as the position of the left edge point, and the last pixel position of the continuous white pixels is detected as the position of the right edge point. Is detected for each line, and the generated edge position information of the four sides is stored in the edge position storage memory .

また、請求項11記載の発明は画像傾き補正方法に係り、入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、エッジ位置生成手段によって、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成して、生成されたエッジ位置の情報をエッジ位置保存メモリに順次保存し、上辺エッジ候補検出手段が、上記エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、上記帳票の上辺をなすエッジ直線の候補として複数の直線を検出し、下辺,左辺,右辺エッジ候補検出手段が、上記エッジ位置保存メモリに保存されたエッジ位置の情報と、上記上辺エッジ候補検出手段で検出された上辺のエッジ直線の情報とから、帳票の下辺,左辺,右辺をなすエッジ直線の候補として複数の直線を検出し、エッジ選択手段が、上記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択し、コーナー検出手段が、上記選択された4辺の組み合わせから帳票のコーナー座標を検出し、パラメータ生成手段が、上記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成し、画像補正手段が、上記生成されたパラメータを用いて、上記ラインバッファの情報を順次格納して画像として保存した画像保存メモリの画像を補正すると共に、上記エッジ位置生成手段において、上辺・下辺エッジ位置生成手段が、上記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する上記白画素の画素数が上記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、左辺・右辺エッジ位置生成手段が、画像データをライン方向に探索して、上記白画素が所望の幅以上連続したときは、連続する上記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する上記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行って、生成された4辺のエッジ位置の情報を上記エッジ位置保存メモリに保存することを特徴としている。 According to an eleventh aspect of the present invention, there is provided an image tilt correction method, wherein an edge position generation unit uses an image read from a line buffer that temporarily stores an input form image for each scanning line, The upper edge and lower edge edge point positions and the left and right edge point positions of the form are generated, the generated edge position information is sequentially stored in the edge position storage memory, and the upper edge candidate detection means However, using the edge position information stored in the edge position storage memory, a plurality of straight lines are detected as edge straight line candidates forming the upper side of the form, and the lower side, left side, and right side edge candidate detecting means are From the edge position information stored in the edge position storage memory and the upper edge straight line information detected by the upper edge candidate detection means, the lower side, left side, and right side of the form A plurality of straight lines are detected as edge straight line candidates to be formed, and the edge selecting unit selects a combination of four sides that are valid as a form from the combination of four sides generated from the detected plurality of straight lines, and a corner detecting unit However, the corner coordinates of the form are detected from the selected combination of the four sides, the parameter generation means generates parameters necessary for correcting the form image using the detected corner coordinates, and the image correction means Then, using the generated parameters, the line buffer information is sequentially stored and corrected as an image in the image storage memory, and the edge position generation means includes upper and lower edge position generation means, The image data stored in the line buffer is divided into a plurality of ranges at equal intervals, and the predetermined brightness or more existing in each range When it is first detected that the number of defined white pixels is equal to or greater than a desired threshold, the process of setting the number of image data is performed for each line with the midpoint of the range as the position of the upper edge point, When it is finally detected that the number of white pixels present in each range is equal to or greater than the desired threshold value, processing for setting the image data number with the midpoint of the range as the position of the lower edge point This is performed for each line, and the left side / right side edge position generation means searches the image data in the line direction, and when the white pixel continues for a desired width or more, the first pixel position of the continuous white pixel is determined as the left side edge. In addition to detecting the position of the point, the process of detecting the last pixel position of the continuous white pixel as the position of the right side edge point is performed for each line, and the information on the generated edge positions of the four sides is set to the edge position. It is characterized by being stored in a storage memory .

また、請求項12記載の発明は、請求項10記載の画像傾き補正方法に係り、上記エッジ候補検出手段が、上記エッジ位置保存メモリに保存された4辺のエッジ位置の情報からHough変換を用いて4辺のエッジ直線の候補となる複数の直線を検出することを特徴としている。 According to a twelfth aspect of the present invention, in the image tilt correction method according to the tenth aspect , the edge candidate detection unit uses Hough transform from the information on the edge positions of the four sides stored in the edge position storage memory. And detecting a plurality of straight lines that are candidates for edge straight lines on four sides.

また、請求項13記載の発明は、請求項11記載の画像傾き補正方法に係り、上記上辺エッジ候補検出手段が、上記エッジ位置保存メモリに保存された上辺のエッジ位置の情報からHough変換を用いて上辺のエッジ直線の候補となる複数の直線を検出することを特徴としている。 The invention according to claim 13 relates to the image inclination correction method according to claim 11 , wherein the upper edge candidate detection means uses Hough transform from information on the edge position of the upper edge stored in the edge position storage memory. A feature is that a plurality of straight lines that are candidates for the upper edge straight line are detected.

また、請求項14記載の発明は、請求項13記載の画像傾き補正方法に係り、上記下辺,左辺,右辺エッジ候補検出手段が、上記エッジ位置保存メモリに保存された4辺のエッジ位置の情報からHough変換を用いて検出された4辺のエッジ直線の候補となる複数の直線と、上記上辺エッジ候補手段で検出された上辺のエッジ直線の候補となる複数の直線とから、下辺,左辺,右辺のエッジ直線の候補となる複数の直線を検出することを特徴としている。 According to a fourteenth aspect of the present invention, there is provided the image inclination correcting method according to the thirteenth aspect , wherein the lower side, left side and right side edge candidate detecting means is information on edge positions of four sides stored in the edge position storage memory. From the plurality of straight lines that are candidates for the four edge straight lines detected by using the Hough transform and the plurality of straight lines that are candidates for the upper edge straight lines detected by the upper edge candidate means, the lower side, the left side, It is characterized by detecting a plurality of straight lines that are candidates for edge straight lines on the right side.

また、請求項15記載の発明は、請求項10乃至14のいずれか一記載の画像傾き補正方法に係り、上記エッジ選択手段が、隣りあう2辺のなす角度が同等な4辺の組み合わせをすべて検出し、検出されたすべての4辺の組み合わせのうち、上辺と下辺の距離と、左辺と右辺の距離との和が最大となる4辺の組み合わせを、上記帳票として妥当な4辺の組み合わせとして選択することを特徴としている。 The invention according to claim 15 relates to the image inclination correction method according to any one of claims 10 to 14 , wherein the edge selecting means determines all combinations of four sides having the same angle between two adjacent sides. Among the combinations of all detected four sides, the combination of the four sides that maximizes the sum of the distance between the upper side and the lower side and the distance between the left side and the right side is regarded as a valid four-side combination as the above-mentioned form. It is characterized by selection.

また、請求項16記載の発明は、請求項10乃至15のいずれか一記載の画像傾き補正方法に係り、上記コーナー検出手段が、上記帳票として妥当な4辺の組み合わせとして選択された4辺のエッジ直線における、隣り合う2辺を構成する直線(直線の延長部分である場合を含む)の交点として帳票のコーナー座標を検出することを特徴としている。 According to a sixteenth aspect of the present invention, there is provided the image inclination correction method according to any one of the tenth to fifteenth aspects, wherein the corner detection unit is configured to select four sides selected as a combination of four sides that are valid as the form. The feature is that corner coordinates of a form are detected as an intersection of straight lines (including a case where the straight line is an extension) of two adjacent sides in the edge straight line.

また、請求項17記載の発明は、請求項10乃至16のいずれか一記載の画像傾き補正方法に係り、上記パラメータ生成手段が、入力画像座標を特定の位置に移動し、特定の倍率で拡大または縮小して、特定の角度回転させたのち、回転中心を出力画像の座標の原点に合わせる演算を行って出力画像を求める変換行列の逆行列によって上記パラメータを生成することを特徴としている。 The invention according to claim 17 relates to the image tilt correction method according to any one of claims 10 to 16 , wherein the parameter generation means moves the input image coordinates to a specific position and enlarges the image at a specific magnification. Alternatively, after reducing and rotating by a specific angle, the parameter is generated by an inverse matrix of a transformation matrix for obtaining an output image by performing an operation for adjusting the rotation center to the origin of the coordinates of the output image.

また、請求項18記載の発明は、請求項10乃至17のいずれか一記載の画像傾き補正方法に係り、上記画像補正手段が、上記パラメータを用いて、入力帳票画像の傾きを補正するとともに、帳票画像の外側の部分を除去する補正を行うことを特徴としている。
The invention according to claim 18 relates to the image inclination correction method according to any one of claims 10 to 17 , wherein the image correction means corrects the inclination of the input form image using the parameter, The correction is performed to remove the outer portion of the form image.

本発明の画像傾き補正装置および画像傾き補正方法では、紙送り機構を有するスキャナ装置において、副走査方向への探索を必要とせず、主走査方向を処理単位としてラスタ画像の入力と同時に処理を行うことができるため、高速処理が可能であるとともに、帳票画像の傾きが小さい場合でも帳票画像のコーナー座標を精度よく求めて、帳票画像の傾きを補正することができる。さらに、帳票コーナーが折れ曲がっていたり、斜めまたは丸くカットされていた場合や、帳票のエッジ部分の一部に帳票画像の外側との間で輝度の差が少ないベタ塗り領域がある場合でも正しく帳票画像の外縁を検出することが可能である。   In the image tilt correction apparatus and the image tilt correction method of the present invention, a scanner device having a paper feed mechanism does not require a search in the sub-scanning direction, and performs processing simultaneously with the input of a raster image using the main scanning direction as a processing unit. Therefore, high-speed processing is possible, and even when the inclination of the form image is small, the corner coordinates of the form image can be obtained with high accuracy and the inclination of the form image can be corrected. In addition, even when the form corner is bent or cut obliquely or rounded, or even when there is a solid area with a small difference in brightness between the outside of the form image and part of the edge of the form, the form image is correct. It is possible to detect the outer edge.

入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成するエッジ位置生成部と、生成されたエッジ位置の情報を順次保存するエッジ位置保存メモリと、エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、帳票の4辺のエッジ直線の候補として複数の直線を検出するエッジ候補検出部と、検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択するエッジ選択部と、選択された4辺の組み合わせから帳票のコーナー座標を検出するコーナー検出部と、検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成するパラメータ生成部と、ラインバッファの情報を順次格納して画像として保存する画像保存メモリと、生成されたパラメータを用いて画像保存メモリに保存された画像を補正する画像補正部とを備えて画像傾き補正装置を構成する。   Using the image read from the line buffer that temporarily stores the input form image for each scan line, the position of the edge points on the top and bottom sides of the form, and the position of the edge points on the left and right sides of the form Using the edge position generation unit for generating the edge position, the edge position storage memory for sequentially storing the generated edge position information, and the edge position information stored in the edge position storage memory, the edges of the four sides of the form An edge candidate detection unit that detects a plurality of straight lines as a straight line candidate, and an edge selection unit that selects a combination of four sides that are valid as a form from a combination of four sides generated from the detected plurality of straight lines. The corner detection unit that detects the corner coordinates of the form from the combination of the four sides, and the parameters required when correcting the form image are generated using the detected corner coordinates. An image storage unit that sequentially stores line buffer information and stores the image as an image, and an image correction unit that corrects the image stored in the image storage memory using the generated parameter. An inclination correction apparatus is configured.

図1は、本発明の画像傾き補正装置による帳票画像の補正を概念的に説明する図、図2は、本発明の第1実施例である傾き補正装置の構成を示すブロック図、図3は、本実施例の傾き補正装置における処理手順を示すフローチャート、図4は、上辺,下辺エッジ位置生成部の処理手順を示すフローチャート、図5は、上辺,下辺のエッジ位置を生成する際の処理方法を説明する図、図6は、4辺のエッジ位置の書式を例示する図、図7は、上辺のエッジ位置と下辺のエッジ位置の検出を説明するための図、図8は、左辺,右辺エッジ位置生成部の処理手順を示すフローチャート、図9は、エッジ候補検出部の処理手順を示すフローチャート、図10は、不正な左辺エッジ位置と右辺エッジ位置とを除去する方法を説明する図、図11は、エッジ選択部の処理手順を示すフローチャート、図12は、エッジ選択部の選択方法を説明する図、図13は、コーナー検出部で検出されるコーナー座標を説明する図、図14は、入力画像から出力画像を算出する方法を説明する図である。   FIG. 1 is a diagram for conceptually explaining the correction of a form image by the image tilt correction apparatus of the present invention, FIG. 2 is a block diagram showing the configuration of the tilt correction apparatus according to the first embodiment of the present invention, and FIG. FIG. 4 is a flowchart showing the processing procedure of the upper side and lower side edge position generation unit, and FIG. 5 is a processing method for generating the edge positions of the upper side and the lower side. 6 is a diagram illustrating the format of the edge positions of the four sides, FIG. 7 is a diagram for explaining the detection of the edge positions of the upper side and the lower side, and FIG. 8 is the left side and the right side FIG. 9 is a flowchart showing the processing procedure of the edge candidate detection unit, FIG. 10 is a diagram for explaining a method for removing an illegal left edge position and right edge position, and FIG. 11 is FIG. 12 is a flowchart for explaining the selection method of the edge selector, FIG. 13 is a diagram for explaining the corner coordinates detected by the corner detector, and FIG. 14 is an output from the input image. It is a figure explaining the method to calculate an image.

図1は、本発明の画像傾き補正装置によって実現される帳票画像の補正を、概念的に説明するものである。
紙送り機構を有するスキャナにおいて帳票を読み込んだ場合に、例えば帳票がスキャナの正常な入力位置に対して傾いてセットされていたような場合には、図1(a) における帳票PQRSで示すように、帳票画像が、入力画像の外縁に対して傾いたものとなる。または、帳票が正しくセットされていた場合でも、スキャナの紙送り機構の不具合によって、スキャナに対して用紙が傾いて送られたような場合も、同様に、帳票画像が入力画像の外縁に対して傾いたものとなる。
本発明の画像傾き補正装置は、このような場合に、帳票画像を入力画像に対して、例えば点Pを中心として回転することによって、出力帳票画像が入力画像に対して傾きのない状態に補正することができるとともに、出力帳票画像の外側の領域を除去して、図1(b) に示すように、帳票部分に対応する幅W,高さHの領域のみからなる画像を切り出すことができるようにするものである。
FIG. 1 conceptually illustrates the correction of a form image realized by the image tilt correction apparatus of the present invention.
When a form is read by a scanner having a paper feed mechanism, for example, when the form is set tilted with respect to the normal input position of the scanner, as shown by form PQRS in FIG. The form image is inclined with respect to the outer edge of the input image. Or, even if the form is set correctly, even if the paper is tilted and sent to the scanner due to a problem with the paper feed mechanism of the scanner, the form image is also similar to the outer edge of the input image. It will be inclined.
In such a case, the image inclination correction apparatus of the present invention corrects the output form image so that there is no inclination with respect to the input image by rotating the form image with respect to the input image, for example, around the point P. In addition, the area outside the output form image can be removed, and an image composed only of the area of width W and height H corresponding to the form part can be cut out as shown in FIG. It is what you want to do.

次に、図2を用いて、本実施例の傾き補正装置の構成を説明する。この例の傾き補正装置は、紙送り機構を有するスキャナ等の帳票画像入力部201と、帳票画像入力部201から1走査ラインごとに入力されたラスタ画像を一時的に格納するラインバッファ202と、ラインバッファ202に一時的に格納されたラスタ画像から上辺,下辺,左辺,右辺の各エッジ点の情報を検出するエッジ位置生成部203と、ラインバッファ202に一時的に格納されたラスタ画像を順次格納する画像保存メモリ204と、エッジ位置生成部203で生成されたエッジ点の情報(エッジ位置)を保存するエッジ位置保存メモリ210と、エッジ位置保存メモリ210に保存されたエッジ位置から各辺を構成する可能性がある直線として複数のエッジ直線候補を検出するエッジ候補検出部205と、エッジ候補検出部205で検出された各辺のエッジ直線候補から直線の傾きと、向かい合う2直線(上辺と下辺、左辺と右辺)の距離情報を利用して、帳票のエッジ(外縁)として妥当な組み合わせを検出するエッジ選択部206と、エッジ選択部206で検出された4辺の直線における隣り合う2辺の交点の座標を算出して、帳票のコーナー座標を求めるコーナー検出部207と、コーナー検出部207で検出されたコーナー座標から画像補正時に必要となるパラメータを算出するパラメータ生成部208と、パラメータ生成部208で算出されたパラメータを使用して、画像保存メモリ204に保存されている画像を補正して、帳票の傾き補正と、帳票の外側部分を取り除く処理とを行う画像補正部209とから概略構成されている。   Next, the configuration of the tilt correction apparatus according to the present embodiment will be described with reference to FIG. The tilt correction apparatus of this example includes a form image input unit 201 such as a scanner having a paper feed mechanism, a line buffer 202 that temporarily stores a raster image input for each scanning line from the form image input unit 201, and An edge position generation unit 203 that detects information on edge points of the upper side, the lower side, the left side, and the right side from the raster image temporarily stored in the line buffer 202, and the raster image temporarily stored in the line buffer 202 are sequentially An image storage memory 204 to store, an edge position storage memory 210 to store edge point information (edge position) generated by the edge position generation unit 203, and each edge from the edge positions stored in the edge position storage memory 210. An edge candidate detection unit 205 that detects a plurality of edge straight line candidates as straight lines that may be configured, and an edge candidate detection unit 20 Edge that detects a reasonable combination as the edge of the form (outer edge) using the straight line slope from the edge straight line candidates detected in step 2 and the distance information of the two opposite straight lines (upper and lower sides, left and right sides) The selection unit 206, the corner detection unit 207 for calculating the corner coordinates of the form by calculating the coordinates of the intersection of two adjacent sides in the straight line of the four sides detected by the edge selection unit 206, and detected by the corner detection unit 207 A parameter generation unit 208 that calculates parameters necessary for image correction from the corner coordinates, and a parameter calculated by the parameter generation unit 208 to correct the image stored in the image storage memory 204 to generate a form And an image correction unit 209 that performs processing for removing the outer portion of the form.

以下、図2に示されたこの例の傾き補正装置における各構成要素の機能について詳細に説明する。
帳票画像入力部201には、紙送り機構を有するスキャナから、処理対象となる帳票画像がラスタ画像として1走査ラインごとに順次入力される。なおこの際、帳票の外側部分の輝度は、帳票面中の文字や画像等が存在しない背景の部分の輝度よりも低く取得されているものとする。
ラインバッファ202は、帳票画像入力部201によって入力された画像データを1走査ラインごとに一時的に格納する。
Hereinafter, the function of each component in the tilt correction apparatus of this example shown in FIG. 2 will be described in detail.
A form image to be processed is sequentially input to the form image input unit 201 as a raster image for each scanning line from a scanner having a paper feed mechanism. In this case, it is assumed that the luminance of the outer portion of the form is acquired lower than the luminance of the background portion where no characters or images exist in the form surface.
The line buffer 202 temporarily stores the image data input by the form image input unit 201 for each scanning line.

エッジ位置生成部203は、ラインバッファ202に格納されているラインごとの画像データから、上辺・下辺エッジ位置生成部203a によって、上辺, 下辺のエッジ位置を生成し、左辺・右辺エッジ位置生成部203b によって、左辺,右辺のエッジ位置を生成して、エッジ位置保存メモリ210に保存する。この際、エッジ位置生成部203は、図6の書式でエッジ位置を生成する。なお、上辺・下辺エッジ位置生成部203a と左辺・右辺エッジ位置生成部203b の具体的動作については、さらに後述する。
画像保存メモリ204は、ラインバッファ202に一時的に格納されている画像データに基づいて、エッジ位置生成部203で各辺のエッジ位置が生成されたのち、ラインバッファ202から出力される画像データを順次格納する。
The edge position generation unit 203 generates the edge positions of the upper side and the lower side from the image data for each line stored in the line buffer 202 by the upper side / lower side edge position generation unit 203a, and the left side / right side edge position generation unit 203b. Thus, the edge positions of the left side and the right side are generated and stored in the edge position storage memory 210. At this time, the edge position generation unit 203 generates an edge position in the format of FIG. Specific operations of the upper side / lower side edge position generation unit 203a and the left side / right side edge position generation unit 203b will be described later.
The image storage memory 204 stores image data output from the line buffer 202 after the edge position generation unit 203 generates the edge position of each side based on the image data temporarily stored in the line buffer 202. Store sequentially.

エッジ候補検出部205では、エッジ位置保存メモリ210から読み出された上辺,下辺,左辺,右辺の各エッジ位置の情報から、既知のHough変換によって各辺のエッジ直線の候補を検出する。各辺のエッジ直線は、この時点では一意に決定されず、直線性が認められるエッジ直線が複数存在する場合には、それらすべてを候補として生成される。なお、Hough変換の方法についてはさらに後述する。検出された複数のエッジ直線は、エッジ選択部206に出力される。
エッジ選択部206では、エッジ候補検出部205で検出されたエッジ直線から、隣りあう2辺がなす角度が同等(ほぼ直角)な直線の組み合わせを4辺を構成する直線として複数選択し、それらのうち、上辺と下辺の距離と、左辺と右辺の距離の和が最大となる組み合わせを、帳票のエッジ(外縁)として妥当な組み合わせとして選択して、コーナー検出部207に出力する。
The edge candidate detection unit 205 detects edge straight line candidates of each side by known Hough transformation from the information on the edge positions of the upper side, lower side, left side, and right side read from the edge position storage memory 210. The edge straight lines of each side are not uniquely determined at this time, and when there are a plurality of edge straight lines with recognized linearity, all of them are generated as candidates. The Hough conversion method will be described later. The detected plurality of edge straight lines are output to the edge selection unit 206.
The edge selection unit 206 selects a plurality of combinations of straight lines having the same angle (almost right angle) formed by two adjacent sides from the edge straight lines detected by the edge candidate detection unit 205 as straight lines constituting four sides, and Among them, a combination that maximizes the sum of the distance between the upper side and the lower side and the distance between the left side and the right side is selected as an appropriate combination as an edge (outer edge) of the form, and is output to the corner detection unit 207.

コーナー検出部207では、エッジ選択部206から出力された各辺のエッジ直線を利用して、それぞれの直線の交点を求めることによって、帳票のコーナー座標を検出する。検出されたコーナー座標は、パラメータ生成部208に出力される。
パラメータ生成部208では、コーナー検出部207からのコーナー座標の出力によって、画像補正時に必要となるパラメータを生成して、画像補正部209に出力する。
画像補正部209では、パラメータ生成部208で生成されたパラメータを用いて、画像保存メモリ204に保存されていた画像データを補正して、補正された帳票画像を出力する。
The corner detection unit 207 detects the corner coordinates of the form by using the edge straight line of each side output from the edge selection unit 206 to obtain the intersection of each straight line. The detected corner coordinates are output to the parameter generation unit 208.
The parameter generation unit 208 generates parameters necessary for image correction based on the output of the corner coordinates from the corner detection unit 207, and outputs the parameters to the image correction unit 209.
The image correction unit 209 corrects the image data stored in the image storage memory 204 using the parameters generated by the parameter generation unit 208, and outputs a corrected form image.

次に、図2乃至図11を用いて、この例の傾き補正装置の動作を順次説明する。
まず、図3のフローチャートに示すように、画像入力部201からk番目の1ライン分の画像データが入力されて、ラインバッファ202に一時的に格納される(ステップ301)。
次に、エッジ位置生成部203では、ラインバッファ202に格納された1ライン分の画像データから、上辺,下辺のエッジ位置を生成し(ステップ302)、左辺,右辺のエッジ位置を生成する(ステップ303)。
Next, the operation of the tilt correction apparatus of this example will be sequentially described with reference to FIGS.
First, as shown in the flowchart of FIG. 3, image data for the k-th one line is input from the image input unit 201 and temporarily stored in the line buffer 202 (step 301).
Next, the edge position generation unit 203 generates the edge positions of the upper side and the lower side from the image data for one line stored in the line buffer 202 (step 302), and generates the edge positions of the left side and the right side (step 302). 303).

次に、図2に示す上辺・下辺エッジ位置生成部203a の動作を、図4のフローチャートと、図5,図6,図7とを用いて説明する。
入力されたk番目のラインの画像データは、主走査方向に s[pixel] 間隔でM箇の範囲に分割され、各範囲を以降の処理単位として処理が行われる(ステップ401)。
次に、図5に示すように、範囲i(0≦i≦M)の中から、輝度T以上となる白画素数Ai が検出される(ステップ402)。
Next, the operation of the upper side / lower side edge position generation unit 203a shown in FIG. 2 will be described with reference to the flowchart of FIG. 4 and FIGS.
The input image data of the kth line is divided into M ranges at s [pixel] intervals in the main scanning direction, and processing is performed using each range as a subsequent processing unit (step 401).
Next, as shown in FIG. 5, the number of white pixels Ai having a luminance T or more is detected from the range i (0 ≦ i ≦ M) (step 402).

次に、範囲iの中で検出された白画素数Ai がs/2以上であれば、ステップ404に進み、s/2未満であればステップ402に戻る(ステップ403)ことによって、順次次の範囲の白画素数が検出される。
次に、ステップ404で、最初に範囲iにおいてステップ403の条件(Ai ≧s/2)を満たした場合であれば、図6の表601中の上辺エッジ位置と範囲iを示す箇所に現在の画像データの番号(K)が設定され、そうでなければ、図6の表601中の下辺エッジ位置と範囲iを示す箇所に、現在の画像データの番号(K)が設定される(ステップ405)。表601中においては、X座標が範囲iの中点に、上辺と下辺のエッジ位置のY座標として、Kが設定されたことが示されている。
Next, if the number of white pixels Ai detected in the range i is s / 2 or more, the process proceeds to step 404, and if it is less than s / 2, the process returns to step 402 (step 403), thereby sequentially The number of white pixels in the range is detected.
Next, in step 404, if the range i first satisfies the condition of step 403 (Ai ≥ s / 2) in the range i, the current edge of the table 601 in FIG. If the number (K) of the image data is set, otherwise, the number (K) of the current image data is set at the location indicating the lower edge position and the range i in the table 601 of FIG. 6 (step 405). ). Table 601 indicates that K is set as the Y coordinate of the edge positions of the upper side and the lower side at the X point of the range i.

その後、ステップ407に示すように、ステップ404,405,406の処理が全範囲について終了していない場合には、ステップ402に戻り、全範囲について終了した場合には、処理を終了する。
このような処理を全ラインについて行うことによって、帳票の上辺および下辺のエッジ位置が生成される。
Thereafter, as shown in step 407, when the processing of steps 404, 405, and 406 is not completed for the entire range, the process returns to step 402, and when completed for the entire range, the processing is terminated.
By performing such processing for all lines, the edge positions of the upper side and the lower side of the form are generated.

図7は、上辺のエッジ位置と下辺のエッジ位置の検出を説明するものであって、最初、帳票画像を1走査ライン単位で順次、ラインバッファに一時的に格納したのち、ラインバッファに一時的に格納された画像を主走査方向に所定の閾値、例えば s[pixel] ごとに、範囲1,範囲2,…,範囲Mのように、複数の範囲に等間隔に分割し、各範囲内に存在する白画素数が所定の閾値、例えば s/2[pixel] 以上となる最初のライン位置において、その範囲の中心の位置に、帳票の上辺のエッジ位置の情報(●)を生成し、各範囲内に存在する白画素数が所定の閾値 s/2[pixel] 以上となる最後のライン位置において、その範囲の中心の位置に、帳票の下辺のエッジ位置の情報(▼)を生成することが示されている。   FIG. 7 illustrates the detection of the upper edge position and the lower edge position. First, the form image is temporarily stored in the line buffer sequentially in units of one scanning line, and then temporarily stored in the line buffer. Is divided into a plurality of ranges at equal intervals, such as range 1, range 2,..., Range M for each predetermined threshold in the main scanning direction, for example, s [pixel], and within each range. At the first line position where the number of existing white pixels is greater than or equal to a predetermined threshold, for example, s / 2 [pixel], information on the edge position of the upper side of the form (●) is generated at the center position of the range. At the last line position where the number of white pixels existing in the range is equal to or greater than the predetermined threshold s / 2 [pixel], information (▼) on the edge position of the lower side of the form is generated at the center position of the range. It is shown.

特許文献1に示された技術においては、ラインごとに、黒画素から白画素に変わる変化点と、白画素から黒画素に変わる変化点を求めるため、帳票の傾きが小さくなるに従って、上辺および下辺ではエッジ点の検出数が減少し、極端な場合、傾きがないときは検出されるエッジ点の数は「0」である。
これに対して、本発明の場合は、帳票を主走査方向に複数の範囲に分割し、各範囲内に存在する白画素を検出して、検出された白画素数が所定の閾値を超えているとき、その範囲内の中点をエッジ点として検出するので、傾きの大小にかかわらず検出されるエッジ点の位置と、エッジ点の数は同じである。従って本発明の場合は、帳票画像の傾きが小さい場合でも、帳票画像の上辺および下辺のエッジ点を精度良く検出することができる。
In the technique disclosed in Patent Document 1, for each line, a change point that changes from a black pixel to a white pixel and a change point that changes from a white pixel to a black pixel are obtained. Then, the number of detected edge points decreases, and in an extreme case, when there is no inclination, the number of detected edge points is “0”.
On the other hand, in the case of the present invention, the form is divided into a plurality of ranges in the main scanning direction, white pixels existing in each range are detected, and the number of detected white pixels exceeds a predetermined threshold value. Since the midpoint within the range is detected as an edge point, the position of the detected edge point and the number of edge points are the same regardless of the magnitude of the inclination. Therefore, in the case of the present invention, even when the inclination of the form image is small, it is possible to accurately detect the upper and lower edge points of the form image.

次に、左辺・右辺エッジ位置生成部203b の動作を、図8のフローチャートと、図6とを用いて説明する。
まず、入力されたk番目のラインの画像データを左から探索して、最初に白画素が w[pixel] 以上連続した最初の白画素位置Lを検出する(ステップ801)。ここで w[pixel] は、帳票幅内に主走査方向に存在する画素数である。
Lが存在する場合は、ステップ803へ進み、Lが存在しない場合は、処理を終了する(ステップ802)。
Next, the operation of the left / right edge position generation unit 203b will be described with reference to the flowchart of FIG. 8 and FIG.
First, the input image data of the k-th line is searched from the left, and the first white pixel position L in which white pixels continue for w [pixel] or more is detected first (step 801). Here, w [pixel] is the number of pixels existing in the main scanning direction within the form width.
If L exists, the process proceeds to step 803, and if L does not exist, the process ends (step 802).

ステップ803では、入力されたK番目のラインの画像データを左から探索して、最後に白画素が w[pixel] 以上連続した最後の白画素位置Rを検出する。
Rが存在する場合は、ステップ805へ進み、Rが存在しない場合は、処理を終了する(ステップ804)。
ステップ805では、位置Lとそのときの画像データの番号とを左辺のエッジ位置として、図6の表602中の現在の画像データの番号に対応した箇所に保存して、ステップ806に進む。
In step 803, the input image data of the Kth line is searched from the left, and finally the last white pixel position R in which white pixels continue for w [pixel] or more is detected.
If R exists, the process proceeds to step 805, and if R does not exist, the process ends (step 804).
In step 805, the position L and the number of the image data at that time are stored as the left edge position in the position corresponding to the current image data number in the table 602 of FIG. 6, and the process proceeds to step 806.

ステップ806では、位置Rとそのときの画像データの番号を右辺のエッジ位置として、図6の表602中の現在の画像データの番号に対応した箇所に保存する。
このような処理を画像データの全ラインについて行うことによって、左辺および右辺のエッジ位置が生成される。
In step 806, the position R and the number of the image data at that time are stored as the right edge position in a location corresponding to the current image data number in the table 602 of FIG.
By performing such processing for all lines of the image data, the edge positions of the left side and the right side are generated.

次に、エッジ候補検出部205では、エッジ位置保存メモリ210に保存された各辺のエッジ位置から、図9に示されたフローチャートに従って、各辺のエッジ直線の候補を検出する(ステップ305)。各辺のエッジ直線は、この時点では一意に決定されず、直線性が認められるエッジ直線が多数存在する場合には、それらすべてがエッジ直線候補として生成される。エッジ直線候補となるべき直線の検出には、既知の技術であるHough変換(非特許文献1参照)を用いる。
以下、図9のフローチャートと図10とを用いて、直線検出の動作を説明する。
Next, the edge candidate detection unit 205 detects edge straight line candidates for each side from the edge positions stored in the edge position storage memory 210 according to the flowchart shown in FIG. 9 (step 305). The edge straight lines of each side are not uniquely determined at this time, and when there are a large number of edge straight lines with recognized linearity, all of them are generated as edge straight line candidates. A Hough transform (see Non-Patent Document 1), which is a known technique, is used to detect a straight line that should be an edge straight line candidate.
Hereinafter, the straight line detection operation will be described with reference to the flowchart of FIG. 9 and FIG.

まず、上辺のエッジ位置の情報をHough空間に投票する(ステップ901)。ここで使用するHough空間は、次に示す直線の式(1)
ρ=Xcosθ+Ysinθ ・・・(1)
から変換される(ρ,θ)平面である。ここで、ρは座標の原点(X=0,Y=0)から直線までの距離、θは原点から直線に下ろした垂線とX軸とのなす角である。
First, information on the edge position of the upper side is voted on the Hough space (step 901). The Hough space used here is a straight line expression (1) shown below.
ρ = X cos θ + Y sin θ (1)
(Ρ, θ) plane transformed from. Here, ρ is the distance from the origin of the coordinates (X = 0, Y = 0) to the straight line, and θ is the angle formed between the perpendicular drawn from the origin to the straight line and the X axis.

次に、Hough空間内の投票数P以上となるすべての位置を、上辺のエッジ直線候補として生成する(ステップ902)。
さらに下辺のエッジ位置の情報をHough空間に投票し(ステップ903)、Hough空間内の投票数P以上となるすべての位置を、下辺のエッジ直線候補として生成する(ステップ904)。
Next, all positions in the Hough space that are equal to or greater than the number of votes P are generated as edge straight line candidates on the upper side (step 902).
Further, the information on the edge position of the lower side is voted on the Hough space (step 903), and all positions in the Hough space that are equal to or larger than the number of votes P are generated as the edge straight line candidates on the lower side (step 904).

次に、上辺のエッジ位置の情報と下辺のエッジ位置の情報とから、正しい左辺エッジ位置情報を検出する(ステップ905)。
これは、図10において1001に示すように、左辺のエッジ位置情報には、下辺に属すべき不正な左辺エッジ位置情報が含まれているためである。
これを除外するために、図10の1002に示すように、上辺のエッジ位置のうちでY座標が最大となるエッジ点と、下辺のエッジ位置のうちでY座標が最小になるエッジ点とをそれぞれ基準点として、マージンを付加したエッジ位置1003と1004の範囲内にあるエッジ位置のみを、正しい左辺エッジ位置として検出する。
そして、正しい左辺エッジ位置がHough空間に投票される(ステップ906)ことによって、Hough空間内の投票数P以上となる位置がすべて求められ、これらの位置が左辺のエッジ直線候補として生成される(ステップ907)。
Next, correct left side edge position information is detected from the information on the edge position on the upper side and the information on the edge position on the lower side (step 905).
This is because, as indicated by 1001 in FIG. 10, the edge position information on the left side includes incorrect left side edge position information that should belong to the lower side.
In order to exclude this, as indicated by 1002 in FIG. 10, an edge point having the maximum Y coordinate among the edge positions of the upper side and an edge point having the minimum Y coordinate among the edge positions of the lower side are represented. Only the edge positions within the range of the edge positions 1003 and 1004 with the margin added are detected as the correct left side edge positions as the reference points.
Then, the correct left side edge position is voted on the Hough space (step 906), and all positions where the number of votes in the Hough space is equal to or greater than P are obtained, and these positions are generated as edge straight line candidates on the left side ( Step 907).

次に、左辺の場合と同様に、上辺のエッジ位置と下辺のエッジ位置の情報とから、正しい右辺のエッジ位置情報を検出する(ステップ908)。
そして、正しい右辺エッジ位置がHough空間に投票される(ステップ909)ことによって、Hough空間内の投票数P以上となる位置がすべて求められ、これらの位置が右辺のエッジ直線候補として生成される(ステップ910)。
このようにして、各辺のエッジ直線の候補が生成される。
Next, as in the case of the left side, the right side edge position information is detected from the information of the upper side edge position and the lower side edge position (step 908).
Then, the correct right-side edge position is voted on the Hough space (step 909), and all positions where the number of votes in the Hough space is equal to or greater than P are obtained, and these positions are generated as edge straight line candidates on the right side ( Step 910).
In this way, edge straight line candidates for each side are generated.

次に、エッジ選択部206では、エッジ候補検出部205における各辺のエッジ直線候補の検出(ステップ305)結果から、隣りあう2辺が交わる角度が同等(ほぼ直角)な4辺によって帳票のエッジ直線の組み合わせが選択される(ステップ306)。
そして選択されたすべての帳票のエッジ直線の組み合わせにおいて、上辺と下辺の距離と、左辺と右辺の距離の和が最大となる4辺の組み合わせによって、妥当性のある4辺の組み合わせを検出し(ステップ307)、妥当性のある組み合わせが存在するときは、帳票コーナーの検出に進む(ステップ308)が、妥当性のある組み合わせが存在しないときは、エラー処理を行って(ステップ311)、処理を終了する。
Next, in the edge selection unit 206, the edge of the form is detected by the four sides having the same angle (substantially a right angle) at which the two adjacent sides meet from the result of the edge straight line candidate detection (step 305) in the edge candidate detection unit 205. A combination of straight lines is selected (step 306).
Then, in the combination of edge straight lines of all the selected forms, a combination of four sides having a validity is detected by the combination of the four sides that maximizes the distance between the upper side and the lower side and the distance between the left side and the right side ( Step 307) When there is a valid combination, the process proceeds to detection of a form corner (Step 308). When there is no valid combination, error processing is performed (Step 311), and the process is performed. finish.

以下、エッジ選択部206における、エッジ直線の組み合わせの選択方法を、図11に示すフローチャートと図12とを用いて説明する。
まず、変数Maxを設け、これを0で初期化する(ステップ1101)。次に、角度が同等な(誤差±0.5°程度)、4辺の組み合わせをすべて検出する(ステップ1102)。ただし、左辺と右辺は上辺と下辺に対して直角であるため、90°から傾き角度を差し引いて調整する。
Hereinafter, a method for selecting a combination of edge straight lines in the edge selection unit 206 will be described with reference to the flowchart shown in FIG. 11 and FIG.
First, a variable Max is provided and initialized with 0 (step 1101). Next, all combinations of four sides with the same angle (error ± 0.5 °) are detected (step 1102). However, since the left side and the right side are perpendicular to the upper side and the lower side, adjustment is performed by subtracting the inclination angle from 90 °.

次に、4辺の組み合わせが存在するか否かをみて(ステップ1103)、組み合わせが存在しない場合は、エラー処理を行って(ステップ1109)、処理を終了する。
4辺の組み合わせが存在する場合は、図12の1201に示すように、上辺と下辺の距離D1 を算出し(ステップ1104)、同様に、左辺と右辺の距離D2 を算出する(ステップ1105 )。
ここで距離D1 ,D2 は、図12の1601に示すように、ベタ塗り領域があるときは、ベタ塗り領域を含む値をD1 とし、ベタ塗り領域を含まない値をD2 として距離を算出するものとする。
Next, it is checked whether or not a combination of four sides exists (step 1103). If there is no combination, error processing is performed (step 1109), and the process is terminated.
If there is a combination of four sides, as shown at 1201 in FIG. 12, the distance D1 between the upper side and the lower side is calculated (step 1104), and similarly, the distance D2 between the left side and the right side is calculated (step 1105).
Here, the distances D1 and D2 are calculated as shown by 1601 in FIG. 12, when there is a solid area, the value including the solid area is D1, and the value not including the solid area is D2. And

次に、変数Maxと(D1 +D2 )の値を比較して(ステップ1106)、Maxの値が小さければ、このときの4辺の組み合わせの情報を保持して、変数Maxに(D1 +D2 )の値を代入し(ステップ1107)、変数Maxの値が小さくなければ、ステップ1108へ進む。
ステップ1108では、すべての組み合わせについての処理が終了したか否かをみて、終了していなければ、ステップ1104へ戻り、すべての組み合わせが終了していれば処理を終了する。
これによって、図12の1202に示すように、ベタ塗り領域を含めた帳票の外縁として、各辺のエッジ直線が選択される。
Next, the variable Max is compared with the value of (D1 + D2) (step 1106). If the value of Max is small, information on the combination of the four sides at this time is held, and the variable Max is set to (D1 + D2). A value is substituted (step 1107), and if the value of the variable Max is not small, the process proceeds to step 1108.
In step 1108, it is determined whether or not the processing for all combinations has been completed. If not completed, the process returns to step 1104, and if all the combinations have been completed, the process is terminated.
As a result, as shown at 1202 in FIG. 12, an edge straight line on each side is selected as the outer edge of the form including the solid area.

次に、コーナー検出部207では、エッジ選択部206で選択された各辺のエッジ直線を用いて、それぞれの直線の交点を求めることによって、図13に示すように、帳票画像の左上,右上,左下,右下の4点のコーナー座標を検出する(ステップ308)。
この際、本発明の傾き補正装置では、各辺のエッジ直線の交点としてコーナー座標を検出するので、エッジ直線の一部が欠けている場合でも、エッジ直線の延長の交点としてコーナー座標を求めることができる。従って、帳票コーナーが折れ曲がっていたり、斜めまたは丸くカットされていた場合でも、正しく帳票画像の外縁を検出することができる。
Next, the corner detection unit 207 uses the edge straight lines of the respective sides selected by the edge selection unit 206 to obtain the intersections of the respective straight lines, and as shown in FIG. The corner coordinates of the four points on the lower left and lower right are detected (step 308).
At this time, since the inclination correction device of the present invention detects the corner coordinates as the intersection of the edge straight lines of each side, the corner coordinates are obtained as the intersection of the extension of the edge straight lines even when a part of the edge straight line is missing. Can do. Therefore, the outer edge of the form image can be correctly detected even when the form corner is bent or cut obliquely or rounded.

次に、パラメータ生成部208では、コーナー検出部207で検出された4点のコーナー座標を基に所定の計算を行って、画像補正部209で使用するパラメータを生成する(ステップ309)。
この際、画像補正部209で使用する変換式は、入力画像座標をX、出力画像座標をU、変換行列をAとすると、次の式(2)で表される。
X=A−1U ・・・(2)
(2)式における入力画像座標X、出力画像座標U、変換行列Aは次のようなものである。
Next, the parameter generation unit 208 performs a predetermined calculation based on the four corner coordinates detected by the corner detection unit 207 to generate parameters used by the image correction unit 209 (step 309).
At this time, the conversion formula used by the image correction unit 209 is expressed by the following formula (2), where X is the input image coordinate, U is the output image coordinate, and A is the conversion matrix.
X = A −1 U (2)
The input image coordinate X, the output image coordinate U, and the transformation matrix A in equation (2) are as follows.

Figure 0004784500
mx : x方向の移動量, sx : x方向の倍率, cx : 回転中心の x座標
my : y方向の移動量, sy : y方向の倍率, cx : 回転中心の y座標
θ : 回転角度
Figure 0004784500
mx: amount of movement in x direction, sx: magnification in x direction, cx: x coordinate of rotation center
my: displacement in y direction, sy: magnification in y direction, cx: y coordinate of rotation center θ: rotation angle

上記各式において、xは主走査方向の座標を示し、yは副走査方向の座標を示すものとする。変換行列Aにおいて、第1項は、帳票画像の特定位置への移動量を示している。第2項は、帳票画像の拡大,縮小の倍率を示している。第3項は、帳票画像の回転角度を示している。また第4項は、回転中心をx,y座標の原点(0,0)に合わせることを示している。
帳票画像の拡大,縮小は、スキャナの特性によって、帳票画像のx方向とy方向に伸縮が生じるのを補償するためであって、伸縮量が十分少ない場合は、倍率(sx,sy)=(1,1)とする。
この場合、変換行列Aの逆行列A−1は、次の式(3)で表される。
In the above equations, x represents the coordinate in the main scanning direction, and y represents the coordinate in the sub scanning direction. In the conversion matrix A, the first term indicates the amount of movement of the form image to a specific position. The second term indicates the magnification of the form image. The third term indicates the rotation angle of the form image. The fourth term indicates that the center of rotation is aligned with the origin (0, 0) of the x and y coordinates.
The enlargement / reduction of the form image is to compensate for the expansion / contraction of the form image in the x direction and the y direction due to the characteristics of the scanner. When the expansion / contraction amount is sufficiently small, the magnification (sx, sy) = ( 1,1).
In this case, the inverse matrix A −1 of the transformation matrix A is expressed by the following equation (3).

Figure 0004784500
Figure 0004784500

従って、パラメータ生成部208では、(2)式 ,(3)式におけるmx,my,sx,sy,cx,cy,θから、6個のパラメータa11,a12,a13,a21,a22,a23を求めることになる。
一例として、図1に示すように帳票の傾きを補正し、帳票の外側の不要な部分を除去する場合、回転角度θはエッジ選択部206で検出された4辺の直線の傾きから求めることが可能であり、回転中心(cx,cy)を左上コーナー座標位置とすると、移動量(mx,my)=(0,0)となり、倍率(sx,sy)=(1,1)として、パラメータa11,a12,a13,a21,a22,a23が算出される。
Therefore, in the parameter generation unit 208, the six parameters a 11 , a 12 , a 13 , a 21 , a from the mx, my, sx, sy, cx, cy, θ in the expressions (2) and (3). 22, thereby obtaining the a 23.
As an example, when the inclination of the form is corrected as shown in FIG. 1 and unnecessary portions outside the form are removed, the rotation angle θ can be obtained from the inclinations of the four-side straight lines detected by the edge selection unit 206. If the center of rotation (cx, cy) is the upper left corner coordinate position, the movement amount (mx, my) = (0, 0), and the magnification (sx, sy) = (1, 1) and the parameter a 11, a 12, a 13, a 21, a 22, a 23 is calculated.

最後に、画像補正部209では、パラメータ生成部208で生成されたパラメータを用いて、帳票の傾きを補正し、帳票の外側の不要な部分を除去する補正を行う(ステップ310)。
図1に示されたように補正を行う場合、式(2)を用いて、出力画像座標Uの次の(4)式に示す範囲に対して出力画像が生成される。
この際、出力画像の各画素の値に対して、線形補間法等の既知の補間技術を適用して変換を行うことによって、滑らかに補正を行うことが可能である。
0≦u≦W, 0≦v≦H ・・・(4)
ここで、出力画像U=(u,v)であって、uはX方向の出力座標、vはY方向の出力座標である。また、(4)式のWは帳票の幅、Hは帳票の高さである。
これによって、帳票画像の外側の不要な領域が除去される。なお、帳票画像の傾き補正の処理と、帳票画像の外側の不要な領域の除去の処理とは、画像補正部209において並行して行われるものである。
Finally, the image correction unit 209 corrects the inclination of the form by using the parameters generated by the parameter generation unit 208, and performs correction to remove unnecessary portions outside the form (step 310).
When correction is performed as shown in FIG. 1, an output image is generated for a range indicated by the following expression (4) of the output image coordinates U using Expression (2).
At this time, the value of each pixel of the output image can be smoothly corrected by performing conversion by applying a known interpolation technique such as a linear interpolation method.
0 ≦ u ≦ W, 0 ≦ v ≦ H (4)
Here, the output image U = (u, v), u is the output coordinate in the X direction, and v is the output coordinate in the Y direction. In Equation (4), W is the width of the form, and H is the height of the form.
Thereby, an unnecessary area outside the form image is removed. Note that the process of correcting the inclination of the form image and the process of removing an unnecessary area outside the form image are performed in parallel in the image correcting unit 209.

以下、入力画像から出力画像を算出する方法について、図14を用いてさらに詳細に説明する。
いま、図14(a) に示す座標系x,yにおける入力画像上において、帳票がP,Q,R,Sで示す領域に存在するとき、図14 (b)に示す座標系u,vにおいて、帳票を示す出力画像がA,B,C,Dで示す領域を占めるものとする。
上述の式(4)は、A,B,C,Dで囲まれた領域を表すものであり、この領域は、帳票の外側を除いた帳票部分となる。すなわち、出力画像は、横幅がW、縦幅(高さ)がHのサイズを持つものとして生成される。なお、横幅W,縦幅Hは、四つの帳票コーナーから算出することができる。
Hereinafter, a method for calculating an output image from an input image will be described in more detail with reference to FIG.
Now, on the input image in the coordinate system x, y shown in FIG. 14 (a), when the form exists in the area indicated by P, Q, R, S, in the coordinate system u, v shown in FIG. 14 (b). Assume that the output image indicating the form occupies the areas indicated by A, B, C, and D.
The above formula (4) represents an area surrounded by A, B, C, and D, and this area is a form part excluding the outside of the form. That is, the output image is generated as having a width of W and a height (height) of H. The horizontal width W and the vertical width H can be calculated from four form corners.

具体的に説明すれば、出力画像の原点の座標A(0,0)に対応する入力画像の座標は、式(2)にAの座標(0,0)を代入することによって算出され、そのときの座標値が図14(a) のP点となる。同様に、B,C,Dについても、式(2)から対応する入力画像中の座標を算出することができ、それぞれ図14(a) のQ,R,Sの各点となる。
このような演算を、出力画像のA,B,C,Dで囲まれた領域に含まれる(W×H)箇のすべての座標に対して行えば、図14(b) に示すように、傾きが補正され、帳票の外側が除去された出力画像(補正画像)が生成される。
More specifically, the coordinates of the input image corresponding to the coordinates A (0,0) of the origin of the output image are calculated by substituting the coordinates (0,0) of A into the equation (2). The coordinate value at that time is point P in FIG. Similarly, for B, C, and D, the coordinates in the corresponding input image can be calculated from Equation (2), and the points are Q, R, and S in FIG.
If such an operation is performed on all coordinates (W × H) included in the region surrounded by A, B, C, and D of the output image, as shown in FIG. An output image (corrected image) in which the inclination is corrected and the outside of the form is removed is generated.

この際、式(2)で算出される入力画像中の座標は、小数点を含む座標になる。一方、入力画像はディジタル画像であって離散化されているので、入力画像の座標は整数となる。従って、出力画像の座標と入力画像の座標とを対応付けようとしても、誤差が生じることになる。
このような誤差を避けるための最も簡単な方法は、小数点以下を四捨五入して、整数化された入力画像側の座標の輝度を出力画像側の輝度とする方法であるが、この場合は、罫線等のエッジ付近がギザギザになる傾向がある。これに対しては、周知の線形補間法等の補間技術を用いて補間することによって、滑らかに補正することが可能になる。
At this time, the coordinates in the input image calculated by Expression (2) are coordinates including a decimal point. On the other hand, since the input image is a digital image and is discretized, the coordinates of the input image are integers. Therefore, an error occurs even if the coordinates of the output image and the coordinates of the input image are to be associated with each other.
The simplest method for avoiding such an error is to round the numbers after the decimal point to make the luminance of the coordinates on the input image side converted to an integer the luminance on the output image side. There is a tendency that the vicinity of the edges becomes jagged. On the other hand, smooth interpolation can be performed by performing interpolation using an interpolation technique such as a known linear interpolation method.

以上、説明したように、この例の傾き補正装置によれば、紙送り機構を有するスキャナ装置において、副走査方向への探索を必要とせず、主走査方向を処理単位としてラスタ画像の入力と同時に処理を行うことができるため、高速処理が可能であるとともに、帳票画像の傾きが小さい場合でも帳票画像のコーナー座標を精度よく求めて、帳票画像の傾きを補正することができる。さらに、安定領域の検出を必要とせず、また、帳票コーナーが折れ曲がっていたり、斜めまたは丸くカットされていた場合や、帳票のエッジの一部に帳票画像の外側との間で輝度の差が少ないベタ塗り領域があるような場合でも正しく帳票画像の外縁を検出することができる。   As described above, according to the tilt correction apparatus of this example, the scanner apparatus having the paper feed mechanism does not require a search in the sub-scanning direction, and at the same time as the input of the raster image with the main scanning direction as a processing unit. Since processing can be performed, high-speed processing is possible, and even when the inclination of the form image is small, the corner coordinates of the form image can be obtained with high accuracy and the inclination of the form image can be corrected. Furthermore, there is no need to detect a stable area, and there is little difference in brightness between the outside of the form image when the form corner is bent or slanted or rounded, or part of the form edge. Even when there is a solid area, the outer edge of the form image can be detected correctly.

図15は、本発明の第2実施例である傾き補正装置の構成を示すブロック図、図16は、本実施例の傾き補正装置における処理手順を示すフローチャートである。
この例の傾き補正装置の構成は、図2に示された第1実施例の傾き補正装置とほぼ同様であるが、エッジ候補検出部205に代えて下辺・左辺・右辺エッジ候補検出部212を備えるとともに、エッジ位置保存メモリ210と下辺・左辺・右辺エッジ候補検出部212との間に別に上辺エッジ候補検出部211を備えた点が異なっている。
また、この例の傾き補正装置の処理手順は、図3に示された第1実施例の傾き補正装置の場合とほぼ同様であるが、ステップ303とステップ304の間にステップ312を有し、ステップ304とステップ306の間に、ステップ305に代えてステップ314を有するとともに、ステップ312とステップ314の間にステップ313を有する点が異なっている。
FIG. 15 is a block diagram showing a configuration of a tilt correction apparatus according to the second embodiment of the present invention, and FIG. 16 is a flowchart showing a processing procedure in the tilt correction apparatus of the present embodiment.
The configuration of the inclination correction apparatus of this example is substantially the same as that of the inclination correction apparatus of the first embodiment shown in FIG. 2, but instead of the edge candidate detection unit 205, a lower side / left side / right side edge candidate detection unit 212 is provided. In addition, a difference is that an upper edge candidate detection unit 211 is additionally provided between the edge position storage memory 210 and the lower side / left side / right side edge candidate detection unit 212.
The processing procedure of the inclination correction apparatus of this example is substantially the same as that of the inclination correction apparatus of the first embodiment shown in FIG. 3, but has step 312 between step 303 and step 304. A difference is that step 314 is provided instead of step 305 between step 304 and step 306, and step 313 is provided between step 312 and step 314.

以下、この例の傾き補正装置の構成において、特に第1実施例の場合と異なる部分について詳細に説明する。
上辺エッジ候補検出部211は、エッジ位置生成部203で生成された上辺のエッジ直線の情報を、エッジ位置保存メモリ210を介して検出して、下辺・左辺・右辺エッジ候補検出部212に伝達する。
下辺・左辺・右辺エッジ候補検出部212では、エッジ位置保存メモリ210に保存された下辺・左辺・右辺のエッジ位置の情報を用いて、、下辺・左辺・右辺のエッジ直線の候補を検出し、上辺エッジ候補検出部211で検出された上辺のエッジ直線の情報とともに、エッジ選択部206に伝達する。
Hereinafter, in the configuration of the inclination correction apparatus of this example, a part different from the case of the first embodiment will be described in detail.
The upper edge candidate detection unit 211 detects the information on the edge straight line of the upper side generated by the edge position generation unit 203 via the edge position storage memory 210 and transmits the information to the lower side / left side / right side edge candidate detection unit 212. .
The lower side / left side / right side edge candidate detection unit 212 detects edge straight line candidates for the lower side, left side, and right side using the information on the edge positions of the lower side, left side, and right side stored in the edge position storage memory 210, and The information is transmitted to the edge selection unit 206 together with information on the edge straight line of the upper side detected by the upper edge candidate detection unit 211.

次に、この例の傾き補正装置の動作について説明する。この例の傾き補正装置における、ステップ301〜310の動作は第1実施例の場合と同様である。以下においては、特に第1実施例の場合と異なる部分について詳細に説明する。
ステップ312においては、帳票の上辺が必ず取得される画像データの番号Gを予め定めておくことによって、入力された画像データの番号(入力ライン数で示される)がGになると、上辺のエッジ直線検出が起動される。なおGの値は、あまり大きな値とする必要はなく、実際上生じ得る傾きに応じて、例えば傾きが10°程度の範囲内の画像データの番号とすればよい。
ステップ313では、現時点で生成されている上辺のエッジ位置を用いて、上辺のエッジ直線候補の検出が先行して行われる。
ステップ314においては、ステップ313による上辺のエッジ直線候補の検出が行われた後に、下辺・左辺・右辺のエッジ直線候補の検出を行う。
Next, the operation of the tilt correction apparatus of this example will be described. The operations of steps 301 to 310 in the tilt correction apparatus of this example are the same as those in the first embodiment. In the following, portions different from the case of the first embodiment will be described in detail.
In step 312, when the number G of the input image data (indicated by the number of input lines) becomes G by predetermining the number G of the image data that the upper side of the form is necessarily acquired, the edge straight line on the upper side. Detection is triggered. Note that the value of G does not need to be a very large value, and may be a number of image data within a range where the inclination is about 10 °, for example, according to the inclination that may actually occur.
In step 313, the upper edge straight line candidate is detected in advance using the upper edge position generated at the present time.
In step 314, after the edge straight line candidate on the upper side in step 313 is detected, the edge straight line candidates on the lower side, the left side, and the right side are detected.

前述の第1実施例の傾き補正装置では、画像データの全ラインに対してエッジ位置を生成してからエッジ直線候補の検出を行っていた。この例の傾き補正装置では、上辺以外のエッジ位置は、画像データのラインがすべて入力されるまで生成が完了しないが、上辺のエッジ位置は、ある程度の画像データのラインが入力された時点で完了していることを利用して、上辺のエッジ位置の生成が完了した時点で、上辺のエッジ直線候補の検出を先行して行うようにしたので、第1実施例の場合と比べて全体の処理時間を短縮することが可能となる。   In the tilt correction apparatus of the first embodiment described above, edge straight line candidates are detected after generating edge positions for all lines of image data. In the tilt correction apparatus of this example, generation of the edge positions other than the upper side is not completed until all the image data lines are input, but the upper edge position is completed when a certain amount of image data lines are input. Since the detection of the upper edge straight line candidate is performed in advance at the time when the generation of the upper edge position is completed, the entire process is compared with the case of the first embodiment. Time can be shortened.

以上、この発明の実施例を図面により詳述してきたが、具体的な構成はこの実施例に限られるものではなく、この発明の要旨を逸脱しない範囲の設計の変更等があってもこの発明に含まれる。例えば、傾き補正を行うべき帳票の大きさや縦横の形状比等は任意である。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and the present invention can be changed even if there is a design change or the like without departing from the gist of the present invention. include. For example, the size of the form to be tilt-corrected, the vertical / horizontal shape ratio, and the like are arbitrary.

この発明は、紙送り機構を有するスキャナ装置として、ファクシミリ装置のように光センサに対して帳票を移動させる形式のものでもよく、または複写機のように帳票を固定して光センサを移動させる形式のものでも利用可能である。   The present invention may be a scanner device having a paper feed mechanism in which a form is moved with respect to an optical sensor as in a facsimile machine, or a form in which a form is fixed and the optical sensor is moved as in a copying machine. Can also be used.

本発明の画像傾き補正装置による帳票画像の補正を概念的に説明する図である。It is a figure which illustrates notionally correction | amendment of the form image by the image inclination correction apparatus of this invention. 本発明の第1実施例である傾き補正装置の構成を示すブロック図である。It is a block diagram which shows the structure of the inclination correction apparatus which is 1st Example of this invention. 同実施例の傾き補正装置における処理手順を示すフローチャートである。It is a flowchart which shows the process sequence in the inclination correction apparatus of the Example. 上辺,下辺エッジ位置生成部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of an upper side and a lower side edge position production | generation part. 上辺,下辺のエッジ位置を生成する際の処理方法を説明する図である。It is a figure explaining the processing method at the time of producing | generating the edge position of an upper side and a lower side. 4辺のエッジ位置の書式を例示する図である。It is a figure which illustrates the format of the edge position of 4 sides. 上辺のエッジ位置と下辺のエッジ位置の検出を説明するための図である。It is a figure for demonstrating the detection of the edge position of an upper side, and the edge position of a lower side. 左辺,右辺エッジ位置生成部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the left side and right side edge position generation part. エッジ候補検出部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of an edge candidate detection part. 不正な左辺エッジ位置と右辺エッジ位置とを除去する方法を説明する図である。It is a figure explaining the method of removing an illegal left side edge position and a right side edge position. エッジ選択部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of an edge selection part. エッジ選択部の選択方法を例示する図である。It is a figure which illustrates the selection method of an edge selection part. コーナー検出部で検出されるコーナー座標を例示する図である。It is a figure which illustrates the corner coordinate detected by a corner detection part. 入力画像から出力画像を算出する方法を説明する図である。It is a figure explaining the method of calculating an output image from an input image. 本発明の第2実施例である傾き補正装置の構成を示すブロック図である。It is a block diagram which shows the structure of the inclination correction apparatus which is 2nd Example of this invention. 同実施例の傾き補正装置の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the inclination correction apparatus of the Example. 帳票エッジ付近のベタ塗りを例示する図である。It is a figure which illustrates solid coating of the form edge vicinity.

符号の説明Explanation of symbols

201 帳票画像入力部(帳票画像入力手段)
202 ラインバッファ
203 エッジ位置生成部(エッジ位置生成手段)
203a 上辺・下辺エッジ位置生成部
203b 左辺・右辺エッジ位置生成部
204 画像保存メモリ
205 エッジ候補検出部(エッジ候補検出手段)
206 エッジ選択部(エッジ選択手段)
207 コーナー検出部(コーナー検出手段)
208 パラメータ生成部(パラメータ生成手段)
209 画像補正部(画像補正手段)
210 エッジ位置保存メモリ
211 上辺エッジ候補検出部(上辺エッジ候補検出手段)
212 下辺・左辺・右辺エッジ候補検出部(下辺・左辺・右辺エッジ候補検出手段)
201 Form image input unit (form image input means)
202 Line buffer 203 Edge position generator (edge position generator)
203a Upper / lower edge position generation unit 203b Left / right edge position generation unit 204 Image storage memory 205 Edge candidate detection unit (edge candidate detection means)
206 Edge selection unit (edge selection means)
207 Corner detection unit (corner detection means)
208 Parameter generator (parameter generator)
209 Image correction unit (image correction means)
210 Edge position storage memory 211 Upper edge candidate detection unit (upper edge candidate detection means)
212 Lower / Left / Right Edge Candidate Detection Unit (Lower / Left / Right Edge Candidate Detection Unit)

Claims (18)

入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成するエッジ位置生成部と、前記生成されたエッジ位置の情報を順次保存するエッジ位置保存メモリと、該エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、前記帳票の4辺のエッジ直線の候補として複数の直線を検出するエッジ候補検出部と、前記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択するエッジ選択部と、前記選択された4辺の組み合わせから帳票のコーナー座標を検出するコーナー検出部と、前記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成するパラメータ生成部と、前記ラインバッファの情報を順次格納して画像として保存する画像保存メモリと、前記生成されたパラメータを用いて前記画像保存メモリに保存された画像を補正する画像補正部とを備えてなると共に、
前記エッジ位置生成部が、
前記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する前記白画素の画素数が前記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行う上辺・下辺エッジ位置生成部と、
画像データをライン方向に探索して、前記白画素が所望の幅以上連続したときは、連続する前記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する前記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行う左辺・右辺エッジ位置生成部とからなり、
生成された4辺のエッジ位置の情報を前記エッジ位置保存メモリに保存するように構成されていることを特徴とする画像傾き補正装置。
Using the image read from the line buffer that temporarily stores the input form image for each scan line, the position of the edge points on the top and bottom sides of the form, and the position of the edge points on the left and right sides of the form Using the edge position generation unit for generating the edge position, the edge position storage memory for sequentially storing the generated edge position information, and the edge position information stored in the edge position storage memory. An edge candidate detection unit that detects a plurality of straight lines as edge straight line candidates, and an edge selection unit that selects a combination of four sides that are valid as a form from a combination of four sides generated from the detected plurality of straight lines And a corner detection unit that detects corner coordinates of the form from the combination of the selected four sides, and is necessary when correcting the form image using the detected corner coordinates. A parameter generation unit that generates parameters to be used, an image storage memory that sequentially stores the information of the line buffer and stores it as an image, and corrects the image stored in the image storage memory using the generated parameter together comprising an image correcting unit,
The edge position generation unit
First, the image data stored in the line buffer is divided into a plurality of ranges at equal intervals, and the number of white pixels defined in each range and defined as a predetermined luminance or higher is equal to or higher than a desired threshold. Is detected for each line, and the number of white pixels existing in each range is greater than or equal to the desired threshold value. When it is finally detected, the upper side and lower side edge position generation unit for performing processing for setting the image data number for each line with the middle point of the range as the position of the lower side edge point,
When the image data is searched in the line direction and the white pixels continue for a desired width or more, the first pixel position of the continuous white pixels is detected as the position of the left edge point, and the white pixels of the continuous white pixels are detected. It consists of a left side / right side edge position generation unit that performs processing for detecting the last pixel position as the position of the right side edge point for each line,
An image inclination correction apparatus configured to store the generated edge position information of the four sides in the edge position storage memory .
入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成するエッジ位置生成部と、前記生成されたエッジ位置の情報を順次保存するエッジ位置保存メモリと、該エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、前記帳票の上辺をなすエッジ直線の候補として複数の直線を検出する上辺エッジ候補検出部と、前記エッジ位置保存メモリに保存されたエッジ位置の情報と、前記上辺エッジ候補検出部で検出された上辺のエッジ直線の情報とから、帳票の下辺,左辺,右辺をなすエッジ直線の候補として複数の直線を検出する下辺,左辺,右辺エッジ候補検出部と、前記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択するエッジ選択部と、前記選択された4辺の組み合わせから帳票のコーナー座標を検出するコーナー検出部と、前記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成するパラメータ生成部と、前記ラインバッファの情報を順次格納して画像として保存する画像保存メモリと、前記生成されたパラメータを用いて前記画像保存メモリに保存された画像を補正する画像補正部とを備えてなると共に、
前記エッジ位置生成部が、
前記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する前記白画素の画素数が前記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行う上辺・下辺エッジ位置生成部と、
画像データをライン方向に探索して、前記白画素が所望の幅以上連続したときは、連続する前記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する前記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行う左辺・右辺エッジ位置生成部とからなり、
生成された4辺のエッジ位置の情報を前記エッジ位置保存メモリに保存するように構成されていることを特徴とする画像傾き補正装置。
Using the image read from the line buffer that temporarily stores the input form image for each scan line, the position of the edge points on the top and bottom sides of the form, and the position of the edge points on the left and right sides of the form An edge position generation unit that generates the edge position storage memory that sequentially stores the generated edge position information, and the edge position information stored in the edge position storage memory. An upper edge candidate detection unit that detects a plurality of straight lines as edge straight line candidates, edge position information stored in the edge position storage memory, and an upper edge straight line detected by the upper edge candidate detection unit. From the information, a lower side, left side, right side edge candidate detecting unit for detecting a plurality of straight lines as edge straight line candidates forming the lower side, left side, and right side of the form, and the detected complex An edge selection unit that selects a combination of four sides that is appropriate as a form from a combination of four sides generated from the straight line, a corner detection unit that detects corner coordinates of the form from the selected combination of four sides, A parameter generation unit that generates parameters necessary for correcting the form image using the detected corner coordinates, an image storage memory that sequentially stores the information of the line buffer and saves it as an image, and the generated parameters And an image correction unit that corrects an image stored in the image storage memory .
The edge position generation unit
First, the image data stored in the line buffer is divided into a plurality of ranges at equal intervals, and the number of white pixels defined in each range and defined as a predetermined luminance or higher is equal to or higher than a desired threshold. Is detected for each line, and the number of white pixels existing in each range is greater than or equal to the desired threshold value. When it is finally detected, the upper side and lower side edge position generation unit for performing processing for setting the image data number for each line with the middle point of the range as the position of the lower side edge point,
When the image data is searched in the line direction and the white pixels continue for a desired width or more, the first pixel position of the continuous white pixels is detected as the position of the left edge point, and the white pixels of the continuous white pixels are detected. It consists of a left side / right side edge position generation unit that performs processing for detecting the last pixel position as the position of the right side edge point for each line,
An image inclination correction apparatus configured to store the generated edge position information of the four sides in the edge position storage memory .
前記エッジ候補検出部が、前記エッジ位置保存メモリに保存された4辺のエッジ位置の位置からHough変換を用いて4辺のエッジ直線の候補となる複数の直線を検出するように構成されていることを特徴とする請求項記載の画像傾き補正装置。 The edge candidate detection unit is configured to detect a plurality of straight lines that are candidates for four-sided edge straight lines using Hough transform from the positions of the four-sided edge positions stored in the edge position storage memory. The image tilt correction apparatus according to claim 1, wherein: 前記上辺エッジ候補検出部が、前記エッジ位置保存メモリに保存された上辺のエッジ位置の情報からHough変換を用いて上辺のエッジ直線の候補となる複数の直線を検出するように構成されていることを特徴とする請求項記載の画像傾き補正装置。 The upper edge candidate detection unit is configured to detect a plurality of straight lines that are candidates for the upper edge straight line using Hough transform from the information on the edge position of the upper edge stored in the edge position storage memory. The image inclination correction apparatus according to claim 2 . 前記下辺,左辺,右辺エッジ候補検出部が、前記エッジ位置保存メモリに保存された4辺のエッジ位置の情報からHough変換を用いて検出された4辺のエッジ直線の候補となる複数の直線と、前記上辺エッジ候補検出部で検出された上辺のエッジ直線の候補となる複数の直線とから、下辺,左辺,右辺のエッジ直線の候補となる複数の直線を検出するように構成されていることを特徴とする請求項記載の画像傾き補正装置。 The lower side, left side, and right side edge candidate detection unit includes a plurality of straight lines that are candidates for four-sided edge straight lines detected by using Hough transform from the information on the four-sided edge positions stored in the edge position storage memory, and And a plurality of straight lines that are candidates for edge straight lines on the lower side, the left side, and the right side are detected from a plurality of straight lines that are candidates for the upper side edge straight line detected by the upper side edge candidate detection unit. The image inclination correction apparatus according to claim 4 . 前記エッジ選択部が、隣り合う2辺のなす角度が同等な4辺の組み合わせをすべて検出し、検出されたすべての4辺の組み合わせのうち、上辺と下辺の距離と、左辺と右辺の距離との和が最大となる4辺の組み合わせを、前記帳票として妥当な4辺の組み合わせとして選択するように構成されていることを特徴とする請求項1乃至のいずれか一記載の画像傾き補正装置。 The edge selection unit detects all combinations of four sides having the same angle between two adjacent sides, and among all the detected combinations of four sides, the distance between the upper side and the lower side, the distance between the left side and the right side, combining, image inclination correcting device according to any one of claims 1 to 5, characterized in that it is configured to select a combination of reasonable four sides as the form sum of four sides with the maximum of . 前記コーナー検出部が、前記帳票として妥当な4辺の組み合わせとして選択された4辺のエッジ直線における、隣りあう2辺を構成する直線(直線の延長部分である場合を含む)の交点として帳票のコーナー座標を検出するように構成されていることを特徴とする請求項1乃至のいずれか一記載の画像傾き補正装置。 The corner detection unit is a four-sided edge line selected as a combination of four sides that is valid for the form, and the form of the form is an intersection of two straight lines (including the case where the line is an extended part). image inclination correcting device according to any one of claims 1 to 6, characterized in that it is configured to detect the corner coordinates. 前記パラメータ生成部が、入力画像の座標を特定の位置に移動し、特定の倍率で拡大または縮小して、特定の角度回転させたのち、回転中心を出力画像の座標の原点に合わせる演算を行って出力画像座標を求める変換行列の逆行列によって前記パラメータを生成するように構成されていることを特徴とする請求項1乃至のいずれか一記載の画像傾き補正装置。 The parameter generation unit moves the coordinates of the input image to a specific position, enlarges or reduces the image by a specific magnification, rotates the image by a specific angle, and then performs an operation for adjusting the rotation center to the origin of the coordinates of the output image. that is configured to generate the parameters by an inverse matrix of the transformation matrix for obtaining the output image coordinates Te image inclination correcting device according to any one of claims 1 to 7, characterized in. 前記画像補正部が、前記パラメータを用いて、入力帳票画像の傾きを補正するとともに、帳票画像の外側の部分を除去する補正を行うように構成されていることを特徴とする請求項1乃至のいずれか一記載の画像傾き補正装置。 The image correction section, using the parameters, thereby correcting the inclination of the input form image, claims 1 to 8, characterized in that it is configured to perform correction to remove the outer portion of the form image The image inclination correction apparatus according to any one of the above. 入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、エッジ位置生成手段によって、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成して、生成されたエッジ位置の情報をエッジ位置保存メモリに順次保存し、エッジ候補検出手段が、前記エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、前記帳票の4辺のエッジ直線の候補として複数の直線を検出し、エッジ選択手段が、前記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択し、コーナー検出手段が、前記選択された4辺の組み合わせから帳票のコーナー座標を検出し、パラメータ生成手段が、前記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成し、画像補正手段が、前記生成されたパラメータを用いて、前記ラインバッファの情報を順次格納して画像として保存した画像保存メモリの画像を補正すると共に、
前記エッジ位置生成手段において、
上辺・下辺エッジ位置生成手段が、前記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する前記白画素の画素数が前記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、
左辺・右辺エッジ位置生成手段が、画像データをライン方向に探索して、前記白画素が所望の幅以上連続したときは、連続する前記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する前記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行って、
生成された4辺のエッジ位置の情報を前記エッジ位置保存メモリに保存することを特徴とする画像傾き補正方法。
Using the image read from the line buffer that temporarily stores the input form image for each scanning line, the edge position generation means uses the positions of the edge points of the upper and lower sides of the form, the left side of the form, and The edge position information on the right side is generated, the generated edge position information is sequentially stored in the edge position storage memory, and the edge candidate detection means uses the edge position information stored in the edge position storage memory. Then, a plurality of straight lines are detected as candidates for the four edge straight lines of the form, and the edge selection means detects the four valid sides as a form from the combination of the four sides generated from the detected plurality of straight lines. The combination is selected, the corner detection means detects the corner coordinates of the form from the selected combination of the four sides, and the parameter generation means detects the detected corner. An image in an image storage memory in which parameters necessary for correcting a form image are generated using coordinates, and image correction means sequentially stores the information of the line buffer using the generated parameters and stores the information as an image. is corrected to,
In the edge position generation means,
The upper side / lower side edge position generation means divides the image data stored in the line buffer into a plurality of ranges at equal intervals, and the number of white pixels defined in each range as having a predetermined luminance or higher is determined. When it is first detected that the threshold value is equal to or greater than a desired threshold value, a process of setting the image data number is performed for each line with the middle point of the range as the position of the upper edge point, and the white pixels existing in each range When it is finally detected that the number of pixels is equal to or greater than the desired threshold, a process for setting the number of image data with the midpoint of the range as the position of the lower edge point is performed for each line,
The left side / right side edge position generation means searches the image data in the line direction, and when the white pixel continues for a desired width or more, the first pixel position of the continuous white pixel is detected as the position of the left side edge point. And performing processing for detecting the last pixel position of the continuous white pixels as the position of the right edge point for each line,
A method of correcting an image inclination , wherein the generated information on the edge positions of the four sides is stored in the edge position storage memory .
入力された帳票画像を1走査ラインごとに一時的に格納するラインバッファから読み出された画像を用いて、エッジ位置生成手段によって、帳票の上辺および下辺のエッジ点の位置と、帳票の左辺および右辺のエッジ点の位置とを生成して、生成されたエッジ位置の情報をエッジ位置保存メモリに順次保存し、上辺エッジ候補検出手段が、前記エッジ位置保存メモリに保存されたエッジ位置の情報を利用して、前記帳票の上辺をなすエッジ直線の候補として複数の直線を検出し、下辺,左辺,右辺エッジ候補検出手段が、前記エッジ位置保存メモリに保存されたエッジ位置の情報と、前記上辺エッジ候補検出手段で検出された上辺のエッジ直線の情報とから、帳票の下辺,左辺,右辺をなすエッジ直線の候補として複数の直線を検出し、エッジ選択手段が、前記検出された複数の直線から生成される4辺の組み合わせから、帳票として妥当な4辺の組み合わせを選択し、コーナー検出手段が、前記選択された4辺の組み合わせから帳票のコーナー座標を検出し、パラメータ生成手段が、前記検出されたコーナー座標を用いて帳票画像の補正時に必要となるパラメータを生成し、画像補正手段が、前記生成されたパラメータを用いて、前記ラインバッファの情報を順次格納して画像として保存した画像保存メモリの画像を補正すると共に、
前記エッジ位置生成手段において、
上辺・下辺エッジ位置生成手段が、前記ラインバッファに格納された画像データを複数の範囲に等間隔に分割して、各範囲内に存在する所定の輝度以上と定義される白画素の画素数が所望の閾値以上であることが最初に検出されたとき、当該範囲の中点を上辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、各範囲内に存在する前記白画素の画素数が前記所望の閾値以上であることが最後に検出されたとき、当該範囲の中点を下辺エッジ点の位置として画像データの番号を設定する処理をラインごとに行い、
左辺・右辺エッジ位置生成手段が、画像データをライン方向に探索して、前記白画素が所望の幅以上連続したときは、連続する前記白画素の最初の画素位置を左辺エッジ点の位置として検出すると共に、連続する前記白画素の最後の画素位置を右辺エッジ点の位置として検出する処理をラインごとに行って、
生成された4辺のエッジ位置の情報を前記エッジ位置保存メモリに保存することを特徴とする画像傾き補正方法。
Using the image read from the line buffer that temporarily stores the input form image for each scanning line, the edge position generation means uses the positions of the edge points of the upper and lower sides of the form, the left side of the form, and And the edge position information on the right side is generated, the generated edge position information is sequentially stored in the edge position storage memory, and the upper edge candidate detection means stores the edge position information stored in the edge position storage memory. A plurality of straight lines are detected as edge straight line candidates forming the upper side of the form, and the lower side, left side, and right side edge candidate detecting means includes edge position information stored in the edge position storage memory, and the upper side From the edge straight line information detected by the edge candidate detection means, a plurality of straight lines are detected as edge straight line candidates forming the lower, left and right sides of the form, and the edges are detected. A selection unit selects a combination of four sides that is appropriate as a form from a combination of four sides generated from the detected plurality of straight lines, and a corner detection unit selects a corner of the form from the combination of the selected four sides. The coordinates are detected, the parameter generation means generates parameters necessary for correcting the form image using the detected corner coordinates, and the image correction means uses the generated parameters to generate the parameters of the line buffer. While correcting the image in the image storage memory that stores information sequentially and saved as an image ,
In the edge position generation means,
The upper side / lower side edge position generation means divides the image data stored in the line buffer into a plurality of ranges at equal intervals, and the number of white pixels defined in each range as having a predetermined luminance or higher is determined. When it is first detected that the threshold value is equal to or greater than a desired threshold value, a process of setting the image data number is performed for each line with the middle point of the range as the position of the upper edge point, and the white pixels existing in each range When it is finally detected that the number of pixels is equal to or greater than the desired threshold, a process for setting the number of image data with the midpoint of the range as the position of the lower edge point is performed for each line,
The left side / right side edge position generation means searches the image data in the line direction, and when the white pixel continues for a desired width or more, the first pixel position of the continuous white pixel is detected as the position of the left side edge point. And performing processing for detecting the last pixel position of the continuous white pixels as the position of the right edge point for each line,
A method of correcting an image inclination , wherein the generated information on the edge positions of the four sides is stored in the edge position storage memory .
前記エッジ候補検出手段が、前記エッジ位置保存メモリに保存された4辺のエッジ位置の情報からHough変換を用いて4辺のエッジ直線の候補となる複数の直線を検出することを特徴とする請求項10記載の画像傾き補正方法。 The edge candidate detection means detects a plurality of straight lines that are candidates for four-sided edge straight lines using Hough transform from information on the four-sided edge positions stored in the edge position storage memory. Item 10. The image inclination correction method according to Item 10 . 前記上辺エッジ候補検出手段が、前記エッジ位置保存メモリに保存された上辺のエッジ位置の情報からHough変換を用いて上辺のエッジ直線の候補となる複数の直線を検出することを特徴とする請求項11記載の画像傾き補正方法。 The upper edge candidate detection means detects a plurality of straight lines that are candidates for an upper edge straight line by using Hough transform from information on the edge position of the upper edge stored in the edge position storage memory. 11. The image inclination correction method according to 11 . 前記下辺,左辺,右辺エッジ候補検出手段が、前記エッジ位置保存メモリに保存された4辺のエッジ位置の情報からHough変換を用いて検出された4辺のエッジ直線の候補となる複数の直線と、前記上辺エッジ候補手段で検出された上辺のエッジ直線の候補となる複数の直線とから、下辺,左辺,右辺のエッジ直線の候補となる複数の直線を検出することを特徴とする請求項13記載の画像傾き補正方法。 The lower side, left side, and right side edge candidate detecting means includes a plurality of straight lines that are candidates for edge straight lines of four sides detected by using Hough transform from the information on the edge positions of the four sides stored in the edge position storage memory; , claim 13 from the upper side with a plurality of straight lines to be the edge the line candidates detected by the upper edge candidate section, the lower side, left side, and detecting a plurality of straight lines to be the right side of the edge the line candidates The image inclination correction method described. 前記エッジ選択手段が、隣りあう2辺のなす角度が同等な4辺の組み合わせをすべて検出し、検出されたすべての4辺の組み合わせのうち、上辺と下辺の距離と、左辺と右辺の距離との和が最大となる4辺の組み合わせを、前記帳票として妥当な4辺の組み合わせとして選択することを特徴とする請求項10乃至14のいずれか一記載の画像傾き補正方法。 The edge selection means detects all combinations of four sides having the same angle formed by two adjacent sides, and among all the detected combinations of four sides, the distance between the upper side and the lower side, the distance between the left side and the right side, image inclination correcting method according to any one of claims 10 to 14 the sum of a combination of four sides with the maximum, and selects as the combination of reasonable four sides as the form. 前記コーナー検出手段が、前記帳票として妥当な4辺の組み合わせとして選択された4辺のエッジ直線における、隣り合う2辺を構成する直線(直線の延長部分である場合を含む)の交点として帳票のコーナー座標を検出することを特徴とする請求項10乃至15のいずれか一記載の画像傾き補正方法。 The corner detection means uses the form of the form as an intersection of straight lines (including the case of an extension of a straight line) that form two adjacent sides in a four-sided edge line selected as a combination of four sides that is valid as the form. 16. The image tilt correction method according to claim 10, wherein corner coordinates are detected. 前記パラメータ生成手段が、入力画像座標を特定の位置に移動し、特定の倍率で拡大または縮小して、特定の角度回転させたのち、回転中心を出力画像の座標の原点に合わせる演算を行って出力画像を求める変換行列の逆行列によって前記パラメータを生成することを特徴とする請求項10乃至16のいずれか一記載の画像傾き補正方法。 The parameter generation means moves the input image coordinates to a specific position, enlarges or reduces the image by a specific magnification, rotates the image by a specific angle, and then performs an operation for adjusting the rotation center to the origin of the coordinates of the output image. image inclination correcting method according to any one of claims 10 to 16, wherein the generating the parameter by the inverse matrix of the transformation matrix for obtaining the output image. 前記画像補正手段が、前記パラメータを用いて、入力帳票画像の傾きを補正するとともに、帳票画像の外側の部分を除去する補正を行うことを特徴とする請求項10乃至17のいずれか一記載の画像傾き補正方法。 The said image correction means correct | amends the inclination of an input form image using the said parameter, and performs the correction | amendment which removes the outer part of a form image, It is any one of Claim 10 thru | or 17 characterized by the above-mentioned. Image tilt correction method.
JP2006332596A 2006-12-08 2006-12-08 Image tilt correction apparatus and image tilt correction method Active JP4784500B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006332596A JP4784500B2 (en) 2006-12-08 2006-12-08 Image tilt correction apparatus and image tilt correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006332596A JP4784500B2 (en) 2006-12-08 2006-12-08 Image tilt correction apparatus and image tilt correction method

Publications (2)

Publication Number Publication Date
JP2008147976A JP2008147976A (en) 2008-06-26
JP4784500B2 true JP4784500B2 (en) 2011-10-05

Family

ID=39607661

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006332596A Active JP4784500B2 (en) 2006-12-08 2006-12-08 Image tilt correction apparatus and image tilt correction method

Country Status (1)

Country Link
JP (1) JP4784500B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110108231A (en) * 2019-05-08 2019-08-09 广东嘉腾机器人自动化有限公司 Huge body cabinet three-dimensional dimension measurement method and storage medium based on Corner Detection

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5185072B2 (en) * 2008-11-10 2013-04-17 共同印刷株式会社 Frame detection method, frame detection apparatus, and frame detection program
CN102196112B (en) * 2010-03-01 2014-09-24 佳能株式会社 Page border detection method and device
CN103366165B (en) * 2012-03-30 2016-06-29 富士通株式会社 Image processing apparatus, image processing method and equipment
JP6021665B2 (en) * 2013-01-30 2016-11-09 株式会社Pfu Image processing apparatus, image processing method, and computer program
JP6070449B2 (en) * 2013-07-08 2017-02-01 富士ゼロックス株式会社 Inclination angle correction apparatus, image reading apparatus, image forming apparatus, and program
JP6191291B2 (en) * 2013-07-09 2017-09-06 富士ゼロックス株式会社 Image reading apparatus, image processing apparatus, and program
JP6107548B2 (en) 2013-08-30 2017-04-05 ブラザー工業株式会社 Document reading apparatus and storage medium
US9811767B2 (en) 2015-02-03 2017-11-07 Ricoh Company, Ltd. Image processing apparatus, image processing method and program
JP6958192B2 (en) 2017-09-29 2021-11-02 ブラザー工業株式会社 Image reader
KR20220008766A (en) 2020-07-14 2022-01-21 캐논 가부시끼가이샤 Image processing apparatus, control method, and storage medium
JP7031763B2 (en) * 2021-02-02 2022-03-08 ブラザー工業株式会社 Image processing program and image processing equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11177773A (en) * 1997-12-15 1999-07-02 Minolta Co Ltd Detector for original
JPH10341332A (en) * 1997-06-10 1998-12-22 Minolta Co Ltd Image-forming device
JPH11177775A (en) * 1997-12-15 1999-07-02 Minolta Co Ltd Detector for original
JPH11177774A (en) * 1997-12-15 1999-07-02 Minolta Co Ltd Detector for original
JP3670571B2 (en) * 2000-10-31 2005-07-13 株式会社Pfu Image reading device
JP2002199179A (en) * 2000-12-27 2002-07-12 Oki Electric Ind Co Ltd Inclination detector
JP2004129022A (en) * 2002-10-04 2004-04-22 Pfu Ltd Image reading device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110108231A (en) * 2019-05-08 2019-08-09 广东嘉腾机器人自动化有限公司 Huge body cabinet three-dimensional dimension measurement method and storage medium based on Corner Detection
CN110108231B (en) * 2019-05-08 2020-10-27 广东嘉腾机器人自动化有限公司 Moment body box body three-dimensional size measuring method based on angular point detection and storage medium

Also Published As

Publication number Publication date
JP2008147976A (en) 2008-06-26

Similar Documents

Publication Publication Date Title
JP4784500B2 (en) Image tilt correction apparatus and image tilt correction method
JP4047352B2 (en) Image distortion correction program, image distortion correction apparatus, and image distortion correction method
US9509884B2 (en) Skew detection
JP2930612B2 (en) Image forming device
JP4911340B2 (en) Two-dimensional code detection system and two-dimensional code detection program
JP6021557B2 (en) Image processing apparatus, image processing system, image processing method, and image processing program
CN100464346C (en) Digital correction method for geometric distortion of form image
JPH1065877A (en) Picture processor
JPH06162190A (en) Document side edge detecting device
JP2010171976A (en) Method and system for correcting distorted document image
KR101969965B1 (en) Image scanning apparatus, method for image compensation and computer-readable recording medium
US9077926B2 (en) Image processing method and image processing apparatus
JP2019179342A (en) Image processing device and image processing method
US6785428B1 (en) Rotated transform of an image using block transfers
KR101621848B1 (en) Image processing apparatus and method
JP6398812B2 (en) Image processing apparatus and computer program
JP4270035B2 (en) Image processing device
JP2015201677A (en) Image processing system and image processing method
JPH10285379A (en) Original angle correction method and original angle correction system
JP4687558B2 (en) Image collation device, image collation method and program
US8184910B2 (en) Image recognition device, image recognition method, and image scanning apparatus having image recognition device
US11665296B2 (en) Image reading device
JP2008258980A (en) Image information processor, and image inclination angle calculation method
JP4687557B2 (en) Image collation device and program
JP4517288B2 (en) Image processing apparatus, image processing method, and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110329

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110530

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110614

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110627

R150 Certificate of patent or registration of utility model

Ref document number: 4784500

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140722

Year of fee payment: 3