JPH08194820A - Picture processor and picture processing method - Google Patents

Picture processor and picture processing method

Info

Publication number
JPH08194820A
JPH08194820A JP7004420A JP442095A JPH08194820A JP H08194820 A JPH08194820 A JP H08194820A JP 7004420 A JP7004420 A JP 7004420A JP 442095 A JP442095 A JP 442095A JP H08194820 A JPH08194820 A JP H08194820A
Authority
JP
Japan
Prior art keywords
pixel
value
image processing
vector
inner product
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
JP7004420A
Other languages
Japanese (ja)
Inventor
Hideo Umeki
秀雄 梅木
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP7004420A priority Critical patent/JPH08194820A/en
Publication of JPH08194820A publication Critical patent/JPH08194820A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE: To provide a picture processor and picture processing method capable of efficiently extracting a picture element having a density gradation vector with desired azimuth. CONSTITUTION: A detection range between 1st and 2nd azimuth parts is specified by a specifying means 1. An auxiliary vector setting means 2 sets two auxiliary vectors respectively rectangular to the 1st and 2nd azimuth parts with (x) and (y) components. A density gradation calculating means 3 calculates the density gradation vector of each picture element as respective component differential values Gx, Gy in the (x) and (y) axes based upon respective density values of each picture element and its peripheral picture elements. An inner product means 4 calculates respective inner products of the density gradation vector and two auxiliary vectors in each picture element. A judging means 5 judges whether the azimuth of the density gradation vector of each picture element is included in the detection range or not base upon the codes of respective inner product values.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、画像を処理する画像処
理装置及び画像処理方法の改良に関するもので、特に、
所望の範囲の濃度勾配ベクトルを有する画素を効率的に
検出するものに係る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to improvements in an image processing apparatus and an image processing method for processing an image, and in particular,
The present invention relates to efficiently detecting pixels having a density gradient vector in a desired range.

【0002】[0002]

【従来の技術】近年、コンピュータの進歩に伴って、各
種画像を処理する画像処理装置及び画像処理方法の普及
はめざましい。画像処理の対象とされる画像としては各
種のものが知られているが、濃淡を有する画像では、す
べての部分で濃度勾配ベクトルを計算することができ
る。濃度勾配ベクトルは、各画素における濃淡変化の方
向及び大きさを表す画像の特徴量の一つである。ある画
素の濃度勾配ベクトルは当該画素の周囲の画素の濃淡値
に基づいて定まり、画像濃淡値の局所的な変化を捉える
ために有用である。
2. Description of the Related Art In recent years, with the progress of computers, image processing apparatuses and image processing methods for processing various images have been remarkably spread. Although various types of images to be subjected to image processing are known, a density gradient vector can be calculated in all parts of an image having shading. The density gradient vector is one of the image feature quantities that represent the direction and magnitude of the grayscale change in each pixel. The density gradient vector of a pixel is determined based on the gray value of pixels around the pixel and is useful for catching a local change in the image gray value.

【0003】任意の方位角の濃度勾配ベクトルを有する
画素を抽出できれば、テクスチャ画像の処理に応用する
ことができる。例えば、一定方向に模様を有する素材を
カメラで撮影し、本来の模様と異なった方向の濃度勾配
ベクトルを有する画素を検出すれば、亀裂などのキズを
発見することができる。このような応用は、FA(ファ
クトリーオートメーション)などの制御の高度化に貢献
する。また、任意の濃度勾配ベクトルを有する画素の抽
出は、他にも、医療画像やOCRなど幅広い応用が考え
られる。
If a pixel having a density gradient vector of an arbitrary azimuth can be extracted, it can be applied to the processing of a texture image. For example, if a material having a pattern in a certain direction is photographed by a camera and a pixel having a density gradient vector in a direction different from the original pattern is detected, a flaw such as a crack can be found. Such applications contribute to the sophistication of control of FA (factory automation) and the like. In addition, the extraction of pixels having an arbitrary density gradient vector can be widely applied to medical images and OCR.

【0004】ここで、従来の画像処理装置及び画像処理
方法における典型的な画像濃度勾配の計算とその方位
角、すなわち濃度勾配ベクトルの向きの検出方式を説明
する。まず、入力された画像のうち所定の画素座標
(i,j)における濃度勾配は、まずその画素を中心と
する周囲の数画素の濃淡値から算出されたX方向および
Y方向の微分値から求められる。
Here, a typical image density gradient calculation and a method of detecting the azimuth angle, that is, the direction of the density gradient vector in the conventional image processing apparatus and image processing method will be described. First, the density gradient at a predetermined pixel coordinate (i, j) in the input image is first obtained from the differential values in the X and Y directions calculated from the gray values of several surrounding pixels centering on that pixel. To be

【0005】ここで、図7は、濃度勾配ベクトルの算出
の具体例を示す原理図である。すなわち、画素座標
(i,j)の濃度勾配のX成分,Y成分のそれぞれをG
x,Gyとし、これらを成分とするベクトルをこの画素
の濃度勾配ベクトルと呼ぶ。図7において、X1からX
9までは画素座標(i,j)の画素とこれを中心とする
近接8画素における画像濃淡値を表している。このとき
Gx,Gyは例えば、図にも示されているように、次式
Here, FIG. 7 is a principle diagram showing a specific example of calculation of the concentration gradient vector. That is, each of the X component and the Y component of the density gradient of the pixel coordinate (i, j) is G
A vector having x and Gy and these components is called a density gradient vector of this pixel. In FIG. 7, X1 to X
Up to 9 represent the image gray value of the pixel at the pixel coordinate (i, j) and the adjacent 8 pixels centered on the pixel. At this time, Gx and Gy are, for example, as shown in the figure,

【数1】 Gx=(X3+X6+X9)−(X1+X4+X7) Gy=(X1+X2+X3)−(X7+X8+X9) で示される計算式で求めることができる。このときの濃
度勾配ベクトルの大きさは、次式
## EQU1 ## Gx = (X3 + X6 + X9)-(X1 + X4 + X7) Gy = (X1 + X2 + X3)-(X7 + X8 + X9). The magnitude of the concentration gradient vector at this time is

【数2】 で表され、濃度勾配ベクトルの方位角は、次式[Equation 2] The azimuth angle of the concentration gradient vector is

【数3】tan-1(Gy/Gx) で表される。ただしtan-1(Gy/Gx)は0[ラジ
アン]から2π[ラジアン]の範囲とする。
## EQU3 ## It is represented by tan -1 (Gy / Gx). However, tan-1 (Gy / Gx) is in the range of 0 [radian] to 2π [radian].

【0006】この場合、所定の範囲の方位角の濃度勾配
ベクトルを有する画素を検出するには、従来技術では一
般に次のように行っていた。すなわち、まず、検出範囲
を角度(ラジアン)で与えておく。そして、予め全画素
における濃度勾配ベクトルについても、検出範囲と同じ
形式であるラジアンでその方位角を算出しておく。この
ように従来では、比較対象双方を同じ形式のラジアンで
表してから角度の比較計算を行ない、条件に合う画素を
抽出していた。
In this case, in order to detect a pixel having a density gradient vector having an azimuth angle within a predetermined range, the conventional technique has generally performed as follows. That is, first, the detection range is given in angle (radian). The azimuth angles of the density gradient vectors for all pixels are calculated in advance in radians, which is the same format as the detection range. As described above, conventionally, both comparison targets are expressed in radians of the same format, and then the angle comparison calculation is performed to extract pixels that meet the conditions.

【0007】また、他の手法としては、画像の各画素に
ついて求められた濃度勾配ベクトルと1つあるいは2つ
の固定された基準ベクトルとの内積を計算し、そこで得
られた内積値の大きさに対して各画素の濃淡値に応じた
重み付けを行ない、ある値以上の画素だけを抽出すると
いうものが存在する(特開昭63−81579)。
As another method, the inner product of the density gradient vector obtained for each pixel of the image and one or two fixed reference vectors is calculated, and the obtained inner product value is set to the magnitude. In contrast, there is a method in which weighting is performed according to the gray value of each pixel and only pixels having a certain value or more are extracted (Japanese Patent Laid-Open No. 63-81579).

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記の
ような従来技術には次のような問題点が存在していた。
すなわち、各画素における濃度勾配ベクトルの方位角を
予め計算しておくという手法では、方位角を求めるため
に全画素に対して逆三角関数の演算が必要である。そし
て、この演算は浮動小数点演算により計算されるため時
間が掛かり、このため効率的な検出が困難であった。ま
た、角度の大小を比較する際には、2π[ラジアン]の
周期性から条件分岐が多く必要となり、検出の効率化が
困難であるのみならず構成が複雑化していた。
However, the above-mentioned conventional techniques have the following problems.
That is, in the method of calculating the azimuth angle of the density gradient vector in each pixel in advance, it is necessary to calculate the inverse trigonometric function for all pixels in order to obtain the azimuth angle. Since this calculation is performed by a floating point calculation, it takes time, which makes it difficult to detect it efficiently. Further, when comparing the magnitudes of angles, a large number of conditional branches are required due to the periodicity of 2π [radian], which makes it difficult to improve the detection efficiency and complicates the configuration.

【0009】一方、固定された基準ベクトルと濃度勾配
ベクトルとの内積による手法では、基準ベクトルが固定
されているため、任意の方向の濃度勾配ベクトルの検索
をすることができなかった。
On the other hand, in the method based on the inner product of the fixed reference vector and the density gradient vector, the density gradient vector in any direction cannot be searched because the reference vector is fixed.

【0010】本発明は、上記のような従来技術の問題点
を解決するために提案されたもので、その目的は、所望
の方位角の濃度勾配ベクトルを有する画素を効率的に抽
出する画像処理装置及び画像処理方法を提供することで
ある。また、本発明の他の目的は、検出結果に対する確
認や加工などの処理が容易な画像処理装置及び画像処理
方法を提供することである。また、本発明の他の目的
は、目的にあった処理を容易にする画像処理装置及び画
像処理方法を提供することである。
The present invention has been proposed to solve the above-mentioned problems of the prior art, and its object is to perform image processing for efficiently extracting pixels having a density gradient vector of a desired azimuth angle. An apparatus and an image processing method are provided. Further, another object of the present invention is to provide an image processing apparatus and an image processing method in which processing such as confirmation and processing of a detection result is easy. Another object of the present invention is to provide an image processing apparatus and an image processing method that facilitate the processing that is suitable for the purpose.

【0011】[0011]

【課題を解決するための手段】上記の目的を達成するた
め、請求項1の発明は、x,y平面上の画像を構成しそ
れぞれ濃淡値を有する各画素から、所望の方位角の濃度
勾配ベクトルを有する画素を検出する画像処理装置にお
いて、検出する濃度勾配ベクトルの方位角の範囲であっ
て第1の方位角と第2の方位角とに挟まれた範囲として
表現できる検出範囲を指定する指定手段と、前記第1の
方位角及び前記第2の方位角に対してそれぞれ直角な二
つの補助ベクトルを各々x成分及びy成分によって設定
する補助ベクトル設定手段と、各画素ごとに、当該画素
及び周囲の画素の各濃淡値に基づいて、濃度勾配ベクト
ルをx,y軸の各成分微分値Gx,Gyとして算出する
濃度勾配算出手段と、各画素ごとに前記濃度勾配ベクト
ルと前記二つの補助ベクトルとの各内積値を算出する内
積手段と、前記各内積値の符号に基づいて前記画素の前
記濃度勾配ベクトルの方位角が前記検出範囲に含まれる
か否かを判定する判定手段と、を有することを特徴とす
る。
In order to achieve the above-mentioned object, the invention of claim 1 forms a density gradient of a desired azimuth angle from each pixel forming an image on the x, y plane and having a gray value. In an image processing device that detects pixels having a vector, a detection range that is a range of azimuth angles of a density gradient vector to be detected and that can be expressed as a range sandwiched between a first azimuth angle and a second azimuth angle is specified. Designating means, auxiliary vector setting means for setting two auxiliary vectors respectively orthogonal to the first azimuth angle and the second azimuth angle by an x component and ay component, and the pixel for each pixel And a density gradient calculating means for calculating the density gradient vector as the component differential values Gx, Gy of the x and y axes based on the gray values of the surrounding pixels, and the density gradient vector and the two complements for each pixel. An inner product means for calculating each inner product value with the vector, and a determination means for determining whether or not the azimuth angle of the concentration gradient vector of the pixel is included in the detection range based on the sign of each inner product value. It is characterized by having.

