JPH04340672A - Method and device for processing image - Google Patents

Method and device for processing image

Info

Publication number
JPH04340672A
JPH04340672A JP3112814A JP11281491A JPH04340672A JP H04340672 A JPH04340672 A JP H04340672A JP 3112814 A JP3112814 A JP 3112814A JP 11281491 A JP11281491 A JP 11281491A JP H04340672 A JPH04340672 A JP H04340672A
Authority
JP
Japan
Prior art keywords
pixel
edge
interest
image
level
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.)
Withdrawn
Application number
JP3112814A
Other languages
Japanese (ja)
Inventor
Yukari Shimomura
下村 ゆかり
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP3112814A priority Critical patent/JPH04340672A/en
Publication of JPH04340672A publication Critical patent/JPH04340672A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To obtain the image processing method and device which enables edge emphasis having no transient state of a level by canceling the stepwise change of the density level at the edge part of an input image. CONSTITUTION:For R, G and B chrominance signals read by a scanner, longitudinal and lateral edges are calculated by an edge detection filter, and the respective edges of the respective chrominance signals R, G and B are compared with threshold values T and T' by a comparator 21. According to the compared results, edge directions are decided and when the edge directions are decided, a selector 22 calculates constants A, B, C and D as picture element numbers showing position relation with a considering picture element. Based on level difference between the picture elements designated by those picture element numbers and the considering picture element or the code, the level transforming the considering picture element is outputted through a selector 23.

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 method and apparatus for detecting and enhancing edge portions of a color image.

【0002】0002

【従来の技術】スキヤナ等にて画像を入力し、2次元座
標の横軸に走査方向、縦軸にレベル変化をとつて入力画
像のエツジ部分のレベル変化を見ると、エツジ部分のレ
ベルは横軸のある点を境に急峻には変化せず、段階状に
変化することがわかる。従来は、ボケているエツジを強
調する手法としてエツジ強調フイルタを用いることが知
られている。これは、図10に示すように、処理したい
画素(注目画素)の周辺にウインドウを設け、そのウイ
ンドウ内の画素と、それに対応するフイルタの重みの積
和をとつて、その結果を注目画素のレベルに加算するこ
とで処理後のレベルとするものである。
[Prior Art] When an image is input using a scanner or the like and the horizontal axis of two-dimensional coordinates is the scanning direction and the vertical axis is the level change, and the level change of the edge part of the input image is observed, the level of the edge part is horizontal. It can be seen that the value does not change sharply after a certain point on the axis, but changes in stages. Conventionally, it has been known to use an edge enhancement filter as a method of enhancing blurred edges. As shown in Figure 10, this involves creating a window around the pixel you want to process (pixel of interest), calculating the sum of the products of the pixels within that window and the weights of the corresponding filters, and applying the results to the pixel of interest. By adding it to the level, it becomes the level after processing.

【0003】0003

【発明が解決しようとしている課題】しかしながら、上
記従来のエツジ強調手法では、処理後においてもエツジ
部分のレベルの過渡的状態である段階状の変化は消滅せ
ず、エツジの始まりと終わりの部分だけ強調しているに
すぎない。例えば、図11(a)のように、黄地に赤、
緑の文字・線画が描いてある画像をスキヤナで読み込み
、RGB3原色信号で表わされる画像を、所謂L*a*
b*に変換し、a*b*空間の頻度分布をとつてa*b
*分布の様子をみると、図11(b)のようになる。 尚、ここでは頻度を量的に表現しづらいので、頻度1以
上のものを黒点で表わす。
[Problems to be Solved by the Invention] However, in the conventional edge enhancement method described above, even after processing, the stepwise change in the level of the edge portion does not disappear, and only the beginning and end portions of the edge are affected. I'm just emphasizing it. For example, as shown in Figure 11(a), red on a yellow background,
An image with green text/line drawings is read in using a scanner, and the image represented by the RGB three primary color signals is converted into the so-called L*a*
Convert to b*, take the frequency distribution of a*b* space, and get a*b
*If you look at the distribution, it will look like Figure 11(b). Note that since it is difficult to express the frequency quantitatively here, those with a frequency of 1 or more are represented by black dots.

【0004】即ち、従来のエツジ強調法では、図11の
(b)に示すように、下地である黄から、赤、緑にかけ
て、天の川状のつながりが発生する。これは、レベルが
階段状態になつているため、黄から赤へ、あるいは緑へ
段階的に色が変化することに起因している。そして、図
11(a)に示す画像に対してエツジ強調フイルタによ
りエツジ強調を施すと、図12(a)にようになり、そ
のL*a*b*分布は、図12の(b)のようになる。 つまり、RGB、またはCMY空間では、見かけ上エツ
ジ部分がはつきりしたようにはなるが、図12(b)か
ら明らかなようにL*a*b*分布で見ると、天の川状
のつながりは消えるどころか余分なノイズが発生して、
各色が膨張するという問題がある。
That is, in the conventional edge enhancement method, as shown in FIG. 11(b), a Milky Way-like connection occurs from the base yellow to red and green. This is because the levels are in a staircase state, so the color changes gradually from yellow to red or green. When edges are emphasized using an edge emphasis filter on the image shown in FIG. 11(a), the result is shown in FIG. 12(a), and the L*a*b* distribution is as shown in FIG. 12(b). It becomes like this. In other words, in the RGB or CMY space, the edges appear to be sharp, but as is clear from Figure 12(b), when viewed in terms of the L*a*b* distribution, the Milky Way-like connection does not appear. Instead of disappearing, extra noise occurs,
The problem is that each color expands.

