JPH02254574A - Noise removing system - Google Patents

Noise removing system

Info

Publication number
JPH02254574A
JPH02254574A JP1078984A JP7898489A JPH02254574A JP H02254574 A JPH02254574 A JP H02254574A JP 1078984 A JP1078984 A JP 1078984A JP 7898489 A JP7898489 A JP 7898489A JP H02254574 A JPH02254574 A JP H02254574A
Authority
JP
Japan
Prior art keywords
noise
pixel
image
pixels
processing
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.)
Pending
Application number
JP1078984A
Other languages
Japanese (ja)
Inventor
Takashi Nagao
隆 長尾
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP1078984A priority Critical patent/JPH02254574A/en
Publication of JPH02254574A publication Critical patent/JPH02254574A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To remove a noise at high speed by calculating the link number of a picture, comparing this link number with a threshold value, regarding the number smaller than the threshold value as the noise and removing the noise. CONSTITUTION:A link number count part 34 provided in a noise removal processing part 36 scans a binary picture over a whole surface and calculates the link number in the black point of a scanning position. Namely, it is detected how many black points are linked with including the black point under scanning. The link number for the angular picture element of a multi-level picture obtained in such a way, namely, of a link number picture is compared with the prescribed threshold value by a threshold value processing part 35 and the picture element having the link number less than the threshold value is regarded as the noise and removed. Thus, the noise in the picture can be removed at high speed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、画像処理方式に関し、特に、二値で表現され
たディジタル画像中からノイズを除去する方式に関する
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image processing method, and particularly to a method for removing noise from a digital image expressed in binary values.

〔従来の技術〕[Conventional technology]

たとえば、パターン!!!識を行う場合には、原稿をT
Vカメラ等で読み取った後に、二値化し、この二値化さ
れたディジタル画像に対して種々の画像処理を行う。こ
のようなディジタル的に表現された画像の中には、読み
取り系や原稿の汚れ等によってノイズが重畳されている
ことが多い。また、画像中のエツジを検出する処理等で
は、画素値のばらつきが検出されてノイズとなることが
多い。
For example, patterns! ! ! If you wish to conduct a
After reading with a V-camera or the like, it is binarized, and various image processing is performed on this binarized digital image. In such digitally expressed images, noise is often superimposed due to dirt on the reading system or the original. Furthermore, in processes such as detecting edges in an image, variations in pixel values are often detected and become noise.

このようなノイズは、画質を劣化させたり、後の処理に
悪影響を及ぼすため、除去することが必要となる。
Such noise deteriorates image quality and adversely affects subsequent processing, so it is necessary to remove it.

従来のノイズ除去方式としては、たとえば、パターンマ
ツチングによる方式がある。この方式では、第8図〜第
1O図に示したようなノイズと一致しそうなパターンを
マスクとして作成し、このマスクと画像とを比較しなが
ら画像全体を走査する。
As a conventional noise removal method, for example, there is a method using pattern matching. In this method, a pattern that is likely to match noise as shown in FIGS. 8 to 1O is created as a mask, and the entire image is scanned while comparing this mask with the image.

そして、もし、マスクと画像の一部とが一致したら、そ
の一致部分の黒画素を白画素に変えてノイズを除去する
。なお、図中、11は白画素、12は黒画素を示す。ま
た、’JR8図は1画素サイズのマスクパターン13、
第9図(a)、 (b)は2画素サイズのマスクパター
ン140例、第10図(a)〜(f)は3画素サイズの
マスクパターン15の例を示す。
If the mask matches a part of the image, the black pixels in the matching part are changed to white pixels to remove noise. Note that in the figure, 11 indicates a white pixel, and 12 indicates a black pixel. In addition, 'JR8 figure shows mask pattern 13 of 1 pixel size,
9(a) and 9(b) show examples of 140 mask patterns of 2 pixel size, and FIGS. 10(a) to 10(f) show examples of mask patterns 15 of 3 pixel size.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

たとえば、第11図に示すようなノイズN、、 N2゜
N3.N4を含んだ画像からノイズを除去する場合には
、1画素サイズのマスクパターン13により1画素サイ
ズのノイズNt、N* が除去され第12図に示す画像
が得られる。次に、2画素サイズのマスクパターン14
による走査が行われ、第9図(a)に示すマスクパター
ン14が2画素サイズのノイズN3と一致するのでこの
ノイズN3 が除去され第13図に示す画像が得られる
。更に、この画像に対して3画素サイズのマスクパター
ン15による走査が行われ、第10図(b)に示すマス
クパターン15が3画素サイズのノイズN4と一致する
のでこのノイズN。
For example, noise N,, N2°N3, as shown in FIG. When removing noise from an image containing N4, the 1-pixel size noise Nt, N* is removed using the 1-pixel size mask pattern 13, and the image shown in FIG. 12 is obtained. Next, a mask pattern 14 with a size of 2 pixels
Since the mask pattern 14 shown in FIG. 9(a) matches the noise N3 having a size of two pixels, this noise N3 is removed and the image shown in FIG. 13 is obtained. Furthermore, this image is scanned using a mask pattern 15 of 3 pixel size, and the mask pattern 15 shown in FIG. 10(b) matches the noise N4 of 3 pixel size, so this noise N.