【0012】また、請求項2の発明は、請求項1記載の
画像処理装置において、各補助ベクトルに係る2つの内
積値の算出を並行処理するための並行処理手段を有する
ことを特徴とする。
The invention according to claim 2 is the image processing apparatus according to claim 1, characterized in that it has parallel processing means for processing in parallel the calculation of two inner product values for each auxiliary vector.

【0013】また、請求項3の発明は、請求項1記載の
画像処理装置において、前記内積手段は、前記画素の前
記濃度勾配ベクトルについて、いずれか一方の前記補助
ベクトルとの内積値のみをまず算出し、この内積値の符
号に基づいて前記画素の前記濃度勾配ベクトルの方位角
が当該補助ベクトルに対応する前記第1又は第2の方位
角に対して前記検出範囲側に含まれると前記判定手段に
よって判定された場合に、他方の補助ベクトルとの内積
値を算出するように構成されたことを特徴とする。
According to a third aspect of the present invention, in the image processing apparatus according to the first aspect, the inner product means first calculates only the inner product value of the density gradient vector of the pixel and any one of the auxiliary vectors. It is determined that the azimuth angle of the concentration gradient vector of the pixel is included in the detection range side with respect to the first or second azimuth angle corresponding to the auxiliary vector based on the sign of the inner product value. When it is determined by the means, the inner product value with the other auxiliary vector is calculated.

【0014】また、請求項4の発明は、請求項1記載の
画像処理装置において、前記各補助ベクトルの各成分値
をそれぞれ複数ビットで表される所定の範囲の整数値で
表すように構成されたことを特徴とする。
According to a fourth aspect of the present invention, in the image processing apparatus according to the first aspect, each component value of each auxiliary vector is represented by an integer value in a predetermined range represented by a plurality of bits. It is characterized by that.

【0015】また、請求項5の発明は、請求項1記載の
画像処理装置において、検出された前記画素のメモリ上
のアドレス値を順次格納する第1の格納手段を有するこ
とを特徴とする。
According to a fifth aspect of the invention, in the image processing apparatus according to the first aspect, there is provided a first storage means for sequentially storing the detected address value of the pixel on the memory.

【0016】また、請求項6の発明は、請求項1記載の
画像処理装置において、検出された前記画素の画像上の
座標値を順次格納する第2の格納手段を有することを特
徴とする。
According to a sixth aspect of the present invention, in the image processing apparatus according to the first aspect, there is provided a second storage means for sequentially storing the detected coordinate values on the image of the pixel.

【0017】また、請求項7の発明は、請求項1記載の
画像処理装置において、画素のメモリ上のアドレス値を
画素の画像上の座標値に換算する第1の換算手段を有す
ることを特徴とする。
According to a seventh aspect of the invention, in the image processing apparatus according to the first aspect, there is provided first conversion means for converting the address value of the pixel on the memory into the coordinate value of the pixel on the image. And

【0018】また、請求項8の発明は、請求項1記載の
画像処理装置において、画素の画像上の座標値を画素の
メモリ上のアドレス値に換算する第2の換算手段を有す
ることを特徴とする。
The invention according to claim 8 is the image processing apparatus according to claim 1, further comprising a second conversion means for converting the coordinate value on the image of the pixel into the address value on the memory of the pixel. And

【0019】また、請求項9の発明は、請求項1記載の
画像処理装置において、検出された画素の部分の画像を
格納する第3の格納手段を有することを特徴とする。
According to a ninth aspect of the present invention, in the image processing apparatus according to the first aspect, there is provided a third storage means for storing the image of the detected pixel portion.

【0020】また、請求項10の発明は、請求項1記載
の画像処理装置において、抽出された各画素について前
記濃淡値の大きさに基づいて重み付けする第1の重み付
け手段を有することを特徴とする。
According to a tenth aspect of the present invention, in the image processing apparatus according to the first aspect, there is provided first weighting means for weighting each extracted pixel based on the magnitude of the gray value. To do.

【0021】また、請求項11の発明は、請求項1記載
の画像処理装置において、抽出された各画素について前
記濃度勾配ベクトルの大きさに基づいて重み付けする第
2の重み付け手段を有することを特徴とする。
Further, the invention of claim 11 is the image processing apparatus according to claim 1, which further comprises second weighting means for weighting each extracted pixel based on the magnitude of the density gradient vector. And

【0022】また、請求項12の発明は、請求項1記載
の画像処理装置において、抽出された各画素について、
各画素に係る2つの前記内積値の差に基づいて重み付け
する第3の重み付け手段を有することを特徴とする。
According to a twelfth aspect of the present invention, in the image processing apparatus according to the first aspect, for each extracted pixel,
It is characterized by further comprising third weighting means for weighting based on the difference between the two inner product values for each pixel.

【0023】また、請求項13の画像処理方法は、x,
y平面上の画像を構成しそれぞれ濃淡値を有する各画素
から、所望の方位角の濃度勾配ベクトルを有する画素を
検出する画像処理方法において、検出する濃度勾配ベク
トルの方位角の範囲であって第1の方位角と第2の方位
角とに挟まれた範囲として表現できる検出範囲を指定す
る指定のステップと、前記第1の方位角及び前記第2の
方位角に対してそれぞれ直角な二つの補助ベクトルを各
々x成分及びy成分によって設定する補助ベクトル設定
のステップと、各画素ごとに、当該画素及び周囲の画素
の各濃淡値に基づいて、濃度勾配ベクトルをx,y軸の
各成分微分値Gx,Gyとして算出する濃度勾配算出の
ステップと、各画素ごとに前記濃度勾配ベクトルと前記
二つの補助ベクトルとの各内積値を算出する内積のステ
ップと、前記各内積値の符号に基づいて前記画素の前記
濃度勾配ベクトルの方位角が前記検出範囲に含まれるか
否かを判定する判定のステップと、を含むことを特徴と
する。
According to the image processing method of claim 13, x,
In an image processing method for detecting a pixel having a density gradient vector of a desired azimuth angle from each pixel that forms an image on the y-plane and has a gray value, a range of azimuth angles of the density gradient vector to be detected, A step of designating a detection range that can be expressed as a range sandwiched between the first azimuth angle and the second azimuth angle, and two steps that are orthogonal to the first azimuth angle and the second azimuth angle. Auxiliary vector setting step of setting the auxiliary vector by x component and y component respectively, and for each pixel, the density gradient vector is differentiated for each component on the x and y axes based on each gray value of the pixel concerned and surrounding pixels. A step of calculating a density gradient for calculating the values Gx and Gy; a step of calculating an inner product of the density gradient vector and the two auxiliary vectors for each pixel; Wherein the azimuth angle of the gradient vector of the pixel based on the sign of the value comprises a step of determining determines whether or not included in the detection range.

【0024】また、請求項14の発明は、請求項13記
載の画像処理方法において、各補助ベクトルに係る2つ
の内積値の算出を並行処理するための並行処理のステッ
プを含むことを特徴とする。
The invention according to claim 14 is the image processing method according to claim 13, characterized in that it includes a step of parallel processing for parallel processing of calculation of two inner product values for each auxiliary vector. .

【0025】また、請求項15の発明は、請求項13記
載の画像処理方法において、前記内積のステップでは、
前記画素の前記濃度勾配ベクトルについて、いずれか一
方の前記補助ベクトルとの内積値のみをまず算出し、こ
の内積値の符号に基づいて前記画素の前記濃度勾配ベク
トルの方位角が当該補助ベクトルに対応する前記第1又
は第2の方位角に対して前記検出範囲側に含まれると前
記判定のステップによって判定された場合に、他方の補
助ベクトルとの内積値を算出することを特徴とする。
According to a fifteenth aspect of the present invention, in the image processing method according to the thirteenth aspect, in the step of the inner product,
For the density gradient vector of the pixel, only the inner product value with any one of the auxiliary vectors is first calculated, and the azimuth angle of the density gradient vector of the pixel corresponds to the auxiliary vector based on the sign of the inner product value. When it is determined in the determination step that it is included in the detection range side with respect to the first or second azimuth angle, the inner product value with the other auxiliary vector is calculated.

【0026】また、請求項16の発明は、請求項13記
載の画像処理方法において、前記各補助ベクトルの各成
分値をそれぞれ複数ビットで表される所定の範囲の整数
値で表すことを特徴とする。
According to a sixteenth aspect of the present invention, in the image processing method according to the thirteenth aspect, each component value of each auxiliary vector is represented by an integer value in a predetermined range represented by a plurality of bits. To do.

【0027】また、請求項17の発明は、請求項13記
載の画像処理方法において、検出された前記画素のメモ
リ上のアドレス値を順次格納する第1の格納のステップ
を含むことを特徴とする。
The invention according to claim 17 is the image processing method according to claim 13, characterized in that it includes a first storing step for sequentially storing the address value on the memory of the detected pixel. .

【0028】また、請求項18の発明は、請求項13記
載の画像処理方法において、検出された前記画素の画像
上の座標値を順次格納する第2の格納のステップを含む
ことを特徴とする。
The invention according to claim 18 is the image processing method according to claim 13, characterized in that it includes a second storage step of sequentially storing the coordinate values of the detected pixels on the image. .

【0029】また、請求項19の発明は、請求項13記
載の画像処理方法において、画素のメモリ上のアドレス
値を画素の画像上の座標値に換算する第1の換算のステ
ップを含むことを特徴とする。
The invention according to claim 19 is the image processing method according to claim 13, which further includes a first conversion step for converting the address value of the pixel on the memory into the coordinate value on the image of the pixel. Characterize.

【0030】また、請求項20の発明は、請求項13記
載の画像処理方法において、画素の画像上の座標値を画
素のメモリ上のアドレス値に換算する第2の換算のステ
ップを含むことを特徴とする。
The invention according to claim 20 is the image processing method according to claim 13, further comprising a second conversion step for converting the coordinate value of the pixel on the image into the address value of the pixel on the memory. Characterize.

【0031】また、請求項21の発明は、請求項13記
載の画像処理方法において、検出された画素の部分の画
像を格納する第3の格納のステップを含むことを特徴と
する。
Further, the invention of claim 21 is the image processing method according to claim 13, characterized by including a third storing step of storing an image of the detected pixel portion.

【0032】また、請求項22の発明は、請求項13記
載の画像処理方法において、抽出された各画素について
前記濃淡値の大きさに基づいて重み付けする第1の重み
付けのステップを含むことを特徴とする。
The invention according to claim 22 is the image processing method according to claim 13, characterized in that it includes a first weighting step for weighting each extracted pixel based on the magnitude of the grayscale value. And

