JPH0498371A - Picture processing system - Google Patents

Picture processing system

Info

Publication number
JPH0498371A
JPH0498371A JP2210173A JP21017390A JPH0498371A JP H0498371 A JPH0498371 A JP H0498371A JP 2210173 A JP2210173 A JP 2210173A JP 21017390 A JP21017390 A JP 21017390A JP H0498371 A JPH0498371 A JP H0498371A
Authority
JP
Japan
Prior art keywords
pixels
image data
white
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
JP2210173A
Other languages
Japanese (ja)
Other versions
JP2651517B2 (en
Inventor
Akira Suzuki
晃 鈴木
Fumio Adachi
安達 文夫
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.)
NTT Inc
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2210173A priority Critical patent/JP2651517B2/en
Publication of JPH0498371A publication Critical patent/JPH0498371A/en
Application granted granted Critical
Publication of JP2651517B2 publication Critical patent/JP2651517B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduction-convert and smooth a binary picture by reading the value of picture elements in a small area in a previously decided processing unit, counting and adding the picture elements in the processing unit, which belong to the small area, only when all are not white or black. CONSTITUTION:A read means 13 reading the value of the picture elements in the small area in the previously decided processing unit at the time of counting the number of the black picture elements or that of the white picture elements in the small area in the binary picture and a deciding means 14 deciding whether the values of the picture elements in the processing unit are all white or black are provided. Then, a counting/addition means 15 counts the picture elements in the processing unit, which belong in the small area, only when all are not white or black. Thus, a problem that the number of the picture elements becomes enormous and the time required for the processing can be eliminated since all the picture elements are fetched one by one so as to add them. Thus, the number of the black or white picture elements in the binary picture can be counted at high speed and picture conversion can be executed.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、2値画像の定められた小領域内の黒画素ま
たは白画素の個数を計数し、この計数した個数をもとに
画像変換を行う画像処理方式に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] This invention counts the number of black pixels or white pixels within a predetermined small area of a binary image, and performs image conversion based on the counted number. This relates to an image processing method that performs.

