JP2000354150A - Image processor and image processing method - Google Patents

Image processor and image processing method

Info

Publication number
JP2000354150A
JP2000354150A JP11163035A JP16303599A JP2000354150A JP 2000354150 A JP2000354150 A JP 2000354150A JP 11163035 A JP11163035 A JP 11163035A JP 16303599 A JP16303599 A JP 16303599A JP 2000354150 A JP2000354150 A JP 2000354150A
Authority
JP
Japan
Prior art keywords
line
image data
black pixel
continuous black
reading
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.)
Granted
Application number
JP11163035A
Other languages
Japanese (ja)
Other versions
JP3481505B2 (en
Inventor
Hiroshi Miyanaga
博史 宮永
Masanori Kamata
政則 鎌田
Akihiro Nagai
章浩 永井
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.)
Panasonic System Solutions Japan Co Ltd
Original Assignee
Matsushita Graphic Communication Systems Inc
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 Matsushita Graphic Communication Systems Inc filed Critical Matsushita Graphic Communication Systems Inc
Priority to JP16303599A priority Critical patent/JP3481505B2/en
Publication of JP2000354150A publication Critical patent/JP2000354150A/en
Application granted granted Critical
Publication of JP3481505B2 publication Critical patent/JP3481505B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

PROBLEM TO BE SOLVED: To remove a black frame area by one reading processing by holding image data of a read document by the line, detecting the continuous black pixel area from a starting position of reading, resetting continuous black pixels to appear on a continuous area from the starting position of reading of the same line and afterward whenever white pixel appears and invalidating the continuous black pixel area of each line which is finally left. SOLUTION: The image data formed by reading a document by every line is inputted in a line memory A101 or B102. In this case, count of the black pixel areas is started and a counter value M is decided when the white pixel appears by an M counter 103. Count of the black pixel areas is started by an N counter 104 when the black pixel appears next, a counter value is reset when the white pixel appears, such a process is repeated and the counter value N is decided at the point of time when the reading of one line is completed. Mask values of the lines are decided based on the counter values M, N by a mask M, N counters 105, 106 and an area to be decided by the mask value is masked and data is outputted by a mask part 107.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、原稿の黒枠領域を
検出し、検出した黒枠領域を除去する画像処理装置およ
び画像処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus and an image processing method for detecting a black frame area of a document and removing the detected black frame area.

【0002】[0002]

【従来の技術】従来、例えば複写機等において、ブック
原稿を原稿台に置いて読取ると、原稿カバーを完全に閉
切ることはできず、外光が入り込む場合がある。また、
通常の原稿であっても、原稿カバーを開けたまま読取る
と、外光が入り込む。このような場合、正規の読取りサ
イズより小さいサイズの原稿を読取ったり、また、正規
の読取位置からずれて原稿を配置した場合には、複写し
た記録紙上において記録画像の周囲に黒枠が生ずること
になる。
2. Description of the Related Art Conventionally, in a copying machine or the like, when a book document is placed on a document table and read, the document cover cannot be completely closed and external light may enter. Also,
Even if it is a normal document, if the document is read with the document cover opened, external light enters. In such a case, if a document smaller than the regular reading size is read, or if the document is placed at a position shifted from the regular reading position, a black frame may be formed around the recorded image on the copied recording paper. Become.

【0003】この黒枠を消去するため、読取った原稿の
黒枠領域を検出して白情報に変換する技術が従来から知
られている。この技術は、オペレータが上下左右の端領
域を任意の幅で選択し、その選択された領域を白情報に
変換する。
[0003] In order to erase the black frame, a technique of detecting a black frame area of a read original and converting it into white information has been conventionally known. In this technique, an operator selects an upper, lower, left, or right end area with an arbitrary width, and converts the selected area into white information.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記の
従来技術によると、オペレータは自分で毎回除去すべき
黒枠の幅を指定しなければならず、操作が面倒であると
いう問題がある。また、複写した記録紙を見て、指定し
た幅が大きすぎて、必要な情報が削除されたり、逆に、
指定した幅が小さすぎて、黒枠がまだ周囲に残っている
場合には、再度オペレータは勘により指定する幅を修正
し、再度複写を繰り返さなければならず、操作が大変面
倒であるという問題がある。さらに、ある程度指定する
幅の修正を繰り返さなければ、各々原稿に応じた適切な
黒枠の除去ができず、無駄に記録紙を浪費するという問
題もあった。
However, according to the above-mentioned prior art, the operator has to specify the width of the black frame to be removed each time by himself, and there is a problem that the operation is troublesome. Also, looking at the copied recording paper, the specified width is too large and necessary information is deleted,
If the specified width is too small and the black frame is still around, the operator must correct the specified width by intuition and repeat the copying again, which is a problem that the operation is very troublesome. is there. Furthermore, unless the correction of the designated width is repeated to some extent, it is not possible to properly remove the black frame corresponding to each document, and there is a problem that recording paper is wasted.

【0005】このような問題を解決するために、同一原
稿を2回読みとって、1回目に黒枠領域を検出し、2回
目に読取り画像データを取込み、2回目に読取った画像
データから1回目に読取った黒枠領域を無効とする処理
を行い、オペレータの操作の介在を無くすという技術も
提案されている。
In order to solve such a problem, the same document is read twice, a black frame area is detected first, image data is read second, and the first image data is read from the second image data. There has also been proposed a technique of performing processing for invalidating a read black frame area to eliminate the intervention of an operator's operation.

【0006】しかし、このような手段によっては、同一
原稿を2回読取らなければならず、黒枠除去のために2
倍の読取時間を必要とし、読取処理が大幅に遅くなると
いう問題があった。
However, with such a means, it is necessary to read the same document twice, and to remove black frames,
There is a problem that the reading time is doubled and the reading process is significantly slowed down.

【0007】本発明は、このような問題点に鑑みてなさ
れたものであり、1回の読取処理で、自動的に各々原稿
の黒枠領域を検出して、黒枠領域を除去することができ
る画像処理装置および画像処理方法を提供することを目
的とする。
The present invention has been made in view of such a problem, and in one reading process, an image capable of automatically detecting a black frame region of each document and removing the black frame region. It is an object to provide a processing device and an image processing method.

【0008】[0008]

【課題を解決するための手段】上記の目的を達成するた
めに、本発明は、読取原稿の画像データをライン単位で
保持し、読取開始位置からの連続黒画素領域を検出する
と共に、同一ラインにおいて前記読取開始位置からの連
続黒画素領域以降に出現する連続黒画素を白画素が出現
する毎にリセットし、最後に残った連続黒画素領域を検
出し、前記各ラインに対応する連続黒画素領域を無効と
して有効画像データを得るという手段を採る。
In order to achieve the above object, the present invention holds image data of a read original in units of a line, detects a continuous black pixel area from a reading start position, and uses the same line. The continuous black pixels appearing after the continuous black pixel region from the reading start position are reset each time a white pixel appears, the last remaining continuous black pixel region is detected, and the continuous black pixels corresponding to each line are detected. Means of obtaining valid image data by invalidating the area is adopted.

【0009】[0009]

【発明の実施の形態】本発明の第1の態様に係る画像処
理装置は、読取原稿の画像データをライン単位で保持す
る記憶手段と、各ラインの読取開始位置からの連続黒画
素領域を検出する第1の手段と、同一ラインにおいて前
記読取開始位置からの連続黒画素領域以降に出現する連
続黒画素を白画素が出現する毎にリセットし、最後に残
った連続黒画素領域を検出する第2の手段と、各ライン
において前記第1の手段および前記第2の手段により検
出した前記各ラインに対応する連続黒画素領域を無効と
して有効画像データを得る手段と、を具備する構成を採
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An image processing apparatus according to a first aspect of the present invention has a storage means for holding image data of a read original in units of lines, and detects a continuous black pixel area from a reading start position of each line. The first means for resetting continuous black pixels appearing after the continuous black pixel area from the reading start position on the same line every time a white pixel appears, and detecting the last remaining continuous black pixel area (2) and means for obtaining effective image data by invalidating a continuous black pixel area corresponding to each line detected by the first means and the second means in each line.

【0010】この構成により、各ラインの画像データを
保持しながら同時に両端の黒画素領域を検出し、出力す
る際に各画像データの両端の黒画素領域を無効としなが
ら出力することにより、同一ラインについて1回の読取
処理において自動的に画像データから両端の黒画素領域
を除去する処理を行うことができるので、オペレータを
煩わせることなく、また、同一原稿を複数回読取らない
ので、読取速度を遅延させることなく、画像データの適
切な黒枠領域の除去を実現できる。
According to this configuration, the black pixel regions at both ends are simultaneously detected while holding the image data of each line, and when outputting, the black pixel regions at both ends of each image data are output while invalidating the black pixel regions. Can automatically remove black pixel regions at both ends from image data in a single reading process, so that the operator does not bother to read the same document a plurality of times. The appropriate removal of the black frame region of the image data can be realized without delay.

【0011】また、本発明の第2の態様は、第1の態様
に係る画像処理装置において、前記第1の手段は、所定
数以内の白画素を検出した場合でも黒画素が連続してい
ると判断し、前記第2の手段は所定数以内の白画素を検
出した場合でも黒画素が連続していると判断する構成を
採る。
According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the first means is such that black pixels continue even when a predetermined number of white pixels are detected. And the second means determines that black pixels are continuous even when a predetermined number of white pixels are detected.

【0012】この構成により、中間調の読取モードで原
稿を読取る場合であっても、不当に短く黒枠領域を誤検
知して、不適切な黒枠除去がなされ、無駄な記録紙が発
生するのを防止することができる。
With this configuration, even when a document is read in the halftone reading mode, the black frame area is erroneously detected erroneously and the black frame is inappropriately removed, and wasteful recording paper is not generated. Can be prevented.

【0013】また、本発明の第3の態様に係る画像処理
装置は、読取原稿の画像データをライン単位で保持する
第1の記憶手段と、各ラインの読取開始位置からの連続
黒画素領域を検出する第1の手段と、同一ラインにおい
て前記読取開始位置からの連続黒画素領域以降に出現す
る連続黒画素を白画素が出現する毎にリセットし最後に
残った連続黒画素領域を検出する第2の手段と、各ライ
ンにおいて前記第1の手段および前記第2の手段により
検出した各ラインに対応する連続黒画素領域を無効とし
て各ラインの有効画像データを得る手段と、前記有効画
像データを格納する第2の記憶手段と、前記各ラインを
前記第2の記憶手段に書き込む際、2ライン目以降の各
ラインの有効領域の始点が1ライン目の有効領域の始点
に合うように書き込みタイミングを変える制御を行う制
御手段と、を具備する構成を採る。
An image processing apparatus according to a third aspect of the present invention comprises a first storage means for storing image data of a read original in units of lines, and a continuous black pixel area from a reading start position of each line. The first means for detecting, and the second means for resetting the continuous black pixels appearing after the continuous black pixel area from the reading start position on the same line each time a white pixel appears, and detecting the last remaining continuous black pixel area Means for obtaining effective image data of each line by invalidating a continuous black pixel region corresponding to each line detected by the first means and the second means in each line; The second storage means for storing, and when writing each line to the second storage means, writing so that the start point of the effective area of each line after the second line matches the start point of the effective area of the first line. Adopts a configuration comprising a control means for controlling to change the viewing timing, the.

【0014】この構成により、有効領域の始点を各ライ
ン間で同一位置に揃えることができるので、1回の読取
処理において黒枠領域の除去を行うのみならず、原稿が
曲がって配置された場合であっても原稿の曲がりを適正
に補正することができる。
With this configuration, the starting point of the effective area can be aligned at the same position between the lines, so that not only the black frame area is removed in one reading process, but also when the original is bent and arranged. Even if there is, the curvature of the document can be properly corrected.