【0033】また、請求項23の発明は、請求項13記
載の画像処理方法において、抽出された各画素について
前記濃度勾配ベクトルの大きさに基づいて重み付けする
第2の重み付けのステップを含むことを特徴とする。
The invention according to claim 23 is the image processing method according to claim 13, further comprising a second weighting step for weighting each extracted pixel based on the magnitude of the density gradient vector. Characterize.

【0034】また、請求項24の発明は、請求項13記
載の画像処理方法において、抽出された各画素につい
て、各画素に係る2つの前記内積値の差に基づいて重み
付けする第3の重み付けのステップを含むことを特徴と
する。
The invention of claim 24 is the image processing method according to claim 13, wherein each extracted pixel is weighted based on the difference between the two inner product values of each pixel. It is characterized by including a step.

【0035】[0035]

【作用】上記のような構成を有する本発明は、次のよう
な作用を有する。すなわち、請求項1,13の発明で
は、検出範囲は一定の幅のある範囲であり、第1の方位
角と第2の方位角に挟まれた範囲として表現できる。こ
こで、2つの補助ベクトルを用いる。各補助ベクトルは
それぞれ第1の方位角及び第2の方位角に直角であり、
各補助ベクトルは各々x成分及びy成分によって表され
る。一方、各画素ごとに、当該画素及び周囲の画素の各
濃淡値に基づいて、濃度勾配ベクトルがx,y軸の各成
分微分値Gx,Gyとして算出される。そして、1画素
分ごとに濃度勾配ベクトルと二つの補助ベクトルとの2
つの内積値が算出される。
The present invention having the above structure has the following functions. That is, in the inventions of claims 1 and 13, the detection range is a range having a certain width and can be expressed as a range sandwiched between the first azimuth angle and the second azimuth angle. Here, two auxiliary vectors are used. Each auxiliary vector is at right angles to the first azimuth angle and the second azimuth angle, respectively,
Each auxiliary vector is represented by an x component and ay component, respectively. On the other hand, for each pixel, the density gradient vector is calculated as the component differential values Gx and Gy of the x and y axes based on the gray values of the pixel and the surrounding pixels. The density gradient vector and the two auxiliary vectors are divided into two for each pixel.
Two dot product values are calculated.

【0036】そして、各内積値の符号に基づいて画素の
濃度勾配ベクトルが検出範囲に含まれるか否かが判定さ
れる。ここで、一般に、2つのベクトル間の内積値は各
ベクトルの方位角間の角度が鋭角のとき正、鈍角のとき
負となる。そして、各補助ベクトルは第1の方位角及び
第2の方位角に対してそれぞれ直角である。したがっ
て、濃度勾配ベクトルについては、各補助ベクトルとの
内積値の符号によって、第1の方位角及び第2の方位角
との角度関係を特定することができる。例えば、第1補
助ベクトルが第1の方位角に対して第2の方位角側にあ
り、かつ、第2補助ベクトルが第1の方位角に対して第
2の方位角側にある場合、内積値の符号が共に正のとき
に濃度勾配ベクトルは検出範囲内に存在する。
Then, based on the sign of each inner product value, it is determined whether or not the density gradient vector of the pixel is included in the detection range. Here, in general, the inner product value between two vectors is positive when the angle between the azimuth angles of each vector is acute and negative when the angle is obtuse. Then, each auxiliary vector is orthogonal to the first azimuth angle and the second azimuth angle. Therefore, regarding the concentration gradient vector, the angular relationship between the first azimuth angle and the second azimuth angle can be specified by the sign of the inner product value with each auxiliary vector. For example, when the first auxiliary vector is on the second azimuth side with respect to the first azimuth and the second auxiliary vector is on the second azimuth side with respect to the first azimuth, the inner product When both the signs of the values are positive, the concentration gradient vector exists within the detection range.

【0037】なお、内積値は、x要素同士の積及びy要
素同士の積の和という単純な演算で算出でき、直角の判
定も符号という単純な情報のみに基づいて行うことがで
きる。このように、請求項1,13の発明では、所望の
方位角の濃度勾配ベクトルを有する画素の検出を、全画
像の濃度勾配ベクトルの方位角をラジアンで算出してお
くことなく、単純な情報と処理によって効率的に行うこ
とができる。
The inner product value can be calculated by a simple operation of summing the products of x elements and the products of y elements, and the right angle can be determined based on only simple information such as a sign. As described above, in the inventions of claims 1 and 13, a simple information is detected without detecting a pixel having a density gradient vector of a desired azimuth angle by calculating the azimuth angle of the density gradient vector of all images in radians. And processing can be done efficiently.

【0038】また、請求項2,14の発明では、各補助
ベクトルに係る2つの内積値の算出が並行処理されるの
で、検出処理が高速化される。
Further, in the inventions of claims 2 and 14, since the calculation of the two inner product values for each auxiliary vector is performed in parallel, the detection processing is speeded up.

【0039】また、請求項3,15の発明では、いずれ
か一方の補助ベクトルとの内積値のみがまず算出され、
この内積値の符号に基づいて画素の濃度勾配ベクトルの
方位角が当該補助ベクトルに対応する前記第1又は第2
の方位角に対して前記検出範囲側に含まれると判定され
た場合に、他方の補助ベクトルとの内積値が算出され
る。このため、先に算出された内積値に基づいて検出範
囲外であることが判明した場合は後の内積値の算出を省
略することができ、演算回数が節約できるので処理が迅
速化される。
Further, in the invention of claims 3 and 15, only the inner product value with any one of the auxiliary vectors is first calculated,
Based on the sign of this inner product value, the azimuth angle of the density gradient vector of the pixel corresponds to the auxiliary vector.
When it is determined that the azimuth angle is included in the detection range side, the inner product value with the other auxiliary vector is calculated. Therefore, when it is determined based on the previously calculated inner product value that it is out of the detection range, the subsequent calculation of the inner product value can be omitted, and the number of calculations can be saved, thus speeding up the process.

【0040】また、請求項4,16の発明では、各補助
ベクトルの各成分値がそれぞれ所定の範囲の整数値で表
される。そして、整数値は一般に内部表現形式が単純で
演算処理も容易かつ高速なので、処理が迅速化される。
In the inventions of claims 4 and 16, each component value of each auxiliary vector is represented by an integer value within a predetermined range. In general, the integer value has a simple internal representation format, and the arithmetic processing is easy and fast, so that the processing is speeded up.

【0041】また、請求項5,17の発明では、検出さ
れた画素のメモリ上のアドレス値が順次格納され蓄積さ
れるので、検出された画素の濃淡値にアクセスする場合
に画像の座標値をアドレス値に換算する処理を改めて行
う必要がない。このため、検出後の画像データへのアク
セスなどの処理が高速化される。
Further, in the inventions of claims 5 and 17, since the address values of the detected pixels on the memory are sequentially stored and accumulated, the coordinate values of the image are set when accessing the gray value of the detected pixels. There is no need to perform the process of converting the address value again. Therefore, processing such as access to the image data after detection is speeded up.

【0042】また、請求項6,18の発明では、検出さ
れた画素の画像上の座標値が順次格納されるので、検出
された部分の画像化や位置の特定など座標を用いた処理
を行う場合も、メモリ上のアドレス値を画像上の座標値
に換算する処理を改めて行う必要がない。
Further, in the inventions of claims 6 and 18, since the coordinate values on the image of the detected pixels are sequentially stored, the processing using the coordinates such as imaging the detected portion and specifying the position is performed. Also in this case, it is not necessary to perform the process of converting the address value on the memory into the coordinate value on the image again.

【0043】また、請求項7,19の発明では、検出さ
れた部分がメモリ上のアドレス値の型式で格納されてい
ても、このアドレス値が画素の画像上の座標値に換算さ
れるので、検出された部分の画像化や位置の特定など座
標を用いた処理が容易である。
Further, in the inventions of claims 7 and 19, even if the detected portion is stored in the form of the address value on the memory, since this address value is converted into the coordinate value on the image of the pixel, It is easy to perform processing using coordinates such as imaging the detected portion and specifying the position.

【0044】また、請求項8,20の発明では、検出さ
れた部分が画像上の座標値の型式で格納されていても、
この座標値がメモリ上のアドレス値に換算されるので、
検出された部分の濃淡値にアクセスする場合など、アド
レス値を用いた処理が容易である。
Further, in the inventions of claims 8 and 20, even if the detected portion is stored in the form of coordinate values on the image,
Since this coordinate value is converted into the address value on the memory,
The processing using the address value is easy when accessing the gray value of the detected portion.

【0045】また、請求項9,21の発明では、検出さ
れた画素の部分が画像の型式のまま格納されるので、確
認などのため画像化が必要な場合も改めて画像化の処理
を行う必要がない。
Further, in the inventions of claims 9 and 21, since the detected pixel portion is stored as it is as the image type, it is necessary to perform the image forming process again when the image forming is necessary for confirmation. There is no.

【0046】また、請求項10,22の発明では、抽出
された各画素について濃淡値の大きさに基づいて重み付
けがされる。このため、画像の暗い部分が処理の対象物
でなく明るい部分を重視したいなど、濃淡値が意味を持
つ場合に、処理の目的に沿った画素を重視した処理を行
うことが容易になる。
Further, in the inventions of claims 10 and 22, each extracted pixel is weighted based on the magnitude of the gray value. For this reason, when the gray value is significant, such as when the dark portion of the image is not the object to be processed and the bright portion is important, it is easy to perform the processing that emphasizes the pixels according to the purpose of the processing.

【0047】また、請求項11,23の発明では、抽出
された各画素について濃度勾配ベクトルの大きさに基づ
いて重み付けがされる。このため、画像の輪郭部分で濃
度勾配が急であるなど濃度勾配ベクトルの大きさが意味
を持つ場合に、処理の目的に沿った画素を重視した処理
を行うことが容易になる。
According to the eleventh and twenty-third aspects of the present invention, each extracted pixel is weighted based on the magnitude of the density gradient vector. For this reason, when the magnitude of the density gradient vector is significant, such as when the density gradient is steep at the contour portion of the image, it becomes easy to perform processing that emphasizes pixels according to the purpose of the processing.

【0048】また、請求項12,24の発明では、抽出
された各画素について、その画素に係る2つの内積値の
差に基づいて重み付けが行われる。ここで、一般に、内
積値の差は小さいほど、画素の濃度勾配ベクトルと検出
範囲の中心方位角が近い。このため、検出範囲の中央に
位置する濃度勾配ベクトルを持つ画素を重視して処理
し、目的に合った処理を行うことが容易になる。
According to the twelfth and twenty-fourth aspects of the present invention, each extracted pixel is weighted based on the difference between two inner product values of the pixel. Here, in general, the smaller the difference between the inner product values, the closer the density gradient vector of the pixel and the central azimuth angle of the detection range. For this reason, it becomes easy to perform processing suitable for the purpose by giving priority to the processing of the pixel having the density gradient vector located in the center of the detection range.

【0049】[0049]

【実施例】次に、本発明の実施例について図面に従って
具体的に説明する。なお、後述する実施例はコンピュー
タ上に実現され、実施例の各機能は所定の手順(ソフト
ウェア)がこのコンピュータを制御することで実現され
る。
Embodiments of the present invention will now be specifically described with reference to the drawings. The embodiments described below are realized on a computer, and each function of the embodiments is realized by a predetermined procedure (software) controlling the computer.