(従来の技術1 2値画像の縮小変換や平滑化には定められた画素数から
なる小領域内の黒画素または白画素の個数を計数し、係
数した黒または白画素の個数を用いて出力を決定する方
式がある。このような方式の例として、「画像の縮小変
換方法」 (特願平1−17703号)がある。ここで
の変換処理の方法を第1図に示す。
(Prior art 1: To reduce or smooth a binary image, count the number of black or white pixels in a small area consisting of a predetermined number of pixels, and output using the number of black or white pixels calculated by a coefficient. An example of such a method is the "Image Reduction Conversion Method" (Japanese Patent Application No. 17703/1993). The conversion processing method used here is shown in FIG.

第5図は原画像Wを横方向に1 / m、縦方向に1 
/ nに縮小する場合の例を示す。mxnの小領域の黒
画素の個数を求めて、その加算値を変換して出力値を得
るため、画素の値を、例えば8画素単位に加算手段1の
中のシフトレジスタ2に読み込んだ後、マスク回路3に
より画素の値を1画素づつ取り出し、加算回路4により
黒画素の値を1” 白画素の値を“0″′として加算し
て加算値を加算値用メモリ5に格納し、加算値変換手段
6で変換出力を得ている。
Figure 5 shows the original image W at 1/m in the horizontal direction and 1/m in the vertical direction.
An example of reducing the number to /n is shown below. In order to calculate the number of black pixels in a small area of mxn and convert the added value to obtain an output value, after reading the pixel values into the shift register 2 in the adding means 1 in units of, for example, 8 pixels, The mask circuit 3 takes out the pixel values one by one, and the adder circuit 4 adds the black pixel value to 1" and the white pixel value to "0"', stores the added value in the added value memory 5, and performs the addition. A conversion output is obtained by the value conversion means 6.

[発明が解決しようとする課題] しかしながら、このような従来の方式では、゛全ての画
素を一画素づつ取り出し加算するため、画素数が膨大に
なると処理にかかる時間も膨大になってしまうという問
題があった。
[Problems to be Solved by the Invention] However, in such a conventional method, ``all pixels are taken out one by one and added, so as the number of pixels increases, the time required for processing also increases.'' was there.

この発明は、以上述べた処理時間が膨大になる問題点を
解決し、2値画像の黒または白画素の個数を高速に計数
して画像変換を行う画像処理方式を提供することを目的
とする。
An object of the present invention is to solve the above-mentioned problem that the processing time is enormous, and to provide an image processing method that performs image conversion by rapidly counting the number of black or white pixels in a binary image. .

〔課題を解決するための手段] この発明にかかる画像処理方式は、2値画像における小
領域の黒画素または白画素の個数を計数する際に、小領
域内の画素の値をあらかじめ定められた処理単位で読み
込む読み込み手段と、その処理単位内の画素の値が全て
白または黒かどうかを判定する判定手段を設け、全て白
または黒でなかったときのみ小領域内に属する処理単位
の画素の計数加算手段で行う。
[Means for Solving the Problems] The image processing method according to the present invention calculates the value of the pixel in the small area from a predetermined value when counting the number of black pixels or white pixels in a small area in a binary image. A reading means for reading in each processing unit and a determining means for determining whether all the pixel values in the processing unit are white or black are provided, and only when the values of the pixels in the processing unit belonging to the small area are not all white or black, the pixel values of the processing unit belonging to the small area are This is done by counting and adding means.

また、白領域の場合に、処理を行わない方式としてファ
クシミリにおいて用いられている白ラインスキップ法が
あるが、この方法では、画素の値を1ライン単位で判定
するため1ライン中に1画素でも黒画素があると処理が
スキップされず、小領域の画素の値を基に画像処理する
方式には適用できない。白ラインスキップ法とは、lラ
インに比べて小さい読み取り単位で、画素の値を読み取
る手段と、その部分領域毎に加算する手段を設けている
点が異なる。
In addition, in the case of white areas, there is a white line skip method used in facsimiles as a method that does not perform any processing, but in this method, the pixel value is determined line by line, so even if there is only one pixel in one line, If there are black pixels, processing will not be skipped, and this method cannot be applied to a method that performs image processing based on the values of pixels in a small area. The white line skip method is different from the white line skip method in that it is provided with means for reading pixel values in smaller reading units than 1 line, and means for adding them for each partial area.

[作用1 この発明においては、あらかじめ定められた処理単位で
小領域内の画素の値を読み込み、その処理単位内の画素
の値が全て白または黒かを判定し、全て白または黒でな
かったときのみ小領域内に属する処理単位の画素の計数
を行うものである。
[Operation 1] In this invention, pixel values within a small area are read in a predetermined processing unit, and it is determined whether all pixel values within that processing unit are white or black. Only in this case, the pixels of the processing unit belonging to the small area are counted.

〔実施例1 以下、この発明の実施例を図面を用いて詳細に説明する
。
[Embodiment 1] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

本実施例では、2値画像に縦・横ともに1/4の縮小を
施す画像変換において、縦横4X4の166画素構成さ
れる小領域に含まれる黒画素の個数が、8個以上のとき
変換画素を黒にし、黒画素の個数が7個以下のとき変換
画素を白とする方式を例に取り説明する。また、画像デ
ータの読み込み単位は横方向の8画素とし、読み込まれ
た処理単位の画素が全て白画素かどうかを判定し、そう
でないときは黒画素の数を求める例をもとに説明する。
In this embodiment, in image conversion that reduces a binary image by 1/4 both vertically and horizontally, when the number of black pixels included in a small area consisting of 166 pixels (4×4) is 8 or more, the converted pixel is An example will be explained in which the converted pixel is made black and the converted pixel is made white when the number of black pixels is 7 or less. Further, an example will be explained based on an example in which the unit of reading image data is 8 pixels in the horizontal direction, and it is determined whether all the pixels of the read processing unit are white pixels, and if they are not, the number of black pixels is calculated.

第1図の実施例を説明する前に、第2図により画像デー
タについて説明する。
Before explaining the embodiment shown in FIG. 1, image data will be explained with reference to FIG.

第2図はこの発明の一実施例を説明するための画像デー
タの例を示す。第2図の画像データの例において、原画
像Wの小領域は、Ql、Q2.Q3、・・・・・・+Q
nで示される4×4の画素からなる領域である。
FIG. 2 shows an example of image data for explaining one embodiment of the present invention. In the example of image data in FIG. 2, the small areas of the original image W are Ql, Q2 . Q3,...+Q
This is an area consisting of 4×4 pixels indicated by n.

また、読み込み単位は、小領域Ql、Q2の第1ライン
の場合は、pH,PI3.PI3.PI3、PI3.P
I3.PI3.PI3の8画素である。このとき、小領
域に対応する読み込み単位の部分領域は、pH,PI3
.PI3.PI4の部分領域と、PI3.PI3.PI
3.PI8の部分領域との2つの部分領域である。なお
、符号は要部のみに記入しである。
In addition, the reading unit is pH, PI3. PI3. PI3, PI3. P
I3. PI3. There are 8 pixels of PI3. At this time, the partial area of the reading unit corresponding to the small area is pH, PI3
.. PI3. A partial region of PI4, and a partial region of PI3. PI3. P.I.
3. These are two partial areas with the partial area of PI8. Note that codes are written only for important parts.

第1図はこの発明の第1の実施例を説明するためのブロ
ック構成図である。第1図において、11は入力装置、
12はこの入力装置11から書き込まれた画像データを
蓄える画像メモリ、13は画素数を単位としてあらかじ
め定めた読み込み単位で、画像メモリ12から画像デー
タを読み込む読み込み手段、14はこの読み込み手段1
3で読み込まれた画素の値が全て白であるかを判定する
判定手段、15は処理手段で、この判定手段14から受
は取った画素の部分領域の黒画素の個数を計数する計数
手段151と、計数用バッファメモリ153および15
4と、計数用バッファメモリと計数手段151からの出
力との加算を行う加算手段152と、計数用バッファメ
モリの内容を読み出す読み出し手段155からなる。1
6は入力が定められた値以上のときに変換画素として黒
を出力する2値化手段、17は変換画像用メモリである
。
FIG. 1 is a block diagram for explaining a first embodiment of the present invention. In FIG. 1, 11 is an input device;
12 is an image memory for storing image data written from the input device 11; 13 is a reading unit for reading image data from the image memory 12 in predetermined reading units based on the number of pixels; 14 is this reading unit 1;
15 is a processing means, and a counting means 151 counts the number of black pixels in the partial area of the pixels received from the determination means 14; and counting buffer memories 153 and 15
4, an adding means 152 for adding the output from the counting buffer memory and the counting means 151, and a reading means 155 for reading out the contents of the counting buffer memory. 1
6 is a binarization means that outputs black as a converted pixel when the input is a predetermined value or more, and 17 is a converted image memory.

入力装置11は信号線Slを介して画像メモリ12へ画
像データを全て書き込むと、制御線C2により処理手段
15内の計数用バッファメモリ153.計数用バッファ
メモリ154の内容を初期化するように指示するととも
に、制御線C1により読み込み手段13を起動する。
When the input device 11 writes all the image data to the image memory 12 via the signal line Sl, the input device 11 writes all the image data to the image memory 12 via the signal line Sl, and then writes the data to the counting buffer memory 153 . An instruction is given to initialize the contents of the counting buffer memory 154, and the reading means 13 is activated via the control line C1.

読み込み手段13は入力装置11より制御線C1を介し
て起動を受けたとき、および判定手段14より制御線C
4を介して要求信号を受けたとき画像メモリ12から8
画素の画像データを読み込み単位として信号線S2を通
して読み込み、信号線S3により判定手段14へ出力す
る。また、読み込み手段13は2つの小領域分の4つの
読み込み単位の画像データ(第2図の最初の例ではQl
とQ2の部分に当たるpH〜P18.P21〜P28.
 P31〜P38. P41〜P48)を判定手段14
へ出力後、判定手段14からの制御線C4による要求信
号か処理手段15からの制御線C5による要求信号を受
けたときに読み出し制御信号を制御線C3により処理手
段15へ出力する。
The reading means 13 receives activation from the input device 11 via the control line C1, and from the determining means 14 via the control line C1.
When a request signal is received via 4, the image memory 12 to 8
Image data of a pixel is read as a reading unit through a signal line S2, and output to the determination means 14 through a signal line S3. The reading means 13 also stores image data in four reading units for two small areas (in the first example in FIG. 2, Ql
and the pH corresponding to the Q2 part ~ P18. P21-P28.
P31-P38. P41 to P48) by the determining means 14
After receiving the request signal from the determining means 14 on the control line C4 or the request signal from the processing means 15 on the control line C5, it outputs a read control signal to the processing means 15 on the control line C3.

判定手段14は信号Pa53を介して読み込み手段13
から画像データを受は取ると、その画像データが全て白
であるかどうかを判定し、全て白画素でないときは信号
線S4により処理手段15へ画像データを出力する。ま
た、読み込み手段13からの画像データが全て白画素の
ときは、読み込み手段13へ制御線C4により次の画像
データの要求信号を送出する。
The determining means 14 reads the reading means 13 via the signal Pa53.
When image data is received from , it is determined whether the image data is all white or not, and if all the pixels are not white, the image data is outputted to the processing means 15 via the signal line S4. Further, when the image data from the reading means 13 are all white pixels, a request signal for the next image data is sent to the reading means 13 via the control line C4.

処理手段15は判定手段14からの画像データを信号L
9 S 4を介して受は取ると、その出力に含まれる小
領域に対応する部分領域毎の黒画素の個数を計数手段1
51で計数し、加算手段152により計数用バッファメ
モリ153および154にある値とで加算し、結果を再
び計数用ノ\ツファメモリにおくるとともに、読み込み
手段13へ制御線C5により次の画像データの要求信号
を送出する。また、処理手段15は読み込み手段13か
ら読み出し制御信号を制御線C3により受けると、読み
出し手段155により計数用バッファメモリ153、計
数用バッファメモリ154の内容を読み出して2値化手
段16へ信号線S5により出力し、その後、各計数用バ
ッファメモリ153゜154の内容を初期化する。また
、入力装置11から制御IS C2により信号を受は取
ると、計数用バッファメモリ153.計数用バッファメ
モリ154の内容を初期化する。
The processing means 15 converts the image data from the determining means 14 into a signal L.
9 When the output is received via S4, the number of black pixels for each partial area corresponding to the small area included in the output is counted by means 1.
51, the addition means 152 adds the values in the counting buffer memories 153 and 154, sends the result to the counting buffer memory again, and requests the next image data to the reading means 13 via the control line C5. Send a signal. Further, when the processing means 15 receives a read control signal from the reading means 13 through the control line C3, the reading means 155 reads out the contents of the counting buffer memory 153 and the counting buffer memory 154, and sends the contents to the binarizing means 16 via the signal line S5. After that, the contents of each counting buffer memory 153 and 154 are initialized. Further, when the control IS C2 receives a signal from the input device 11, the counting buffer memory 153. The contents of the counting buffer memory 154 are initialized.

2値化手段16は処理手段15からの出力を信号線S5
により受は取ると、その値が8以上であるかどうかを調
べ、°°8“°以上であれば黒画素を、8未満であれば
白画素を変換画像用メモリ17に出力する。
The binarization means 16 converts the output from the processing means 15 into a signal line S5.
When the value is received, it is checked whether the value is 8 or more, and if it is 8" or more, a black pixel is output to the converted image memory 17, and if it is less than 8, a white pixel is output to the converted image memory 17.

以下、画像メモリ12の内容として、第2図に示す画像
データが書き込まれたときを例にとって、この発明の第
1の実施例の動作を説明する。
The operation of the first embodiment of the present invention will be described below, taking as an example the case where the image data shown in FIG. 2 is written as the contents of the image memory 12.

入力装置11は画像メモリ12へ画像データを全て書き
込んだ後、制御線C2により処理手段15の計数用バッ
ファメモリ153と計数用バッファメモリ154の内容
を°“O”にするとともに、制御線C1を通して読み込
み手段13を起動する。読み込み手段13はこの起動を
受けて画像メモリ12から8画素を単位として画像デー
タの読み込みを開始する。第2図の例では、まず、第1
ラインのpH,PI3.PI3.PI3.PI3、PI
3.PI3.PI3の画素の画像データを第3図(a)
のように読み込み、判定手段14へ出力する。判定手段
14は第2図の例の第1ラインのpH,PI3.PI3
.PI3.PI5、PI3.PI3.PI3は全て白画
素であるため、読み込み手段13へ次の読み込みを行う
ように制御線C4を通して要求する。
After writing all the image data into the image memory 12, the input device 11 sets the contents of the counting buffer memory 153 and the counting buffer memory 154 of the processing means 15 to "O" using the control line C2, and also sets the contents of the counting buffer memory 153 and the counting buffer memory 154 of the processing means 15 to "O" through the control line C1. The reading means 13 is activated. In response to this activation, the reading means 13 starts reading image data from the image memory 12 in units of eight pixels. In the example in Figure 2, first,
Line pH, PI3. PI3. PI3. PI3, PI
3. PI3. The image data of the pixel of PI3 is shown in Figure 3 (a).
It is read as follows and output to the determination means 14. The determining means 14 determines the pH of the first line in the example of FIG. 2, PI3. PI3
.. PI3. PI5, PI3. PI3. Since all PI3 are white pixels, a request is made to the reading means 13 to perform the next reading through the control line C4.

次に、第2ラインのP21.P22.P23゜P24.
P25.P26.P27.P28が画像データとして読
み込み手段13に第3図(b)のように読み込まれ、判
定手段14へ出力されると、判定手段14はP21〜P
28の中に黒画素が存在することから、画像データを処
理手段15へ出力する。
Next, the second line P21. P22. P23゜P24.
P25. P26. P27. When P28 is read into the reading means 13 as image data as shown in FIG.
Since there are black pixels in 28, the image data is output to the processing means 15.

処理手段15は判定手段14から出力を受けると、まず
、小領域Q1に属する画素であるP21、P22.P2
3.P24の4画素の内の黒画素の個数を計数手段15
1で計数し、加算手段152で小領域Ql用の計数用バ
ッファメモリ153の内容の内容との加算をとる。第2
図の例では、黒画素の個数2が計数用バッファメモリ1
53に置かれる。さらに、処理手段15は小領域Q2に
属するP25.P26.P27.P28の4画素のうち
の黒画素の個数を計数手段151で計数し、加算手段1
52で小領域Q2用の計数用バッファメモリ154の内
容との加算を取る。
When the processing means 15 receives the output from the determination means 14, it first selects pixels P21, P22 . P2
3. Counting means 15 for counting the number of black pixels among the four pixels of P24
1, and addition means 152 adds the contents of the counting buffer memory 153 for the small area Ql. Second
In the example shown in the figure, the number of black pixels is 2, which is 1 in the counting buffer memory.
It is placed at 53. Furthermore, the processing means 15 further processes P25. P26. P27. The counting means 151 counts the number of black pixels among the four pixels of P28, and the adding means 1
At step 52, addition is made to the contents of the counting buffer memory 154 for the small area Q2.

第2図の例では、黒画素の個数°゛2°°が計数用バッ
ファメモリ154に置かれる。小領域Ql、Q2に属す
る2組の4画素の中の黒画素の計数と加算が終了すると
、処理手段15は制御線5を介して読み込み手段13へ
次の画像データの要求信号を出す。
In the example of FIG. 2, the number of black pixels, .degree.2.degree., is placed in the counting buffer memory 154. When the counting and addition of black pixels among the two sets of four pixels belonging to the small areas Ql and Q2 is completed, the processing means 15 issues a request signal for the next image data to the reading means 13 via the control line 5.

以下、読み込み手段13は判定手段14または処理手段
15より要求信号を受けると、第3ラインCP31〜P
38) 、さらに第4ライン(P41〜P48)の画像
データの読み込みと判定手段14への出力を行う。第2
ラインと同様にして、判定手段14での白画素の判定と
、読み込み単位で全てが白画素でない場合の処理手段1
5での小領域Q1と02それぞれの黒画素の計数と加算
が終了し、判定手段14か処理手段15のいずれかから
要求信号が読み込み手段13へ出力されると、読み込み
手段13は処理手段15へ制御線C3を介して読み出し
制御信号を出すとともに、次の小領域Q3.Q4の画像
データの読み込みを開始する。
Hereinafter, when the reading means 13 receives a request signal from the determining means 14 or the processing means 15, the third line CP31 to P
38) Furthermore, the image data of the fourth line (P41 to P48) is read and output to the determination means 14. Second
Similarly to the line, the determination means 14 determines white pixels, and the processing means 1 when all pixels are not white pixels in the read unit.
When the counting and addition of black pixels in each of the small areas Q1 and 02 in step 5 is completed, and a request signal is output from either the determining means 14 or the processing means 15 to the reading means 13, the reading means 13 outputs the request signal to the processing means 15. A read control signal is output to the next small area Q3 through the control line C3. Start reading the image data of Q4.