が除去され第14図に示すノ4ズがない画像が得られる
is removed, and an image free of scratches as shown in FIG. 14 is obtained.

しかしながら上記の方式では、画素サイズの大きなノイ
ズまで除去する場合には、第8図〜第1O図に示すよう
に、マスクパターンの数が指数関数的に増加するため、
多数回のパターンマツチングが必要となる。このため多
数回画像を走査しなければならず、処理時間が長くなっ
てしまい、高速でノイズ除去を行えないという問題があ
った。
However, in the above method, when removing large pixel-sized noise, the number of mask patterns increases exponentially, as shown in FIGS. 8 to 1O.
Pattern matching is required many times. For this reason, the image has to be scanned many times, which increases the processing time, resulting in the problem that noise removal cannot be performed at high speed.

本発明は、前記問題点を解決するために案出されたもの
であって、画像中のノイズを高速に除去することを目的
とする。
The present invention was devised to solve the above-mentioned problems, and an object of the present invention is to quickly remove noise in an image.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のノイズ除去方式は、前記目的を達成するため、
ディジタル画像を走査して各黒画素或いは白画素と連結
した黒画素群或いは白画素群の画素数を計数し、該画素
数が一定数以下であるとき前記画素をノイズと見做して
閾値処理により除去することを特徴とする。
In order to achieve the above object, the noise removal method of the present invention has the following features:
A digital image is scanned and the number of pixels in a black pixel group or white pixel group connected to each black pixel or white pixel is counted, and when the number of pixels is less than a certain number, the pixel is regarded as noise and threshold processing is performed. It is characterized in that it is removed by.

〔作用〕[Effect]

以下、本発明の作用を具体的に例を挙げて説明する。本
発明を実現するためのノイズ除去装置の基本的な構成例
を第1図に示す。
Hereinafter, the effects of the present invention will be explained with specific examples. FIG. 1 shows a basic configuration example of a noise removal device for realizing the present invention.

この装置は、二値画像を一時的に記憶する二値画像記憶
部31と、多値画像を一時的に記憶する多値画像記憶部
32と、装置全体の制御を行う制御部33と、任意の画
素の連結数をカウントする連結数計数部34及び画像全
体を任意の閾値で二値化する閾値処理部35からなるノ
イズ除去処理部36とを備えている。
This device includes a binary image storage section 31 that temporarily stores binary images, a multivalued image storage section 32 that temporarily stores multivalued images, a control section 33 that controls the entire device, and an optional The noise removal processing section 36 includes a connection number counting section 34 that counts the number of connected pixels, and a threshold processing section 35 that binarizes the entire image using an arbitrary threshold value.

jJ1図に示す装置の基本的な動作について第2図を参
照して説明する。
The basic operation of the apparatus shown in FIG. jJ1 will be explained with reference to FIG. 2.