【0050】したがって、本明細書では、以下、実施例
の各機能を有する仮想的回路ブロック(手段)を想定し
て実施例を説明する。すなわち、本明細書における各
「手段」ないし「部」は実施例の各機能に対応する概念
で、必ずしも特定のハードウェアやソフトウェア・ルー
チンに1対1には対応しない。同一のハードウェア要素
が場合によって異なった手段を構成する。例えば、コン
ピュータはある命令を実行するときにある手段となり別
の命令を実行するときは別の手段となりうる。また、一
つの手段がわずか1命令によって実現される場合もあれ
ば多数の命令によって実現される場合もある。但し、コ
ンピュータの使用は一例であり、本発明の機能の全部又
は一部は、可能ならば、カスタムチップ(専用の集積回
路)のような電子回路上に実現してもよい。
Therefore, in the present specification, an embodiment will be described below by assuming a virtual circuit block (means) having each function of the embodiment. That is, each "means" or "unit" in this specification is a concept corresponding to each function of the embodiment, and does not necessarily correspond to a specific hardware or software routine on a one-to-one basis. The same hardware element may in some cases constitute different means. For example, a computer may be one means for executing one instruction and another for executing another instruction. Further, one means may be realized by only one instruction or may be realized by a large number of instructions. However, use of a computer is an example, and all or part of the functions of the present invention may be realized on an electronic circuit such as a custom chip (dedicated integrated circuit) if possible.

【0051】実施例に用いられるコンピュータは、一般
には、CPU(中央演算処理装置)と、RAM(随時書
込読出型記憶素子)からなる主記憶装置とを有する。ま
た、前記コンピュータの規模は自由であり、パーソナル
コンピュータ・ワークステーション・メインフレームな
ど、いかなる規模のものを用いてもよい。
The computer used in the embodiment generally has a CPU (central processing unit) and a main memory device composed of a RAM (random writing / reading type memory element). The size of the computer is arbitrary, and any size such as a personal computer, a workstation, a mainframe, etc. may be used.

【0052】また、前記コンピュータのハードウェア
は、典型的には、キーボードやマウスなどの入力装置
と、ハードディスク装置などの外部記憶装置と、CRT
表示装置やプリンタ印字装置などの出力装置と、必要な
入出力制御回路を含む。
The hardware of the computer is typically an input device such as a keyboard and a mouse, an external storage device such as a hard disk device, and a CRT.
It includes an output device such as a display device and a printer printer, and necessary input / output control circuits.

【0053】但し、ハードウェア構成は自由で、本発明
が実施できる限り、上記の構成要素の一部を追加・変更
・除外してもよい。例えば、実施例は、複数のコンピュ
ータを接続したコンピュータネットワーク上に実現して
もよい。また、CPUの種類は自由であり、CPUを複
数同時に用いたり、単一のCPUをタイムシェアリング
(時分割)で使用し、複数の処理を同時平行的に行って
もよい。
However, the hardware configuration is arbitrary, and as long as the present invention can be implemented, some of the above components may be added, changed, or excluded. For example, the embodiments may be realized on a computer network in which a plurality of computers are connected. Further, the type of CPU is arbitrary, and a plurality of CPUs may be used at the same time, or a single CPU may be used for time sharing (time sharing) to perform a plurality of processes simultaneously in parallel.

【0054】また、他の入力装置(例えば、タッチパネ
ル・ライトペン・トラックボールなどのポインティング
デバイスや、デジタイザ・イメージ読取装置やビデオカ
メラなどの画像入力装置・音声識別装置・各種センサな
ど)を用いてもよい。また、他の外部記憶装置(例え
ば、フロッピーディスク装置・RAMカード装置・磁気
テープ装置・光学ディスク装置・光磁気ディスク装置・
バブルメモリ装置・フラッシュメモリなど)を用いても
よい。また、他の出力装置(例えば、液晶表示装置・プ
ラズマディスプレイ装置・ビデオプロジェクター・LE
D表示装置・音響発生回路・音声合成回路など)を用い
てもよい。
In addition, other input devices (for example, pointing devices such as touch panels, light pens, trackballs, image input devices such as digitizers, image reading devices and video cameras, voice recognition devices, various sensors, etc.) are used. Good. Also, other external storage devices (for example, floppy disk device, RAM card device, magnetic tape device, optical disk device, magneto-optical disk device,
Bubble memory device, flash memory, etc.) may be used. In addition, other output devices (for example, liquid crystal display device, plasma display device, video projector, LE
D display device, sound generation circuit, voice synthesis circuit, etc.) may be used.

【0055】また、前記コンピュータにおいて実施例を
実現するためのソフトウェアの構成としては、典型的に
は、実施例の各機能を実現するためのアプリケーション
ソフトウェアが、OS(オペレーティングシステム)上
で実行される態様が考えられる。また、実施例を実現す
るためのソフトウェアの態様としては、典型的には、高
級言語やアセンブラからコンパイル(翻訳)された機械
語が考えられる。但し、前記コンピュータのソフトウェ
ア構成も自由であり、本発明が実施できる限り、ソフト
ウェア構成を変更してもよい。例えば、必ずしもOSを
用いる必要はなく、また、ソフトウェアの表現形式も自
由であり、BASICのようなインタプリタ(逐次解釈
実行型)言語を用いてもよい。
As a software configuration for realizing the embodiment in the computer, typically, application software for realizing each function of the embodiment is executed on an OS (operating system). Embodiments are possible. Further, as a form of software for implementing the embodiment, typically, a machine language compiled (translated) from a high-level language or an assembler can be considered. However, the software configuration of the computer is also free, and the software configuration may be changed as long as the present invention can be implemented. For example, it is not always necessary to use the OS, the expression format of the software is free, and an interpreter (sequential interpretation execution type) language such as BASIC may be used.

【0056】また、ソフトウェアの格納態様も自由であ
り、ROM(読出し専用メモリ)に格納しておいてもよ
く、また、ハードディスク装置のような外部記憶装置に
格納しておき、コンピュータの起動時や処理の開始時に
主メモリ上にロード(読み込み)してもよい。また、ソ
フトウェアを複数の部分に分割して外部記憶装置に格納
しておき、処理内容に応じて必要なモジュールのみを随
時主メモリ上にロード(読み込み)してもよい。さら
に、ソフトウェアの部分ごとに異なった態様で格納して
もよい。
The software can be stored in any manner, and may be stored in a ROM (read-only memory). Alternatively, the software may be stored in an external storage device such as a hard disk drive at the time of starting the computer. It may be loaded into the main memory at the start of processing. Alternatively, the software may be divided into a plurality of parts and stored in an external storage device, and only the necessary modules may be loaded (read) into the main memory at any time according to the processing content. Further, each software portion may be stored in a different manner.

【0057】また、本実施例における各手順の各ステッ
プは、その性質に反しない限り、実行順序を変更し、複
数同時に実行し、また、実行ごとに異なった順序で実行
してもよい。このような順序の変更は、例えば、ユーザ
が実行可能な処理を選択するなどメニュー形式のインタ
ーフェース手法によって実現することができる。
Also, each step of each procedure in this embodiment may be executed in a different order, a plurality of steps may be executed at the same time, or may be executed in a different order for each execution, as long as the nature thereof is not violated. Such an order change can be realized by a menu-type interface method, such as a user selecting an executable process.

【0058】また、本明細書において「入力」というと
きは、本来の情報の入力のみならず、情報の入力と密接
に関連する他の処理を含む。このような処理は、例え
ば、入力内容のエコーバックや修正・編集である。ま
た、「入力」は、必ずしもコンピュータ外部からの入力
には限定されず、所定のメモリ領域又はディスク装置か
ら情報を読み出すことによっても行われる。また、本明
細書において「出力」というときは、本来の情報の出力
のみならず、情報の出力と密接に関連する他の処理を含
む。このような処理は、例えば、出力すべき範囲の入力
や、画面スクロールの指示である。また、「出力」は、
必ずしもコンピュータ外部への出力には限定されず、所
定のメモリ領域又はディスク装置に情報を書き込むこと
によっても行われる。なお、対話的入出力手順によって
入力と出力を一体的操作によって実現してもよく、この
ような一体的操作によって、選択・指定・特定などの処
理を行ってもよい。
The term "input" used in this specification includes not only the original input of information but also other processing closely related to the input of information. Such processing is, for example, echo back or correction / editing of input contents. In addition, “input” is not necessarily limited to input from outside the computer, and is also performed by reading information from a predetermined memory area or disk device. Further, in this specification, the term “output” includes not only the original output of information but also other processing closely related to the output of information. Such processing is, for example, input of a range to be output or an instruction for screen scrolling. Also, "output" is
The output is not necessarily limited to the outside of the computer, and may be performed by writing information in a predetermined memory area or a disk device. It should be noted that input and output may be realized by an integrated operation by an interactive input / output procedure, and processing such as selection, designation, and specification may be performed by such an integrated operation.

【0059】また、本明細書におけるデータ(情報)や
データの格納手段は前記コンピュータ上においていかな
る態様で存在してもよい。例えば、データのハードウェ
ア上の所在部分は、主記憶装置・外部記憶装置・CPU
のレジスタやキャッシュメモリなどいかなる部分でもよ
い。また、データの保持態様も自由である。例えば、デ
ータは、ファイル形式で保持されるのみならず、メモリ
やディスクなどの記憶装置を物理的アドレスで直接アク
セスすることによって実現してもよい。また、データの
表現形式も自由で、例えば、文字列を表すコードの単位
は、文字単位でも単語単位でもよい。また、データは必
要とされる一定時間だけ保持されれば十分で、その後消
滅してもよく、保持時間の長短は自由である。また、辞
書データのように当面変更されない情報は、ROMに格
納してもよい。
The data (information) and the data storage means in the present specification may exist in any form on the computer. For example, the location portion of data on the hardware is the main storage device / external storage device / CPU.
It may be any part such as a register or a cache memory. Further, the data retention mode is also free. For example, the data is not only retained in the file format, but may be realized by directly accessing a storage device such as a memory or a disk by a physical address. In addition, the expression format of the data is arbitrary, and for example, the unit of the code representing the character string may be a character unit or a word unit. Further, it is sufficient that the data is retained for the required fixed time, and the data may be deleted thereafter, and the retention time is free. Information that is not changed for the time being, such as dictionary data, may be stored in the ROM.

【0060】また、本明細書において、特定の情報への
言及は確認的で、言及されない情報の存在を否定するも
のではない。すなわち、本発明の動作では、動作に必要
な一般的な情報やその格納領域、例えば、各種ポイン
タ、スタック、カウンタ、フラグ、パラメータ、ワーク
エリア、バッファなどが適宜用いられる。
In this specification, reference to specific information is a confirmation and does not deny the existence of information that is not referred to. That is, in the operation of the present invention, general information necessary for the operation and its storage area, for example, various pointers, stacks, counters, flags, parameters, work areas, buffers, etc. are appropriately used.

【0061】実施例の各部分が処理に要する情報は、特
に記載がない場合、当該情報を保持している他の部分か
ら獲得される。このような情報の獲得は、例えば、当該
情報を格納している変数やメモリをアクセスすることに
よって実現することができる。なお、情報の消去・抹消
は、当該情報の内容自体を必ずしも記憶領域から現実に
削除せず、消去を表すフラグを設定するなど、情報の意
味付けの変更によって行うことができる。
The information required by each part of the embodiment for processing is obtained from the other part holding the information unless otherwise specified. Such acquisition of information can be realized, for example, by accessing a variable or memory that stores the information. The information can be erased / erased by not actually deleting the content itself of the information from the storage area but by changing the meaning of the information, such as setting a flag indicating the deletion.