処理手段15は読み込み手段13より読み出し制御信号
を受けると、計数用バッファメモリ153の内容と、計
数用バッファメモリ154の内容を2値化手段16出力
し、その後、各計数用バッファメモリ153,154の
内容を°O”に戻す。
When the processing means 15 receives a read control signal from the reading means 13, it outputs the contents of the counting buffer memory 153 and the contents of the counting buffer memory 154 to the binarizing means 16, and then outputs the contents of the counting buffer memory 153 and the counting buffer memory 154 to the binarizing means 16. Return the contents to °O”.

2値化手段16は処理手段15からの出力を受は取ると
、その値が°8”以上であるかどうかを調べ、°゛8”
以上であれば黒画素を、8°”未満であれば白画素を変
換画像用メモリ17に出力する。
When the binarization means 16 receives the output from the processing means 15, it checks whether the value is greater than or equal to °8".
If it is above, a black pixel is output to the converted image memory 17, and if it is less than 8°, a white pixel is output to the converted image memory 17.

以上の動作によって、小領域Ql、Q2内のそれぞれの
黒画素の個数をもとに2値化した結果が2値化手段16
から出力され、変換画像用メモリ17に蓄えられる。以
後、同様にして、小領域Q3、Q4の画像データである
第1ラインP19〜P116、第2ラインP29〜P2
16、第3ラインP39〜P316、第4ラインP49
〜P416を読み込み手段13で順次読み込み、判定手
段14で白画素の判定を行い、全てが白画素でない場合
に処理手段15で小領域Q3.Q4内のそれぞれの黒画
素の個数を出力し、2値化手段16で変換画素の値を決
定して変換画像用メモリ17に蓄える。以下同様な処理
を続けることにより全画面中の各小領域内の黒画素の個
数をもとにした縮小した2値画像が、変換画像用メモリ
17に蓄えられる。
Through the above operations, the result of binarization based on the number of black pixels in each of the small areas Ql and Q2 is obtained by the binarization means 16.
, and stored in the converted image memory 17. Thereafter, in the same manner, the first lines P19 to P116 and the second lines P29 to P2, which are the image data of the small areas Q3 and Q4, are
16, 3rd line P39 to P316, 4th line P49
-P416 are sequentially read by the reading means 13, the determining means 14 determines whether the pixels are white, and if all pixels are not white, the processing means 15 selects the small area Q3. The number of each black pixel in Q4 is output, and the value of the converted pixel is determined by the binarization means 16 and stored in the converted image memory 17. Thereafter, by continuing similar processing, a reduced binary image based on the number of black pixels in each small area in the entire screen is stored in the converted image memory 17.