【0015】また、本発明の第4の態様に係る画像処理
装置は、読取原稿の画像データをライン単位で保持する
記憶手段と、各ラインの読取開始位置からの連続黒画素
領域を検出する第1の手段と、同一ラインにおいて前記
読取開始位置からの連続黒画素領域以降に出現する連続
黒画素を白画素が出現する毎にリセットし最後に残った
連続黒画素領域を検出する第2の手段と、各ラインにお
いて、前記第1の手段および前記第2の手段により検出
した各ラインに対応する連続黒画素領域を無効として有
効画像データを得る手段と、前記記憶手段から各ライン
の画像データを読み出す際、2ライン目以降の各ライン
の有効領域の始点が1ライン目の有効領域の始点に合う
ように読み出し位置を変える制御を行う制御手段と、を
具備する構成を採る。
An image processing apparatus according to a fourth aspect of the present invention comprises a storage unit for storing image data of a read original in units of lines, and a storage unit for detecting a continuous black pixel area from a reading start position of each line. A second means for resetting a continuous black pixel appearing after the continuous black pixel area from the reading start position on the same line every time a white pixel appears, and detecting a last remaining continuous black pixel area; Means for obtaining effective image data by invalidating a continuous black pixel area corresponding to each line detected by the first means and the second means in each line; and obtaining image data of each line from the storage means. When reading, control means for controlling the read position so that the start point of the effective area of each line after the second line matches the start point of the effective area of the first line is adopted. .

【0016】この構成により、有効領域の始点を各ライ
ン間で同一位置に揃えることができるので、1回の読取
処理において黒枠領域の除去を行うのみならず、原稿が
曲がって配置された場合であっても原稿の曲がりを適正
に補正することができる。
According to this configuration, the starting point of the effective area can be aligned at the same position between the lines, so that not only the black frame area is removed in one reading process but also when the original is bent. Even if there is, the curvature of the document can be properly corrected.

【0017】また、本発明の第5の態様は、第3の態様
に係る画像処理装置において、原稿が右曲がりか左曲が
りかを検出する手段を有し、前記制御手段は、原稿が右
曲がりの場合有効画像データの始点が最左端であるライ
ン以前の領域については1ライン目の読取開始位置から
有効画像データの始点までの間隔だけずらして各々有効
画像データの始点から各ラインを書き込み、一方前記最
左端であるライン以降については各々有効画像データの
始点から各ラインを書き込むようにタイミングを変える
構成を採る。
According to a fifth aspect of the present invention, there is provided the image processing apparatus according to the third aspect, further comprising means for detecting whether the original is right-handed or left-handed, and wherein the control means comprises: In the case of, for the area before the line where the start point of the effective image data is the leftmost end, each line is written from the start point of the effective image data while being shifted by an interval from the reading start position of the first line to the start point of the effective image data. For the lines after the leftmost line, the timing is changed so that each line is written from the start point of the effective image data.

【0018】また、本発明の第6の態様は、第3の態様
に係る画像処理装置において、原稿が右曲がりか左曲が
りかを検出する手段を有し、前記制御手段は、原稿が左
曲がりの場合有効画像データの始点が最左端であるライ
ンを1ライン目としこれ以降このラインの有効画像デー
タの始点に各ラインの有効画像データの始点を揃え、一
方前記最左端であるライン以前の領域については各々有
効画像データの始点から各ラインを書き込むようにタイ
ミングを変える構成を採る。
According to a sixth aspect of the present invention, in the image processing apparatus according to the third aspect, there is provided means for detecting whether the original is right-handed or left-handed. In the case of the first line, the line where the start point of the effective image data is the leftmost line is set as the first line, and thereafter, the start point of each line of the effective image data is aligned with the start point of the effective image data of this line. As for (1), the timing is changed so that each line is written from the start point of the effective image data.

【0019】この構成により、原稿が曲がって読取られ
た場合、すべてのラインについて有効画像データの始点
を揃えることにより、複写画像が原画像と上端部若しく
は下端部において著しく異なったものとして再現される
のを防止しつつ、原稿の曲がり補正をし、黒枠領域の除
去を行うことができる。
With this configuration, when the original is read in a bent state, the starting point of the effective image data is aligned for all lines, so that the copied image is reproduced as a remarkably different upper end or lower end from the original image. In addition, it is possible to correct the skew of the document and to remove the black frame area while preventing the occurrence of the blackout.

【0020】また、本発明の第7の態様は、第4の態様
に係る画像処理装置において、原稿が右曲がりか左曲が
りかを検出する手段を有し、前記制御手段は、原稿が右
曲がりの場合有効画像データの始点が最左端であるライ
ン以前の領域については1ライン目の読取開始位置から
有効画像データの始点までの間隔だけずらして各々有効
画像データの始点から各ラインの読み出しを行い、一方
前記最左端であるライン以降の領域については各々有効
画像データの始点から各ラインの読み出しを行う構成を
採る。
According to a seventh aspect of the present invention, there is provided the image processing apparatus according to the fourth aspect, further comprising means for detecting whether the original is right-handed or left-handed. In the case of, for the area before the line where the start point of the effective image data is the leftmost end, each line is read from the start point of the effective image data while being shifted by an interval from the reading start position of the first line to the start point of the effective image data. On the other hand, for the area after the line at the leftmost end, each line is read from the start point of the effective image data.

【0021】また、本発明の第8の態様は、第4の態様
に係る画像処理装置において、原稿が右曲がりか左曲が
りかを検出する手段を有し、前記制御手段は、原稿が左
曲がりの場合有効画像データの始点が最先端であるライ
ンを1ライン目としこれ以降このラインの有効画像デー
タの始点に各ラインの有効画像データの始点を揃え、一
方前記最左端であるライン以前の領域については各々有
効画像データの始点から各ラインの読み出しを行う構成
を採る。
According to an eighth aspect of the present invention, there is provided the image processing apparatus according to the fourth aspect, further comprising means for detecting whether the original is right-handed or left-handed, and wherein the control means comprises: In the case of the first line, the starting point of the effective image data is set as the first line, and thereafter, the starting point of the effective image data of each line is aligned with the starting point of the effective image data of this line. , Each line is read from the start point of the effective image data.

【0022】この構成により、原稿が曲がって読取られ
た場合、すべてのラインについて有効画像データの始点
を揃えることにより、複写画像が原画像と上端部若しく
は下端部において著しく異なったものとして再現される
のを防止しつつ、原稿の曲がり補正をし、黒枠領域の除
去を行うことができる。
According to this configuration, when the original is read in a bent state, the starting points of the effective image data are aligned for all lines, so that the copied image is reproduced as a remarkably different upper end or lower end from the original image. In addition, it is possible to correct the skew of the document and to remove the black frame region while preventing the occurrence of the skew.

【0023】また、本発明の第9の態様に係る画像処理
装置は、各ラインの読取開始位置からの第1の連続黒画
素領域を検出する第1の手段と、同一ラインにおいて前
記読取開始位置からの連続黒画素以降に出現する連続黒
画素を白画素が出現する毎にリセットし最後に残った第
2の連続黒画素領域を検出する第2の手段と、複数のラ
インについて前記第1の連続黒画素領域の第1の差分お
よび前記第2の連続黒画素領域の第2の差分を演算し、
前記第1の差分および前記第2の差分の大小により原稿
が右曲がりか左曲がりかを判断する制御手段と、を具備
する構成を採る。
An image processing apparatus according to a ninth aspect of the present invention comprises: a first means for detecting a first continuous black pixel area from a reading start position of each line; A second means for resetting a continuous black pixel appearing after the continuous black pixel from each time a white pixel appears, and detecting a last remaining second continuous black pixel area, and a first means for a plurality of lines. Calculating a first difference between the continuous black pixel regions and a second difference between the second continuous black pixel regions;
A control unit that determines whether the original is right-handed or left-handed according to the magnitude of the first difference and the second difference.

【0024】この構成により、原稿を読みながら同時に
原稿の傾きを検知できるため、1回の読取処理におい
て、極めて簡易な構成により、画像データの取り込み、
黒枠領域の除去、原稿の傾き方向、の3つの検知をする
ことができる。
With this configuration, it is possible to simultaneously detect the inclination of the document while reading the document.
Three detections, that is, the removal of the black frame area and the inclination direction of the document can be performed.

【0025】また、本発明の第10の態様に係る画像処
理装置は、各ラインの読取開始位置からの第1の連続黒
画素領域を検出する第1の手段と、同一ラインにおいて
前記読取開始位置からの連続黒画素以降に出現する連続
黒画素を白画素が出現する毎にリセットし最後に残った
第2の連続黒画素領域を検出する第2の手段と、複数の
ラインについて前記第1の連続黒画素領域の第1の差分
および前記第2の連続黒画素領域の第2の差分を演算
し、前記第1の差分および前記第2の差分の大小により
原稿が右曲がりか左曲がりかを判断すると共に前記第1
の差分および前記第2の差分に基づいて原稿の曲がり角
度を演算する制御手段と、を具備する構成を採る。
An image processing apparatus according to a tenth aspect of the present invention comprises: a first means for detecting a first continuous black pixel area from a reading start position of each line; A second means for resetting a continuous black pixel appearing after the continuous black pixel from each time a white pixel appears, and detecting a last remaining second continuous black pixel area, and a first means for a plurality of lines. A first difference of a continuous black pixel region and a second difference of the second continuous black pixel region are calculated, and whether the original is right-handed or left-handed depending on the magnitude of the first difference and the second difference. Judgment and the first
And a control unit for calculating a bending angle of the original document based on the difference between the original document and the second difference.

【0026】この構成により、読取画像データの全体を
メモリに一旦格納して傾きを検知するのではなく、原稿
を読みながら同時に原稿の傾きを検知するため、1回の
読取処理において、極めて簡易な構成により、画像デー
タの取り込み、黒枠領域の除去、原稿の傾き方向、その
傾き角度、の4つの検知を並列に行うことができる。
According to this configuration, the inclination of the original is simultaneously detected while reading the original, instead of temporarily storing the entirety of the read image data in the memory to detect the inclination. With this configuration, it is possible to perform four detections of image data acquisition, removal of the black frame area, and the direction of inclination of the document and the inclination angle thereof in parallel.

【0027】また、本発明の第11の態様に係るファク
シミリ装置は、第1の態様から第10の態様のいずれか
に係る画像処理装置を備えた構成を採る。
Further, a facsimile apparatus according to an eleventh aspect of the present invention employs a configuration including the image processing apparatus according to any one of the first to tenth aspects.

【0028】この構成により、各ラインの画像データを
保持しながら同時に両端の黒画素領域を検出し、出力す
る際に各画像データの両端の黒画素領域を無効としなが
ら出力することにより、同一ラインについて1回の読取
処理において自動的に画像データから両端の黒画素領域
を除去する処理を行うことができるので、オペレータを
煩わせることなく、また、同一原稿を複数回読取らない
ので、読取速度を遅延させることなく、画像データの適
切な黒枠領域の除去を実現できる。
According to this configuration, the black pixel regions at both ends are simultaneously detected while holding the image data of each line, and when outputting, the black pixel regions at both ends of each image data are output while being invalidated. Can automatically remove black pixel regions at both ends from image data in a single reading process, so that the operator does not bother to read the same document a plurality of times. The appropriate removal of the black frame region of the image data can be realized without delay.

【0029】また、本発明の第12の態様に係る画像処
理方法は、読取原稿の画像データをライン単位で保持す
る工程と、読取開始位置からの連続黒画素領域を検出す
ると共に、同一ラインにおいて前記読取開始位置からの
連続黒画素領域以降に出現する連続黒画素を白画素が出
現する毎にリセットし、最後に残った連続黒画素領域を
検出する工程と、前記各ラインに対応する連続黒画素領
域を無効として有効画像データを得る工程と、を具備す
る構成を採る。
The image processing method according to a twelfth aspect of the present invention includes a step of holding image data of a read original in units of lines, a step of detecting a continuous black pixel region from a reading start position, and a step of A step of resetting continuous black pixels appearing after the continuous black pixel area from the reading start position each time a white pixel appears, and detecting a last remaining continuous black pixel area; Obtaining effective image data by invalidating the pixel area.