いま、原稿を読み取って得られた画像のエツジが抽出さ
れ、二値画像記憶1!F[S31に第2図(a)に示す
ような1画素サイズのノイズNll N2.2画素サイ
ズのノイズN3 及び3画素サイズのノイズN。
Now, the edges of the image obtained by reading the original are extracted, and binary image storage 1! F[S31 includes 1 pixel size noise Nll, N2.2 pixel size noise N3, and 3 pixel size noise N as shown in FIG. 2(a).

を含む二値画像すなわちエツジ抽出画像71が記憶され
ているとする。ノイズ除去処理部36に設けられた連結
数計数部34は、二値画像を全面にわたって走査し、走
査位置にある黒点における連結数を求める。すなわち、
走査中の黒点を含めて何個の黒点が繋がっているかを検
出する。別の表現をすると、連結数は、各黒画素と連結
した黒画素群の画素数である。なお、ここでいう連結数
とは、8近傍における連結数を意味するが、これに限定
されるものではなく、4近傍の場合も同様である。
It is assumed that a binary image including an edge extraction image 71 is stored. A connection number counting unit 34 provided in the noise removal processing unit 36 scans the entire binary image and calculates the number of connections at a black point located at the scanning position. That is,
Detects how many black points are connected, including the black point being scanned. Expressed in another way, the number of connections is the number of pixels in the black pixel group that are connected to each black pixel. Note that the number of connections here means the number of connections in 8 neighborhoods, but is not limited to this, and the same applies to the case of 4 neighborhoods.

たとえば、5個の黒点が繋がっている場合は連結数を「
5」とし、多値画像記憶部32の対応する走査位置にこ
の「5」という値を書き込む。このようにして求められ
た多値画像すなわち連結数画像72(第2図(b)参照
)の各画素の連結数は、闇値処理部35により所定の閾
値と比較され、閾値以下の連結数を有する画素はノイズ
と見做して除去する。
For example, if 5 sunspots are connected, set the number of connections to ``
5" and writes the value "5" into the corresponding scanning position of the multi-valued image storage section 32. The number of connections of each pixel in the multivalued image, that is, the number of connections image 72 (see FIG. 2(b)) obtained in this way is compared with a predetermined threshold by the dark value processing unit 35, and the number of connections below the threshold is Pixels having 2 are considered to be noise and removed.

第2図の例では、連結数「3」以下をノイズと見做して
除去してふり、第2図(C)に示すようなノイズ除去画
像73が得られる。すなわち、ノイズN、。
In the example of FIG. 2, a noise-removed image 73 as shown in FIG. 2(C) is obtained by assuming that the number of connections "3" or less is noise and removing it. That is, the noise N,.

N t、 N s、 N 4 は−回の走査で全て除去
される。なあ、このノイズ除去画像73に対して、必要
に応じて端点接続処理、細線化処理等を行うことにより
、第2図(イ)に示すような境界線検出画像74を得る
ことができる。
N t , N s , and N 4 are all removed in - times of scanning. Incidentally, by performing end point connection processing, line thinning processing, etc. on this noise-removed image 73 as necessary, a boundary line detection image 74 as shown in FIG. 2(A) can be obtained.

上述の処理を行うための本発明の基本的なフローを第3
図に示す。
The basic flow of the present invention for performing the above processing is explained in the third section.
As shown in the figure.

ステップ101:画像の隅を走査位置にセットする。Step 101: Set the corner of the image to the scanning position.

ステップ102:走査位置が画像の反対の隅まで進んだ
かどうかで終了を判定し、もし走査終了ならばステップ
107に移る。
Step 102: The end is determined based on whether the scanning position has advanced to the opposite corner of the image, and if the scanning is completed, the process moves to step 107.

ステップ103:二値画像記憶!1FIS31中の走査
位置にある画素の値(第2図(a)参照)を読み出し、
黒画素でないならば走査位置を次の画素に移して(ステ
ツブ108)ステップ102へ戻る。
Step 103: Binary image memory! 1 Read the value of the pixel at the scanning position in the FIS 31 (see Fig. 2 (a)),
If the pixel is not a black pixel, the scanning position is moved to the next pixel (step 108) and the process returns to step 102.

ステップ104:多値画像8己憶部32中の走査位置に
ある画素の値(第2図ら)参照)を読み出し、「0」で
ないならば既に処理の終わった画素なので、走査位置を
次の画素に移して(ステップ108)ステップ102 
に戻る。なお、多値画像記憶部32の画素の値は、「0
」に初期化されているものとする。
Step 104: Read out the value of the pixel at the scanning position in the multilevel image 8 self-memory unit 32 (see Figure 2, etc.), and if it is not "0", it is a pixel that has already been processed, so the scanning position is moved to the next pixel. (Step 108) Step 102
Return to Note that the pixel value of the multivalued image storage unit 32 is “0”.
”.

ステップ105:走査位置の黒画素と連結している黒画
素群(以下、連結体と称する)の画素数すなわち連結数
を連結計数部34によってカウントする。
Step 105: The number of pixels in a group of black pixels (hereinafter referred to as a "connected body") connected to the black pixel at the scanning position, that is, the number of connections, is counted by the connection counting section 34.

この連結数を求めるアルゴリズムを示すフローチャー1
・の−例を第4図に示す。
Flowchart 1 showing the algorithm for calculating the number of connections
An example of ・is shown in FIG.

まず、初期化処理として、たとえば制御部33に設けら
れたスタックポインタの値SPを「0」にセットすると
ともに、現在位置を注目画素の位置にセットする(ステ
ップ201.202)。次に、現在位置の多値画像記憶
部32の値を「−1」に変更(ステップ203) l、
た後、現在位置の周囲8画素のうち、二値画像記憶部3
1における画素が黒で且つ多値画像記憶部32の値が「
0」である画素を全て抽出する(ステップ204) 抽出した画素数が「2」以上である場合は、抽出画素の
一つを選択し、他の画素は座標をスタックに格納してス
タックポインタの値SPを格納分増やしたくステップ2
06)後、現在位置を、抽出した或いは選択した画素の
位置に変更する(ステップ207)。また、抽出した画
素数が「1」である場合は、直接ステップ207 に進
む。また、抽出した画素数が「0」である場合は、スタ
ックポインタの値SPが「0」か否かを判別しくステッ
プ208)、値SPが「0」である場合は、多値画像記
憶部32の注目画素以後の画素を走査し、画素値が「−
1」の画素数、すなわち、連結数をカウントする(ステ
ップ209)。次に、多値画像記憶部32中の「−1」
の画素値を連結数で置き換えて処理を終了する。
First, as an initialization process, for example, the value SP of the stack pointer provided in the control unit 33 is set to "0", and the current position is set to the position of the pixel of interest (steps 201 and 202). Next, change the value of the multivalued image storage unit 32 at the current position to "-1" (step 203) l,
After that, out of the 8 pixels surrounding the current position, the binary image storage unit 3
The pixel at 1 is black and the value of the multi-valued image storage unit 32 is "
0'' (Step 204) If the number of extracted pixels is 2 or more, select one of the extracted pixels, store the coordinates of the other pixels in the stack, and move the stack pointer. Step 2 to increase the value SP by the amount stored
06), the current position is changed to the position of the extracted or selected pixel (step 207). Further, if the number of extracted pixels is "1", the process directly advances to step 207. Furthermore, if the number of extracted pixels is "0", it is determined whether the value SP of the stack pointer is "0" or not (step 208), and if the value SP is "0", the multivalued image storage The pixels after the pixel of interest 32 are scanned, and the pixel value is "-"
1'' pixels, that is, the number of connections (step 209). Next, "-1" in the multivalued image storage unit 32
The pixel value of is replaced with the number of connections and the process ends.