このように動作するから、“°O″を加算するという本
来不要な処理を省いて、小領域に含まれる黒画素の個数
を計数することができ、画像変換を高速化できる。
Since it operates in this way, the number of black pixels included in a small area can be counted without the originally unnecessary process of adding "°O", and image conversion can be speeded up.

この発明の第2の実施例を次に説明する。第2の実施例
は、第1の実施例より、より高速に黒画素の個数を計数
するため、画像データの読み込み単位の画素の値が全て
白でない場合に読み込み単位を分割して、分割した単位
でさらに全てが白画素であるか判定し、全てが白でない
場合だけ計数処理を行うようにしたものである。以下、
画像データの読み込み単位が横方向の8画素であって、
白画素の判定後、さらに4画素の2つに分割して判定す
る場合を例にとって、この発明の第2の実施例を第4図
のブロック構成図をもとに説明する。
A second embodiment of the invention will now be described. In the second embodiment, in order to count the number of black pixels faster than in the first embodiment, the reading unit is divided and divided when all the pixel values in the reading unit of image data are not white. It is further determined for each pixel whether all pixels are white, and counting processing is performed only when all pixels are not white. below,
The unit of reading image data is 8 pixels in the horizontal direction,
A second embodiment of the present invention will be described based on the block diagram of FIG. 4, taking as an example a case in which, after determining a white pixel, the pixel is further divided into two parts of four pixels for determination.