【0062】(1)第1実施例の構成 第1実施例は、請求項1,3〜5,7,13,15〜1
7,19に相当するもので、x,y平面上の画像を構成
しそれぞれ濃淡値を有する各画素から、所望の方位角の
濃度勾配ベクトルを有する画素を検出する画像処理装置
である。第1実施例の目的は、所望の方位角の濃度勾配
ベクトルを有する画素を効率的に抽出する画像処理装置
及び画像処理方法を提供することである。また、第1実
施例の他の目的は、検出結果に対する確認や加工などの
処理が容易な画像処理装置及び画像処理方法を提供する
ことである。また、第1実施例の他の目的は、目的にあ
った処理を容易にする画像処理装置及び画像処理方法を
提供することである。
(1) Structure of the First Embodiment The first embodiment has the features of claims 1, 3 to 5, 7, 13, and 15 to 1.
The image processing apparatus corresponds to Nos. 7 and 19 and detects a pixel having a density gradient vector of a desired azimuth angle from each pixel having an intensity value, which constitutes an image on the x and y planes. An object of the first embodiment is to provide an image processing apparatus and an image processing method for efficiently extracting pixels having a density gradient vector of a desired azimuth angle. Another object of the first embodiment is to provide an image processing apparatus and an image processing method in which processing such as confirmation and processing of a detection result is easy. Further, another object of the first embodiment is to provide an image processing apparatus and an image processing method that facilitate the processing suitable for the purpose.

【0063】まず、図1は第1実施例の画像処理装置
(以下「本装置」という)の構成を示す機能ブロック図
である。本装置は、この図に示すように、検出する濃度
勾配ベクトルの方位角の範囲であって第1の方位角と第
2の方位角とに挟まれた範囲として表現できる検出範囲
を指定する指定手段1と、第1の方位角及び第2の方位
角に対してそれぞれ直角な二つの補助ベクトルを各々x
成分及びy成分によって設定する補助ベクトル設定手段
2と、を有する。また、本装置は、各画素ごとに、当該
画素及び周囲の画素の各濃淡値に基づいて、濃度勾配ベ
クトルをx,y軸の各成分微分値Gx,Gyとして算出
する濃度勾配算出手段3と、各画素ごとに濃度勾配ベク
トルと前記二つの補助ベクトルとの各内積値を算出する
内積手段4と、前記各内積値の符号に基づいて画素の濃
度勾配ベクトルの方位角が前記検出範囲に含まれるか否
かを判定する判定手段5と、を有する。
First, FIG. 1 is a functional block diagram showing the configuration of an image processing apparatus (hereinafter referred to as "this apparatus") of the first embodiment. As shown in this figure, the present apparatus designates a detection range that is a range of azimuth angles of the concentration gradient vector to be detected and can be expressed as a range sandwiched between the first azimuth angle and the second azimuth angle. Means 1 and two auxiliary vectors, each orthogonal to the first and second azimuth angles, respectively x
And an auxiliary vector setting means 2 for setting the y component and the y component. Further, the present apparatus further includes a density gradient calculating means 3 for calculating, for each pixel, a density gradient vector as component differential values Gx, Gy of x and y axes based on gray values of the pixel concerned and surrounding pixels. , The inner product means 4 for calculating each inner product value of the density gradient vector and the two auxiliary vectors for each pixel, and the azimuth of the density gradient vector of the pixel is included in the detection range based on the sign of each inner product value. And a determining unit 5 for determining whether or not to perform.

【0064】また、本装置は、検出された画素のメモリ
上のアドレス値を順次格納する第1の格納手段6と、画
素のメモリ上のアドレス値を画素の画像上の座標値に換
算する第1の換算手段7と、を有する。
The present apparatus further comprises a first storage means 6 for sequentially storing the detected address value of the pixel on the memory, and a first storage means 6 for converting the address value of the pixel on the memory into coordinate values on the image of the pixel. And the conversion means 7 of 1.

【0065】(2)第1実施例の作用及び効果 [検出範囲の指定]x,y平面上の画像を構成しそれぞ
れ濃淡値を有する画素Xi,j (i=0〜N−1、j=0
〜M−1)が存在し、各画素の濃淡値は任意の複数ビッ
ト(例えば8ビット)の精度で表現されているとする。
この場合に所望の方位角の濃度勾配ベクトルを有する画
素を検出するには、まず、指定手段1を通じて検出範囲
を指定する。この指定の仕方は自由で、例えば、ユーザ
が手作業で入力してもよいし、アプリケーションプログ
ラムの処理ルーチンから引き渡してもよい。
(2) Operation and effect of the first embodiment [Designation of detection range] Pixels Xi, j (i = 0 to N-1, j =, which form an image on the x and y planes and have gray values respectively 0
˜M−1) exists, and the grayscale value of each pixel is represented with an arbitrary precision of a plurality of bits (for example, 8 bits).
In this case, in order to detect a pixel having a density gradient vector of a desired azimuth angle, first, the detection range is designated by the designating means 1. The method of this designation is arbitrary. For example, the user may manually input or may hand over from the processing routine of the application program.

【0066】検出範囲は、検出する濃度勾配ベクトルの
方位角の範囲であり、第1の方位角と第2の方位角とに
挟まれた範囲として表現できればよい。すなわち、ここ
では、検出範囲として中心方位角A[ラジアン]とその
前後の検出許容角d[ラジアン]で与え、方位角A+d
からA−dの範囲とするが、最小方位角と最大方位角に
よって検出範囲を指定してもよい。なお、方位角A−d
を第1の方位角、方位角A+dを第2の方位角とする
(図2)。
The detection range is a range of azimuth angles of the concentration gradient vector to be detected, and may be expressed as a range sandwiched between the first azimuth angle and the second azimuth angle. That is, here, the detection range is given by the central azimuth angle A [radian] and the detection allowable angle d [radian] before and after the central azimuth angle A + d.
However, the detection range may be specified by the minimum azimuth angle and the maximum azimuth angle. Note that the azimuth angle A-d
Is the first azimuth angle and azimuth angle A + d is the second azimuth angle (FIG. 2).

【0067】第1実施例では、濃淡画像において各画像
ごとに独立な2方向の微分値を成分とする濃度勾配ベク
トル(Gx,Gy)を考えるが、この場合、その濃度勾
配ベクトルの方位角tan-1(Gy/Gx)が、次式
In the first embodiment, a density gradient vector (Gx, Gy) which has independent two-way differential values as components in each grayscale image is considered. In this case, the azimuth angle tan of the density gradient vector is considered. -1 (Gy / Gx) is the following formula

【数4】 で表される範囲内にある画素だけを抽出することとな
る。
[Equation 4] Only pixels within the range represented by are extracted.

【0068】[補助ベクトルの設定]検出範囲が設定さ
れると、補助ベクトル設定手段2が、第1の方位角A−
d及び前記第2の方位角A+dに対してそれぞれ直角な
二つの補助ベクトルS1,S2を各々x成分及びy成分
によってS1(S1x,S1y),S2(S2x,S2
y)のように設定する。図3は、図2のように検出方位
角Aと検出許容角dが与えられたときに設定される2つ
の補助ベクトルを模式的に表している。また、図4は補
助ベクトルの各成分を表す。次式は、補助ベクトルの各
成分を算出するための演算の例である。
[Setting of Auxiliary Vector] When the detection range is set, the auxiliary vector setting means 2 causes the first azimuth angle A-
d and two auxiliary vectors S1 and S2, which are respectively orthogonal to the second azimuth angle A + d, are divided into S1 (S1x, S1y), S2 (S2x, S2) by an x component and ay component
Set as in y). FIG. 3 schematically shows two auxiliary vectors set when the detection azimuth angle A and the detection allowable angle d are given as in FIG. Further, FIG. 4 shows each component of the auxiliary vector. The following equation is an example of an operation for calculating each component of the auxiliary vector.

【数5】 このとき、各補助ベクトルS1,S2の各成分値S1
x,S1y,S2x,S2yはそれぞれ、複数ビットで
表される所定の範囲すなわち−LとLの間の整数値で表
される。この整数化は、例えば小数点以下の切り捨てや
四捨五入などの変換によって実現することができる。
(Equation 5) At this time, each component value S1 of each auxiliary vector S1, S2
x, S1y, S2x, and S2y are each represented by a predetermined range represented by a plurality of bits, that is, an integer value between -L and L. This integer conversion can be realized by conversion such as rounding down or rounding down after the decimal point.

【0069】仮に、A=π/3[ラジアン](=60
[度])、d=π/36[ラジアン](=5[度])の
とき、Lを自然数の256とし、各補助ベクトルのすべ
ての成分が−LとLの間の整数値を取るように整数化す
ると仮定する。この場合、例えば、補助ベクトルS1の
X成分は次式
Assuming that A = π / 3 [radian] (= 60
[Degrees]) and d = π / 36 [radians] (= 5 [degrees]), let L be a natural number 256, and make sure that all components of each auxiliary vector take integer values between −L and L. Suppose that it is an integer. In this case, for example, the X component of the auxiliary vector S1 is

【数6】 で示されるような整数値“−209”をとる。(Equation 6) Takes an integer value "-209".

【0070】このように、第1実施例では、各補助ベク
トルの各成分値がそれぞれ所定の範囲の整数値で表され
る。そして、整数値は一般に内部表現形式が単純で演算
処理も容易かつ高速なので、処理が迅速化される(請求
項4,16)。
As described above, in the first embodiment, each component value of each auxiliary vector is represented by an integer value within a predetermined range. In addition, since the integer value is generally simple in internal representation format and easy and fast in arithmetic processing, the processing is speeded up (claims 4 and 16).

【0071】[濃度勾配ベクトルの算出]また、画素の
検出のために、濃度勾配算出手段3が各画素ごとに、当
該画素及び周囲の画素の各濃淡値に基づいて、濃度勾配
ベクトルをx,y軸の各成分微分値Gx,Gyとして算
出する。なお、この算出はあらかじめすべての画素につ
いて行ってから内積以降の処理に進んでもよく、また、
画素ごとに濃度勾配ベクトルの算出と内積以降の処理を
交互に行うようにしてもよい。
[Calculation of Density Gradient Vector] Further, in order to detect a pixel, the density gradient calculating means 3 calculates a density gradient vector x, for each pixel based on each gray value of the pixel concerned and surrounding pixels. It is calculated as each component differential value Gx, Gy on the y-axis. It should be noted that this calculation may be performed for all pixels in advance and then proceed to the process after the inner product.
The calculation of the density gradient vector and the process after the inner product may be alternately performed for each pixel.

【0072】ここでは、あらかじめ全画素の濃度勾配ベ
クトルの各成分Gx、Gyを求め、所定のメモリ領域に
格納しておくものとする。各画素での濃度勾配ベクトル
は、従来技術と同様、図7に示すように算出する。
Here, it is assumed that the components Gx and Gy of the density gradient vector of all pixels are obtained in advance and stored in a predetermined memory area. The density gradient vector at each pixel is calculated as shown in FIG. 7 as in the prior art.

【0073】[内積による判定]次に、1画素分ごとに
濃度勾配ベクトルを読み出し、内積手段4が、各画素ご
との濃度勾配ベクトル(Gx,Gy)と二つの補助ベク
トルS1(S1x,S1y),S2(S2x,S2y)
との各内積値を算出する。
[Determination by Inner Product] Next, the density gradient vector is read out for each pixel, and the inner product means 4 causes the density gradient vector (Gx, Gy) for each pixel and two auxiliary vectors S1 (S1x, S1y). , S2 (S2x, S2y)
Calculate each inner product value of and.