また、ステップ208で値SPが「0」でない場合は、
スタックから読み出した座標を現在位置とし、その分だ
けスタックポインタの値SPを減らす(ステップ211
)。次に、現在位置の多値画像記憶部32の値が「0」
であるか否か判別しくステップ212)、「0」である
場合にはステップ203 に戻り、「0」でない場合に
はステップ20Bに戻る。
Further, if the value SP is not "0" in step 208,
The coordinates read from the stack are set as the current position, and the value SP of the stack pointer is decreased by that amount (step 211).
). Next, the value of the multivalued image storage unit 32 at the current position is “0”.
If it is "0", the process returns to step 203; if it is not "0", the process returns to step 20B.

上述のステップ201〜212の処理により連結数が求
められる。
The number of connections is determined by the processing in steps 201 to 212 described above.

上述の連結数を求める処理に対する理解を容易にするた
め、第5図(1a)に示すような画素数が3であるノイ
ズの連結数を求める際の二値画像及び多値画像の変化を
第5図に例示する。第5図(1a)〜(12a)  は
二値画像の変化を示し、第5図(1b)〜(12b) 
 は対応する多値画像の変化を示している。
In order to facilitate understanding of the process of calculating the number of connections described above, the changes in a binary image and a multivalued image when calculating the number of connections of a noise whose number of pixels is 3 as shown in FIG. An example is shown in Figure 5. Figures 5 (1a) to (12a) show changes in binary images, and Figures 5 (1b) to (12b)
indicates a change in the corresponding multivalued image.

なお、第5図〈1a)〜(12a)  中、左下がりの
斜線が付された画素は黒画素を示す。また、各画素の位
置は、左上の画素を原点として、右方向に(1,1)。
In addition, in FIGS. 5(1a) to (12a), pixels marked with diagonal lines downward to the left indicate black pixels. Also, the position of each pixel is (1, 1) in the right direction from the upper left pixel as the origin.

(2,1)、 (3,1)、 (4,1>  と表し、
下方向に(1,1) 、 (1,2) 。
Expressed as (2,1), (3,1), (4,1>,
(1,1), (1,2) downwards.

(1,3)。(1,4)  と表すものとする。(1,3). It shall be expressed as (1, 4).

いま、第5図(la)に示す4X4サイズの二値画像の
上から2番目で左から2番目の画素、すなわち、(2,
2)  の位置の画素が注目画素であるとすると、ステ
ップ201.202により、この注目画素を現在位置と
してセットする。なあ、スタックポインタの値SPの初
期値は「0」であり、また、多値画像の画素の初期値は
、同図(1b)に示すように「0」である。
Now, the second pixel from the top and the second pixel from the left of the 4×4 size binary image shown in FIG. 5(la), that is, (2,
2) Assuming that the pixel at the position is the pixel of interest, this pixel of interest is set as the current position in steps 201 and 202. Incidentally, the initial value of the stack pointer value SP is "0", and the initial value of the pixel of the multivalued image is "0" as shown in FIG. 1(1b).

次に、同図(2b)に示すように、現在位!(2,2)
の多値画像の値を「−1」に変更くステップ203)し
た後、同図(3a)、 (3b)  に示すように、現
在位置<2.2)  の周囲8画素く破線の矩形が通過
する画S)のうち、二値画像における画素が黒で且つ多
値画像の値が「0」の画素を全て抽出する(ステップ2
04)。同図(3b)に示す右下がりの斜線が付された
(2.3)、 (3,3)の位置の画素が抽出画素を示
す。
Next, as shown in the same figure (2b), the current position! (2,2)
After changing the value of the multivalued image to "-1" (step 203), as shown in (3a) and (3b) in the same figure, the 8-pixel dashed rectangle around the current position < 2.2) is Among the passing images S), all pixels whose pixels in the binary image are black and whose value is "0" in the multivalued image are extracted (step 2
04). The pixels at positions (2.3) and (3,3) marked with diagonal lines downward to the right in FIG. 3B indicate extraction pixels.