【0005】尚、上記のL*a*b*とは、色を色相(
H)、明度(V)、彩度(C)に近い形で表現する色空
間であり、CIEのXYZ座標系の理論が適用できるも
のに関しては、理論的に比較的容易に変換できる。3原
色信号RGB(NTSC)からCIE−XYZへの変換
は、 X=0.608R+0.173G+0.200BY=0
.299R+0.587G+0.114BZ=    
          0.066G+1.112Bの如
き関係式に従つて行なわれ、CIE−XYZからL*a
*b*(CIE)への変換は、X0 ,Y0 ,Z0 
を標準色でのX,Y,Zの値として、下記式にて実行さ
れる。
[0005] The above L*a*b* refers to the hue (
H), brightness (V), and saturation (C), and can be theoretically converted relatively easily as long as it is a color space to which CIE's XYZ coordinate system theory can be applied. Conversion from three primary color signals RGB (NTSC) to CIE-XYZ is as follows: X=0.608R+0.173G+0.200BY=0
.. 299R+0.587G+0.114BZ=
It is performed according to the relational expression such as 0.066G + 1.112B, and L*a is obtained from CIE-XYZ.
Conversion to *b* (CIE) is X0, Y0, Z0
This is executed using the following formula, using the standard color as the X, Y, and Z values.

【0006】[0006]

【数1】[Math 1]

【0007】また、色相(H)、明度(V)、彩度(C
)については、以下のように表わされる。
[0007] Furthermore, hue (H), brightness (V), and saturation (C
) is expressed as follows.

【0008】[0008]

【数2】[Math 2]

【0009】画像処理では、色そのものを変換する技術
は知られているが、そのための色抽出については、RG
B、CMY3原色信号空間で抽出する、あるいはL*a
*b*、Luvのように、色相、明度、彩度を表わす空
間で抽出するにしても、上記天の川状のレベルの過渡的
状態がない方が、抽出時にも、また色変換時にも変換し
たい色の領域がはつきり分かれていて処理しやすいこと
は明らかである。
[0009] In image processing, the technology of converting the color itself is known, but the color extraction for this purpose is
B, Extract in CMY 3 primary color signal space, or L*a
Even when extracting in a space that expresses hue, brightness, and saturation, such as *b* and Luv, it is better to have no transient state at the milky-way level mentioned above, both during extraction and color conversion. It is clear that the color areas are clearly separated and easy to process.

【0010】本発明はかかる点に鑑みてなされたもので
あり、その目的とするところは、入力画像のエツジ部分
の濃度レベルの段階状変化を解消し、レベルの過渡的状
態がないエツジ強調が可能な画像処置方法及びその装置
を提供することである。
The present invention has been made in view of the above, and its purpose is to eliminate stepwise changes in the density level at the edge portions of an input image, and to achieve edge enhancement without level transients. An object of the present invention is to provide a possible image processing method and apparatus.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
、本発明は、以下の構成を備える。即ち、画像を読み込
み、その画像のエツジ処理を行なう画像処理装置におい
て、注目画素を中心に水平、及び垂直方向に所定画素数
の色信号データを入力する手段と、注目画素が画像のエ
ツジであるかを判定するエツジ判定手段と、前記エツジ
の方向を求める手段と、注目画素の色レベルと前記画像
のエツジ方向に対して所定数前後させた画素の色レベル
との差をもとに、該注目画素の変換後のレベルを出力す
る第1の出力手段と、前記エツジ判定手段が、注目画素
はエツジではないと判定したときに、該注目画素の色レ
ベルをそのまま出力する第2の出力手段とを備える。
Means for Solving the Problems In order to achieve the above object, the present invention has the following configuration. That is, in an image processing apparatus that reads an image and performs edge processing on the image, there is a means for inputting color signal data of a predetermined number of pixels in the horizontal and vertical directions centering on the pixel of interest, and a means for inputting color signal data of a predetermined number of pixels in the horizontal and vertical directions centering on the pixel of interest, and the pixel of interest is the edge of the image. an edge determining means for determining whether the edge direction is the same; and a means for determining the direction of the edge; a first output means for outputting the converted level of the pixel of interest; and a second output means for outputting the color level of the pixel of interest as is when the edge determining means determines that the pixel of interest is not an edge. Equipped with.

【0012】好ましくは、第1の出力手段は、注目画素
の色レベルと画像のエツジ方向に対して所定数前の画素
の色レベルとの差と、注目画素の色レベルと画像のエツ
ジ方向に対して所定数後の画素の色レベルとの差との符
号が等しいとき、該所定数が1となるまで該所定数をデ
クリメントしながら、該色レベルの差をもとに該注目画
素の変換後のレベルを出力し、該符号が異なつたときに
は、その差の小さい方の画素の色レベルを出力する。
Preferably, the first output means calculates the difference between the color level of the pixel of interest and the color level of a pixel a predetermined number of times before the edge direction of the image, and the difference between the color level of the pixel of interest and the edge direction of the image. On the other hand, when the sign of the difference with the color level of a pixel after a predetermined number of pixels is the same, the pixel of interest is converted based on the difference in color level while decrementing the predetermined number until the predetermined number becomes 1. The subsequent level is output, and when the signs differ, the color level of the pixel with the smaller difference is output.