【0030】この構成により、各ラインの画像データを
保持しながら同時に両端の黒画素領域を検出し、出力す
る際に各画像データの両端の黒画素領域を無効としなが
ら出力することにより、同一ラインについて1回の読取
処理において自動的に画像データから両端の黒画素領域
を除去する処理を行うことができるので、オペレータを
煩わせることなく、また、同一原稿を複数回読取らない
ので、読取速度を遅延させることなく、画像データの適
切な黒枠領域の除去を実現できる。
With this configuration, the black pixel regions at both ends are simultaneously detected while holding the image data of each line, and when outputting the image data, the black pixel regions at both ends of each image data are output while invalidating them so that the same line is output. Can automatically remove black pixel regions at both ends from image data in a single reading process, so that the operator does not bother to read the same document a plurality of times. The appropriate removal of the black frame region of the image data can be realized without delay.

【0031】以下、本発明の実施の形態について、図面
を参照して説明する。 (実施の形態1)実施の形態1に係る画像処理装置は、
1回の読取処理において自動的に画像データから両端の
黒画素領域を除去する処理を行う。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. (Embodiment 1) An image processing apparatus according to Embodiment 1
In one reading process, a process of automatically removing black pixel regions at both ends from image data is performed.

【0032】図1は、本発明の実施の形態1に係る画像
処理装置の概略構成を示すブロック図である。ラインメ
モリA101およびラインメモリB102は、読取った
原稿の画像データをライン単位で2ライン毎保持する。
Mカウンタ103は、左端のマスク幅検知カウンタであ
り、Nカウンタ104は、右端のマスク幅検知カウンタ
である。また、マスクMカウンタ105は、左端のマス
ク実行カウンタであり、Mカウンタ103のカウンタ値
Mにマージン幅αを含めて「M+α」を出力する。ま
た、マスクNカウンタ106は、右端のマスク実行カウ
ンタであり、Nカウンタ104のカウンタ値Nにマージ
ン幅αを含めて「L−N−α」を出力する。この「L」
は主走査方向の読取範囲である。マスク部107は、画
信号をマスクして出力する。
FIG. 1 is a block diagram showing a schematic configuration of an image processing apparatus according to Embodiment 1 of the present invention. The line memory A101 and the line memory B102 hold image data of a read document every two lines in line units.
The M counter 103 is a leftmost mask width detection counter, and the N counter 104 is a rightmost mask width detection counter. The mask M counter 105 is a mask execution counter at the left end, and outputs “M + α” including the margin width α in the counter value M of the M counter 103. The mask N counter 106 is a mask execution counter at the right end, and outputs “L−N−α” including the margin width α in the counter value N of the N counter 104. This "L"
Is a reading range in the main scanning direction. The mask unit 107 masks and outputs an image signal.

【0033】次に、本発明の実施の形態1に係る画像処
理装置における画像の読取動作および書き込み動作の概
念について説明する。図2は、本発明の実施の形態1に
係る画像処理装置における画像の読取動作および書き込
み動作のタイミングチャート図である。まず、図示しな
い読取手段により、原稿をライン毎に読取り、読取って
得た画像データをラインメモリA101またはラインメ
モリB102に入力する。ラインメモリA101または
ラインメモリB102に対する書き込みと読み出しは、
以下のように行われる。
Next, the concept of an image reading operation and an image writing operation in the image processing apparatus according to the first embodiment of the present invention will be described. FIG. 2 is a timing chart of an image reading operation and an image writing operation in the image processing apparatus according to Embodiment 1 of the present invention. First, an original is read line by line by a reading unit (not shown), and image data obtained by reading is input to the line memory A101 or the line memory B102. Writing to and reading from the line memory A101 or the line memory B102
It is performed as follows.

【0034】すなわち、図2に示すように、読取った第
1ラインの画像データをラインメモリA101に書き込
むと同時に、第1ラインに対するMカウンタ103のカ
ウンタ値とNカウンタ104のカウンタ値を決定する。
次に、ラインメモリA101から第1ラインの画像デー
タを読み出す。読み出された第1ラインの画像データ
は、マスクをされて出力される。このマスクの値は、M
マスクカウンタ105が、Mカウンタ103のカウンタ
値に基づき、Nマスクカウンタ106が、Nカウンタ1
04のカウンタ値に基づいてそれぞれ算出する。第1ラ
インの画像データの読み出しと同時に、第2ラインの画
像データをラインメモリB102に書き込み、これと同
時に第2ラインに対するMカウンタ103のカウント値
とNカウンタ104のカウント値を決定する。
That is, as shown in FIG. 2, the read image data of the first line is written into the line memory A101, and at the same time, the counter value of the M counter 103 and the counter value of the N counter 104 for the first line are determined.
Next, the image data of the first line is read from the line memory A101. The read first line image data is masked and output. The value of this mask is M
Based on the counter value of the M counter 103, the N counter 1
Each of them is calculated based on the counter value of No. 04. Simultaneously with the reading of the image data of the first line, the image data of the second line is written into the line memory B102, and at the same time, the count value of the M counter 103 and the count value of the N counter 104 for the second line are determined.

【0035】同様に、ラインメモリB102から第2ラ
インの画像データを読み出す。読み出された第2ライン
の画像データは、マスクをされて出力される。このマス
クの値は、Mマスクカウンタ105が、Mカウンタ10
3のカウンタ値に基づき、Nマスクカウンタ106が、
Nカウンタ104のカウンタ値に基づいてそれぞれ算出
する。第2ラインの画像データの読み出しと同時に、第
3ラインの画像データをラインメモリA101に書き込
み、これと同時に第3ラインに対するMカウンタ103
のカウント値とNカウンタ104のカウント値を決定す
る。
Similarly, the image data of the second line is read from the line memory B102. The read image data of the second line is masked and output. The value of this mask is determined by the M mask counter 105 by the M counter 10.
Based on the counter value of 3, the N mask counter 106
Each is calculated based on the counter value of the N counter 104. Simultaneously with the reading of the image data of the second line, the image data of the third line is written into the line memory A101.
And the count value of the N counter 104 are determined.

【0036】このように、ラインメモリA101とライ
ンメモリB102により、マスクをするラインに基づい
てマスクエリアを決定するため、原稿が曲がっていて
も、問題なくマスクをすることが可能となる。
As described above, since the mask area is determined based on the line to be masked by the line memory A101 and the line memory B102, masking can be performed without any problem even if the original is curved.

【0037】次に、本発明の実施の形態1に係る画像処
理装置におけるデータの入力とマスク後の出力との関係
について説明する。図3は、本発明の実施の形態1に係
る画像処理装置において、1ラインの画像データ中に黒
がない場合におけるデータの入出力関係を示すタイミン
グチャート図である。以下、読取範囲Lを左から読取る
ものとする。最左端から黒が存在しているため、読取を
開始するとMカウンタ103が黒画素領域のカウントを
開始する。Mカウンタ103はカウントを継続し、最初
に白が出現する部分でMカウンタ値Mが決定する。白が
連続した後、最初に黒が出現したときにNカウンタ10
4が黒画素領域のカウントを開始する。Nカウンタ10
4は、白が出現するとカウンタ値をリセットするが、こ
の場合は、黒が連続するため、Nカウンタ104はカウ
ントを継続する。最右端に達すると、Nカウンタ値Nが
決定する。マスクMカウンタ105とマスクNカウンタ
106は、それぞれ、カウンタ値M、Nに基づいてマー
ジンを含めた値を算出し、このラインにおけるマスクの
値が決定する。マスクの値が決定すると、マスク部10
7は、その値により決められた領域をマスクし、データ
を出力する。
Next, the relationship between data input and masked output in the image processing apparatus according to Embodiment 1 of the present invention will be described. FIG. 3 is a timing chart showing an input / output relationship of data when there is no black in one line of image data in the image processing apparatus according to Embodiment 1 of the present invention. Hereinafter, the reading range L is read from the left. Since black exists from the leftmost end, when reading is started, the M counter 103 starts counting the black pixel area. The M counter 103 continues counting, and the M counter value M is determined at a portion where white first appears. After white continues, the first time black appears, the N counter 10
4 starts counting the black pixel area. N counter 10
No. 4 resets the counter value when white appears, but in this case, the N counter 104 continues counting because black continues. When the rightmost end is reached, the N counter value N is determined. The mask M counter 105 and the mask N counter 106 respectively calculate a value including a margin based on the counter values M and N, and determine the value of the mask in this line. When the value of the mask is determined, the mask unit 10
7 masks an area determined by the value and outputs data.

【0038】図4は、本発明の実施の形態1に係る画像
処理装置において、1ラインの画像データ中に黒がある
場合におけるデータの入出力関係を示すタイミングチャ
ート図である。最左端から黒が存在しているため、読取
を開始するとMカウンタ103が黒画素領域のカウント
を開始する。Mカウンタ103はカウントを継続し、最
初に白が出現する部分でMカウンタ値Mが決定する。白
が続いた後、最初に黒が出現したときにNカウンタ10
4が黒画素領域のカウントを開始する。しかし、このラ
インでは、黒が途中で途切れて白が出現するため、Nカ
ウンタ104は、白が出現した時点でカウンタ値をリセ
ットする。次に黒が出現したとき、Nカウンタ104は
再び黒画素領域のカウントを開始するが、再度白が出現
するため、カウンタ値をリセットする。これを繰り返
し、黒が連続しつつ、読取範囲Lの最右端に到達した段
階でNカウンタ値Nが決定する。マスクMカウンタ10
5とマスクNカウンタ106は、それぞれ、カウンタ値
M、Nに基づいてマージンを含めた値を算出し、このラ
インにおけるマスクの値が決定する。マスクの値が決定
すると、マスク部107は、その値により決められた領
域をマスクし、データを出力する。
FIG. 4 is a timing chart showing an input / output relationship of data in a case where black is present in one line of image data in the image processing apparatus according to Embodiment 1 of the present invention. Since black exists from the leftmost end, when reading is started, the M counter 103 starts counting the black pixel area. The M counter 103 continues counting, and the M counter value M is determined at a portion where white first appears. After white continues, N counter 10 when black first appears
4 starts counting the black pixel area. However, since black appears on the line and white appears on the line, the N counter 104 resets the counter value when white appears. Next, when black appears, the N counter 104 starts counting the black pixel area again. However, since white appears again, the counter value is reset. This is repeated, and the N counter value N is determined at the stage where the rightmost end of the reading range L is reached while black continues. Mask M counter 10
5 and the mask N counter 106 calculate a value including a margin based on the counter values M and N, respectively, and the value of the mask in this line is determined. When the value of the mask is determined, the mask unit 107 masks an area determined by the value and outputs data.

【0039】図5は、本発明の実施の形態1に係る画像
処理装置において、1ラインの画像データの1画素目か
ら白である場合におけるデータの入出力関係を示すタイ
ミングチャート図である。最左端から黒が存在していな
いため、読取を開始してもMカウンタ103は黒画素領
域のカウントを行わない。この場合、Mカウンタ値Mは
0となる。白が続いた後、最初に黒が出現したときにN
カウンタ104が黒画素領域のカウントを開始する。し
かし、このラインでも、黒が途中で途切れて白が出現す
るため、Nカウンタ104は、白が出現した時点でカウ
ンタ値をリセットする。次に黒が出現したとき、Nカウ
ンタ104は再び黒画素領域のカウントを開始するが、
再度白が出現するため、カウンタ値をリセットする。こ
れを繰り返し、黒が連続しつつ、読取範囲Lの最右端に
到達した段階でNカウンタ値Nが決定する。マスクMカ
ウンタ105とマスクNカウンタ106は、それぞれ、
カウンタ値M、Nに基づいてマージンを含めた値を算出
し、このラインにおけるマスクの値が決定する。マスク
の値が決定すると、マスク部107は、その値により決
められた領域をマスクし、データを出力する。なお、こ
の場合、マスクMカウンタ105の値は、マージン幅α
のみとなる。
FIG. 5 is a timing chart showing the data input / output relationship when the image data of one line is white from the first pixel in the image processing apparatus according to Embodiment 1 of the present invention. Since black does not exist from the leftmost end, the M counter 103 does not count the black pixel area even when reading is started. In this case, the M counter value M becomes 0. After white, N appears when black first appears
The counter 104 starts counting the black pixel area. However, even in this line, since black is interrupted on the way and white appears, the N counter 104 resets the counter value when white appears. Next, when black appears, the N counter 104 starts counting the black pixel area again.
Since white appears again, the counter value is reset. This is repeated, and the N counter value N is determined at the stage where the rightmost end of the reading range L is reached while black continues. The mask M counter 105 and the mask N counter 106 respectively
A value including a margin is calculated based on the counter values M and N, and a mask value in this line is determined. When the value of the mask is determined, the mask unit 107 masks an area determined by the value and outputs data. In this case, the value of the mask M counter 105 is the margin width α
Only.