第4図において、入力装置119画像メモリ12、読み
込み手段131判定手段14.2値化手段16および変
換画像用メモリ17は第1の実施例と同一である。
In FIG. 4, the input device 119, the image memory 12, the reading means 131, the determining means 14, the binarizing means 16, and the converted image memory 17 are the same as those in the first embodiment.

141は前記判定手段14から出力された画像データを
4画素づつの2つに分割し、分割した画像データの値が
全て白であるかを判定する2次判定手段であって、信号
)M S 4を介して判定手段14から画像データを受
は取ると、その画像デー夕を4画粗単位の画像データ1
と画像データ2に分割し、分割した単位で全て白である
かどうかを判定し、画像、データlが全て白画素でない
ときは処理手段150へ信号1as41を通して画像デ
ータ1を出力するとともに、制御線C41により画像デ
ータ種別lを処理手段150へ伝えるとともに、処理手
段150からの処理終了信号を待ち、これを受けると画
像データ2の判定処理に移る。
Reference numeral 141 denotes a secondary judgment means which divides the image data outputted from the judgment means 14 into two parts of 4 pixels each and judges whether all the values of the divided image data are white. When image data is received from the determining means 14 via the image forming apparatus 4, the image data is divided into image data 1 in units of 4 pixels.
and image data 2, and it is determined whether all the pixels are white in the divided unit.If the image data l are not all white pixels, image data 1 is output to the processing means 150 through the signal 1as41, and the control line C41 transmits the image data type l to the processing means 150, and waits for a processing end signal from the processing means 150. Upon receiving this, the process moves to the determination processing of image data 2.