【0074】そして、判定手段5が、前記各内積値の符
号に基づいて画素の濃度勾配ベクトルが検出範囲に含ま
れるか否かを判定する。ここで、一般に、2つのベクト
ル間の内積値は各ベクトルの方位角間の角度が鋭角のと
き正、鈍角のとき負となる。そして、各補助ベクトルは
第1の方位角A−d及び第2の方位角A+dに対してそ
れぞれ直角である。したがって、濃度勾配ベクトルにつ
いては、各補助ベクトルとの内積値Gx・S1x+Gy
・S1y,Gx・S1x+Gy・S1yの符号によっ
て、第1の方位角A−d,第2の方位角A+dとの角度
関係を特定することができる。例えば、第1補助ベクト
ルが第1の方位角に対して第2の方位角側にあり、か
つ、第2補助ベクトルが第2の方位角に対して第1の方
位角側にあるとき、内積値の符号が共に正のとき、濃度
勾配ベクトルは第1の方位角と第2の方位角の間に存在
する。
Then, the judging means 5 judges whether or not the density gradient vector of the pixel is included in the detection range based on the sign of each inner product value. Here, in general, the inner product value between two vectors is positive when the angle between the azimuth angles of each vector is acute and negative when the angle is obtuse. Each auxiliary vector is at right angles to the first azimuth angle A-d and the second azimuth angle A + d. Therefore, for the concentration gradient vector, the inner product value Gx · S1x + Gy with each auxiliary vector
The angular relationship between the first azimuth angle A-d and the second azimuth angle A + d can be specified by the symbols S1y, Gx · S1x + Gy · S1y. For example, when the first auxiliary vector is on the second azimuth side with respect to the first azimuth and the second auxiliary vector is on the first azimuth side with respect to the second azimuth, the inner product When the signs of the values are both positive, the concentration gradient vector exists between the first azimuth angle and the second azimuth angle.

【0075】なお、2つのベクトル間の内積値は、x要
素同士の積及びy要素同士の積の和という単純な演算で
算出でき、直角の判定も符号という単純な情報のみに基
づいて行うことができる。このように、第1実施例で
は、所望の方位角の濃度勾配ベクトルを有する画素の検
出を、全画像の濃度勾配ベクトルの方位角をラジアン
(tan-1(Gy/Gx))で算出しておくことなく、
単純な情報と処理によって効率的に行うことができる
(請求項1,13)。
The inner product value between two vectors can be calculated by a simple operation such as the sum of the products of x elements and the products of y elements, and the determination of the right angle should be made based only on simple information such as a sign. You can As described above, in the first embodiment, the detection of the pixel having the density gradient vector of the desired azimuth is performed by calculating the azimuth of the density gradient vector of all images in radian (tan −1 (Gy / Gx)). Without putting
It can be efficiently performed by simple information and processing (claims 1 and 13).

【0076】また、いずれか一方の補助ベクトルとの内
積値のみをまず算出し、この内積値の符号に基づいて画
素の濃度勾配ベクトルの方位角が当該補助ベクトルに対
応する前記第1又は第2の方位角に対して前記検出範囲
側に含まれると判定された場合に、他方の補助ベクトル
との内積値を算出してもよい(請求項3,15)。この
ようにすれば、先に算出された内積値に基づいて検出範
囲外であることが判明した場合は後の内積値の算出を省
略することができ、演算回数が節約できるので処理が迅
速化される。
Further, only the inner product value with one of the auxiliary vectors is first calculated, and the azimuth of the density gradient vector of the pixel corresponds to the auxiliary vector based on the sign of the inner product value. When it is determined to be included in the detection range side with respect to the azimuth angle of, the inner product value with the other auxiliary vector may be calculated (claims 3 and 15). By doing this, if it is found that the value is out of the detection range based on the inner product value calculated earlier, the subsequent calculation of the inner product value can be omitted, and the number of calculations can be saved, thus speeding up the processing. To be done.

【0077】図5は、この場合の画素抽出の手順を示す
フローチャートである。すなわち、画素座標を指すポイ
ンタを移動させながら(ステップ200)メモリから一
画素分の濃度勾配ベクトル(Gx,Gy)を読み出し、
補助ベクトルS1との内積P1を
FIG. 5 is a flow chart showing the procedure of pixel extraction in this case. That is, the density gradient vector (Gx, Gy) for one pixel is read from the memory while moving the pointer indicating the pixel coordinates (step 200),
The inner product P1 with the auxiliary vector S1

【数7】P1=S1x・Gx+S1y・Gy にしたがって求める(ステップ201)。そして、この
P1が正(P1>0)か否かを判定し(ステップ20
2)、正でないならば画素座標ポインタの移動(ステッ
プ200)に戻り、次の画素へ処理を進める。
(7) P1 = S1x · Gx + S1y · Gy is calculated (step 201). Then, it is determined whether this P1 is positive (P1> 0) (step 20).
2) If it is not positive, the process returns to the movement of the pixel coordinate pointer (step 200) to proceed to the next pixel.

【0078】ステップ202においてP1が正の場合
は、続いて、濃度勾配ベクトル(Gx,Gy)と補助ベ
クトルS2との内積P2を
If P1 is positive in step 202, then the inner product P2 of the concentration gradient vector (Gx, Gy) and the auxiliary vector S2 is calculated.

【数8】P2=S2x・Gx+S2y・Gy にしたがって求める(ステップ203)。そして、この
P2が正(P2>0)か否かを判定し(ステップ20
4)、正でないならば画素座標ポインタの移動(ステッ
プ200)に戻り、次の画素へ処理を進める。P1が正
の場合は、当該画素の濃淡値が格納されたメモリのアド
レスが第1の格納手段6に格納される(ステップ20
5)。そして、全画素を走査していない場合は(ステッ
プ206)、次の画素へ処理を進めるが(ステップ20
0)、全画素を走査し終えていれば画素抽出を終了す
る。
(8) P2 = S2x · Gx + S2y · Gy is calculated (step 203). Then, it is determined whether this P2 is positive (P2> 0) (step 20).
4) If it is not positive, return to the movement of the pixel coordinate pointer (step 200) and proceed to the next pixel. If P1 is positive, the address of the memory in which the grayscale value of the pixel is stored is stored in the first storage means 6 (step 20).
5). If all pixels have not been scanned (step 206), the process proceeds to the next pixel (step 20).
0), if scanning of all pixels has been completed, pixel extraction is completed.

【0079】なお、第1実施例では、検出された画素に
ついて、座標値ではなくメモリ上のアドレス値が順次格
納され蓄積されるので、検出された画素の濃淡値にアク
セスする場合に画像の座標値をアドレス値に換算する処
理が省略できる。このため、検出後の画像データへのア
クセスなどの処理が高速化される(請求項5,17)。
In the first embodiment, not the coordinate value but the address value on the memory is sequentially stored and accumulated for the detected pixel. Therefore, when accessing the gray value of the detected pixel, the coordinate of the image is accessed. The process of converting a value into an address value can be omitted. Therefore, processing such as access to the image data after detection is speeded up (claims 5 and 17).

【0080】[抽出結果の変換]上記のように、第1実
施例では、検出された部分がメモリ上のアドレス値の型
式で格納されるが、第1の換算手段7が、必要に応じ
て、このアドレス値を画素の画像上の座標値に換算する
(請求項7,19)。この換算は、画像メモリのメモリ
空間上におけるオフセット値と画像データのX,Y各方
向の画素数などに基づいて行うことができる。例えば、
1画素が1バイトの画像メモリがオフセットアドレスV
から配置され、X方向N画素Y方向M画素に構成され、
座標値を0から数える場合、アドレス値Rに基づいて座
標値Xi,j のi,jはそれぞれ、
[Conversion of Extraction Result] As described above, in the first embodiment, the detected portion is stored in the form of the address value on the memory, but the first converting means 7 may store it as necessary. The address value is converted into the coordinate value on the image of the pixel (claims 7 and 19). This conversion can be performed based on the offset value in the memory space of the image memory and the number of pixels in each of the X and Y directions of the image data. For example,
Image memory with 1 byte for 1 pixel is offset address V
And arranged in N pixels in the X direction and M pixels in the Y direction,
When the coordinate value is counted from 0, i and j of the coordinate value Xi, j are respectively calculated based on the address value R.

【数9】j=int((R−V)/N) i=R−(N*j)−V によって求めることができる(但しint()は引数の
整数部分をとる関数とする)。このように第1実施例で
は、検出された部分の画像上の座標値を得ることもでき
るので、検出された部分の画像化や位置の特定など座標
を用いた処理が容易である。
## EQU9 ## j = int ((RV) / N) i = R- (N * j) -V (where int () is a function that takes the integer part of the argument). As described above, in the first embodiment, the coordinate value on the image of the detected portion can be obtained, so that the processing using the coordinates such as imaging the detected portion and specifying the position is easy.

【0081】(3)第2実施例 また、各画素の濃度勾配ベクトル(Gx,Gy)と、各
補助ベクトル(S1x,S1y),(S2x,S2y)
との各々の内積値の算出を並行処理するための並行処理
手段を設ければ、検出処理が高速化される(請求項2,
14)。このような並行処理は、マルチCPU、数値演
算用コプロセッサなどによって実現することができる。
(3) Second Embodiment Further, the density gradient vector (Gx, Gy) of each pixel and each auxiliary vector (S1x, S1y), (S2x, S2y).
If the parallel processing means for parallel processing the calculation of the inner product value of each of and is provided, the detection processing can be speeded up.
14). Such parallel processing can be realized by a multi-CPU, a numerical operation coprocessor, or the like.

【0082】すなわち、図6は、第2実施例における処
理手順を示すフローチャートである。この図に示すよう
に、第2実施例では、各画素の濃度勾配ベクトルについ
て(ステップ300)、第1補助ベクトルS1との内積
P1を求める演算と、第2補助ベクトルS2との内積P
2を求める演算を並行に処理する(ステップ301,3
02)。
That is, FIG. 6 is a flowchart showing the processing procedure in the second embodiment. As shown in this figure, in the second embodiment, with respect to the density gradient vector of each pixel (step 300), the calculation for obtaining the inner product P1 with the first auxiliary vector S1 and the inner product P with the second auxiliary vector S2 are performed.
The calculation for obtaining 2 is processed in parallel (steps 301, 3
02).

【0083】そして、得られた2つの内積値P1,P2
が共に正かどうかを判定し(ステップ303)、共に正
の場合のみ当該画素のアドレスを抽出用メモリに記録す
る(ステップ305)。
Then, the obtained two inner product values P1 and P2
Are both positive (step 303), and only when both are positive, the address of the pixel is recorded in the extraction memory (step 305).

【0084】(4)他の実施例 なお、本発明は上記実施例に限定されるものではなく、
実施態様の変更は自由であるから、次に例示するような
他の実施例をも包含するものである。
(4) Other Embodiments The present invention is not limited to the above embodiments,
Since the embodiment can be freely changed, the present invention also includes other embodiments as illustrated below.