【0013】[0013]

【作用】以上の構成において、入力画像のエツジ部分の
濃度レベルの段階状変化を解消し、レベルの過渡的状態
がないエツジ強調をするよう機能する。
[Operation] The above configuration functions to eliminate stepwise changes in the density level at the edge portions of the input image and to perform edge emphasis without any level transients.

【0014】[0014]

【実施例】以下、添付図面を参照して、本発明に係る好
適な実施例を詳細に説明する。図1,図2は、本発明の
一実施例である画像処理装置の要部構成を示すブロツク
図である。図1において、不図示のスキヤナによつて読
み込まれたRGB色信号は、FIFO部1に入力される
。このFIFO1は5個のFIFOにて構成され、画像
の垂直方向の連続する5ライン分のデータが記憶される
。そして、各ラインの左端から右端までのデータが、同
一水平方向に位置するラツチ群2の各ラツチに、クロツ
ク(不図示)に同期して順次出力される。これら出力さ
れたデータは、ラツチ群2にてラツチされ、注目画素を
中心とした水平・垂直方向5×5の画素データとして格
納される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. FIGS. 1 and 2 are block diagrams showing the main components of an image processing apparatus according to an embodiment of the present invention. In FIG. 1, RGB color signals read by a scanner (not shown) are input to a FIFO section 1. This FIFO 1 is composed of five FIFOs, and stores data for five consecutive lines of the image in the vertical direction. Data from the left end to the right end of each line is sequentially output to each latch of the latch group 2 located in the same horizontal direction in synchronization with a clock (not shown). These output data are latched by latch group 2 and stored as 5×5 pixel data in the horizontal and vertical directions centered on the pixel of interest.

【0015】ラツチ群2に格納されたデータは、縦方向
エツジ計算部3、及び横方向エツジ計算部4に入力され
、図3に示すエツジ検出フイルタにて縦方向エツジ、及
び横方向エツジが算出される。図3に示すエツジ検出フ
イルタの内、(a)は縦方向エツジ検出フイルタであり
、(b)は横方向エツジ検出フイルタである。これらの
フイルタにてエツジを検出する方法は、例えば、縦方向
エツジ検出フイルタについて説明すると、ラツチ群2か
らの5×5のデータの内、フイルタの−1の重みに対応
する画素、及び+1の重みに対応する画素を個々に全て
加算し、加算後の両値を減算する。この演算により、5
×5のデータに縦方向エツジ検出フイルタをかけた値が
得られる。
The data stored in the latch group 2 is input to the vertical edge calculation section 3 and the horizontal edge calculation section 4, and the vertical edge and the horizontal edge are calculated by the edge detection filter shown in FIG. be done. Among the edge detection filters shown in FIG. 3, (a) is a vertical edge detection filter, and (b) is a horizontal edge detection filter. For example, in the case of a vertical edge detection filter, the method for detecting edges with these filters is as follows: Among the 5×5 data from latch group 2, the pixels corresponding to the weight of -1 and the weight of +1 of the filter are All pixels corresponding to the weights are added individually, and both values after addition are subtracted. With this calculation, 5
A value obtained by applying the vertical edge detection filter to the ×5 data is obtained.

【0016】横方向についても同様な演算を行ない、こ
れらの演算にて得られたエツジa(縦方向)とエツジb
(横方向)を、図2に示す処理回路にて色信号R,G,
Bそれぞれについて求める。
Similar calculations are performed in the horizontal direction, and the edge a (vertical direction) and edge b obtained by these calculations are
(horizontal direction), the color signals R, G,
Find each B.

【0017】図2に示す処理回路において、各色信号R
,G,Bそれぞれのエツジについて、後述するように、
比較器21にて不図示のCPUによりレジスタにセツト
されたしきい値T,T’との比較が行なわれ、その結果
に基づきエツジ方向を決める。エツジ方向が決定される
と、セレクター22にて、注目画素との位置関係を示す
画素番号である定数A,B,C,Dを求め、後述する演
算処理を行なつて、セレクター23を介してR’,G’
,B’の値を出力する。
In the processing circuit shown in FIG.
, G, and B, as described later,
A comparison is made in the comparator 21 with threshold values T and T' set in a register by a CPU (not shown), and the edge direction is determined based on the result. When the edge direction is determined, the selector 22 obtains constants A, B, C, and D, which are pixel numbers indicating the positional relationship with the pixel of interest. R', G'
, B' are output.

【0018】尚、上記ラツチ群2の構成を水平・垂直方
向5×5構成としたのは、本出願人がスキヤナ2機種に
ついて実験、調査した結果、色信号のレベルが、エツジ
部分において変化目標レベルに達するのに最大5画素必
要なことが判明したことに基づくものである。
The reason why the latch group 2 has a 5×5 configuration in the horizontal and vertical directions is that the applicant has conducted experiments and research on two types of scanners, and found that the level of the color signal changes at the edge portion. This is based on the fact that it was found that a maximum of 5 pixels are required to reach the level.