画像データ1が全て白画素のときは画像データ2の判定
処理に移る。画像データ2が全て白画素でないときは、
処理手段150へ信号線S41を通して画像データ2を
出力するととともに、制御線C41により画像データ種
別2を処理手段150へ伝えるとともに、処理手段15
0からの処理終了信号を待ち、これを受けると次の画像
データ要求を制御線C5を介して読み込み手段13へ出
す。画像データ2が全て白画素のときは、次の画像デー
タ要求を制御線C5を介して読み込み手段13へ出す。
When all of the image data 1 are white pixels, the process moves to the determination process for image data 2. When image data 2 is not all white pixels,
The image data 2 is output to the processing means 150 through the signal line S41, and the image data type 2 is transmitted to the processing means 150 through the control line C41.
It waits for a processing end signal from 0, and upon receiving it, sends a next image data request to the reading means 13 via the control line C5. When all of the image data 2 are white pixels, a request for the next image data is sent to the reading means 13 via the control line C5.

150は2次判定手段141から受は取った画素の部分
領域の黒画素の個数を計数し、小領域毎に加算を行う処
理手段であって、2次判定手段141からの画像データ
を信号線S41を介して受は取ると、その出力に含まれ
る黒画素の個数を計数手段151で計数し、2次判定手
段141からの制御線C41による画像データ種別信号
が画像データ種別1であれば、加算手段152により計
数用バッファメモリ153にある値とで加算し、結果を
再び計数用バッファメモリ153におくとともに、制御
線C42により処理終了信号を2次判定手段141に送
出し、画像データ種別信号が画像データ種別2であれば
加算手段152により計数用バッファメモリ154にあ
る値とで加算し、結果を再び計数用バッファメモリ15
4におくとともに、制御C線42により処理終了信号を
2次判定手段141に送出する。
150 is a processing means that counts the number of black pixels in a partial area of pixels received from the secondary determination means 141 and adds them for each small area, and transmits the image data from the secondary determination means 141 to a signal line. When the reception is received via S41, the number of black pixels included in the output is counted by the counting means 151, and if the image data type signal on the control line C41 from the secondary determination means 141 is image data type 1, The adding means 152 adds the value stored in the counting buffer memory 153, stores the result again in the counting buffer memory 153, and sends a processing end signal to the secondary determining means 141 via the control line C42, and outputs an image data type signal. If the image data type is 2, the adding means 152 adds it to the value in the counting buffer memory 154, and the result is added to the counting buffer memory 15 again.
4 and sends a processing end signal to the secondary determination means 141 via the control C line 42.

また、計数手段151は読み込み手段13から読み出し
制御信号を制御線C3により受けると、読み出し手段1
55により計数用バッファメモリ153.154の内容
を読み出して、2値化手段16へ信号線S5により出力
し、その後、各計数用バッファメモリ153,154の
内容を初期化する。また、入力装置11から制御1ic
2により信号を受は取ると、計数用バッファメモリ15
3.154の内容を初期化する。
Further, when the counting means 151 receives a readout control signal from the reading means 13 through the control line C3, the counting means 151
55 reads out the contents of the counting buffer memories 153 and 154 and outputs them to the binarizing means 16 through the signal line S5, and then initializes the contents of each counting buffer memory 153 and 154. In addition, control 1ic from input device 11
2, when the signal is received, the counting buffer memory 15
3. Initialize the contents of 154.

以下、画像メモリ12の内容として、第2図に示す画像
データが書き込まれたときを例にとって、この発明の第
2の実施例の動作を説明する。
The operation of the second embodiment of the present invention will be described below, taking as an example the case where the image data shown in FIG. 2 is written as the contents of the image memory 12.

入力装置11が画像メモリ12へ画像データを全て書き
込み、読み込み手段13でこれを読み取って判定手段1
4で白画素の判定を行い、全て白画素でない場合に信号
線S4を介して画像データを出力するまでの動作は実施
例1と全く同様である。
The input device 11 writes all the image data to the image memory 12, and the reading means 13 reads it and determines the judgment means 1.
The operations up to step 4 in which white pixels are determined and, if all pixels are not white, image data is output via the signal line S4, are exactly the same as in the first embodiment.

第2図の小領域Ql、Q2の第1ラインは全て白画素で
あるから、2次判定手段141へは出力されず、第2ラ
インのP21〜P28の画像データから2次判定手段1
41へ出力される。2次判定手段141はP21.P2
2.・・・・・・、P28の画像データを信号線S4を
介して受けると、P21〜P24の画像データ1とP2
5〜P28の画像データ2に分割し、まず、画像データ
1について白画素の判定を行う。第2区の例では、P2
1〜P24の画像データ1の中に黒画素が存在すること
から、処理手段150へ画像データ1と制御線C41を
通して画像データ種別lを出力し、処理手段150から
の処理終了信号を待つ。
Since the first line of the small areas Ql and Q2 in FIG.
41. The secondary determination means 141 performs P21. P2
2. ......, when the image data of P28 is received via the signal line S4, image data 1 and P2 of P21 to P24 are received.
First, image data 1 is divided into image data 2 from 5 to P28, and a white pixel is determined. In the example of Ward 2, P2
Since black pixels exist in the image data 1 of 1 to P24, the image data type 1 is output to the processing means 150 through the image data 1 and the control line C41, and a processing end signal from the processing means 150 is awaited.