【0085】例えば、検出範囲の第1の方位角及び第2
の方位角に対して直角の位置はそれぞれ2つずつ考えら
れるが、補助ベクトルはいずれの直角の位置に設定して
もよい。いずれの直角の位置に設定した場合も符号によ
る判定は位置に対応した正又は負の符号によって行うこ
とができる。
For example, the first azimuth angle and the second azimuth angle of the detection range
There are two possible positions at right angles to each azimuth angle, but the auxiliary vector may be set at any right angle position. In either case of setting at right angles, the determination by the sign can be made by the positive or negative sign corresponding to the position.

【0086】また、検出結果を格納する手段は必ずしも
必要ではなく、検出範囲内の方位角の濃度勾配ベクトル
を有する画素が検出される都度、当該画素に対する必要
な処理を行ってもよい。また、補助ベクトルの成分値は
必ずしも整数で表す必要はなく、実数で表せば厳密な精
度が求められるような処理に適する。また、抽出された
画素に重み付けする各重み付け手段も、必ずしも設けな
くともよい。
Further, the means for storing the detection result is not always necessary, and whenever a pixel having a density gradient vector of an azimuth angle within the detection range is detected, a necessary process may be performed on the pixel. Further, the component value of the auxiliary vector does not necessarily have to be represented by an integer, and it is suitable for processing that requires strict accuracy if represented by a real number. Further, each weighting means for weighting the extracted pixels does not necessarily have to be provided.

【0087】また、本発明が処理の対象とする画像は白
黒の濃淡値のみからなる画像には限定されず、RGB形
式などのカラー画像や紫外線・赤外線などに基づく画像
などいかなる種類の画像にも適用することができる。ま
た、画素の検出は必ずしも全ての画素について行う必要
はなく、いくつかおきの画素を調べるなど画素を間引き
してもよい。この場合は、検出対象とする画素が周囲の
画素を適正に代表するように、事前にフィルタリング処
理を行うことが望ましい。
The image to be processed by the present invention is not limited to an image consisting of only grayscale values, and may be any type of image such as a color image in RGB format or an image based on ultraviolet rays or infrared rays. Can be applied. Further, it is not always necessary to detect pixels for all pixels, and pixels may be thinned out by checking every few pixels. In this case, it is desirable to perform the filtering process in advance so that the detection target pixel appropriately represents the surrounding pixels.

【0088】また、検出結果として、検出された画素の
画像上の座標値を順次格納してもよい(請求項6,1
8)。このようにすれば、検出された部分の画像化や位
置の特定など座標を用いた処理を行う場合も、メモリ上
のアドレス値を画像上の座標値に換算する処理が省略で
きる。
As the detection result, the coordinate values of the detected pixels on the image may be sequentially stored (claims 6 and 1).
8). By doing this, even when performing processing using coordinates such as imaging of the detected portion or specifying the position, the processing of converting the address value on the memory into the coordinate value on the image can be omitted.

【0089】また、画素の画像上の座標値を画素のメモ
リ上のアドレス値に換算するようにしてもよい(請求項
8,20)。例えば、1画素が1バイトの画像メモリが
オフセットアドレスVから配置され、X方向N画素Y方
向M画素に構成され、座標値を0から数える場合、座標
値Xi,j のi,jに基づいてアドレス値Rは、
Further, the coordinate value of the pixel on the image may be converted into the address value of the pixel on the memory (claims 8 and 20). For example, when an image memory in which 1 pixel is 1 byte is arranged from an offset address V and is configured to have N pixels in the X direction and M pixels in the Y direction and the coordinate value is counted from 0, based on i, j of the coordinate value Xi, j. The address value R is

【数10】R=V+j*N+i によって求めることができる。このようにすれば、検出
された部分が画像上の座標値の型式で格納されていて
も、この座標値がメモリ上のアドレス値に換算されるの
で、検出された部分の濃淡値にアクセスする場合など、
アドレス値を用いた処理が容易である。
## EQU10 ## It can be obtained by R = V + j * N + i. By doing this, even if the detected portion is stored in the form of the coordinate value on the image, this coordinate value is converted into the address value in the memory, so the gray value of the detected portion is accessed. For example,
Processing using the address value is easy.

【0090】また、検出された画素の部分を画像の型式
のまま格納すれば(請求項9,21)、画像化の処理が
不要になる。
Further, if the detected pixel portion is stored as the image type (claims 9 and 21), the image forming process becomes unnecessary.

【0091】また、抽出された各画素について濃淡値の
大きさに基づいて重み付けをしてもよい(請求項10,
22)。このような重み付けは、濃淡値が所定のしきい
値を超えるかどうかでバイナリに行ったり、濃淡値を引
数とする各種関数の関数値によって行うことができる。
このようにすれば、画像の暗い部分が処理の対象物でな
く明るい部分を重視したいなど、濃淡値が意味を持つ場
合に、処理の目的に沿った画素を重視した処理を行うこ
とが容易になる。
Further, each extracted pixel may be weighted based on the magnitude of the gray value (claim 10).
22). Such weighting can be performed in binary depending on whether the gray value exceeds a predetermined threshold value, or by the function value of various functions using the gray value as an argument.
This makes it easy to perform pixel-oriented processing according to the purpose of the processing when the grayscale value has meaning, such as when the dark portion of the image is not the object to be processed but the bright portion is emphasized. Become.

【0092】また、同様に、抽出された各画素について
濃度勾配の大きさに基づいて重み付けしてもよい(請求
項11,23)。このようにすれば、画像の輪郭部分な
ど濃度勾配が意味を持つ場合に、処理の目的に沿った画
素を重視した処理を行うことが容易になる。
Similarly, the extracted pixels may be weighted based on the magnitude of the density gradient (claims 11 and 23). With this configuration, when the density gradient such as the contour portion of the image has a meaning, it becomes easy to perform the processing that emphasizes the pixels according to the purpose of the processing.

【0093】また、同様に、抽出された各画素につい
て、その画素に係る2つの内積値の差に基づいて重み付
けしてもよい(請求項12,24)。すなわち、一般
に、内積値の差は小さいほど、画素の濃度勾配ベクトル
と検出範囲の中心方位角が近い。このため、前記のよう
にすれば、検出範囲の中央に位置する濃度勾配ベクトル
を持つ画素を重視して処理し、目的に合った処理を行う
ことが容易になる。
Similarly, each extracted pixel may be weighted based on the difference between the two inner product values of that pixel (claims 12 and 24). That is, generally, the smaller the difference between the inner product values, the closer the density gradient vector of the pixel and the central azimuth angle of the detection range. For this reason, if it makes it above, it will become easy to carry out the processing suitable for the purpose, giving priority to the pixel having the density gradient vector located in the center of the detection range.

【0094】[0094]

【発明の効果】以上のように、本発明によれば、所望の
方位角の濃度勾配ベクトルを有する画素を効率的に抽出
できるので、画像処理が高速化される。
As described above, according to the present invention, a pixel having a density gradient vector of a desired azimuth can be efficiently extracted, so that image processing can be speeded up.

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

【図1】本発明の第1実施例の画像処理装置の構成を示
す機能ブロック図。
FIG. 1 is a functional block diagram showing the configuration of an image processing apparatus according to a first embodiment of the present invention.

【図2】本発明の第1実施例において指定される検出範
囲を示す図。
FIG. 2 is a diagram showing a detection range designated in the first embodiment of the present invention.

【図3】本発明の第1実施例における検出範囲と2つの
補助ベクトルとの関係を示す図。
FIG. 3 is a diagram showing a relationship between a detection range and two auxiliary vectors in the first embodiment of the present invention.

【図4】本発明の第1実施例における各補助ベクトルの
成分値を示す図。
FIG. 4 is a diagram showing the component value of each auxiliary vector in the first embodiment of the present invention.

【図5】本発明の第1実施例における検出の手順を示す
フローチャート。
FIG. 5 is a flowchart showing a detection procedure in the first embodiment of the present invention.

【図6】本発明の第2実施例における検出の手順を示す
フローチャート。
FIG. 6 is a flowchart showing a detection procedure in the second embodiment of the present invention.

【図7】本発明及び従来の画像処理装置及び画像処理方
法における濃度勾配ベクトルの算出の具体例を示す原理
図。
FIG. 7 is a principle diagram showing a specific example of calculation of a density gradient vector in the image processing apparatus and the image processing method according to the present invention.

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

1…指定手段 2…補助ベクトル設定手段 3…濃度勾配算出手段 4…内積手段 5…判定手段 6…第1の格納手段 7…第1の換算手段 200以降…手順の各ステップ DESCRIPTION OF SYMBOLS 1 ... Designation means 2 ... Auxiliary vector setting means 3 ... Concentration gradient calculation means 4 ... Inner product means 5 ... Judgment means 6 ... 1st storage means 7 ... 1st conversion means 200 and after ... Each step of a procedure

Claims (24)