【0019】そこで、上述したエツジ部分のレベルの過
渡的な状態を解消するために、本実施例では、図2に示
す回路にて注目画素がエツジ部分であるかどうかを判別
し、それがエツジであれば、エツジ方向に所定数(mと
する)分の画素前の画素、所定数分の画素後の画素それ
ぞれと注目画素とのレベルの差をとり、レベル差の絶対
値が小さい方の画素のレベルに強制変換するようにして
いる。尚、エツジ方向に前後させる画素数は、ここでは
m=2、つまり2画素とする。
Therefore, in order to eliminate the above-described transient state of the level of the edge portion, in this embodiment, the circuit shown in FIG. 2 determines whether or not the pixel of interest is an edge portion. If so, calculate the difference in level between the pixel of interest and a pixel before a predetermined number of pixels (m) and a pixel after a predetermined number of pixels in the edge direction, and calculate the difference in level between the pixel of interest and the pixel before and after a predetermined number of pixels in the edge direction. I am trying to force conversion to the pixel level. Note that the number of pixels moved back and forth in the edge direction is m=2, that is, 2 pixels here.

【0020】また、本実施例では、頂点レベルが1画素
幅しかない細線(図7に示す)の頂点レベル保護のため
、前記2つのレベル差の符号が一致したならば、さらに
mをデクリメントし、m=1として同様の処理を行なつ
て、再度2つのレベル差の符号が一致したならば、注目
画素は保存すべき頂点として変換しない。しかし、2つ
のレベル差の符号が一致しなければ、同様にレベル差の
絶対値が小さい方の画素のレベルに強制変換を行なう。
Furthermore, in this embodiment, in order to protect the vertex level of a thin line whose vertex level is only one pixel wide (as shown in FIG. 7), if the signs of the two level differences match, m is further decremented. , m=1, and if the signs of the two level differences match again, the pixel of interest is not converted as a vertex to be saved. However, if the signs of the two level differences do not match, forced conversion is similarly performed to the level of the pixel with the smaller absolute value of the level difference.

【0021】次に、図4に示すフローチヤートを参照し
て、本実施例に係る画像処理装置における処理手順を説
明する。図4のステツプS1で、R,G,Bそれぞれに
ついてエツジa(縦方向)とエツジb(横方向)の絶対
値の和   EDGE=|エツジa|+|エツジb|     
                   …(1)が最
大のものの色信号を求め、それをXとする。そして、ス
テツプS2で、EDGE(X)が、所定のしきい値Tを
越えているかどうかを判定し、それがしきい値以下であ
ればステツプS3に進んで、エツジ強調処理を行なわな
い、つまり注目画素はR,G,Bすべてそのままの値と
して、ban=12とする。このbanとは、図5に示
すように変換すべき画素の位置関係を示し、注目画素=
12となる。
Next, the processing procedure in the image processing apparatus according to this embodiment will be explained with reference to the flowchart shown in FIG. In step S1 of FIG. 4, the sum of the absolute values of edge a (vertical direction) and edge b (horizontal direction) for each of R, G, and B is calculated as follows: EDGE=|edge a|+|edge b|
...Find the color signal for which (1) is the maximum, and let it be X. Then, in step S2, it is determined whether EDGE(X) exceeds a predetermined threshold value T, and if it is less than the threshold value, the process proceeds to step S3, in which edge enhancement processing is not performed. The pixel of interest is set to ban=12 with all R, G, and B values unchanged. This ban indicates the positional relationship of pixels to be converted as shown in FIG. 5, and the pixel of interest =
It becomes 12.

【0022】一方、ステツプS2でEDGE(X)がし
きい値Tを越えていると判定されるとステツプS4に進
み、エツジa(X)とエツジb(X)の符号、及び大き
さをもとにエツジの方向を求める。ここで、新たなしき
い値をT’=T/2とすると、|エツジa(X)|≧T
’かつ|エツジb(X)|<T’ならば、エツジの方向
は縦としてステツプS5に進む。また、|エツジa(X
)|<T’かつ|エツジb(X)|≧T’ならば、エツ
ジの方向は横であり、ステツプS6に進む。
On the other hand, if it is determined in step S2 that EDGE(X) exceeds the threshold T, the process proceeds to step S4, where the signs and magnitudes of edge a(X) and edge b(X) are also determined. Find the direction of the edge. Here, if the new threshold value is T'=T/2, |edge a(X)|≧T
If 'and |edge b(X)|<T', the edge direction is assumed to be vertical and the process proceeds to step S5. Also, |Etsuji a(X
)|<T' and |edge b(X)|≧T', the direction of the edge is horizontal, and the process advances to step S6.