ここでは、抽出した画素数が「2」であるので、ステッ
プ206に進み、同図<4a)、 <4b)に示すよう
に、一方の(2,3)  の位置の抽出画素を選択し、
他方の(3,3)の位置の抽出画素をスタック画素(I
I線が付された画素)として、座標(3,3>をスタッ
クに格納してスタックポインタの値SPを「1」とする
(ステップ206)。なふ、同図(4b)において、縦
線が付された(2.3)  の位置の画素が選択画素を
示す。その後、同図(5a)に示すように、現在位置を
、選択した画素の位置(2,3)  に変更する(ステ
ップ207)。
Here, the number of extracted pixels is "2", so proceed to step 206, select the extracted pixel at the position (2, 3) on one side, as shown in <4a) and <4b) in the same figure.
The other extracted pixel at position (3, 3) is stacked pixel (I
The coordinates (3, 3> are stored in the stack as the pixel marked with the I line) and the value SP of the stack pointer is set to "1" (step 206).In the same figure (4b), the vertical line The pixel at the position (2.3) marked with is the selected pixel.Then, as shown in (5a) in the same figure, the current position is changed to the selected pixel position (2,3) (step 207).

その後、ステップ203に戻る。After that, the process returns to step 203.

今度は、同図(6a)に示すように現在位置が(2,3
)であるので、同図(6b)に示すように、この位置の
多値画像の値を「−1」に変更(ステップ203) t
This time, the current position is (2, 3) as shown in the same figure (6a).
), the value of the multivalued image at this position is changed to "-1" (step 203), as shown in FIG. 6(b).
.

た後、同図(7a)、 (7b)に示すように、現在位
!(2,3>の周囲8画素のうち、二値画像における画
素が黒で且つ多値画像の値が「0」の画素を全て抽出す
る(ステップ204)。同図(7b)中、右下がりの斜
線が付された(3.3)の位置の画素が抽出画素を示す
After that, as shown in (7a) and (7b) in the same figure, the current position! (Out of the 8 pixels surrounding 2, 3>, extract all the pixels whose binary image is black and whose multi-valued image value is "0" (step 204). The diagonally shaded pixel at position (3.3) indicates the extracted pixel.

ここでは、抽出した画素数が「1」であるので、直接ス
テップ207 に進み、同図(8a)に示すように、現
在位置を、選択した画素の位置(3,3)  に変更し
た後、ステップ203に戻る。
Here, since the number of extracted pixels is "1", the process directly proceeds to step 207, and after changing the current position to the selected pixel position (3, 3), as shown in (8a) of the same figure, Return to step 203.

今度は、同図(9a)に示すように現在位置が(3,3
)であるので、同図(9b)に示すように、この位置の
多値画像の値を「−1」に変更(ステップ203) し
た後、ステップ204に進む。ここでは、同図(10a
)。
This time, the current position is (3, 3) as shown in the same figure (9a).
), the value of the multivalued image at this position is changed to "-1" (step 203), and then the process proceeds to step 204, as shown in FIG. 9(9b). Here, the same figure (10a
).

(10b)  に示すように、現在位置(3,3) の
周囲8画素のうち、二値画像における画素が黒で且つ多
値画像の値が「0」の画素はないのでステップ208に
進む。
As shown in (10b), among the eight pixels surrounding the current position (3, 3), there is no pixel whose binary image is black and whose multilevel image value is "0", so the process proceeds to step 208.

抽出した画素数が「0」である場合は、ステップ208
でスタックポインタの値SPが「0」か否かを判別する
。ここでは、SPの値は「1」であるのでステップ21
1に進み、同図(lla)、 (llb)に示すように
、スタックから読み出した座標(3,3)  を現在位
置とし、スタックポインタの値SPを「0」にする。次
に、現在位置(3,3) の多値画像の値が「0」であ
るか否か判別するが(ステップ212)、ここでは、「
0」でないのでステップ208に戻る。
If the number of extracted pixels is "0", step 208
It is determined whether the value SP of the stack pointer is "0" or not. Here, since the value of SP is "1", step 21
1, as shown in (lla) and (llb) in the same figure, the coordinates (3, 3) read from the stack are set as the current position, and the value SP of the stack pointer is set to "0". Next, it is determined whether the value of the multivalued image at the current position (3, 3) is "0" (step 212), but here, "
0'', the process returns to step 208.

今度は、値SPが「0」であるので、ステップ209に
進み、多値画像の注目画素以後の画素を走査し、゛画素
値が「−1」の画素数をカウントする。すなわち、連結
数は「3」となる。次に、同図(12b)に示すように
、多値画像中の「−1」の画素値を連結数すなわち「3
」で置き換えて処理を終了する。
This time, since the value SP is "0", the process advances to step 209, and the pixels after the pixel of interest in the multivalued image are scanned, and the number of pixels with a pixel value of "-1" is counted. In other words, the number of connections is "3". Next, as shown in the same figure (12b), the pixel value of "-1" in the multivalued image is
” and end the process.

次に、再度第3図に示すフローチャートに戻って説明を
続ける。
Next, the explanation will be continued by returning to the flowchart shown in FIG. 3 again.

ステップ106:ステップ105で求めた連結数を新た
な画素値として多値画像記憶部32中の連結体構成画素
の値を変更し、走査位置を次の画素に移して(ステップ
108)ステップ102に戻る。
Step 106: The number of connections obtained in step 105 is used as a new pixel value to change the values of the pixels constituting the connected body in the multivalued image storage unit 32, and the scanning position is moved to the next pixel (step 108), and the process proceeds to step 102. return.

ステップ107:上記ステップ101−106の処理に
よって求められた連結数画像(第2図ら)参照)に対し
、連結数の小さい連結体はノイズとみなし、闇値処理部
35によって閾値処理してノイズを除去しく第2図(C
)参照)、二値画像記憶装置31に格納する。
Step 107: Concatenated bodies with a small number of concatenations are regarded as noise in the concatenated number image (see Fig. 2, etc.) obtained by the processing of steps 101-106 above, and are subjected to threshold processing by the dark value processing unit 35 to remove the noise. Figure 2 (C)
) and stored in the binary image storage device 31.