処理手段150は2次判定手段141から出力を受ける
と、P21.P22.P23.P24の4画素のうちの
黒画素の個数を計数手段151で計数し、制御線C41
からの画像データ種別信号が画像データ種別1であるこ
とから、加算手段152で小領域Ql用の計数用バッフ
ァメモリ153の内容との加算を取り、その結果を計数
用バ・ソファメモリ153へ書き戻し、制御線C42に
より処理終了を2次判定手段141へ通知する。2次判
定手段141は制御線C42により処理終了を受けると
、P25〜P28の画像データ2について白画素の判定
を行い、P25〜P28の画像データ2に黒画素が存在
することから、処理手段150へ画像データ2と制御線
C41を通して画像データ種別2を出力し、処理手段1
50からの処理終了信号を待つ。
Upon receiving the output from the secondary determination means 141, the processing means 150 determines P21. P22. P23. The number of black pixels among the four pixels of P24 is counted by the counting means 151, and the control line C41
Since the image data type signal from is image data type 1, the adding means 152 adds the contents of the counting buffer memory 153 for the small area Ql and writes the result to the counting buffer memory 153. Then, the secondary determination means 141 is notified of the end of the process via the control line C42. When the secondary determination means 141 receives the end of processing through the control line C42, it determines whether the image data 2 of P25 to P28 is a white pixel, and since there is a black pixel in the image data 2 of P25 to P28, the processing means 150 Image data type 2 is output to the processing means 1 through the image data 2 and control line C41.
Wait for a processing end signal from 50.

処理手段150は2次判定手段141から出力を受ける
と前述と同様に動作し、制御線C41からの画像データ
種別信号が画像データ種別2であることから、小領域Q
2用の計数用バッファメモリ154に計数して加算した
結果を書き入れて、処理終了を2次判定手段141へ通
知する。2次判定手段141は制御19 C42により
処理終了を受けると、読み込み手段13へ次の画像デー
タの要求信号を出す。これにより、第3ラインの処理に
移る。
When the processing means 150 receives the output from the secondary determination means 141, it operates in the same manner as described above, and since the image data type signal from the control line C41 is image data type 2, the small area Q
The result of counting and addition is written into the counting buffer memory 154 for 2, and the completion of the process is notified to the secondary determining means 141. When the secondary determination means 141 receives the completion of processing through control 19C42, it issues a request signal for the next image data to the reading means 13. Thereby, the process moves to the third line.

第2図の小領域Ql、Q2の第3ラインの例では、P3
1〜P38に黒画素が含まれることから、2次判定手段
141へ画像データが出力される。2次判定手段141
において、P31〜P34に黒画素が含まれることから
、画像データ1が処理手段150へ送られ、第2ライン
の例の動作と同様に黒画素の計数と加算が行われ、制御
線C42より処理終了が通知される。2次判定手段14
1はこれを受けてP35〜P38の白画素の判定を行う
。第2図の例では全て白画素であることから、処理手段
150への画像データ2の出力は行わず、読み込み回路
13へ次の画像データの要求信号を出す。以下、第4ラ
インの処理が上記と同様に行われ、これが終了すると第
1の実施例と同様に、処理手段150内の加算値の読み
出しと、2値化手段16での2値化および変換画像用メ
モリ17への書き込みを行い、次の小領域の処理に移る
。
In the example of the third line of the small areas Ql and Q2 in FIG.
Since black pixels are included in pixels 1 to P38, the image data is output to the secondary determination means 141. Secondary determination means 141
, since black pixels are included in P31 to P34, image data 1 is sent to the processing means 150, where black pixels are counted and added in the same way as the operation in the example of the second line, and processing is performed from the control line C42. You will be notified of the termination. Secondary determination means 14
1 receives this and determines white pixels P35 to P38. In the example of FIG. 2, since all pixels are white, image data 2 is not output to the processing means 150, and a request signal for the next image data is sent to the reading circuit 13. Thereafter, the processing of the fourth line is performed in the same manner as above, and when this is completed, the addition value is read out in the processing means 150, and the binarization and conversion is performed in the binarization means 16, as in the first embodiment. Writing is performed in the image memory 17, and processing moves on to the next small area.