【0040】これにより、各ラインの画像データを保持
しながら同時に両端の黒画素領域を検出し、出力する際
に各画像データの両端の黒画素領域を無効としながら出
力することにより、同一ラインについて1回の読取処理
において自動的に画像データから両端の黒画素領域を除
去する処理を行うことができるので、オペレータを煩わ
せることなく、また、同一原稿を複数回読取らないの
で、読取速度を遅延させることなく、画像データの適切
な黒枠領域の除去を実現できる。
Thus, while simultaneously holding the image data of each line, the black pixel regions at both ends are detected, and when outputting, the black pixel regions at both ends of each image data are output while invalidating them, so that the same line is output. In a single reading process, the process of automatically removing the black pixel regions at both ends from the image data can be performed, so that the operator is not bothered and the same document is not read a plurality of times, so that the reading speed is delayed. Thus, it is possible to realize appropriate removal of the black frame region of the image data without performing the above operation.

【0041】図6は、本発明の実施の形態1に係る画像
処理装置において、入力された画像データが中間調であ
る場合における黒領域の検知を示すタイミングチャート
図である。図6の第1段目に示すように、入力された画
像データのうち、黒枠領域に相当する部分を2値化する
と、第2段目のように全黒となる。中間調画像に対して
は、階調性を表現するために、誤差拡散法やディザ法等
が用いられるので、原稿のカバーを開けた状態で読取り
を行った場合のように不要な光が混入すると、本来黒枠
領域である部分が全黒とはならず、所々白画素が点在す
ることとなる。図6の第3段目では、これをライン上で
表現している。このような場合、白が出現したときにM
カウンタ103がカウントを停止したり、Nカウンタ1
04がカウンタ値をリセットすると、黒枠領域が実際よ
りも小さいと認識され、その結果、適切な黒枠除去がで
きなくなる。そこで、中間調データに対しては、白画素
を検出しても、その数が所定数以下である場合は、黒が
連続しているとみなすこととした。すなわち、図6の第
4段目に示すように、Mカウンタ103は、白画素を検
出しても黒画素のカウントを続け、連続した白画素を検
知した段階で、Mカウンタ値を決定する。また、図示し
ていないが、Nカウンタ104も、白画素を検出して
も、その数が所定数以下である場合は、黒が連続してい
るとみなし、黒画素が連続しつつ読取範囲の最右端に到
達した段階で、Nカウンタ値を決定する。
FIG. 6 is a timing chart showing the detection of a black area when the input image data is halftone in the image processing apparatus according to the first embodiment of the present invention. As shown in the first row of FIG. 6, when the portion corresponding to the black frame area in the input image data is binarized, the image data becomes all black as shown in the second row. For halftone images, the error diffusion method or dither method is used to express the gradation, so unnecessary light is mixed in as in the case where reading is performed with the cover of the document opened. Then, the portion which is originally a black frame region is not completely black, and white pixels are scattered in some places. In the third row of FIG. 6, this is expressed on a line. In such a case, when white appears, M
The counter 103 stops counting or the N counter 1
When the counter 04 resets the counter value, it is recognized that the black frame area is smaller than the actual area, and as a result, it becomes impossible to appropriately remove the black frame. Therefore, with respect to halftone data, even if white pixels are detected, if the number is equal to or less than a predetermined number, it is determined that black is continuous. That is, as shown in the fourth row of FIG. 6, the M counter 103 continues counting black pixels even when detecting white pixels, and determines the M counter value when continuous white pixels are detected. Although not shown, even if the N counter 104 detects a white pixel, if the number is equal to or smaller than a predetermined number, it is regarded that black is continuous, and the black pixel is continuous and the reading range is not changed. When reaching the rightmost end, the N counter value is determined.

【0042】これにより、中間調の読取モードで原稿を
読取る場合であっても、不当に短く黒枠領域を誤検知し
て、不適切な黒枠除去がなされ、無駄な記録紙が発生す
るのを防止することができる。
Thus, even when an original is read in the halftone reading mode, an erroneously short black frame area is erroneously detected and inappropriate black frame removal is performed, thereby preventing wasteful recording paper from being generated. can do.

【0043】次に、本発明の実施の形態1に係る画像処
理装置の使用例について、図7を参照して説明する。図
7は、本発明の実施の形態1に係る画像処理装置の使用
例を示す図であり、図7(a)は、原稿が斜めに置かれ
た状態を示す図である。本発明の実施の形態1に係る画
像処理装置は、Mカウンタ値とNカウンタ値によりライ
ン毎に黒枠を検知するため、このように原稿が斜めに置
かれても、正確に原稿の縁を自動的に認識して、適切な
範囲で周囲の黒をマスクすることができる。但し、画像
データに対して、原稿の曲がりは補正しない。
Next, an example of use of the image processing apparatus according to the first embodiment of the present invention will be described with reference to FIG. FIG. 7 is a diagram illustrating an example of use of the image processing apparatus according to the first embodiment of the present invention, and FIG. 7A is a diagram illustrating a state where a document is placed obliquely. Since the image processing apparatus according to the first embodiment of the present invention detects a black frame for each line based on the M counter value and the N counter value, even if the document is placed obliquely as described above, the edge of the document is automatically detected. It is possible to mask surrounding black in an appropriate range by recognizing the situation. However, the original data is not corrected for the image data.

【0044】図7(b)は、読取範囲に対して原稿がず
れて置かれた場合を示す図である。このような場合で
も、本発明の実施の形態1に係る画像処理装置は、Mカ
ウンタ値とNカウンタ値によりライン毎に黒枠を検知す
るため、有効な読取範囲を正確に残しつつ、適切な範囲
で黒枠を除去することが可能である。
FIG. 7B is a diagram showing a case where the document is shifted from the reading range. Even in such a case, the image processing apparatus according to the first embodiment of the present invention detects the black frame for each line based on the M counter value and the N counter value. Can remove the black frame.

【0045】(実施の形態2)次に、本発明の実施の形
態2に係る画像処理装置について説明する。実施の形態
2に係る画像処理装置は、1回の読取処理において黒枠
領域の除去を行うのみならず、原稿が曲がって配置され
た場合であっても原稿の曲がりを適正に補正する。
(Embodiment 2) Next, an image processing apparatus according to Embodiment 2 of the present invention will be described. The image processing apparatus according to the second embodiment not only removes the black frame region in one reading process, but also appropriately corrects the curving of the document even when the document is bent.

【0046】図8は、本発明の実施の形態2に係る画像
処理装置の概略構成を示すブロック図である。なお、実
施の形態1と同様の構成については、同一の番号を付
し、説明を省略する。マスク生成部801は、画信号を
マスクするための信号を生成し、イネーブル生成部80
2は、ページメモリの書出し位置を変えるためにタイミ
ングをずらしたイネーブル信号を生成する。また、傾き
方向補正ライン検知部803は、原稿の傾きの方向によ
りどこからどこまでを補正するかを検出し、セレクタ8
04は、上記の結果より補正の必要性の有無を選択す
る。
FIG. 8 is a block diagram showing a schematic configuration of an image processing apparatus according to Embodiment 2 of the present invention. Note that the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted. The mask generation unit 801 generates a signal for masking an image signal, and
2 generates an enable signal whose timing is shifted to change the write position of the page memory. Further, the inclination direction correction line detection unit 803 detects the position from which the image is to be corrected according to the direction of the inclination of the document.
Step 04 selects the necessity of correction based on the above result.

【0047】次に、以上のように構成された本発明の実
施の形態2に係る画像処理装置におけるデータの入力と
マスク後の出力との関係について説明する。図9は、本
発明の実施の形態2に係る画像処理装置におけるデータ
の入出力関係を示すタイミングチャート図である。原稿
の読取範囲を規制するイネーブル入力信号に基づき、図
示しない読取手段が原稿の読取を開始する。この原稿の
場合、最左端から黒が存在しているため、Mカウンタ1
03が黒画素領域のカウントを開始する。Mカウンタ1
03はカウントを継続し、最初に白が出現する部分でM
カウンタ値Mが決定する。白が連続した後、最初に黒が
出現したときにNカウンタ104が黒画素領域のカウン
トを開始する。Nカウンタ104は、白が出現するとカ
ウンタ値をリセットするが、この場合は、黒が連続する
ため、Nカウンタ104はカウントを継続する。最右端
に達すると、Nカウンタ値Nが決定する。マスクMカウ
ンタ105とマスクNカウンタ106は、それぞれ、カ
ウンタ値M、Nに基づいてマージンを含めた値を算出す
る。ここでは、第3ラインまでを読み込んだ状態を示し
ており、原稿が左に傾いて置かれたため、図示するよう
に、ラインが進むに従って最左端の黒枠領域が増加して
いる。
Next, the relationship between data input and masked output in the image processing apparatus according to the second embodiment of the present invention configured as described above will be described. FIG. 9 is a timing chart showing an input / output relationship of data in the image processing apparatus according to Embodiment 2 of the present invention. A reading unit (not shown) starts reading the document based on an enable input signal for restricting the reading range of the document. In the case of this document, since black exists from the leftmost end, the M counter 1
03 starts counting the black pixel area. M counter 1
03 continues counting, and M is the part where white first appears.
The counter value M is determined. After black continues, the N counter 104 starts counting the black pixel area when black first appears. The N counter 104 resets the counter value when white appears, but in this case, since black continues, the N counter 104 continues counting. When the rightmost end is reached, the N counter value N is determined. The mask M counter 105 and the mask N counter 106 calculate a value including a margin based on the counter values M and N, respectively. Here, a state in which the third line is read is shown, and the original is placed to the left, and as shown, the leftmost black frame area increases as the line advances.

【0048】イネーブル生成部802は、Mカウンタ値
に応じて、図示しないページメモリへの書き出し位置を
変更するイネーブル信号を生成する。第1ラインにおい
て、Mカウンタの値Mが求まると、イネーブル生成部8
02は、このMに基づいて、第2ライン以降のラインに
対し、書き出し位置から最初に出現する白画素までの幅
が常にMとなるように、イネーブル信号を変更して出力
する。すなわち、第2ライン以降の各ラインにおける有
効領域の始点が第1ラインの有効領域の始点に合うよう
にページメモリへの書き込みタイミングを変更する。
The enable generation unit 802 generates an enable signal for changing a write position to a page memory (not shown) according to the M counter value. In the first line, when the value M of the M counter is obtained, the enable generation unit 8
No. 02 changes and outputs the enable signal based on the M so that the width from the writing position to the first appearing white pixel is always M for the second and subsequent lines. That is, the timing of writing to the page memory is changed so that the start point of the effective area in each line after the second line matches the start point of the effective area in the first line.

【0049】同時に、傾き方向補正ライン検知部803
が、原稿の傾きの方向によりどこからどこまでを補正す
るかを検出し、検出結果をセレクタ804へ出力する。
セレクタ804は、入力された原稿の傾きに関する信号
に基づき、原稿が曲がっている場合は、イネーブル生成
部802が生成したイネーブル信号を選択して出力し、
原稿が曲がっていない場合は、通常の読取で使用するイ
ネーブル信号を選択して出力する。
At the same time, the inclination direction correction line detecting unit 803
Detects the position from which to correct according to the direction of the inclination of the document, and outputs the detection result to the selector 804.
The selector 804 selects and outputs the enable signal generated by the enable generation unit 802 based on the input signal relating to the inclination of the original when the original is bent,
If the original is not bent, an enable signal used in normal reading is selected and output.