上記の処理手順により高速でノイズを除去するという本
発明の目的を達成することができる。
The purpose of the present invention, which is to remove noise at high speed, can be achieved by the above processing procedure.

〔実施例〕〔Example〕

以下、図面を参照しながら実施例に基づいて本発明の特
徴を具体的に説明する。
DETAILED DESCRIPTION OF THE INVENTION Hereinafter, features of the present invention will be specifically described based on examples with reference to the drawings.

第6図は本発明を適用する画像の境界線検出装置の構成
を示すブロック図の一例である。
FIG. 6 is an example of a block diagram showing the configuration of an image boundary detection device to which the present invention is applied.

この装置は、第1図で説明した二値画像記憶部31、 
 多値画像記憶部32.制御部33.連結数計数部34
及び閾値処理部35を備えている。更に、コマンド等を
入力するための、入力装置51と、この人力装置51か
ら入力されるコマンド等或いは二値画像記憶部31及び
多値画像記憶部32に記憶される画像を表示するデイス
プレィ52と、多値画像記憶部32に記憶される画像の
エツジ抽出処理を行うエツジ抽出部53と、検出された
エツジの切れ(不連続)を接続する端点接続処理部54
と、接続されたエツジを1画素の幅にする細線化処理部
55と、前記閾値処理部35で行う閾値処理の闇値を与
える閾値設定部56とを備えている。図中、破線で囲ま
れた部分が境界線検出処理部57を示している。
This device includes the binary image storage section 31 described in FIG.
Multivalued image storage unit 32. Control unit 33. Connection number counting section 34
and a threshold value processing section 35. Furthermore, an input device 51 for inputting commands and the like, and a display 52 for displaying commands and the like input from the human-powered device 51 or images stored in the binary image storage section 31 and the multi-value image storage section 32. , an edge extraction unit 53 that performs edge extraction processing of the image stored in the multivalued image storage unit 32, and an end point connection processing unit 54 that connects the detected edge breaks (discontinuities).
, a thinning processing unit 55 that makes the connected edges one pixel wide, and a threshold setting unit 56 that provides a darkness value for the threshold processing performed by the threshold processing unit 35. In the figure, a portion surrounded by a broken line indicates the boundary line detection processing section 57.

以下、第7図に示すフローチャートに沿って本実施例の
動作の説明を行う。
Hereinafter, the operation of this embodiment will be explained along the flowchart shown in FIG.

ステップ301:多値画像記憶部32に記憶された境界
*!It出処理の対象となる画像に対して、エツジ抽出
部53によりエツジ抽出処理を行い、多値画像記憶部3
2に格納する。なお、このエツジ抽出処理は、たとえば
、手塚ほか著「ディジタル画像処理工学」1日刊工業新
聞社、昭和60年6月15日発行。
Step 301: Boundary* stored in the multivalued image storage unit 32! The edge extraction section 53 performs edge extraction processing on the image to be subjected to the It output processing, and the multivalued image storage section 3
Store in 2. This edge extraction process can be performed, for example, in "Digital Image Processing Engineering" by Tezuka et al., published by Nikkan Kogyo Shimbun, June 15, 1986.

76〜78ページに記載されているような技法を利用し
て実現することができる。
This can be accomplished using techniques such as those described on pages 76-78.

ステップ302:多値画像記憶部32に記憶されたエツ
ジ抽出画像に対して閾値処理部35で閾値処理を行い、
二値画像記憶B31に格納する。この時点での結果画像
71を第2図(a)に示す。同図は抽出された不連続な
エツジ画素群の周辺にノイズN、、N、。
Step 302: The threshold processing unit 35 performs threshold processing on the edge extracted image stored in the multivalued image storage unit 32,
It is stored in the binary image storage B31. The resulting image 71 at this point is shown in FIG. 2(a). In the figure, there is noise N,,N, around the extracted discontinuous edge pixel group.

Ns、N4 が重畳した様子を示している。It shows how Ns and N4 are superimposed.

ステップ303:二値画像8己憶部31に記憶された画
像に対して、連結数計数部34を用いて第3図の処理フ
ローのステップ101−106.108に示した連結数
計数処理を行い、連結数画像72を得る。この時点で多
値画像記憶部32に格納されている画像を第2図(b)
に示す。
Step 303: The connection number counting process shown in steps 101-106 and 108 of the processing flow of FIG. , a connected number image 72 is obtained. The image stored in the multilevel image storage unit 32 at this point is shown in FIG. 2(b).
Shown below.

ステップ304:入力装置51から連結数画像の闇値処
理用の閾値、たとえば「3」を入力し、閾値設定部56
に登録する。
Step 304: Input a threshold value for dark value processing of the connected number image from the input device 51, for example "3", and input it to the threshold setting unit 56.
Register.