【特許請求の範囲】[Claims] 【請求項1】 x,y平面上の画像を構成しそれぞれ濃
淡値を有する各画素から、所望の方位角の濃度勾配ベク
トルを有する画素を検出する画像処理装置において、 検出する濃度勾配ベクトルの方位角の範囲であって第1
の方位角と第2の方位角とに挟まれた範囲として表現で
きる検出範囲を指定する指定手段と、 前記第1の方位角及び前記第2の方位角に対してそれぞ
れ直角な二つの補助ベクトルを各々x成分及びy成分に
よって設定する補助ベクトル設定手段と、 各画素ごとに、当該画素及び周囲の画素の各濃淡値に基
づいて、濃度勾配ベクトルをx,y軸の各成分微分値G
x,Gyとして算出する濃度勾配算出手段と、 各画素ごとに前記濃度勾配ベクトルと前記二つの補助ベ
クトルとの各内積値を算出する内積手段と、 前記各内積値の符号に基づいて前記画素の前記濃度勾配
ベクトルの方位角が前記検出範囲に含まれるか否かを判
定する判定手段と、 を有することを特徴とする画像処理装置。
1. An image processing apparatus for detecting a pixel having a density gradient vector of a desired azimuth angle from each pixel having an intensity value and forming an image on an x, y plane, and an azimuth of a density gradient vector to be detected. The range of angles, first
Specifying means for specifying a detection range that can be expressed as a range sandwiched between the azimuth angle and the second azimuth angle, and two auxiliary vectors that are respectively orthogonal to the first azimuth angle and the second azimuth angle. With an x-component and a y-component, and a density gradient vector for each pixel, based on the gray values of the pixel and surrounding pixels, for each pixel.
x and Gy, a density gradient calculating means, an inner product means for calculating each inner product value of the density gradient vector and the two auxiliary vectors for each pixel, and an inner product value of each pixel based on the sign of each inner product value. An image processing apparatus comprising: a determination unit that determines whether the azimuth angle of the density gradient vector is included in the detection range.
【請求項2】 各補助ベクトルに係る2つの内積値の算
出を並行処理するための並行処理手段を有することを特
徴とする請求項1記載の画像処理装置。
2. The image processing apparatus according to claim 1, further comprising a parallel processing unit for performing parallel processing for calculating two inner product values for each auxiliary vector.
【請求項3】 前記内積手段は、 前記画素の前記濃度勾配ベクトルについて、いずれか一
方の前記補助ベクトルとの内積値のみをまず算出し、 この内積値の符号に基づいて前記画素の前記濃度勾配ベ
クトルの方位角が当該補助ベクトルに対応する前記第1
又は第2の方位角に対して前記検出範囲側に含まれると
前記判定手段によって判定された場合に、他方の補助ベ
クトルとの内積値を算出するように構成されたことを特
徴とする請求項1記載の画像処理装置。
3. The inner product means first calculates only an inner product value of any one of the auxiliary vectors of the density gradient vector of the pixel, and the density gradient of the pixel is calculated based on the sign of the inner product value. The first direction in which the azimuth angle of the vector corresponds to the auxiliary vector
Alternatively, when it is determined by the determination means that the second azimuth is included in the detection range side, the inner product value with the other auxiliary vector is calculated. 1. The image processing device according to 1.
【請求項4】 前記各補助ベクトルの各成分値をそれぞ
れ複数ビットで表される所定の範囲の整数値で表すよう
に構成されたことを特徴とする請求項1記載の画像処理
装置。
4. The image processing apparatus according to claim 1, wherein each component value of each auxiliary vector is configured to be represented by an integer value in a predetermined range represented by a plurality of bits.
【請求項5】 検出された前記画素のメモリ上のアドレ
ス値を順次格納する第1の格納手段を有することを特徴
とする請求項1記載の画像処理装置。
5. The image processing apparatus according to claim 1, further comprising a first storage unit that sequentially stores the detected address value on the memory of the pixel.
【請求項6】 検出された前記画素の画像上の座標値を
順次格納する第2の格納手段を有することを特徴とする
請求項1記載の画像処理装置。
6. The image processing apparatus according to claim 1, further comprising a second storage unit that sequentially stores the detected coordinate values of the pixel on the image.
【請求項7】 画素のメモリ上のアドレス値を画素の画
像上の座標値に換算する第1の換算手段を有することを
特徴とする請求項1記載の画像処理装置。
7. The image processing apparatus according to claim 1, further comprising first conversion means for converting an address value of a pixel on a memory into a coordinate value of the pixel on an image.
【請求項8】 画素の画像上の座標値を画素のメモリ上
のアドレス値に換算する第2の換算手段を有することを
特徴とする請求項1記載の画像処理装置。
8. The image processing apparatus according to claim 1, further comprising a second conversion unit that converts a coordinate value on the image of the pixel into an address value on the memory of the pixel.
【請求項9】 検出された画素の部分の画像を格納する
第3の格納手段を有することを特徴とする請求項1記載
の画像処理装置。
9. The image processing apparatus according to claim 1, further comprising a third storage unit for storing an image of the detected pixel portion.
【請求項10】 抽出された各画素について前記濃淡値
の大きさに基づいて重み付けする第1の重み付け手段を
有することを特徴とする請求項1記載の画像処理装置。
10. The image processing apparatus according to claim 1, further comprising a first weighting unit that weights each extracted pixel based on the magnitude of the grayscale value.
【請求項11】 抽出された各画素について前記濃度勾
配ベクトルの大きさに基づいて重み付けする第2の重み
付け手段を有することを特徴とする請求項1記載の画像
処理装置。
11. The image processing apparatus according to claim 1, further comprising second weighting means for weighting each extracted pixel based on the magnitude of the density gradient vector.
【請求項12】 抽出された各画素について、各画素に
係る2つの前記内積値の差に基づいて重み付けする第3
の重み付け手段を有することを特徴とする請求項1記載
の画像処理装置。
12. A third weighting method for weighting each extracted pixel based on a difference between two inner product values of each pixel.
The image processing apparatus according to claim 1, further comprising:
【請求項13】 x,y平面上の画像を構成しそれぞれ
濃淡値を有する各画素から、所望の方位角の濃度勾配ベ
クトルを有する画素を検出する画像処理方法において、 検出する濃度勾配ベクトルの方位角の範囲であって第1
の方位角と第2の方位角とに挟まれた範囲として表現で
きる検出範囲を指定する指定のステップと、 前記第1の方位角及び前記第2の方位角に対してそれぞ
れ直角な二つの補助ベクトルを各々x成分及びy成分に
よって設定する補助ベクトル設定のステップと、 各画素ごとに、当該画素及び周囲の画素の各濃淡値に基
づいて、濃度勾配ベクトルをx,y軸の各成分微分値G
x,Gyとして算出する濃度勾配算出のステップと、 各画素ごとに前記濃度勾配ベクトルと前記二つの補助ベ
クトルとの各内積値を算出する内積のステップと、 前記各内積値の符号に基づいて前記画素の前記濃度勾配
ベクトルの方位角が前記検出範囲に含まれるか否かを判
定する判定のステップと、 を含むことを特徴とする画像処理方法。
13. An image processing method for detecting a pixel having a density gradient vector of a desired azimuth angle from pixels each of which has an intensity value and constitutes an image on an x, y plane, and an azimuth of a density gradient vector to be detected. The range of angles, first
A step of designating a detection range that can be expressed as a range sandwiched between the azimuth angle and the second azimuth angle, and two auxiliary angles each orthogonal to the first azimuth angle and the second azimuth angle. Auxiliary vector setting step of setting vector by x component and y component respectively, and for each pixel, based on each gray value of the pixel concerned and surrounding pixels, the density gradient vector G
x and Gy, a step of calculating a density gradient, a step of calculating an inner product value of each of the density gradient vector and the two auxiliary vectors for each pixel, and a step of calculating the inner product value based on the sign of each inner product value. A step of determining whether or not the azimuth angle of the density gradient vector of the pixel is included in the detection range.
【請求項14】 各補助ベクトルに係る2つの内積値の
算出を並行処理するための並行処理のステップを含むこ
とを特徴とする請求項13記載の画像処理方法。
14. The image processing method according to claim 13, further comprising a step of parallel processing for parallel processing of calculating two inner product values for each auxiliary vector.
【請求項15】 前記内積のステップでは、 前記画素の前記濃度勾配ベクトルについて、いずれか一
方の前記補助ベクトルとの内積値のみをまず算出し、 この内積値の符号に基づいて前記画素の前記濃度勾配ベ
クトルの方位角が当該補助ベクトルに対応する前記第1
又は第2の方位角に対して前記検出範囲側に含まれると
前記判定のステップによって判定された場合に、他方の
補助ベクトルとの内積値を算出することを特徴とする請
求項13記載の画像処理方法。
15. The inner product step first calculates only an inner product value of the density gradient vector of the pixel and one of the auxiliary vectors, and the density of the pixel is calculated based on a sign of the inner product value. The first direction in which the azimuth angle of the gradient vector corresponds to the auxiliary vector
14. The image according to claim 13, wherein when the determination step determines that the second azimuth angle is included in the detection range side, an inner product value with the other auxiliary vector is calculated. Processing method.
【請求項16】 前記各補助ベクトルの各成分値をそれ
ぞれ複数ビットで表される所定の範囲の整数値で表すこ
とを特徴とする請求項13記載の画像処理方法。
16. The image processing method according to claim 13, wherein each component value of each auxiliary vector is represented by an integer value in a predetermined range represented by a plurality of bits.
【請求項17】 検出された前記画素のメモリ上のアド
レス値を順次格納する第1の格納のステップを含むこと
を特徴とする請求項13記載の画像処理方法。
17. The image processing method according to claim 13, further comprising a first storage step of sequentially storing the detected address value of the pixel on the memory.
【請求項18】 検出された前記画素の画像上の座標値
を順次格納する第2の格納のステップを含むことを特徴
とする請求項13記載の画像処理方法。
18. The image processing method according to claim 13, further comprising a second storage step of sequentially storing the detected coordinate values of the pixel on the image.
【請求項19】 画素のメモリ上のアドレス値を画素の
画像上の座標値に換算する第1の換算のステップを含む
ことを特徴とする請求項13記載の画像処理方法。
19. The image processing method according to claim 13, further comprising a first conversion step of converting an address value of a pixel on a memory into a coordinate value on an image of the pixel.
【請求項20】 画素の画像上の座標値を画素のメモリ
上のアドレス値に換算する第2の換算のステップを含む
ことを特徴とする請求項13記載の画像処理方法。
20. The image processing method according to claim 13, further comprising a second conversion step of converting the coordinate value of the pixel on the image into the address value of the pixel on the memory.
【請求項21】 検出された画素の部分の画像を格納す
る第3の格納のステップを含むことを特徴とする請求項
13記載の画像処理方法。
21. The image processing method according to claim 13, further comprising a third storing step of storing an image of the detected pixel portion.
【請求項22】 抽出された各画素について前記濃淡値
の大きさに基づいて重み付けする第1の重み付けのステ
ップを含むことを特徴とする請求項13記載の画像処理
方法。
22. The image processing method according to claim 13, further comprising a first weighting step of weighting each extracted pixel based on the magnitude of the gray value.
【請求項23】 抽出された各画素について前記濃度勾
配ベクトルの大きさに基づいて重み付けする第2の重み
付けのステップを含むことを特徴とする請求項13記載
の画像処理方法。
23. The image processing method according to claim 13, further comprising a second weighting step of weighting each extracted pixel based on the magnitude of the density gradient vector.
【請求項24】 抽出された各画素について、各画素に
係る2つの前記内積値の差に基づいて重み付けする第3
の重み付けのステップを含むことを特徴とする請求項1
3記載の画像処理方法。
24. A third weighting method for weighting each extracted pixel based on a difference between two inner product values of each pixel.
2. The method of claim 1 including the step of
3. The image processing method described in 3.
JP7004420A 1995-01-13 1995-01-13 Picture processor and picture processing method Pending JPH08194820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7004420A JPH08194820A (en) 1995-01-13 1995-01-13 Picture processor and picture processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7004420A JPH08194820A (en) 1995-01-13 1995-01-13 Picture processor and picture processing method

Publications (1)

Publication Number Publication Date
JPH08194820A true JPH08194820A (en) 1996-07-30

Family

ID=11583790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7004420A Pending JPH08194820A (en) 1995-01-13 1995-01-13 Picture processor and picture processing method

Country Status (1)

Country Link
JP (1) JPH08194820A (en)

Similar Documents

Publication Publication Date Title
US6774889B1 (en) System and method for transforming an ordinary computer monitor screen into a touch screen
JP4738469B2 (en) Image processing apparatus, image processing program, and image processing method
JPH05500874A (en) Polygon-based method for automatic extraction of selected text in digitized documents
CN111290684B (en) Image display method, image display device and terminal equipment
CN114402369A (en) Human body posture recognition method and device, storage medium and electronic equipment
US20090180690A1 (en) Image searching apparatus and image searching method
CN111209856B (en) Invoice information identification method and device, electronic equipment and storage medium
CN114495146A (en) Image text detection method and device, computer equipment and storage medium
CN110796130A (en) Method, device and computer storage medium for character recognition
US20040017940A1 (en) Document information input apparatus, document information input method, document information input program and recording medium
CN112862703A (en) Image correction method and device based on mobile photographing, electronic equipment and medium
CN117253022A (en) Object identification method, device and inspection equipment
CN110782390A (en) Image correction processing method and device and electronic equipment
CN110619597A (en) Semitransparent watermark removing method and device, electronic equipment and storage medium
JPH08194820A (en) Picture processor and picture processing method
US20040105583A1 (en) Segmenting a composite image via minimum areas
CN114495105A (en) Image tilt correction method, device, storage medium and computer equipment
JP4648084B2 (en) Symbol recognition method and apparatus
JPWO2020208742A1 (en) Polygon detection device, polygon detection method, and polygon detection program
CN112464753B (en) Method and device for detecting key points in image and terminal equipment
CN112967187B (en) Method and apparatus for target detection
KR101212316B1 (en) Movement path extracting method of center points of frame using spatial transformation and motion estimation
JP2000285237A (en) Method and device for picture processing and recording medium with picture processing program recorded
CN115273104A (en) Music score recognition method and device, electronic equipment and storage medium
JPH0830725A (en) Device and method for processing image