【0050】一方、マスク生成部801は、画信号をマ
スクするための信号を生成し、マスク部107は、その
値により決められた領域をマスクし、データを出力す
る。
On the other hand, mask generation section 801 generates a signal for masking an image signal, and mask section 107 masks an area determined by the value and outputs data.

【0051】これにより、有効領域の始点を各ライン間
で同一位置に揃えることができるので、1回の読取処理
において黒枠領域の除去を行うのみならず、原稿が曲が
って配置された場合であっても原稿の曲がりを適正に補
正することができる。
As a result, the starting point of the effective area can be aligned at the same position between the lines, so that not only the black frame area is removed in one reading process but also the original is bent. However, it is possible to properly correct the skew of the original.

【0052】次に、本発明の実施の形態2に係る画像処
理装置の使用例について、図10を参照して説明する。
図10は、本発明の実施の形態2に係る画像処理装置の
使用例を示す図であり、図10(a)は、原稿が斜めに
置かれた状態を示す図である。本発明の実施の形態2に
係る画像処理装置は、原稿の縁を自動的に認識して、周
囲の黒をマスクし、かつ主走査方向に対して原稿の曲が
りを補正する。すなわち、Mカウンタ値とNカウンタ値
によりライン毎に黒枠を検知し、有効領域の始点を各ラ
イン間で同一位置に揃えるため、図10(a)に示すよ
うに原稿が斜めに置かれても、原稿の曲がりを補正する
ことができる。画像データに対しても補正を行うため、
原稿の有効領域の画像が多少歪むが、原稿の曲がりが小
さい場合は、ほとんど影響が出ないため、原稿の曲がり
に対する補正は有効に機能する。
Next, an example of use of the image processing apparatus according to the second embodiment of the present invention will be described with reference to FIG.
FIG. 10 is a diagram illustrating a use example of the image processing apparatus according to the second embodiment of the present invention, and FIG. 10A is a diagram illustrating a state where a document is placed obliquely. The image processing apparatus according to the second embodiment of the present invention automatically recognizes the edge of the document, masks the surrounding black, and corrects the curvature of the document in the main scanning direction. That is, a black frame is detected for each line based on the M counter value and the N counter value, and the starting point of the effective area is aligned at the same position between the lines. Therefore, even if the document is placed obliquely as shown in FIG. , It is possible to correct the bending of the original. In order to correct image data,
If the image in the effective area of the document is slightly distorted, but the curvature of the document is small, there is almost no effect, so the correction for the curvature of the document functions effectively.

【0053】図10(b)は、読取範囲に対して原稿が
左又は右にずれて置かれた場合、補正する範囲と補正を
しない範囲とを示す図である。実施の形態2では、原稿
が左曲がりである場合は、有効画像データの始点が最左
端であるラインを第1ラインとして、これ以降、このラ
インの有効画像データの始点に、各ラインの有効画像デ
ータの始点を揃える。一方、最左端であるライン以前の
画像領域における各ラインの始点については、第1ライ
ンの始点に揃えると適正な画像が得られなくなるため、
それぞれ有効画像データの始点から各ラインを書き込
む。一方、原稿が右曲がりである場合は、有効画像デー
タの始点が最左端であるライン以前の領域については第
1ラインの読取開始位置から有効画像データの始点まで
の間隔だけずらしてそれぞれ有効画像データの始点から
各ラインを書き込み、最左端であるライン以降について
は、読取開始位置から有効画像データの始点までの間隔
だけずらすと適正な画像が得られなくなるため、それぞ
れ有効画像データの始点から各ラインを書き込む。
FIG. 10B is a diagram showing a range to be corrected and a range not to be corrected when the document is shifted left or right with respect to the reading range. In the second embodiment, when the original is left-turned, the line where the start point of the effective image data is the leftmost end is set as the first line, and thereafter, the effective image data of each line is set as the start point of the effective image data of this line. Align the starting point of the data. On the other hand, if the start point of each line in the image area before the leftmost line is aligned with the start point of the first line, an appropriate image cannot be obtained.
Each line is written from the start point of the effective image data. On the other hand, when the original is right-turned, the effective image data is shifted from the reading start position of the first line to the start of the effective image data in the area before the line where the effective image data start point is the leftmost end. Each line is written from the start point of the line, and after the line at the leftmost end, if the distance from the reading start position to the start point of the effective image data is shifted, an appropriate image cannot be obtained. Write.

【0054】これにより、原稿が曲がって読取られた場
合、すべてのラインについて有効画像データの始点を揃
えることにより、複写画像が原画像と上端部若しくは下
端部において著しく異なったものとして再現されるのを
防止しつつ、原稿の曲がり補正をし、黒枠領域の除去を
行うことができる。
In this way, when the original is read in a bent state, the start point of the effective image data is aligned for all the lines, so that the copied image is reproduced as being significantly different from the original image at the upper end or the lower end. , The skew of the document can be corrected, and the black frame region can be removed.

【0055】(実施の形態3)次に、本発明の実施の形
態3に係る画像処理装置について、図面を参照して説明
する。実施の形態3に係る画像処理装置は、1回の読取
処理において黒枠領域の除去を行うのみならず、原稿が
曲がって配置された場合であっても原稿の曲がりを適正
に補正する。
(Embodiment 3) Next, an image processing apparatus according to Embodiment 3 of the present invention will be described with reference to the drawings. The image processing apparatus according to the third embodiment not only removes the black frame area in one reading process, but also appropriately corrects the curving of the document even when the document is bent.

【0056】図11は、本発明の実施の形態3に係る画
像処理装置の概略構成を示すブロック図である。なお、
実施の形態1および実施の形態2と同様の構成について
は、同一の番号を付し、説明を省略する。ラインメモリ
読出しアドレス制御部1001は、ラインメモリA10
1およびラインメモリB102対して、読み出し位置を
変更する制御を行う。また、このラインメモリ読出しア
ドレス制御部1001には、Mカウンタ103の出力信
号と、傾き方向補正ライン検知部803の出力信号とが
入力される。
FIG. 11 is a block diagram showing a schematic configuration of an image processing apparatus according to Embodiment 3 of the present invention. In addition,
The same configurations as those in the first and second embodiments are denoted by the same reference numerals, and description thereof is omitted. The line memory read address control unit 1001 includes a line memory A10
1 and the line memory B102 are controlled to change the reading position. Further, the output signal of the M counter 103 and the output signal of the tilt direction correction line detection unit 803 are input to the line memory read address control unit 1001.

【0057】次に、以上のように構成された本発明の実
施の形態3に係る画像処理装置におけるデータの入力と
マスク後の出力との関係について説明する。図12は、
本発明の実施の形態2に係る画像処理装置におけるデー
タの入出力関係を示すタイミングチャート図である。原
稿の読取範囲を規制するイネーブル入力信号に基づき、
図示しない読取手段が原稿の読取を開始する。実施の形
態3では、このイネーブル入力信号は、固定値とされて
いる。
Next, the relationship between data input and masked output in the image processing apparatus according to Embodiment 3 of the present invention configured as described above will be described. FIG.
FIG. 9 is a timing chart illustrating an input / output relationship of data in the image processing apparatus according to the second embodiment of the present invention. Based on the enable input signal that regulates the reading range of the original,
A reading unit (not shown) starts reading the document. In the third embodiment, the enable input signal has a fixed value.

【0058】ここで読取った原稿の場合、最左端から黒
が存在しているため、Mカウンタ103が黒画素領域の
カウントを開始する。Mカウンタ103はカウントを継
続し、最初に白が出現する部分でMカウンタ値Mが決定
する。白が連続した後、最初に黒が出現したときにNカ
ウンタ104が黒画素領域のカウントを開始する。Nカ
ウンタ104は、白が出現するとカウンタ値をリセット
するが、この場合は、黒が連続するため、Nカウンタ1
04はカウントを継続する。最右端に達すると、Nカウ
ンタ値Nが決定する。マスクMカウンタ105とマスク
Nカウンタ106は、それぞれ、カウンタ値M、Nに基
づいてマージンを含めた値を算出する。ここでは、第3
ラインまでを読み込んだ状態を示しており、原稿が左に
傾いて置かれたため、図示するように、ラインが進むに
従って最左端の黒枠領域が増加している。
In the case of the document read here, since black exists from the leftmost end, the M counter 103 starts counting the black pixel area. The M counter 103 continues counting, and the M counter value M is determined at a portion where white first appears. After black continues, the N counter 104 starts counting the black pixel area when black first appears. The N counter 104 resets the counter value when white appears. In this case, since black continues, the N counter 1
04 continues counting. When the rightmost end is reached, the N counter value N is determined. The mask M counter 105 and the mask N counter 106 calculate a value including a margin based on the counter values M and N, respectively. Here, the third
This shows a state in which the line has been read, and the original is placed to the left, and as shown in the figure, the leftmost black frame area increases as the line advances.

【0059】ラインメモリ読出しアドレス制御部100
1は、第1ラインにおいて、Mカウンタの値Mが求まる
と、この値Mに基づいて、第2ライン以降のラインに対
し、読み出し位置から原稿の有効領域までの幅が常にM
となるように、ラインメモリA101およびラインメモ
リB102からの読み出し位置を変更する。すなわち、
第2ライン以降の各ラインにおける有効領域の始点が第
1ラインの有効領域の始点に合うように読み出し位置を
変更する。
Line memory read address control unit 100
When the value M of the M counter is obtained in the first line, the width from the reading position to the effective area of the document is always M for the lines subsequent to the second line based on this value M.
The read positions from the line memories A101 and B102 are changed so that That is,
The read position is changed so that the start point of the effective area in each line after the second line matches the start point of the effective area in the first line.

【0060】マスクMカウンタ105とマスクNカウン
タ106とによって、マスクの値が決定すると、マスク
部107は、その値により決められた領域をマスクし、
データを出力する。
When the mask value is determined by the mask M counter 105 and the mask N counter 106, the mask unit 107 masks the area determined by the value.
Output data.

【0061】これにより、有効領域の始点を各ライン間
で同一位置に揃えることができるので、1回の読取処理
において黒枠領域の除去を行うのみならず、原稿が曲が
って配置された場合であっても原稿の曲がりを適正に補
正することができる。
As a result, the starting point of the effective area can be aligned at the same position between the lines, so that not only the black frame area is removed in one reading process but also the original is bent. However, it is possible to properly correct the skew of the original.

【0062】なお、本発明の実施の形態3に係る画像処
理装置の使用例は、図10に示す実施の形態2と同様
に、原稿が斜めに置かれた場合や、原稿がずらして置か
れた場合にも適用することができる。
As in the case of Embodiment 2 shown in FIG. 10, an example of use of the image processing apparatus according to Embodiment 3 of the present invention is a case where an original is placed obliquely or an original is shifted. It can also be applied when

【0063】(実施の形態4)次に、本発明の実施の形
態4に係る画像処理装置について、図面を参照して説明
する。実施の形態4に係る画像処理装置は、1回の読取
動作で黒枠領域を除去すると共に、原稿の傾き方向を検
出する。
(Embodiment 4) Next, an image processing apparatus according to Embodiment 4 of the present invention will be described with reference to the drawings. The image processing apparatus according to the fourth embodiment removes the black frame area by one reading operation and detects the inclination direction of the document.

【0064】図13は、本発明の実施の形態4に係る画
像処理装置の概略構成を示すブロック図である。Mカウ
ンタ1301は、左端のマスク幅検知カウンタであり、
Nカウンタ1302は、右端のマスク幅検知カウンタで
ある。また、ラッチ回路1303、1305、1307
は、前ラインと現ラインで比較するための前ラインラッ
チ回路であり、比較器1304、1306、1308
は、前ラインと現ラインを比較する。また、比較器13
09は、比較器1306と比較器1308の出力信号を
比較する。条件判定部1310は、比較器1304と比
較器1309からの入力信号に基づいて補正すべき範囲
を判定する。
FIG. 13 is a block diagram showing a schematic configuration of an image processing apparatus according to Embodiment 4 of the present invention. An M counter 1301 is a mask width detection counter at the left end,
The N counter 1302 is a rightmost mask width detection counter. Latch circuits 1303, 1305, 1307
Is a previous line latch circuit for comparing the previous line with the current line, and includes comparators 1304, 1306, 1308
Compares the previous line with the current line. Further, the comparator 13
09 compares the output signals of the comparator 1306 and the comparator 1308. Condition determination unit 1310 determines a range to be corrected based on input signals from comparators 1304 and 1309.