ステップ305:閾値設定B56に登録された閾値を用
いて閾値処理部35により、多値画像記憶部32に記憶
された連結数画像72を閾値処理し、二値画像記憶部3
1に格納する。この時点で二値画像記憶部31に格納さ
れているノイズ除去画像73を第2図(C)に示す。な
お、ここでは、連結数「3」以下の連結体をノイズと見
做し、閾値処理によりノイズ除去を行っている。
Step 305: Using the threshold value registered in the threshold value setting B56, the threshold processing unit 35 performs threshold processing on the connected number image 72 stored in the multi-valued image storage unit 32, and the binary image storage unit 3
Store in 1. The noise-removed image 73 stored in the binary image storage section 31 at this point is shown in FIG. 2(C). Note that here, connected bodies with the number of connections "3" or less are regarded as noise, and noise is removed by threshold processing.

ステップ306二二値画像記憶部31に記憶されたノイ
ズ除去結果画像73をデイスプレィ52に表示する。
Step 306 The noise removal result image 73 stored in the binary image storage section 31 is displayed on the display 52.

すなわち、閾値を超した連結数の画素のみが黒点として
表示される。
That is, only pixels whose number of connections exceeds the threshold are displayed as black dots.

ステップ307;ノイズ除去結果を見て、これでよいと
判断されたら次の処理ステップ308 に進む。
Step 307: Look at the noise removal results, and if it is determined that this is acceptable, proceed to the next processing step 308.