【0023】|エツジa(X)|≧T’かつ|エツジb
(X)|≧T’であれば、エツジの方向は斜めであり、
さらにエツジa(X)×エツジb(X)を求めて、その
符号がプラスであれば、エツジ方向は右下がりであると
してステツプS7に進み、マイナスならば、エツジ方向
が左下がりであるとしてステツプS8に進む。
|edge a(X)|≧T'and|edge b
If (X)|≧T', the direction of the edge is oblique,
Further, calculate edge a(X)×edge b(X), and if the sign is positive, proceed to step S7 assuming that the edge direction is downward to the right; if negative, proceed to step S7, assuming that the edge direction is downward to the left. Proceed to S8.

【0024】上記ステツプS5〜S8では、定数A,B
,C,Dに値を与える処理を行なう。これらの定数A,
B,C,Dは、Aが注目画素に対して2画素前の画素の
番号、Bが2画素後の画素の番号、Cが1画素前の画素
の番号、Dが1画素後の画素の番号を意味する。続くス
テツプS9では、注目画素とAに対応する画素とのレベ
ル差を求め、それをdiff1とし、また、注目画素と
Bに対応する画素とのレベルの差を求め、それをdif
f2とする。そして、ステツプS10で、diff1×
diff2の符号を求め、それがプラスならば注目画素
が細線の頂点である可能性があるため、ステツプS12
に進む。また、符号がマイナスならば、注目画素はエツ
ジの途中であるとしてステツプS11に進み、diff
1とdiff2の絶対値をもとに、その値が小さい方の
画素(A、またはB)をbanに代入する。
In the above steps S5 to S8, constants A and B are
, C, and D. These constants A,
For B, C, and D, A is the number of the pixel 2 pixels before the target pixel, B is the number of the pixel 2 pixels after, C is the number of the pixel 1 pixel before, and D is the number of the pixel 1 pixel after. means number. In the following step S9, the difference in level between the pixel of interest and the pixel corresponding to A is determined and set as diff1, and the difference in level between the pixel of interest and the pixel corresponding to B is determined and set as diff1.
Let it be f2. Then, in step S10, diff1×
The sign of diff2 is determined, and if it is positive, there is a possibility that the pixel of interest is the apex of a thin line, so step S12
Proceed to. If the sign is negative, it is assumed that the pixel of interest is in the middle of an edge, and the process proceeds to step S11, where the diff
Based on the absolute values of 1 and diff2, the pixel (A or B) with the smaller value is assigned to ban.

【0025】ステツプS12では、注目画素とCに対応
する画素とのレベル差を求め、それをdiff1とし、
また、注目画素とDに対応する画素とのレベル差を求め
、それをdiff2とする。次のステツプS13では、
ステツプS12で求めたdiff1,diff2よりd
iff1×diff2の符号を求め、それがプラスなら
ば注目画素は細線の頂点であるためステツプS14に進
み、ban=12とする。しかし、diff1×dif
f2の符号がマイナスであれば、ステツプS15にてd
iff1とdiff2の絶対値を求め、その値が小さい
方の画素(C、またはD)をbanに代入する。
In step S12, the level difference between the pixel of interest and the pixel corresponding to C is determined, and this is set as diff1.
Furthermore, the level difference between the pixel of interest and the pixel corresponding to D is determined and set as diff2. In the next step S13,
From diff1 and diff2 obtained in step S12, d
The sign of if1×diff2 is determined, and if it is positive, the pixel of interest is the apex of the thin line, so the process proceeds to step S14, and ban=12 is set. However, diff1×dif
If the sign of f2 is negative, d is determined in step S15.
The absolute values of if1 and diff2 are determined, and the pixel (C or D) with the smaller value is assigned to ban.

【0026】以上の処理にて、すべての場合についてb
anへの代入が完了、つまり注目画素が変換されるべき
画素の番号が求められたので、ステツプS16では、水
平・垂直5×5のデータから得られたR’,G’,B’
の値はR’=R(ban),G’=G(ban),B’
=B(ban)となる。そして、ステツプS17では、
全画素について処理を終了したか否かを判断し、その判
断の結果がYESであれば処理を終了し、NOであれば
再度ステツプS1に戻る。
[0026] With the above processing, in all cases b
Since the assignment to an has been completed, that is, the number of the pixel to which the pixel of interest should be converted has been obtained, in step S16, R', G', B' obtained from the horizontal and vertical 5 x 5 data are
The values are R'=R(ban), G'=G(ban), B'
=B (ban). Then, in step S17,
It is determined whether or not processing has been completed for all pixels, and if the result of the determination is YES, the processing is terminated, and if NO, the process returns to step S1 again.

【0027】そこで、図6の(a)に示すような、横方
向のエツジを垂直方向に一定の面で切断したときに、そ
のエツジ部分の濃度レベルが段階状に変化する画像に対
して、上述の処理を施せば、そのエツジ部分は、図6(
b)において実線にて示すように直角に変化する滑らか
なエツジに変換される。また、図7(a)のような細線
画像も、図7(b)に示すようにそのエツジ部分が改善
される。
Therefore, for an image as shown in FIG. 6(a), in which when a horizontal edge is cut along a constant plane in the vertical direction, the density level of the edge portion changes stepwise. If the above-mentioned processing is performed, the edge portion will become as shown in Fig. 6 (
In b), it is converted into a smooth edge that changes at right angles, as shown by the solid line. Furthermore, the edges of a thin line image as shown in FIG. 7(a) are improved as shown in FIG. 7(b).