【0065】次に、以上のように構成された本発明の実
施の形態4に係る画像処理装置の動作について説明す
る。図示しない読取手段が原稿の読取を開始すると、読
取られた画像データがMカウンタ1301とNカウンタ
1302に入力される。Mカウンタ1301とNカウン
タ1302の機能は、実施の形態1と同様である。Mカ
ウンタ1301の出力は、前ラインAについてはラッチ
回路1303、1305へ入力され、現ラインBは比較
器1304、1306に入力される。比較器1304
は、前ラインAにおけるMカウンタ1301の値と現ラ
インBにおけるMカウンタ1301の値との大小を比較
して比較結果を条件判定部1310に出力する。
Next, the operation of the image processing apparatus according to Embodiment 4 of the present invention configured as described above will be described. When reading means (not shown) starts reading a document, the read image data is input to the M counter 1301 and the N counter 1302. The functions of M counter 1301 and N counter 1302 are the same as in the first embodiment. The output of the M counter 1301 is input to the latch circuits 1303 and 1305 for the previous line A, and the current line B is input to the comparators 1304 and 1306. Comparator 1304
Compares the value of the M counter 1301 in the previous line A with the value of the M counter 1301 in the current line B, and outputs the comparison result to the condition determination unit 1310.

【0066】また、比較器1306は、Mカウンタ13
01からの入力信号とラッチ回路1305からの入力信
号とを比較して比較結果を比較器1309へ出力する。
また、比較器1308は、Nカウンタ1302からの入
力信号とラッチ回路1307からの入力信号とを比較し
て比較結果を比較器1309へ出力する。ここで比較器
1309における比較動作について図14を参照して説
明する。
The comparator 1306 is provided with the M counter 13
The input signal from 01 and the input signal from latch circuit 1305 are compared, and the comparison result is output to comparator 1309.
The comparator 1308 compares the input signal from the N counter 1302 with the input signal from the latch circuit 1307 and outputs a comparison result to the comparator 1309. Here, the comparison operation in the comparator 1309 will be described with reference to FIG.

【0067】図14は、本発明の実施の形態4に係る画
像処理装置における比較器1309の原稿の曲がり方向
を検出する場合のタイミングチャート図である。図14
において、前ラインを、現ラインをとする。比較器
1306は、こののMカウンタ値とのMカウンタ値
とから差分xを算出する。また、比較器1308は、
のNカウンタ値とのNカウンタ値とから差分yを算出
する。比較器1309は、このxとyとの大小を比較し
て原稿の傾き方向を判定する。図14に示す原稿の場
合、比較の結果x>yとなるため、原稿の傾き方向は、
「右」と判断する。比較器1309は、この判断結果を
条件判定部1310に出力する。
FIG. 14 is a timing chart of the comparator 1309 in the image processing apparatus according to Embodiment 4 of the present invention when detecting the bending direction of a document. FIG.
In, the previous line is the current line. The comparator 1306 calculates a difference x from the M counter value and the M counter value. Also, the comparator 1308
The difference y is calculated from the N counter value and the N counter value. The comparator 1309 compares the magnitudes of x and y to determine the inclination direction of the document. In the case of the original shown in FIG. 14, since the comparison results in x> y, the inclination direction of the original is
Judge as "right". Comparator 1309 outputs this determination result to condition determination section 1310.

【0068】条件判定部1310は、入力された各信号
に基づき、原稿が左曲がりであって、読取った現ライン
Bの最左端の黒画素領域が前ラインAの最左端の黒画素
領域よりも大きい場合は、その現ラインBについて補正
を行い、小さい場合は、補正を行わないと判断する。こ
れは、実施の形態2でも説明したように、左曲がりの場
合は、原稿の右上の部分は、補正によって最左端に揃え
られてしまうため、適正な画像が得られなくなってしま
う。このため、左曲がりの場合は、水平に対して右上に
はみ出る部分に対しては、補正をせず、その他について
は補正を行う。同様に、条件判定部1310は、原稿が
右曲がりであって、読取った現ラインBの最左端の黒画
素領域が前ラインAの最左端の黒画素領域よりも大きい
場合は、その現ラインBについて補正をせず、小さい場
合は補正をすると判断する。右曲がりの場合、水平に対
して右下にはみ出る部分に対しては、補正によって最左
端に揃えられてしまい、適正な画像が得られなくなって
しまうため、右曲がりの場合は、水平に対して右下には
み出る部分に対して補正をしないこととした。
The condition judging unit 1310 determines that the leftmost black pixel area of the read current line B is larger than the leftmost black pixel area of the previous line A based on the input signals. If it is larger, the current line B is corrected, and if smaller, it is determined that no correction is performed. This is because, as described in the second embodiment, in the case of a left turn, the upper right portion of the document is aligned to the left end by the correction, so that an appropriate image cannot be obtained. For this reason, in the case of a left turn, no correction is made for the portion that protrudes to the upper right with respect to the horizontal, and correction is made for the other portions. Similarly, if the original is right-turned and the leftmost black pixel area of the read current line B is larger than the leftmost black pixel area of the previous line A, the condition determination unit 1310 determines that the current line B Is not corrected, and when it is smaller, it is determined to correct. In the case of a right turn, the portion protruding to the lower right with respect to the horizontal will be aligned to the left end by correction, and it will not be possible to obtain an appropriate image, so in the case of a right turn, No correction was made for the portion protruding to the lower right.

【0069】これにより、原稿を読みながら同時に原稿
の傾きを検知できるため、1回の読取処理において、極
めて簡易な構成により、画像データの取り込み、黒枠領
域の除去、原稿の傾き方向、の3つの検知をすることが
できる。
With this, the inclination of the original can be detected simultaneously while reading the original. Therefore, in one reading process, the image data can be acquired, the black frame area can be removed, and the inclination direction of the original can be reduced with a very simple configuration. Can be detected.

【0070】(実施の形態5)次に、本発明の実施の形
態5に係る画像処理装置について説明する。実施の形態
5に係る画像処理装置は、1回の読取動作で黒枠領域の
除去、原稿の傾き方向、およびその傾きの角度を検出す
る。
(Embodiment 5) Next, an image processing apparatus according to Embodiment 5 of the present invention will be described. The image processing apparatus according to the fifth embodiment detects the removal of the black frame area, the inclination direction of the document, and the angle of the inclination in one reading operation.

【0071】図15は、本発明の実施の形態5に係る画
像処理装置の概略構成を示すブロック図である。Mカウ
ンタ1501は、左端のマスク幅検知カウンタであり、
Nカウンタ1502は、右端のマスク幅検知カウンタで
ある。ラッチ回路1503、1505、1507、15
08は、前ラインと現ラインで比較するための前ライン
ラッチ回路であり、比較器1504、1506は、前ラ
インと現ラインとを比較する。
FIG. 15 is a block diagram showing a schematic configuration of an image processing apparatus according to Embodiment 5 of the present invention. An M counter 1501 is a mask width detection counter at the left end,
The N counter 1502 is a rightmost mask width detection counter. Latch circuits 1503, 1505, 1507, 15
08 is a previous line latch circuit for comparing the previous line with the current line, and the comparators 1504 and 1506 compare the previous line with the current line.

【0072】次に、以上のように構成された本発明の実
施の形態5に係る画像処理装置の動作について説明す
る。図示しない読取手段が原稿の読取を開始すると、読
取られた画像データがMカウンタ1501とNカウンタ
1502に入力される。Mカウンタ1501とNカウン
タ1502の機能は、実施の形態1と同様である。Mカ
ウンタ1501の出力は、前ラインAについてはラッチ
回路1503へ入力され、現ラインBは比較器1504
に入力される。比較器1504は、前ラインAにおける
Mカウンタ1501の値と現ラインBにおけるMカウン
タ1501の値との大小を比較して比較結果をラッチ回
路1507に出力する。
Next, the operation of the image processing apparatus according to the fifth embodiment of the present invention configured as described above will be described. When a reading unit (not shown) starts reading a document, the read image data is input to the M counter 1501 and the N counter 1502. The functions of M counter 1501 and N counter 1502 are the same as in the first embodiment. The output of the M counter 1501 is input to the latch circuit 1503 for the previous line A, and the current line B is output to the comparator 1504
Is input to The comparator 1504 compares the value of the M counter 1501 in the previous line A with the value of the M counter 1501 in the current line B, and outputs the comparison result to the latch circuit 1507.

【0073】また、Nカウンタ1502の出力は、前ラ
インAについてはラッチ回路1505へ入力され、現ラ
インBは比較器1506に入力される。比較器1506
は、前ラインAにおけるNカウンタ1502の値と現ラ
インBにおけるNカウンタ1502の値との大小を比較
して比較結果をラッチ回路1508に出力する。ラッチ
回路1507、1508は、判定ライン数の指示を受け
て、Mカウンタ値およびNカウンタ値の変化量を出力す
る。これらのラッチ回路1507、1508の出力信号
に基づいて、原稿の傾き角度が検出される。この原稿の
傾き角度検出について、図16を参照して説明する。
The output of the N counter 1502 is input to the latch circuit 1505 for the previous line A, and the current line B is input to the comparator 1506. Comparator 1506
Compares the value of the N counter 1502 in the previous line A with the value of the N counter 1502 in the current line B, and outputs the comparison result to the latch circuit 1508. Latch circuits 1507 and 1508 receive the instruction of the number of determination lines and output the change amounts of the M counter value and the N counter value. The tilt angle of the document is detected based on the output signals of these latch circuits 1507 and 1508. The detection of the inclination angle of the document will be described with reference to FIG.

【0074】図16は、本発明の実施の形態5に係る画
像処理装置の原稿の傾き角度を検出する場合のタイミン
グチャート図である。図16において、前ラインを、
現ラインをとする。比較器1504は、こののMカ
ウンタ値とのMカウンタ値とから差分Aを算出する。
また、比較器1506は、のNカウンタ値とのNカ
ウンタ値とから差分Bを算出する。図16に示す原稿の
場合、A>Bとなるため、原稿の傾き方向は、「右」と
判断する。
FIG. 16 is a timing chart in the case where the image processing apparatus according to Embodiment 5 of the present invention detects the inclination angle of a document. In FIG. 16, the previous line is
The current line is assumed. The comparator 1504 calculates a difference A from the M counter value and the M counter value.
The comparator 1506 calculates a difference B from the N counter value and the N counter value. In the case of the original shown in FIG. 16, since A> B, the inclination direction of the original is determined to be “right”.

【0075】また、図16に示すように、前ラインと
現ラインとの距離をCとし、水平に対して原稿の左側
の辺がなす角度を∠x、水平に対して原稿の右側の辺が
なす角度を∠yとする。この場合、∠xは、次の式で計
算される。 ∠x=tan-1(C/A)
As shown in FIG. 16, the distance between the previous line and the current line is C, the angle formed by the left side of the document with respect to the horizontal is Δx, and the right side of the document with respect to the horizontal is The angle formed is Δy. In this case, Δx is calculated by the following equation. ∠x = tan -1 (C / A)

【0076】次に、本発明の実施の形態5に係る画像処
理装置の原稿の傾き角度を検出する動作について、図1
7を参照して説明する。
Next, the operation of the image processing apparatus according to Embodiment 5 of the present invention for detecting the inclination angle of the original will be described with reference to FIG.
This will be described with reference to FIG.