もし閾値が適正でないと判断されたら処理ステップ3(
14へ戻り、再度闇値入力と閾値処理を行う。
If it is determined that the threshold value is not appropriate, processing step 3 (
Return to step 14 and perform dark value input and threshold processing again.

なお、この判断は作業者が目視で行うが、適当なアルゴ
リズムを使用すれば自動化も可能である。
Note that this judgment is made visually by the operator, but it can also be automated by using an appropriate algorithm.

この時点では、多値画像記憶部32内部に連結数画像7
2が残っているので、閾値処理のみを繰り返せばよく、
この閾値処理は短時間で実行できるので、全体の処理を
高速に行うことができる。
At this point, the connected number image 7 is stored inside the multivalued image storage unit 32.
2 remains, so we only need to repeat the threshold processing,
Since this threshold value processing can be executed in a short time, the entire processing can be carried out at high speed.

ステップ308:確定したノイズ除去画像73に、端点
接続処理部54を用いて端点接続処理を行う。なお、こ
の端点接続処理は、たとえば、前記「ディジタル画像処
理工学」78〜79ページに記載されているような技法
を利用して実現することができる。
Step 308: Perform end point connection processing on the determined noise removed image 73 using the end point connection processing section 54. Note that this end point connection processing can be realized using, for example, the technique described in the above-mentioned "Digital Image Processing Engineering", pages 78-79.

ステップ309:接続されたエツジ抽出画像に、細線化
処理部55を用いてm’s化処理を行う。また、この細
線化処理は、たとえば、前記「ディジタル画像処理工学
」139〜142ページに記載されているような技法を
利用して実現することができる。
Step 309: Perform m's processing on the connected edge extracted images using the thinning processing unit 55. Further, this thinning process can be realized using, for example, the technique described in the above-mentioned "Digital Image Processing Engineering", pages 139 to 142.

これらの処理終了時点での結果画像を第2図(イ)に示
す。同図に示すように、上記のような処理手順により、
ノイズを効果的に除去した境界検出画像74を得ること
ができる。
The resulting image at the end of these processes is shown in FIG. 2(a). As shown in the figure, by the above processing procedure,
A boundary detection image 74 with noise effectively removed can be obtained.

なお、上述の説明においては、黒画素に注目して処理を
行ったが、白黒反転画像のように、白画素により表現さ
れる画像に意味がある場合には、白画素に着目して処理
を行えばよい。
Note that in the above explanation, processing was performed focusing on black pixels, but if the image expressed by white pixels has meaning, such as a black-and-white inverted image, processing may be performed focusing on white pixels. Just go.

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

以上に述べたように、本発明においては、画像の連結数
を求め、この連結数と閾値を比較し、閾値より小声いも
のをノイズと見做して除去するようにしている。連結数
は一回の走査で求めることができるので、ノイズとして
除去すべき画素のサイズを大きくした場合でも、ノイズ
除去の処理速度が低下することがない。したがって、高
速でノイズ除去を行うことができる。
As described above, in the present invention, the number of connections in images is determined, this number of connections is compared with a threshold value, and anything that is quieter than the threshold value is regarded as noise and removed. Since the number of connections can be determined in one scan, even if the size of pixels to be removed as noise is increased, the processing speed of noise removal does not decrease. Therefore, noise removal can be performed at high speed.

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

第1図は本発明の基本的な構成を示すブロック図、第2
図は本発明の詳細な説明するための図、第3図は本発明
における基本的な処理の流れを示すフローチャート、第
4図は連結数を求める処理の流れを示すフローチャート
、第5図は連結数を求める際の二値画像及び多値画像の
変化を示す説明図、第6図は本発明の一実施例のブロッ
ク図、第7図は第6図に示す実施例に右ける処理の流れ
を示すフローチャート、第8図〜第10図はマスクパタ
ーンの例を示す説明図、第11図〜第13図はマスクパ
ターンによるマツチングの例を示す説明図、′s14図
はパターンマツチングによるノイズ除去結果を示す説明
図である。 1工:白画素     12:黒画素 13:11m素サイズのマスクパターン14:2画素サ
イズのマスクパターン 15:3画素サイズのマスクパターン 31:二値画像記憶部 32:多値画像記憶部33:制
御部     34:連結数計数部35:閾値処理部 
  36:ノイズ除去処理部51:入力装置    5
2:ディスプレイ53:エツジ抽出部  54:端点接
続処理部55:細線化処理部  56:閾値設定部57
:境界線検出処理部
Figure 1 is a block diagram showing the basic configuration of the present invention, Figure 2 is a block diagram showing the basic configuration of the present invention.
The figure is a diagram for explaining the present invention in detail, Figure 3 is a flowchart showing the basic process flow in the present invention, Figure 4 is a flowchart showing the process flow for calculating the number of connections, and Figure 5 is a flowchart showing the flow of the process to calculate the number of connections. An explanatory diagram showing changes in a binary image and a multivalued image when calculating a number, FIG. 6 is a block diagram of an embodiment of the present invention, and FIG. 7 is a flow of processing according to the embodiment shown in FIG. 6. 8 to 10 are explanatory diagrams showing examples of mask patterns, Figures 11 to 13 are explanatory diagrams showing examples of matching using mask patterns, and Figure 's14 is noise removal by pattern matching. It is an explanatory diagram showing a result. 1st step: White pixel 12: Black pixel 13: Mask pattern of 11m pixel size 14: Mask pattern of 2 pixel size 15: Mask pattern of 3 pixel size 31: Binary image storage unit 32: Multivalued image storage unit 33: Control Section 34: Connection number counting section 35: Threshold processing section
36: Noise removal processing unit 51: Input device 5
2: Display 53: Edge extraction section 54: End point connection processing section 55: Thinning processing section 56: Threshold value setting section 57
:Border line detection processing unit

Claims (1)

【特許請求の範囲】[Claims] 1、ディジタル画像を走査して各黒画素或いは白画素と
連結した黒画素群或いは白画素群の画素数を計数し、該
画素数が一定数以下であるとき前記画素をノイズと見做
して閾値処理により除去することを特徴とするノイズ除
去方式。
1. Scan a digital image and count the number of pixels in a black pixel group or white pixel group connected to each black pixel or white pixel, and if the number of pixels is less than a certain number, consider the pixel to be noise. A noise removal method characterized by removal using threshold processing.
JP1078984A 1989-03-29 1989-03-29 Noise removing system Pending JPH02254574A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1078984A JPH02254574A (en) 1989-03-29 1989-03-29 Noise removing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1078984A JPH02254574A (en) 1989-03-29 1989-03-29 Noise removing system

Publications (1)

Publication Number Publication Date
JPH02254574A true JPH02254574A (en) 1990-10-15

Family

ID=13677159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1078984A Pending JPH02254574A (en) 1989-03-29 1989-03-29 Noise removing system

Country Status (1)

Country Link
JP (1) JPH02254574A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8009926B2 (en) 2006-04-03 2011-08-30 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method, and medium storing program
JP2015153069A (en) * 2014-02-13 2015-08-24 富士ゼロックス株式会社 Image processor and image processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8009926B2 (en) 2006-04-03 2011-08-30 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method, and medium storing program
JP2015153069A (en) * 2014-02-13 2015-08-24 富士ゼロックス株式会社 Image processor and image processing program

Similar Documents

Publication Publication Date Title
CN114529459B (en) Method, system and medium for enhancing image edge
JPH06318251A (en) Device and method for processing image
JP2001266068A (en) Method and device for recognizing table, character- recognizing device, and storage medium for recording table recognizing program
CN111767752B (en) Two-dimensional code identification method and device
CN113569859A (en) Image processing method and device, electronic equipment and storage medium
JP3989341B2 (en) Image processing device
US6983071B2 (en) Character segmentation device, character segmentation method used thereby, and program therefor
JP2871601B2 (en) Character string detecting apparatus and method
US6181437B1 (en) Image processing apparatus capable of producing images without jaggies at edges
JPH02254574A (en) Noise removing system
JP3698867B2 (en) Circular pattern determination method, apparatus and recording medium
JP2021013124A (en) Image processing apparatus, image processing method, and program
JPH08272956A (en) Method and device for noise removal
JP2853510B2 (en) Image noise removal device
JP2003317107A (en) Method and device for ruled-line detection
JPH06301775A (en) Picture processing method, picture identification method and picture processor
JP2800192B2 (en) High-speed character / graphic separation device
JP2771045B2 (en) Document image segmentation method
JPH0646259A (en) Picture noise reduction device
JPS60142482A (en) Device for forming reduced picture
JP2853141B2 (en) Image area identification device
JP2859603B2 (en) Method and apparatus for binarizing image data
JPH1011589A (en) Picture processing method
JPH0721392A (en) Method for extracting contour line of input picture
JPH05282489A (en) Method for deciding attribute of document image