【0028】また、図11(a)の画像に対して、本実
施例に係る画像処理を施せば図13の(a)が得られ、
エツジ強調フイルタをかけた画像である図12の(a)
と比べると、エツジ部分が明瞭になり、かつ平滑部分は
ノイズのない画像となる。この画像のL*a*b*分布
を調べると、図13(b)のような色と色の間のつなが
り(上述した、天の川状の部分)は消滅し、各色の領域
がはつきりした、領域分けがし易すい分布となつている
ことがわかる。
Furthermore, if the image shown in FIG. 11(a) is subjected to the image processing according to this embodiment, the image shown in FIG. 13(a) is obtained.
(a) in Fig. 12 is an image with an edge emphasis filter applied.
Compared to this, the edge portion becomes clearer and the smooth portion becomes a noise-free image. When we examine the L*a*b* distribution of this image, we find that the connection between colors (the Milky Way-shaped part mentioned above) as shown in Figure 13(b) disappears, and the areas of each color become sharp. It can be seen that the distribution is easy to classify into areas.

【0029】以上説明したように、本実施例によれば、
読み込んだカラー画像から注目画素を中心に所定の画像
信号を入力し、水平・垂直方向のエツジ検出フイルタを
用いて注目画素がエツジ部分であるかどうかを判定し、
それがエツジであればエツジの方向を求めて注目画素の
レベルとエツジ方向の所定画素のレベルとの差を求める
、また、注目画素がエツジではない場合は、注目画素の
レベルをそのまま出力することで、画像のエツジ部分の
レベルの過渡的な状態である段階状エツジが直線、直角
で示されるエツジに改善され、色の境界が明確になると
いう効果がある。また、エツジは強調されてもノイズは
強調されないので、各色空間において画像内に存在する
各色の領域を容易に抽出できるという効果がある。
As explained above, according to this embodiment,
A predetermined image signal is input from the loaded color image around the pixel of interest, and horizontal and vertical edge detection filters are used to determine whether the pixel of interest is an edge portion.
If it is an edge, find the direction of the edge and find the difference between the level of the pixel of interest and the level of a predetermined pixel in the edge direction.If the pixel of interest is not an edge, output the level of the pixel of interest as is. This has the effect that the stepped edge, which is a transient state of the level of the edge portion of the image, is improved to an edge shown by a straight line or right angle, and the color boundary becomes clear. Furthermore, since noise is not emphasized even though edges are emphasized, there is an effect that regions of each color existing in an image in each color space can be easily extracted.

【0030】<変形例>上記実施例では、注目画素がエ
ツジか否かを判定するエツジ検出において、図3に示す
エツジ検出フイルタを使用したが、図8の(a),(b
)に示す3×3のフイルタにてエツジ検出を行なつても
よい。
<Modification> In the above embodiment, the edge detection filter shown in FIG. 3 was used in edge detection to determine whether the pixel of interest is an edge.
Edge detection may be performed using a 3×3 filter shown in ).

【0031】このフイルタを使用すると、RGB色信号
を入力するためのFIFOの数が3個になり、それに伴
いラツチ数も略1/3になるので、処理回路を簡単にす
ることができる。また、上記実施例では、エツジの方向
を4方向に分けているが、これらを縦方向、及び横方向
の2方向に限定すると、そのエツジ検出に要するフイル
タは、図9に示す単純なものでよいので、エツジ検出処
理そのものが簡略化できる。
When this filter is used, the number of FIFOs for inputting RGB color signals is reduced to three, and the number of latches is also reduced to approximately 1/3, thereby simplifying the processing circuit. Furthermore, in the above embodiment, the edge direction is divided into four directions, but if these are limited to two directions, the vertical direction and the horizontal direction, the filter required to detect the edge will be a simple one as shown in FIG. Therefore, the edge detection process itself can be simplified.

【0032】さらに、400dpi以上の解像度を有す
るスキヤナであれば、図7に示すような細線の存在は無
視できるとして、図4に示したフローチヤートにおける
ステツプS12,S13,S15の処理を省略できる。 逆に、200dpi以下の解像度のスキヤナを対象とし
てエツジ検出を行なう場合、注目画素とのレベルの差を
とるために必要となる注目画素に前後する画素数mにつ
いては、m=1の処理のみで充分であり、図4に示した
フローチヤートにおけるステツプS9〜S11の処理を
省略できる。
Furthermore, if the scanner has a resolution of 400 dpi or more, the presence of thin lines as shown in FIG. 7 can be ignored, and steps S12, S13, and S15 in the flowchart shown in FIG. 4 can be omitted. On the other hand, when performing edge detection on a scanner with a resolution of 200 dpi or less, the number m of pixels before and after the pixel of interest, which is necessary to determine the level difference with the pixel of interest, can be calculated by only processing m = 1. This is sufficient, and the processing of steps S9 to S11 in the flowchart shown in FIG. 4 can be omitted.

【0033】また、上記実施例は、カラー画像に対する
エツジ検出処理について説明したが、この処理は白黒画
像にも応用できることは言うまでもない。尚、本発明は
、複数の機器から構成されるシステムに適用しても、1
つの機器からなる装置に適用しても良い。また、本発明
はシステム、あるいは装置にプログラムを供給すること
によつて達成される場合にも適用できることは言うまで
もない。
Furthermore, although the above embodiment has described edge detection processing for color images, it goes without saying that this processing can also be applied to black and white images. Note that even if the present invention is applied to a system composed of a plurality of devices, only one
It may also be applied to a device consisting of two pieces of equipment. It goes without saying that the present invention can also be applied to cases where the present invention is achieved by supplying a program to a system or device.

【0034】[0034]

【発明の効果】以上説明したように、本発明によれば、
入力画像のエツジ方向を求め、その方向に沿つた所定画
素のレベルと注目画素とのレベル差をもとに注目画素の
変換後のレベルを算出することで、画像のエツジ部分の
濃度レベルの段階状変化を解消し、レベルの過渡的状態
がないエツジ強調を実現することができるという効果が
ある。
[Effects of the Invention] As explained above, according to the present invention,
By determining the edge direction of the input image and calculating the converted level of the pixel of interest based on the level difference between the level of a predetermined pixel along that direction and the pixel of interest, the density level level of the edge portion of the image can be determined. This has the effect of eliminating state changes and realizing edge enhancement without level transients.

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

【図1】[Figure 1]

【図2】本発明の一実施例である画像処理装置の要部構
成を示すブロツク図、
FIG. 2 is a block diagram showing the main part configuration of an image processing device that is an embodiment of the present invention;

【図3】実施例に係るエツジ検出フイルタを示す図、FIG. 3 is a diagram showing an edge detection filter according to an embodiment;


図4】実施例に係る画像処理装置における処理手順を説
明するフローチヤート、
[
FIG. 4 is a flowchart illustrating the processing procedure in the image processing device according to the embodiment;

【図5】変換すべき画素の位置関係を示す図、FIG. 5 is a diagram showing the positional relationship of pixels to be converted;

【図6】
エツジ部分の濃度レベルが段階状に変化する画像、及び
処理後のエツジ部分を示す図、
[Figure 6]
An image in which the density level of the edge portion changes stepwise, and a diagram showing the edge portion after processing,

【図7】細線画像、及び
処理後のエツジ部分を示す図、
FIG. 7 is a diagram showing a thin line image and an edge part after processing,

【図8】変形例に係る3
×3フイルタを示す図、
[Figure 8] 3 according to modification example
A diagram showing a ×3 filter,

【図9】変形例に係るエツジ方
向を検出するためのフイルタを示す図、
FIG. 9 is a diagram showing a filter for detecting an edge direction according to a modification;

【図10】従来のエツジ強調フイルタを示す図、FIG. 10 is a diagram showing a conventional edge emphasis filter;

【図1
1】スキヤナで読み込んだRGB3原色信号で表わされ
る画像、及びそのa*b*空間の頻度分布を示す図、
[Figure 1
1] A diagram showing an image represented by RGB three primary color signals read by a scanner and its frequency distribution in a*b* space,

【図12】従来のエツジ強調フイルタにより図11の画
像にエツジ強調を施した画像、及びそのL*a*b*分
布を示す図、
FIG. 12 is a diagram showing an image obtained by applying edge enhancement to the image of FIG. 11 using a conventional edge enhancement filter, and its L*a*b* distribution;

【図13】図11の画像に対する処理後の画像、及びそ
の画像のL*a*b*分布を示す図である。
FIG. 13 is a diagram showing an image after processing the image in FIG. 11 and the L*a*b* distribution of the image.

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

1    FIFO 2    ラツチ群 3    縦方向エツジ計算部 4    横方向エツジ計算部 1 FIFO 2 Latch group 3 Vertical edge calculation section 4 Lateral edge calculation section

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  画像を読み込み、その画像のエツジ処
理を行なう画像処理装置において、注目画素を中心に水
平、及び垂直方向に所定画素数の色信号データを入力す
る手段と、前記色信号データより注目画素が画像のエツ
ジであるかを判定するエツジ判定手段と、前記エツジの
方向を求める手段と、注目画素の色レベルと前記画像の
エツジ方向に対して所定数前後させた画素の色レベルと
の差をもとに、該注目画素の変換後のレベルを出力する
第1の出力手段と、前記エツジ判定手段が、注目画素は
エツジではないと判定したときに、該注目画素の色レベ
ルをそのまま出力する第2の出力手段とを備えることを
特徴とする画像処理装置。
1. An image processing device that reads an image and performs edge processing on the image, comprising: means for inputting color signal data of a predetermined number of pixels in the horizontal and vertical directions centering on a pixel of interest; Edge determination means for determining whether a pixel of interest is an edge of an image; means for determining the direction of the edge; and a color level of the pixel of interest and a color level of a pixel shifted forward or backward by a predetermined number with respect to the edge direction of the image. a first output means that outputs the converted level of the pixel of interest based on the difference between the pixel of interest and the edge determination means that determines the color level of the pixel of interest when determining that the pixel of interest is not an edge; An image processing apparatus comprising: a second output means for outputting the image as it is.
【請求項2】  第1の出力手段は、注目画素の色レベ
ルと画像のエツジ方向に対して所定数前の画素の色レベ
ルとの差と、注目画素の色レベルと画像のエツジ方向に
対して所定数後の画素の色レベルとの差との符号が等し
いとき、該所定数が1となるまで該所定数をデクリメン
トしながら、該色レベルの差をもとに該注目画素の変換
後のレベルを出力し、該符号が異なつたときには、その
差の小さい方の画素の色レベルを出力することを特徴と
する請求項1に記載の画像処置装置。
2. The first output means outputs the difference between the color level of the pixel of interest and the color level of a pixel a predetermined number of times earlier with respect to the edge direction of the image, and the difference between the color level of the pixel of interest and the edge direction of the image. When the difference between the pixel and the color level of the pixel after a predetermined number of pixels has the same sign, the predetermined number is decremented until the predetermined number becomes 1, and the pixel of interest is converted based on the difference in color level. 2. The image processing apparatus according to claim 1, wherein when the signs are different, the color level of the pixel with the smaller difference is output.
【請求項3】  画像を読み込み、その画像のエツジ処
理を行なう画像処理方法において、注目画素を中心に水
平、及び垂直方向に所定画素数の色信号データを入力す
る工程と、前記色信号データより注目画素が画像のエツ
ジであるかを判定する工程と、前記エツジの方向を求め
る工程と、注目画素の色レベルと前記画像のエツジ方向
に対して所定数前後させた画素の色レベルとの差をもと
に、該注目画素の変換後のレベルを出力する工程と、前
記エツジを判定する工程にて、注目画素はエツジではな
いと判定されたときに、該注目画素の色レベルをそのま
ま出力する工程とを備えることを特徴とする画像処理方
法。
3. An image processing method that reads an image and performs edge processing on the image, comprising: inputting color signal data of a predetermined number of pixels in horizontal and vertical directions centering on a pixel of interest; A step of determining whether the pixel of interest is an edge of the image, a step of determining the direction of the edge, and a difference between the color level of the pixel of interest and the color level of a pixel shifted forward or backward by a predetermined number with respect to the edge direction of the image. Based on the step of outputting the converted level of the pixel of interest and the step of determining the edge, when it is determined that the pixel of interest is not an edge, the color level of the pixel of interest is output as is. An image processing method comprising the steps of:
JP3112814A 1991-05-17 1991-05-17 Method and device for processing image Withdrawn JPH04340672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3112814A JPH04340672A (en) 1991-05-17 1991-05-17 Method and device for processing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3112814A JPH04340672A (en) 1991-05-17 1991-05-17 Method and device for processing image

Publications (1)

Publication Number Publication Date
JPH04340672A true JPH04340672A (en) 1992-11-27

Family

ID=14596200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3112814A Withdrawn JPH04340672A (en) 1991-05-17 1991-05-17 Method and device for processing image

Country Status (1)

Country Link
JP (1) JPH04340672A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009081529A1 (en) * 2007-12-25 2009-07-02 Nec Corporation Image processing device, image processing method, image decompressing device, image compressing device, image transmission system, and storage medium
JP2011164991A (en) * 2010-02-10 2011-08-25 Toyota Motor Corp Image processing apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009081529A1 (en) * 2007-12-25 2009-07-02 Nec Corporation Image processing device, image processing method, image decompressing device, image compressing device, image transmission system, and storage medium
US8358868B2 (en) 2007-12-25 2013-01-22 Nec Corporation Image processing apparatus, image processing method, image extending apparatus, image compressing apparatus, image transmitting system, and storage medium
JP5229235B2 (en) * 2007-12-25 2013-07-03 日本電気株式会社 Image processing apparatus, image processing method, image expansion apparatus, image compression apparatus, image transmission system, and image processing program
JP2011164991A (en) * 2010-02-10 2011-08-25 Toyota Motor Corp Image processing apparatus

Similar Documents

Publication Publication Date Title
JP3399486B2 (en) Color image processing apparatus and method
JP3293920B2 (en) Image processing apparatus and method
US6519362B1 (en) Method of extracting text present in a color image
US20100157108A1 (en) Image Signal Processor And Image Signal Processing Method
JP4668185B2 (en) Image processing method
JPH06197216A (en) Texture soil eliminating method
EP1035731B1 (en) Image processing method and system
JPH04340672A (en) Method and device for processing image
US5055944A (en) Image signal processing apparatus
KR100700017B1 (en) Apparatus for color interpolation by using adjustable threshold
JP2848558B2 (en) Color image processing equipment
JP3165225B2 (en) Image processing apparatus and image processing method
JP3495743B2 (en) Image processing apparatus and image processing method
JP3150963B2 (en) Image processing method
JP3783815B2 (en) Image processing device
JP2004320447A (en) Image processing apparatus, image processing method, and program for execution by computer
JPH06292006A (en) Picture processing unit
JP2000184219A (en) Color printing system and color printer
JP2618893B2 (en) Color image processing equipment
JP3162730B2 (en) Image processing method
JPH1042313A (en) Signal processing system, image processor and circuit for converting signal
JP3244405B2 (en) Image processing device
JP3244406B2 (en) Image processing device
US7679779B2 (en) Image processing
KR100398883B1 (en) Apparatus and method for detecting edges

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980806