【0077】図17は、本発明の実施の形態5に係る画
像処理装置の原稿の傾き角度を検出する動作フロー図で
ある。原稿の読取が開始すると(ステップS1)、ある
所定のαというラインを経過したかどうかを判断する
(ステップS2)。αラインを経過していない場合はこ
の判断を繰り返し、αラインを経過している場合は1回
目のラインカウントを指示する(ステップS3)。これ
により、1回目のMカウンタ値とNカウンタ値とが確定
する。次に、Cライン経過したかどうかを判断し(ステ
ップS4)、Cラインを経過していない場合は、この判
断を繰り返す。Cラインを経過している場合は、2回目
のラインカウントをしじする(ステップST5)。これ
により、2回目のMカウンタ値とNカウンタ値とが確定
する。以上により、図16に示すAとBの値が確定す
る。この値は、図示しないメモリに格納される。
FIG. 17 is an operation flowchart for detecting the inclination angle of the document in the image processing apparatus according to the fifth embodiment of the present invention. When the reading of the document is started (step S1), it is determined whether or not a predetermined α line has passed (step S2). If it has not passed the α line, this determination is repeated, and if it has passed the α line, the first line count is instructed (step S3). As a result, the first M counter value and N counter value are determined. Next, it is determined whether the C line has elapsed (step S4). If the C line has not elapsed, this determination is repeated. If the C line has passed, the second line count is performed (step ST5). As a result, the second M counter value and the N counter value are determined. Thus, the values of A and B shown in FIG. 16 are determined. This value is stored in a memory (not shown).

【0078】次に、A、Bの値を読み出し、AがBより
も大きいかどうかを判断する(ステップS7)。AがB
よりも大きくない場合は、原稿の傾きは左であると判断
し(ステップS8)、角度を判定する(ステップS
9)。この場合は、図16に示す∠yについて、次の式
で算出する。 ∠y=tan-1(C/B)
Next, the values of A and B are read, and it is determined whether A is greater than B (step S7). A is B
If not larger, it is determined that the inclination of the document is left (step S8), and the angle is determined (step S8).
9). In this case, Δy shown in FIG. 16 is calculated by the following equation. ∠y = tan -1 (C / B)

【0079】一方、ステップS7において、AがBより
も大きい場合は、原稿の傾きは右であると判断し(ステ
ップS10)、角度を判定する(ステップS11)。こ
の場合は、図16に示す∠xについて、次の式で算出す
る。 ∠x=tan-1(C/A)
On the other hand, if A is larger than B in step S7, it is determined that the original is tilted right (step S10), and the angle is determined (step S11). In this case, Δx shown in FIG. 16 is calculated by the following equation. ∠x = tan -1 (C / A)

【0080】これにより、読取画像データの全体をメモ
リに一旦格納して傾きを検知するのではなく、原稿を読
みながら同時に原稿の傾きを検知するため、1回の読取
処理において、極めて簡易な構成により、画像データの
取り込み、黒枠領域の除去、原稿の傾き方向、その傾き
角度、の4つの検知を並列に行うことができる。
Thus, instead of storing the entirety of the read image data in the memory once and detecting the inclination, the inclination of the original is detected at the same time as the original is being read. Accordingly, the four detections of image data capture, removal of the black frame area, the direction of inclination of the document, and its inclination angle can be performed in parallel.

【0081】[0081]

【発明の効果】以上の説明から明らかなように、本発明
によれば、各ラインの画像データを保持しながら同時に
両端の黒画素領域を検出し、出力する際に各画像データ
の両端の黒画素領域を無効としながら出力することによ
り、同一ラインについて1回の読取処理において自動的
に画像データから両端の黒画素領域を除去する処理を行
うことができるので、オペレータを煩わせることなく、
また、同一原稿を複数回読取らないので、読取速度を遅
延させることなく、画像データの適切な黒枠領域の除去
を実現できる。
As is apparent from the above description, according to the present invention, the black pixel regions at both ends are simultaneously detected while outputting the image data of each line, and the black pixels at both ends of each image data are output. By outputting while disabling the pixel area, it is possible to automatically remove the black pixel areas at both ends from the image data in one reading process for the same line, so that the operator is not bothered.
Further, since the same document is not read a plurality of times, it is possible to realize appropriate removal of the black frame region of the image data without delaying the reading speed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態1に係る画像処理装置の概
略構成を示すブロック図
FIG. 1 is a block diagram illustrating a schematic configuration of an image processing apparatus according to a first embodiment of the present invention;

【図2】本発明の実施の形態1に係る画像処理装置にお
ける画像の読取動作および書き込み動作のタイミングチ
ャート図
FIG. 2 is a timing chart of an image reading operation and a writing operation in the image processing apparatus according to the first embodiment of the present invention;

【図3】本発明の実施の形態1に係る画像処理装置にお
いて、1ラインの画像データ中に黒がない場合における
データの入出力関係を示すタイミングチャート図
FIG. 3 is a timing chart showing an input / output relationship of data when there is no black in one line of image data in the image processing apparatus according to Embodiment 1 of the present invention;

【図4】本発明の実施の形態1に係る画像処理装置にお
いて、1ラインの画像データ中に黒がある場合における
データの入出力関係を示すタイミングチャート図
FIG. 4 is a timing chart showing a data input / output relationship when black is included in one line of image data in the image processing apparatus according to the first embodiment of the present invention;

【図5】本発明の実施の形態1に係る画像処理装置にお
いて、1ラインの画像データの1画素目から白である場
合におけるデータの入出力関係を示すタイミングチャー
ト図
FIG. 5 is a timing chart showing an input / output relationship of data when the first pixel of one line of image data is white in the image processing apparatus according to Embodiment 1 of the present invention;

【図6】本発明の実施の形態1に係る画像処理装置にお
いて、入力された画像データが中間調である場合におけ
る黒領域の検知を示すタイミングチャート図
FIG. 6 is a timing chart showing detection of a black area when input image data is halftone in the image processing apparatus according to the first embodiment of the present invention;

【図7】(a) 本発明の実施の形態1に係る画像処理
装置において、原稿が斜めに置かれた状態を示す図 (b) 本発明の実施の形態1に係る画像処理装置にお
いて、読取範囲に対して原稿がずれて置かれた場合を示
す図
FIG. 7A is a diagram showing a state where a document is placed obliquely in the image processing apparatus according to the first embodiment of the present invention; Figure showing the case where the original is shifted from the range

【図8】本発明の実施の形態2に係る画像処理装置の概
略構成を示すブロック図
FIG. 8 is a block diagram illustrating a schematic configuration of an image processing apparatus according to a second embodiment of the present invention;

【図9】本発明の実施の形態2に係る画像処理装置にお
けるデータの入出力関係を示すタイミングチャート図
FIG. 9 is a timing chart showing an input / output relationship of data in the image processing apparatus according to Embodiment 2 of the present invention;

【図10】(a) 本発明の実施の形態2に係る画像処
理装置において原稿が斜めに置かれた状態を示す図 (b) 本発明の実施の形態2に係る画像処理装置にお
いて読取範囲に対して原稿が左又は右にずれて置かれた
場合、補正する範囲と補正をしない範囲とを示す図
FIG. 10A is a diagram illustrating a state where a document is placed obliquely in the image processing apparatus according to the second embodiment of the present invention; A diagram showing a range to be corrected and a range not to be corrected when the original is shifted left or right.

【図11】本発明の実施の形態3に係る画像処理装置の
概略構成を示すブロック図
FIG. 11 is a block diagram illustrating a schematic configuration of an image processing apparatus according to a third embodiment of the present invention;

【図12】本発明の実施の形態2に係る画像処理装置に
おけるデータの入出力関係を示すタイミングチャート図
FIG. 12 is a timing chart showing an input / output relationship of data in the image processing apparatus according to Embodiment 2 of the present invention;

【図13】本発明の実施の形態4に係る画像処理装置の
概略構成を示すブロック図
FIG. 13 is a block diagram illustrating a schematic configuration of an image processing apparatus according to Embodiment 4 of the present invention;

【図14】本発明の実施の形態4に係る画像処理装置に
おける比較器の原稿の曲がり方向を検出する場合のタイ
ミングチャート図
FIG. 14 is a timing chart in the case where the comparator detects a bending direction of a document in the image processing apparatus according to the fourth embodiment of the present invention;

【図15】本発明の実施の形態5に係る画像処理装置の
概略構成を示すブロック図
FIG. 15 is a block diagram showing a schematic configuration of an image processing apparatus according to Embodiment 5 of the present invention.

【図16】本発明の実施の形態5に係る画像処理装置の
原稿の傾き角度を検出する場合のタイミングチャート図
FIG. 16 is a timing chart for detecting an inclination angle of a document in the image processing apparatus according to the fifth embodiment of the present invention;

【図17】本発明の実施の形態5に係る画像処理装置の
原稿の傾き角度を検出する動作フロー図
FIG. 17 is an operation flowchart for detecting an inclination angle of a document in the image processing apparatus according to the fifth embodiment of the present invention;

【符号の説明】[Explanation of symbols]

101 ラインメモリA 102 ラインメモリB 103、1301、1501 Mカウンタ 104、1302、1502 Nカウンタ 105 マスクMカウンタ 106 マスクNカウンタ 107 マスク部 801 マスク生成部 802 イネーブル生成部 803 傾き方向補正ライン検知部 804 セレクタ 1001 ラインメモリ読出しアドレス制御部 1303、1305、1307、1503、1505、
1507、1508ラッチ回路 1304、1306、1308、1309、1504,
1506 比較器 1310 条件判定部
101 Line memory A 102 Line memory B 103, 1301, 1501 M counter 104, 1302, 1502 N counter 105 Mask M counter 106 Mask N counter 107 Mask unit 801 Mask generation unit 802 Enable generation unit 803 Tilt direction correction line detection unit 804 Selector 1001 line memory read address controller 1303, 1305, 1307, 1503, 1505,
1507, 1508 Latch Circuits 1304, 1306, 1308, 1309, 1504,
1506 Comparator 1310 Condition judgment unit

フロントページの続き (72)発明者 永井 章浩 東京都目黒区下目黒2丁目3番8号 松下 電送システム株式会社内 Fターム(参考) 5C076 AA02 AA18 BA01 BA02 BA03 BA06 BA08 CA10 Continuation of front page (72) Inventor Akihiro Nagai 2-3-8 Shimomeguro, Meguro-ku, Tokyo Matsushita Electric Transmission System Co., Ltd. F-term (reference) 5C076 AA02 AA18 BA01 BA02 BA03 BA06 BA08 CA10

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 読取原稿の画像データをライン単位で保
持する記憶手段と、各ラインの読取開始位置からの連続
黒画素領域を検出する第1の手段と、同一ラインにおい
て前記読取開始位置からの連続黒画素領域以降に出現す
る連続黒画素を白画素が出現する毎にリセットし、最後
に残った連続黒画素領域を検出する第2の手段と、各ラ
インにおいて前記第1の手段および前記第2の手段によ
り検出した前記各ラインに対応する連続黒画素領域を無
効として有効画像データを得る手段と、を具備する画像
処理装置。
A storage unit for storing image data of a read document in line units; a first unit for detecting a continuous black pixel area from a reading start position of each line; Second means for resetting continuous black pixels appearing after the continuous black pixel area each time a white pixel appears, and detecting the last remaining continuous black pixel area; and the first means and the second means for each line. Means for obtaining valid image data by invalidating a continuous black pixel area corresponding to each line detected by the means of (2).
【請求項2】 前記第1の手段は、所定数以内の白画素
を検出した場合でも黒画素が連続していると判断し、前
記第2の手段は所定数以内の白画素を検出した場合でも
黒画素が連続していると判断することを特徴とする請求
項1記載の画像処理装置。
2. The method according to claim 1, wherein the first unit determines that the black pixels are continuous even when the white pixels are detected within a predetermined number, and the second unit detects the white pixels within a predetermined number. 2. The image processing apparatus according to claim 1, wherein it is determined that black pixels are continuous.
【請求項3】 読取原稿の画像データをライン単位で保
持する第1の記憶手段と、各ラインの読取開始位置から
の連続黒画素領域を検出する第1の手段と、同一ライン
において前記読取開始位置からの連続黒画素領域以降に
出現する連続黒画素を白画素が出現する毎にリセットし
最後に残った連続黒画素領域を検出する第2の手段と、
各ラインにおいて前記第1の手段および前記第2の手段
により検出した各ラインに対応する連続黒画素領域を無
効として各ラインの有効画像データを得る手段と、前記
有効画像データを格納する第2の記憶手段と、前記各ラ
インを前記第2の記憶手段に書き込む際、2ライン目以
降の各ラインの有効領域の始点が1ライン目の有効領域
の始点に合うように書き込みタイミングを変える制御を
行う制御手段と、を具備する画像処理装置。
3. A first storage means for storing image data of a read document in units of lines, a first means for detecting a continuous black pixel area from a reading start position of each line, and the reading start on the same line. Second means for resetting continuous black pixels appearing after the continuous black pixel region from the position each time a white pixel appears, and detecting the last remaining continuous black pixel region;
Means for invalidating a continuous black pixel area corresponding to each line detected by the first means and the second means in each line to obtain effective image data of each line, and a second means for storing the effective image data The storage unit and, when writing each line to the second storage unit, control to change the write timing so that the start point of the effective area of each line after the second line matches the start point of the effective area of the first line. An image processing apparatus comprising: a control unit.
【請求項4】 読取原稿の画像データをライン単位で保
持する記憶手段と、各ラインの読取開始位置からの連続
黒画素領域を検出する第1の手段と、同一ラインにおい
て前記読取開始位置からの連続黒画素領域以降に出現す
る連続黒画素を白画素が出現する毎にリセットし最後に
残った連続黒画素領域を検出する第2の手段と、各ライ
ンにおいて、前記第1の手段および前記第2の手段によ
り検出した各ラインに対応する連続黒画素領域を無効と
して有効画像データを得る手段と、前記記憶手段から各
ラインの画像データを読み出す際、2ライン目以降の各
ラインの有効領域の始点が1ライン目の有効領域の始点
に合うように読み出し位置を変える制御を行う制御手段
と、を具備する画像処理装置。
4. A storage means for holding image data of a read document in units of lines, a first means for detecting a continuous black pixel area from a reading start position of each line, and Second means for resetting continuous black pixels appearing after the continuous black pixel area each time a white pixel appears and detecting the last remaining continuous black pixel area; and in each line, the first means and the second means Means for obtaining valid image data by invalidating a continuous black pixel area corresponding to each line detected by the means of (2); and reading out image data of each line from the storage means. Control means for controlling the readout position so that the start point coincides with the start point of the effective area of the first line.
【請求項5】 原稿が右曲がりか左曲がりかを検出する
手段を有し、前記制御手段は、原稿が右曲がりの場合有
効画像データの始点が最左端であるライン以前の領域に
ついては1ライン目の読取開始位置から有効画像データ
の始点までの間隔だけずらして各々有効画像データの始
点から各ラインを書き込み、一方前記最左端であるライ
ン以降については各々有効画像データの始点から各ライ
ンを書き込むようにタイミングを変えることを特徴とす
る請求項3記載の画像処理装置。
5. An image forming apparatus according to claim 1, further comprising: means for detecting whether the original is right-handed or left-handed. If the original is right-handed, said control means outputs one line for an area before the line where the start point of the effective image data is the leftmost end. Each line is written from the start point of the effective image data by shifting by an interval from the eye reading start position to the start point of the effective image data, while each line is written from the start point of the effective image data after the line at the leftmost end. 4. The image processing apparatus according to claim 3, wherein the timing is changed as described above.
【請求項6】 原稿が右曲がりか左曲がりかを検出する
手段を有し、前記制御手段は、原稿が左曲がりの場合有
効画像データの始点が最左端であるラインを1ライン目
としこれ以降このラインの有効画像データの始点に各ラ
インの有効画像データの始点を揃え、一方前記最左端で
あるライン以前の領域については各々有効画像データの
始点から各ラインを書き込むようにタイミングを変える
ことを特徴とする請求項3記載の画像処理装置。
6. A means for detecting whether a document is right-handed or left-handed, wherein said control means sets a line whose start point of effective image data is the leftmost line as a first line when the document is left-handed. The start point of the effective image data of each line is aligned with the start point of the effective image data of this line, while the timing is changed so that each line is written from the start point of the effective image data for the area before the line which is the leftmost end. The image processing apparatus according to claim 3, wherein:
【請求項7】 原稿が右曲がりか左曲がりかを検出する
手段を有し、前記制御手段は、原稿が右曲がりの場合有
効画像データの始点が最左端であるライン以前の領域に
ついては1ライン目の読取開始位置から有効画像データ
の始点までの間隔だけずらして各々有効画像データの始
点から各ラインの読み出しを行い、一方前記最左端であ
るライン以降の領域については各々有効画像データの始
点から各ラインの読み出しを行うことを特徴とする請求
項4記載の画像処理装置。
7. A device for detecting whether a document is right-turned or left-turned, wherein said control means is configured to control, when the document is right-turned, one line for an area before a line whose effective image data start point is the leftmost end. Each line is read from the start point of the effective image data by shifting by an interval from the reading start position of the eye to the start point of the effective image data, while the area after the line at the leftmost end is read from the start point of the effective image data. The image processing apparatus according to claim 4, wherein each line is read.
【請求項8】 原稿が右曲がりか左曲がりかを検出する
手段を有し、前記制御手段は、原稿が左曲がりの場合有
効画像データの始点が最先端であるラインを1ライン目
としこれ以降このラインの有効画像データの始点に各ラ
インの有効画像データの始点を揃え、一方前記最左端で
あるライン以前の領域については各々有効画像データの
始点から各ラインの読み出しを行うことを特徴とする請
求項4記載の画像処理装置。
8. A means for detecting whether a document is right-handed or left-handed, wherein the control means sets the first line of the effective image data as the first line when the document is left-handed. The start point of the effective image data of each line is aligned with the start point of the effective image data of this line, and reading of each line from the start point of the effective image data is performed for the region before the leftmost line. The image processing device according to claim 4.
【請求項9】 各ラインの読取開始位置からの第1の連
続黒画素領域を検出する第1の手段と、同一ラインにお
いて前記読取開始位置からの連続黒画素以降に出現する
連続黒画素を白画素が出現する毎にリセットし最後に残
った第2の連続黒画素領域を検出する第2の手段と、複
数のラインについて前記第1の連続黒画素領域の第1の
差分および前記第2の連続黒画素領域の第2の差分を演
算し、前記第1の差分および前記第2の差分の大小によ
り原稿が右曲がりか左曲がりかを判断する制御手段と、
を具備する画像処理装置。
9. A first means for detecting a first continuous black pixel area from a reading start position of each line, and a white pixel which appears after the continuous black pixel from the reading start position on the same line. A second means for resetting each time a pixel appears and detecting a last remaining second continuous black pixel area; a first difference of the first continuous black pixel area for a plurality of lines; Control means for calculating a second difference of the continuous black pixel area and determining whether the original is right-handed or left-handed based on the magnitude of the first difference and the second difference;
An image processing apparatus comprising:
【請求項10】 各ラインの読取開始位置からの第1の
連続黒画素領域を検出する第1の手段と、同一ラインに
おいて前記読取開始位置からの連続黒画素以降に出現す
る連続黒画素を白画素が出現する毎にリセットし最後に
残った第2の連続黒画素領域を検出する第2の手段と、
複数のラインについて前記第1の連続黒画素領域の第1
の差分および前記第2の連続黒画素領域の第2の差分を
演算し、前記第1の差分および前記第2の差分の大小に
より原稿が右曲がりか左曲がりかを判断すると共に前記
第1の差分および前記第2の差分に基づいて原稿の曲が
り角度を演算する制御手段と、を具備する画像処理装
置。
10. A first means for detecting a first continuous black pixel area from a reading start position of each line, and a continuous black pixel appearing on and after the continuous black pixel from the reading start position on the same line. Second means for resetting each time a pixel appears and detecting the last remaining second continuous black pixel area;
For a plurality of lines, the first of the first continuous black pixel regions
And the second difference of the second continuous black pixel area are calculated, and it is determined whether the original is right-handed or left-handed based on the magnitude of the first difference and the second difference, and the first Control means for calculating a bending angle of the document based on the difference and the second difference.
【請求項11】 請求項1から請求項10のいずれかに
記載の画像処理装置を備えたファクシミリ装置。
11. A facsimile apparatus comprising the image processing device according to claim 1.
【請求項12】 読取原稿の画像データをライン単位で
保持する工程と、読取開始位置からの連続黒画素領域を
検出すると共に、同一ラインにおいて前記読取開始位置
からの連続黒画素領域以降に出現する連続黒画素を白画
素が出現する毎にリセットし、最後に残った連続黒画素
領域を検出する工程と、前記各ラインに対応する連続黒
画素領域を無効として有効画像データを得る工程と、を
具備する画像処理方法。
12. A step of holding image data of a read original in units of lines, detecting a continuous black pixel region from a reading start position, and appearing on the same line after the continuous black pixel region from the reading start position. Resetting a continuous black pixel every time a white pixel appears, detecting the last remaining continuous black pixel area, and invalidating the continuous black pixel area corresponding to each line to obtain valid image data. Image processing method provided.
JP16303599A 1999-06-09 1999-06-09 Image processing device and copier Expired - Lifetime JP3481505B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16303599A JP3481505B2 (en) 1999-06-09 1999-06-09 Image processing device and copier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16303599A JP3481505B2 (en) 1999-06-09 1999-06-09 Image processing device and copier

Publications (2)

Publication Number Publication Date
JP2000354150A true JP2000354150A (en) 2000-12-19
JP3481505B2 JP3481505B2 (en) 2003-12-22

Family

ID=15765957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16303599A Expired - Lifetime JP3481505B2 (en) 1999-06-09 1999-06-09 Image processing device and copier

Country Status (1)

Country Link
JP (1) JP3481505B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983071B2 (en) 2001-05-16 2006-01-03 Nec Corporation Character segmentation device, character segmentation method used thereby, and program therefor
US9117283B2 (en) 2013-01-30 2015-08-25 Pfu Limited Image processing apparatus, image processing method, and computer-readable, non-transitory medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983071B2 (en) 2001-05-16 2006-01-03 Nec Corporation Character segmentation device, character segmentation method used thereby, and program therefor
US9117283B2 (en) 2013-01-30 2015-08-25 Pfu Limited Image processing apparatus, image processing method, and computer-readable, non-transitory medium

Also Published As

Publication number Publication date
JP3481505B2 (en) 2003-12-22

Similar Documents

Publication Publication Date Title
US7450756B2 (en) Method and apparatus for incorporating iris color in red-eye correction
JPH08228261A (en) Electronic image matching device for scanner
JPH05252379A (en) Image processor
US20110158537A1 (en) Image processing apparatus
JP2001223894A (en) Picture processor, picture processing method and storage medium
JP4200419B2 (en) PHOTO EXTRACTION METHOD, DEVICE, PROGRAM, AND RECORDING MEDIUM
JP2000354150A (en) Image processor and image processing method
WO2022042669A1 (en) Image processing method, apparatus, device, and storage medium
JP2952793B2 (en) Web meandering recognition method and apparatus
JP3881455B2 (en) Image correction apparatus, image correction method, and medium on which image correction method is recorded
JP3384208B2 (en) Image reading device
JP2001157018A (en) Image reader and image reading method
JP2947126B2 (en) Original image capture device
JPH07170405A (en) Method for eliminating edge shadow signal of original, picture signal processing unit and copying machine
JPH10229486A (en) Image reader
JP2003189082A (en) Image distortion correcting apparatus, program, storage medium thereof and method therefor
JP2006059162A (en) Tooth image correction method and device
JPH08340447A (en) Image processor with through prevention function
JP3312787B2 (en) Image processing system
JPH043656A (en) Picture processor
JP2002281311A (en) Image processor and image reader
JPH10224615A (en) Picture reader
JP3565551B2 (en) Image binarization device
JP3877054B2 (en) Image reduction scaling device
JP2003143398A (en) Image processing apparatus

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
R150 Certificate of patent or registration of utility model

Ref document number: 3481505

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20081010

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091010

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091010

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101010

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111010

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20121010

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20131010

Year of fee payment: 10

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term