このように、読み込み単位をさらに分割して、分割した
画像データが全て白であるときは処理をしないように動
作するから、第1の実施例よりも効果的に°0”を加算
するという本来不要な処理を省いて、小領域に含まれる
黒画素の個数を計数することができ、画像変換を高速化
できる。
In this way, the unit of reading is further divided, and when the divided image data is all white, no processing is performed, so it is possible to add °0" more effectively than in the first embodiment. The number of black pixels included in a small area can be counted without unnecessary processing, and image conversion can be speeded up.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、この発明によれば、小領域内の画
素の値をあらかじめ定められた処理単位で読み込みむ読
み込み手段と、その処理単位内の画素の値が全て白また
は黒かどうかを判定しする判定手段と、全て白または黒
でなかったときのみ、小領域に属する処理単位の画素の
計数を行い加算する加算手段とを具備したので、徒来行
われていた0゛を加算するという処理を省くことができ
るために、黒または白画素の個数の計数を高速化するこ
とができ、大量の画像データを扱う2値画像の縮小変換
や平滑化の高速変換を実現することができる。
As explained above, according to the present invention, there is provided a reading means for reading pixel values in a small area in a predetermined processing unit, and a determination as to whether all pixel values in the processing unit are white or black. Since it is equipped with a judgment means that counts and adds up the pixels of a processing unit belonging to a small area only when the pixels are not all white or black, it is possible to replace the conventional method of adding 0゛. Since processing can be omitted, the number of black or white pixels can be counted at high speed, and high-speed conversion and smoothing of binary images that handle a large amount of image data can be realized.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の第1の実施例を示すブロック構成図
、第2図はこの発明を説明するための原画像データの例
を示す図、第3図は第1の実施例で8画素単位で読み込
んだときの画像データの例を示す図、第4図はこの発明
の第2の実施例を示すブロック構成図、第5図は従来の
画像処理方式の一例を示すブロック構成図である。 図中、11は入力装置、12は画像メモリ、13は読み
込み手段、14は判定手段、15は処理手段、16は2
値化手段、17は変換画像用メモリ、141は2次判定
手段、150は処理手段、151は計数手段、152は
加算手段、153.154は計数用バッファメモリ、1
55は読み出し手段、pH,PI3.・・・・・・、P
21.P22、・・・・・・、P31.P32.・・・
・・・、P41.P42、・・・・・・、は入力画素、
Ql、Q2.・・・・・・ Qnは小領域である。 第3図 pH I2 I3 pH1
FIG. 1 is a block configuration diagram showing a first embodiment of the present invention, FIG. 2 is a diagram showing an example of original image data for explaining this invention, and FIG. 3 is a block diagram showing an example of original image data in the first embodiment. A diagram showing an example of image data when read in units, FIG. 4 is a block diagram showing a second embodiment of the present invention, and FIG. 5 is a block diagram showing an example of a conventional image processing method. . In the figure, 11 is an input device, 12 is an image memory, 13 is a reading means, 14 is a determining means, 15 is a processing means, and 16 is a 2
Value converting means, 17 a converted image memory, 141 a secondary determination means, 150 a processing means, 151 a counting means, 152 an adding means, 153 and 154 a counting buffer memory, 1
55 is a reading means, pH, PI3.・・・・・・P
21. P22,..., P31. P32. ...
..., P41. P42, ..., are input pixels,
Ql, Q2. ...Qn is a small area. Figure 3 pH I2 I3 pH1

Claims (1)

【特許請求の範囲】[Claims] 原画像の小領域に含まれる黒画素または白画素の個数を
計数して画像処理をする方式において、原画素の値をあ
らかじめ定めた読み込み単位で読み込む読み込み手段と
、この読み込み手段で読み込まれた画素の値がすべて白
または黒であるかを判定する判定手段と、読み込まれた
画素の値がすべて白または黒でないときは読み込まれた
画素の前記小領域に対応する部分領域毎に黒または白画
素の個数を求め加算する加算手段とからなることを特徴
とする画像処理方式。
In a method of image processing by counting the number of black pixels or white pixels included in a small area of the original image, there is a reading means for reading the value of the original pixel in a predetermined reading unit, and a pixel read by this reading means. determining means for determining whether the values of the read pixels are all white or black, and when the values of the read pixels are not all white or black, the values of the read pixels are black or white pixels for each partial area corresponding to the small area. An image processing method comprising: an addition means for calculating and adding the number of images.
JP2210173A 1990-08-10 1990-08-10 Image processing method Expired - Fee Related JP2651517B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2210173A JP2651517B2 (en) 1990-08-10 1990-08-10 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2210173A JP2651517B2 (en) 1990-08-10 1990-08-10 Image processing method

Publications (2)

Publication Number Publication Date
JPH0498371A true JPH0498371A (en) 1992-03-31
JP2651517B2 JP2651517B2 (en) 1997-09-10

Family

ID=16584989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2210173A Expired - Fee Related JP2651517B2 (en) 1990-08-10 1990-08-10 Image processing method

Country Status (1)

Country Link
JP (1) JP2651517B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5818962A (en) * 1995-04-21 1998-10-06 Mitsubishi Denki Kabushiki Kaisha Coordinate transformation method for binary image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5818962A (en) * 1995-04-21 1998-10-06 Mitsubishi Denki Kabushiki Kaisha Coordinate transformation method for binary image

Also Published As

Publication number Publication date
JP2651517B2 (en) 1997-09-10

Similar Documents

Publication Publication Date Title
KR920003459B1 (en) Image processing device
JP2651517B2 (en) Image processing method
US20040240553A1 (en) Motion vector detecting method and image processing appparatus using the same
US20020024525A1 (en) Image encoding apparatus and method
EP0558292B1 (en) Compression/expansion circuit
JPH05260461A (en) Motion compensation prediction device
JPS6141273A (en) Picture processor
JP2003157433A (en) Image drawing device
JPH0271378A (en) Still picture processing system
KR20250011367A (en) Image signal processor and imaging system including the same
JP2861845B2 (en) Image scanner with outline function
KR0141719B1 (en) Video data transmission device using video bus
JPH06119438A (en) Active image storage device
JPH03196189A (en) Image signal processing device
JPH01312674A (en) Device for detecting number of black or white picture elements
JPS6276996A (en) Control system for picture data display
JPH0398175A (en) Method and device for image processing
JPH04271572A (en) Facsimile code converter
JPH03252878A (en) Picture data input device
JPS58172097A (en) Detection system of line signal
JPH0828819B2 (en) Image data encoder
EI-Din et al. Rapid video data capture and processing system for computer image measurement and analysis
JPH02131291A (en) Bit block transfer device
JPS61259374A (en) Direct storage access arithmetic system
JPH07210663A (en) Parallel image processor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090523

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees