JPH10145612A - Single color conversion system for color image and image processing system - Google Patents

Single color conversion system for color image and image processing system

Info

Publication number
JPH10145612A
JPH10145612A JP8294256A JP29425696A JPH10145612A JP H10145612 A JPH10145612 A JP H10145612A JP 8294256 A JP8294256 A JP 8294256A JP 29425696 A JP29425696 A JP 29425696A JP H10145612 A JPH10145612 A JP H10145612A
Authority
JP
Japan
Prior art keywords
color
image
color image
contrast
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP8294256A
Other languages
Japanese (ja)
Other versions
JP3752031B2 (en
Inventor
Giyokubu Chiyou
玉武 張
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.)
Mitutoyo Corp
Mitsutoyo Kiko Co Ltd
Original Assignee
Mitutoyo Corp
Mitsutoyo Kiko Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitutoyo Corp, Mitsutoyo Kiko Co Ltd filed Critical Mitutoyo Corp
Priority to JP29425696A priority Critical patent/JP3752031B2/en
Publication of JPH10145612A publication Critical patent/JPH10145612A/en
Application granted granted Critical
Publication of JP3752031B2 publication Critical patent/JP3752031B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To extract a contrast image from a color image so that a difference between different color areas is most remarkable on the contrast image. SOLUTION: In the case of compositing RGB components in a color image at a prescribed ratio to extract a monochromatic contrast image F, a conversion vector is used to decide a ratio of the RGB components of the color image to emphasize a contrast difference between areas of each color to be identified included in the color image. A vector maximizing the dispersion in the contrast image F is adopted for the conversion vector. The conversion vector is obtained by calculating a mean value of each color component of the color image, obtaining a co-variance matrix of the color image from the mean value of each color component and color picture element data configuring the color image and calculating a proper vector corresponding to a proper value whose absolute value is maximum among proper values of the co-variance matrix.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、カラーCCDカ
メラ等の撮像手段で被測定対象を撮像して得られたカラ
ー画像から測定すべきエッジを検出したり、必要な領域
を認識するため、カラー画像からコントラスト画像を抽
出するカラー画像の単色変換方式及び画像処理方式に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color image sensor for detecting an edge to be measured from a color image obtained by imaging an object to be measured by an image pickup means such as a color CCD camera and recognizing a necessary area. The present invention relates to a color image monochrome conversion method and an image processing method for extracting a contrast image from an image.

【0002】[0002]

【従来の技術】被測定対象物や被認識対象物のモノクロ
画像から目的とする輪郭や形状を抽出する場合、通常
は、多階調のモノクロ画像を所定のしきい値レベルで2
値化することより、エッジ画像を抽出する。一方、この
ような白黒画像に対してカラー画像では、対象物の光反
射率等の表面物性と色彩の両方の情報を含んでいるた
め、画像信号の明るさの違いや色の違いを利用して、光
反射率や色の異なる領域の境界線(対象物と背景領域と
の境界線)を検出したり、特定の色の領域を検出するこ
とができるという利点がある。これにより、寸法や形状
を計測したり、存在の有無や位置を認識したりすること
ができる。
2. Description of the Related Art When extracting a desired contour or shape from a monochrome image of an object to be measured or an object to be recognized, a multi-tone monochrome image is usually extracted at a predetermined threshold level.
The edge image is extracted by converting into a value. On the other hand, in contrast to such a black and white image, a color image contains information on both surface physical properties such as the light reflectance of the object and the like, and therefore utilizes differences in brightness and colors of image signals. Therefore, there is an advantage that it is possible to detect a boundary line between regions having different light reflectances and colors (a boundary line between an object and a background region) and a region of a specific color. As a result, it is possible to measure the size and shape, and to recognize the presence / absence and the position.

【0003】ところで、一般にカラー画像は、赤
(R)、緑(G)、青(B)の3色の画像、即ちR,
G,Bの3つの二次元配列データから構成される。計測
処理や認識処理のためには、このカラー画像を単色変換
して1つの二次元配列データであるコントラスト画像を
得、このコントラスト画像の濃度の二次元的分布から対
象物の寸法や形状等を検出したり、対象物の存在の有無
を検出したりする。従って、コントラスト画像は、カラ
ー画像における明るさの違いや色の違いを明確に表現し
たものでなければならない。
Generally, a color image is an image of three colors of red (R), green (G), and blue (B), that is, R,
G and B are composed of three two-dimensional array data. For measurement processing and recognition processing, this color image is converted to a single color to obtain a contrast image as one two-dimensional array data, and the size and shape of the object are determined from the two-dimensional distribution of the density of the contrast image. It detects the presence or absence of the object. Therefore, the contrast image must clearly express the difference in brightness and the difference in color in the color image.

【0004】従来、カラー画像からコントラスト画像を
抽出する方法としては、次の2つの方法が挙げられる。 (1)カラー画像の輝度をコントラスト画像とする方法 第1の方法は、NTSCカラー方式の輝度信号Yをコン
トラスト画像Fとする方法であり、コントラスト画像F
は、
Conventionally, there are the following two methods for extracting a contrast image from a color image. (1) Method of Converting Luminance of Color Image to Contrast Image The first method is a method of converting a luminance signal Y of the NTSC color system into a contrast image F.
Is

【0005】[0005]

【数1】F=0.30R+0.59G+0.11B## EQU1 ## F = 0.30R + 0.59G + 0.11B

【0006】のように変換される。このコントラスト画
像Fは、カラーテレビ放送を白黒テレビで受像して得ら
れる白黒映像と等価である。しかし、この変換は各色成
分の比が固定的な変換であるため、色が異なっても輝度
がたまたま同一となる場合には、コントラスト画像上で
色の異なる領域が区別できなくなることが生じる。例え
ば図8(a)に示すように、対象画像S中に認識すべき
2つの領域A,Bが含まれており、これらの領域A,B
の画像データが(R,G,B)の割合で表現してそれぞ
れ(150,0,0),(0,76,0)であるとする
と、対象画像S上の水平走査ラインHに沿った各色の画
像データは、図8(b)のR,G,Bのようになり、領
域A,Bのコントラスト画像Fa,Fbは、
Is converted as follows. This contrast image F is equivalent to a black-and-white image obtained by receiving a color television broadcast on a black-and-white television. However, since this conversion is a conversion in which the ratio of each color component is fixed, if the luminances happen to be the same even if the colors are different, it may not be possible to distinguish the regions having different colors on the contrast image. For example, as shown in FIG. 8A, the target image S includes two regions A and B to be recognized, and these regions A and B
Is expressed as a ratio of (R, G, B) and is (150, 0, 0) and (0, 76, 0), respectively, along the horizontal scanning line H on the target image S. The image data of each color is as shown in R, G, B in FIG. 8B, and the contrast images Fa, Fb of the regions A, B are

【0007】[0007]

【数2】Fa=0.30×150=45 Fb=0.59×76≒45## EQU2 ## Fa = 0.30 × 150 = 45 Fb = 0.59 × 76 ≒ 45

【0008】となるので、同図(b)に示すように、コ
ントラスト画像F上で領域A,Bを区別することができ
ない。
Therefore, as shown in FIG. 1B, the regions A and B cannot be distinguished on the contrast image F.

【0009】(2)特定の色の画像をコントラスト画像
とする方法 第2の方法は、特定の色を持つ領域を検出する際に、そ
の色の画像をカラー画像から分離してコントラスト画像
Fとする方法である。その色を例えば赤として、色ベク
トル(RGBの混合比)を(1,0,0)とすると、コ
ントラスト画像Fは、
(2) Method of Making Image of Specific Color a Contrast Image In the second method, when an area having a specific color is detected, the image of that color is separated from the color image, and a contrast image F How to Assuming that the color is red, for example, and the color vector (mixing ratio of RGB) is (1, 0, 0), the contrast image F is

【0010】[0010]

【数3】F=1・R+0・G+0・B=R## EQU3 ## F = 1 · R + 0 · G + 0 · B = R

【0011】のように変換される。この方法は、(1)
の方法に比べると、検出したい色を指定することができ
る分だけ柔軟性が高いと言える。しかし、検出したい色
の領域の隣接領域の色を考慮していないため、(1)の
方法と同様、色の異なる領域が区別できなくなることが
生じる。例えば図8(a)の領域Aが赤(150,0,
0)で、領域Bが黄色(150,150,0)である場
合、水平走査ラインHに沿った各色の画像データは、同
図(c)のR,G,Bのようになる。この場合、赤色領
域を検出しようとすると、同図(c)のようにコントラ
スト画像Fは、Rと等しくなるので、領域A,Bを区別
することができない。
Is converted as follows. This method uses (1)
It can be said that the method is more flexible than the method of (1) because the color to be detected can be specified. However, since the color of the area adjacent to the area of the color to be detected is not taken into consideration, it may be impossible to distinguish areas having different colors as in the method (1). For example, the area A in FIG. 8A is red (150, 0,
0), when the area B is yellow (150, 150, 0), the image data of each color along the horizontal scanning line H is as shown by R, G, B in FIG. In this case, if an attempt is made to detect a red area, the contrast image F becomes equal to R as shown in FIG. 3C, so that the areas A and B cannot be distinguished.

【0012】[0012]

【発明が解決しようとする課題】このように、従来のカ
ラー画像の単色変換方式では、対象のカラー画像におけ
る具体的な色配置に拘わらず、常に同じ計算式でコント
ラスト画像を抽出したり、隣接領域や背景領域の色を考
慮せずに抽出したい領域の色をコントラスト画像として
抽出しているので、抽出されたコントラスト画像上で色
の異なる領域を区別できないことがあるという問題があ
る。
As described above, in the conventional single-color conversion method for a color image, regardless of the specific color arrangement in the target color image, the contrast image is always extracted by the same calculation formula, Since the color of the region to be extracted is extracted as a contrast image without considering the color of the region or the background region, there is a problem that regions having different colors may not be distinguished on the extracted contrast image.

【0013】本発明は、このような点に鑑みなされたも
ので、色の異なる領域間の差異がコントラスト画像上で
最も顕著に現れるようにカラー画像からコントラスト画
像を抽出することができるカラー画像の単色変換方式を
提供することを目的とする。本発明はまた、そのような
カラー画像の単色変換方式を用いてカラー画像から対象
物の測定や認識処理を高精度に行うことを可能にする画
像処理方式を提供することを他の目的とする。
The present invention has been made in view of such a point, and a color image extracting apparatus capable of extracting a contrast image from a color image so that a difference between regions having different colors appears most conspicuously on the contrast image. An object of the present invention is to provide a monochromatic conversion method. Another object of the present invention is to provide an image processing method that enables highly accurate measurement and recognition processing of an object from a color image using such a color image single-color conversion method. .

【0014】[0014]

【課題を解決するための手段】本発明のカラー画像の単
色変換方式は、カラー画像の各色成分を所定の比率で合
成して単色のコントラスト画像を抽出するカラー画像の
単色変換方式において、前記カラー画像に含まれる識別
すべき各色の領域間でコントラスト差を強調するように
前記カラー画像の各色成分の比率を決定する変換ベクト
ルを算出する変換ベクトル算出手段と、この変換ベクト
ル算出手段で算出された変換ベクトルを用いて前記カラ
ー画像をコントラスト画像に変換するコントラスト画像
変換手段とを備えたことを特徴とする。
According to a first aspect of the present invention, there is provided a color image single-color conversion system for combining color components of a color image at a predetermined ratio to extract a single-color contrast image. Conversion vector calculation means for calculating a conversion vector for determining a ratio of each color component of the color image so as to emphasize a contrast difference between regions of each color to be identified included in the image, and conversion vector calculation means for calculating the conversion vector. Contrast image conversion means for converting the color image into a contrast image using a conversion vector.

【0015】本発明によれば、カラー画像に含まれる識
別すべき各色の領域間でコントラスト差を強調するよう
にカラー画像の各色成分の比率を決定するための変換ベ
クトルを使用してカラー画像からコントラスト画像を抽
出する。このため、従来のように固定的な演算や特定の
色を指定する方式とは異なり、隣接する領域間の色の違
いがコントラスト画像において強調されることになり、
異なる色の領域間を確実に区別することが可能になる。
According to the present invention, a color vector is converted from a color image by using a conversion vector for determining a ratio of each color component of the color image so as to emphasize a contrast difference between regions of each color to be identified included in the color image. Extract a contrast image. For this reason, unlike the conventional method of specifying a fixed operation or a specific color, the difference in color between adjacent areas is emphasized in the contrast image,
It is possible to reliably distinguish between areas of different colors.

【0016】なお、変換ベクトルとしては、例えばコン
トラスト画像の分散を最大にするものを用いることがで
き、好適には、前記カラー画像の各色成分の平均値を算
出し、これら各色成分の平均値と前記カラー画像を構成
する各カラー画素データとから前記カラー画像の分散共
分散行列を求め、この分散共分散行列の固有値のうち絶
対値が最大の固有値に対応する固有ベクトルを算出する
ことにより求められる。この方式によれば、対象とする
カラー画像に関する事前情報(領域中の識別すべき色の
特定等)が一切不要であるため、コントラスト画像生成
のための操作が極めて簡単になるという利点がある。
As the conversion vector, for example, a vector that maximizes the variance of the contrast image can be used. Preferably, the average value of each color component of the color image is calculated, and the average value of each color component is calculated. A variance-covariance matrix of the color image is obtained from each color pixel data constituting the color image, and an eigenvector corresponding to the largest eigenvalue of the eigenvalues of the variance-covariance matrix is obtained. According to this method, there is no need for prior information (such as identification of a color to be identified in an area) relating to a target color image, so that there is an advantage that an operation for generating a contrast image becomes extremely simple.

【0017】また、前記変換ベクトルは、前記カラー画
像に含まれる識別すべき各色の領域の代表色がそれぞれ
事前情報として与えられる場合には、前記識別すべき各
色の領域間で代表色を各色成分毎に比較して各色成分に
そのコントラストの大きさに応じた重みが付与されるよ
うに決定されるものでもよい。このように、事前情報と
して識別対象の各色の領域の代表色が与えられている
と、変換ベクトルの算出のための演算処理量を非常に少
なくすることができる。
Further, when the representative color of each color region to be identified included in the color image is given as advance information, the conversion vector is used to convert the representative color between each color region to be identified into each color component. Each color component may be determined so as to be weighted in accordance with the magnitude of the contrast for each color component. As described above, when the representative color of each color region to be identified is given as the advance information, the amount of calculation processing for calculating the conversion vector can be extremely reduced.

【0018】識別すべき各色の代表色を算出する方法と
しては、例えば次の2つの方式が考えられる。第1の方
式は、前記カラー画像の識別すべき各色の領域からそれ
ぞれ部分領域を指定するための領域指定手段を備え、前
記領域指定手段によってそれぞれ指定された各部分領域
の色の平均値を前記各領域の代表色として算出する。こ
の方式は、領域を指定する操作が必要になるが、代表色
を算出するための算出演算の処理量を少なくすることが
できるという利点がある。
As a method of calculating a representative color of each color to be identified, for example, the following two methods can be considered. The first method includes an area designating unit for designating a partial area from each color area to be identified of the color image, and calculates an average value of the colors of the partial areas respectively designated by the area designating unit. It is calculated as a representative color of each area. This method requires an operation of designating an area, but has the advantage that the amount of calculation for calculating a representative color can be reduced.

【0019】また、第2の方式は、前記カラー画像の各
色成分の平均値を算出し、これら各色成分の平均値と前
記カラー画像を構成する各カラー画素データとから前記
カラー画像の分散共分散行列を求め、この分散共分散行
列の固有値のうち絶対値が最大の固有値に対応する固有
ベクトルを算出し、三次元色空間上の前記固有ベクトル
の方向に前記カラー画像の各色成分の平均値を境として
前記各カラー画素データをグループ分けし、これら各グ
ループに属するカラー画素データの平均色を前記各領域
の代表色とする。この方式は、第1の方式よりも演算量
が増えるが、識別すべき各色が含まれるようにカラー画
像が得られれば、第1の方式のように領域の指定操作が
不要になるので、操作は簡単になる。
In a second method, an average value of each color component of the color image is calculated, and the variance-covariance of the color image is calculated from the average value of each color component and each color pixel data constituting the color image. A matrix is obtained, and among the eigenvalues of the variance-covariance matrix, the eigenvalue corresponding to the largest eigenvalue is calculated, and the average value of each color component of the color image is set as a boundary in the direction of the eigenvector on the three-dimensional color space. Each of the color pixel data is divided into groups, and the average color of the color pixel data belonging to each group is set as a representative color of each of the regions. This method requires a larger amount of calculation than the first method, but if a color image is obtained so as to include each color to be identified, the operation of specifying the area as in the first method becomes unnecessary. Becomes easy.

【0020】これらの方式は、被測定対象を撮像して得
られたカラー画像から、被測定対象の境界を検出してそ
の寸法や形状を計測する画像処理方式、並びに被認識対
象を撮像して得られたカラー画像から、被認識対象の境
界を検出して被認識対象を認識する画像処理方式等にお
いて、境界検出のためのコントラスト画像を得るのに応
用できる。そして、これらの画像処理方式によれば、白
黒画像を対象としたものよりもより多くの情報を含むカ
ラー画像から対象物を高精度に測定したり認識したりす
ることが可能になる。
These methods include an image processing method for detecting a boundary of an object to be measured from a color image obtained by imaging the object to be measured and measuring its size and shape, and an image processing method for imaging an object to be recognized. The present invention can be applied to obtaining a contrast image for detecting a boundary in an image processing method or the like for detecting a boundary of a recognition target from the obtained color image and recognizing the recognition target. According to these image processing methods, it is possible to measure and recognize a target object with high accuracy from a color image containing more information than a black and white image.

【0021】[0021]

【発明の実施の形態】以下、図面を参照してこの発明の
好ましい実施の形態について説明する。図1は、この発
明の実施例に係るカラー画像の単色変換方式の原理を説
明するための図である。図1(a)は、カラー画像から
なる対象画像Sを示したもので、この対象画像Sには、
識別すべき2つの領域A,Bが含まれている。ここで
は、この対象画像Sにおける水平走査ラインHに沿った
画像データから領域A,B間の差異が最も顕著に現れる
ようにコントラスト画像Fを抽出するための2つの方法
を例示する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram for explaining the principle of a color image monochromatic conversion system according to an embodiment of the present invention. FIG. 1A shows a target image S composed of a color image.
Two areas A and B to be identified are included. Here, two methods for extracting the contrast image F from the image data along the horizontal scanning line H in the target image S so that the difference between the regions A and B appears most remarkably will be exemplified.

【0022】(1)カラー画像からコントラスト画像を
抽出する方法(その1) 対象画像Sに含まれる各画素の座標値をij、画素ij
のカラー画素データをベクトル表現でCij=(Rij,
Gij,Bij)T、変換ベクトルをV=(Vr,Vg,
Vb)Tとすると、コントラスト画像Fの各画素データ
Fijは、下記数4のように求めることができる。
(1) Method of Extracting Contrast Image from Color Image (Part 1) Coordinate values of each pixel included in target image S are ij and pixel ij
Cij = (Rij,
Gij, Bij) T , and the conversion vector is V = (Vr, Vg,
Vb) Assuming that T , each pixel data Fij of the contrast image F can be obtained as in the following Expression 4.

【0023】[0023]

【数4】 Fij=CijTV =VrRij+VgGij+VbBij[Number 4] Fij = Cij T V = VrRij + VgGij + VbBij

【0024】コントラスト画像F上でコントラストを最
大にするには、コントラスト画像Fの分散Verを最大
にすればよい。コントラスト画像Fの分散Verは、下
記数5のように求められる。
In order to maximize the contrast on the contrast image F, the variance Ver of the contrast image F may be maximized. The variance Ver of the contrast image F is obtained as in the following Expression 5.

【0025】[0025]

【数5】 (Equation 5)

【0026】ここで、Nは対象画像Sを構成する画素の
数である。また、F(バー付き)は、コントラスト画像
Fの平均画素レベルであり、C(バー付き)をカラー
画像Cの平均画素レベルとすると、次のように表すこ
とができる。
Here, N is the number of pixels constituting the target image S. Further, F (with bars) is the average pixel level of the contrast image F, and when C (with bars) is the average pixel level of the color image C, it can be expressed as follows.

【0027】[0027]

【数6】 (Equation 6)

【0028】数4及び数6より、数5は数7のようにな
る。
From Equations 4 and 6, Equation 5 becomes Equation 7.

【0029】[0029]

【数7】 (Equation 7)

【0030】ここで、Aはカラー画像Cの分散共分
散行列で、下記数8のように表される。
Here, A is a variance-covariance matrix of the color image C, and is represented by the following equation (8).

【0031】[0031]

【数8】 (Equation 8)

【0032】数7のVerを最大とする変換ベクトル
Vは、分散共分散行列Aの固有値λのうち、絶対値
が最大の固有値λMAXに対応する固有ベクトルVとな
るので、周知の反復法を用いてこれを求めることができ
る。
Since the transform vector V that maximizes Ver in Equation 7 becomes the eigenvector V corresponding to the largest eigenvalue λ MAX among the eigenvalues λ of the variance-covariance matrix A, a well-known iterative method is used. You can ask for this.

【0033】即ち、まず分散供分散行列Aを求めた
後、Vの初期値として例えば(1,1,1)Tを与
え、下記数9の演算を複数回数繰り返して収束した値が
求める変換ベクトルVとなる。演算の回数は、処理速
度と精度との兼ね合いで適当に設定する。
That is, first, after obtaining the variance-dispersion matrix A, for example, (1,1,1) T is given as an initial value of V, and a conversion vector obtained by repeating the operation of the following equation 9 a plurality of times is obtained. V. The number of calculations is appropriately set in consideration of the processing speed and accuracy.

【0034】[0034]

【数9】V=AVV = AV

【0035】但し、この演算の過程でVは、Vr2
Vg2+Vb2=1となるように正規化されている必要が
ある。これにより、求められた変換ベクトルVを用い
て数4の演算を行い、目的とするコントラスト画像Fを
求めることができる。
However, in the course of this calculation, V becomes Vr 2 +
It must be normalized so that Vg 2 + Vb 2 = 1. As a result, the target contrast image F can be obtained by performing the operation of Expression 4 using the obtained conversion vector V.

【0036】例えば図1(a)の例において、領域Aの
面積と領域Bの面積の比が1:8であるとし、図1
(b)のように、領域Aの平均的なカラー画素データ
Cijが(150,0,0)T、領域Bの平均的なカラ
ー画素データCijが(0,76,0)Tである場合に
ついて考えると、各色の平均値は、
For example, in the example of FIG. 1A, it is assumed that the ratio of the area A to the area B is 1: 8.
As shown in (b), the case where the average color pixel data Cij of the area A is (150, 0, 0) T and the average color pixel data Cij of the area B is (0, 76, 0) T Considering that, the average value of each color is

【0037】[0037]

【数10】 (Equation 10)

【0038】のようになるので、分散共分散行列A
は、数11のようになる。
The variance-covariance matrix A
Is as shown in Expression 11.

【0039】[0039]

【数11】 [Equation 11]

【0040】この場合、反復法における1回の演算で収
束し、求められる変換ベクトルVは、V=(0.89
2,-0.452,0)Tとなる。そこで、コントラスト画像F
をF=0.892R−0.452Gとすると、図1の対象画像Sの
水平走査ラインHに沿ったコントラスト画像Fは、図1
(b)のようになり、隣接領域A,B間でコントラスト
の差が強調されるようなコントラスト画像Fを得ること
ができる。このようにコントラストを強調するために変
換ベクトルの一部の係数がマイナス値になることもこの
方式の一つの特徴と言える。
In this case, the conversion vector V converges by one operation in the iterative method, and the obtained conversion vector V is V = (0.89
2, -0.452, 0) T. Therefore, the contrast image F
Let F = 0.892R−0.452G, the contrast image F along the horizontal scanning line H of the target image S in FIG.
(B), it is possible to obtain a contrast image F in which the contrast difference between the adjacent areas A and B is emphasized. One feature of this method is that some coefficients of the conversion vector have negative values in order to enhance contrast.

【0041】また、図1(c)のように、領域Aの平均
的なカラー画素データCijが(150,0,0)T
領域Bの平均的なカラー画素データCijが(150,
150,0)Tである場合についても、上記と同様の計
算を行うと、変換ベクトルV=(0,−1,0)T
求められ、コントラスト画像Fは、F=−Gとなって、
図1(c)のように隣接領域A,B間のコントラスト差
が強調されることになる。
Further, as shown in FIG. 1C, the average color pixel data Cij of the area A is (150, 0, 0) T ,
The average color pixel data Cij of the area B is (150,
150, 0) T , when the same calculation is performed as above, a conversion vector V = (0, −1, 0) T is obtained, and the contrast image F becomes F = −G.
As shown in FIG. 1C, the contrast difference between the adjacent areas A and B is emphasized.

【0042】このように、コントラスト画像Fの分散の
最大値が得られるような変換ベクトルVを算出するこ
とにより、対象画像Sを与えるだけで、他の事前情報は
全く必要とせずに対象画像S内の各色の領域間のコント
ラスト差を強調するようなコントラスト画像Fを抽出す
ることができる。この方式は操作が簡単であるため、オ
ートモードに適している。
As described above, by calculating the conversion vector V that can obtain the maximum value of the variance of the contrast image F, the target image S is given only by providing the target image S without any other prior information. It is possible to extract a contrast image F that emphasizes a contrast difference between regions of each color in the image. This method is suitable for the auto mode because the operation is simple.

【0043】(2)カラー画像からコントラスト画像を
抽出する方法(その2) 上述した方法(その1)は、事前情報が不要である分、
演算処理がやや複雑であるが、事前情報として対象画像
Sに含まれる識別したい領域の色の情報が予め与えられ
ている場合には、以下に述べる方法が、少ない演算量で
済むという点で有利である。ここで必要となる事前情報
とは、識別したい領域、例えば図1(a)における領域
A,Bの色の代表色(Ra,Ga,Ba),(Rb,G
b,Bb)であり、この代表色としては、色の平均値や
予測値を用いることができる。変換ベクトルV=(V
r,Vg,Vb)Tは、下記数12のように求めること
ができる。
(2) Method for Extracting a Contrast Image from a Color Image (Part 2) The above-mentioned method (Part 1) requires no prior information.
Although the arithmetic processing is slightly complicated, when the information of the color of the region to be identified included in the target image S is given in advance as the advance information, the method described below is advantageous in that it requires a small amount of arithmetic. It is. The prior information required here is a region to be identified, for example, representative colors (Ra, Ga, Ba), (Rb, G) of the colors of the regions A and B in FIG.
b, Bb), and an average value or a predicted value of the color can be used as the representative color. Conversion vector V = (V
r, Vg, Vb) T can be obtained as in the following Expression 12.

【0044】[0044]

【数12】 (Equation 12)

【0045】これにより、得られた変換ベクトルVを
用いて数4の演算を行い、目的とするコントラスト画像
Fを求めることができる。この方法は、2つの領域A,
Bで、コントラスト差の小さい色成分は小さい重み、コ
ントラスト差の大きい色成分は大きい重みとなるように
変換ベクトルVの各係数を決定する方法であり、演算
量は先の方法に比べて遥かに少ないため、例えば同種対
象物の計測処理におけるリピートモード等に適してい
る。この方式で、図1(b),(c)の各場合の変換ベ
クトルを算出した場合でも、前記と同様、それぞれV
=(0.892,-0.452,0)T、V=(0,−1,0)T
求められる。
As a result, the operation of Equation 4 is performed using the obtained conversion vector V, and a target contrast image F can be obtained. This method has two regions A,
In B, each coefficient of the conversion vector V is determined so that a color component having a small contrast difference has a small weight and a color component having a large contrast difference has a large weight. Because it is small, it is suitable for, for example, a repeat mode in measurement processing of the same kind of object. Even when the conversion vector in each case of FIGS. 1B and 1C is calculated by this method, the V
= (0.892, -0.452,0) T, V = (0, -1,0) T is required.

【0046】この方法では、領域A,Bの代表色が予め
事前情報として与えられている必要がある。そこで、次
に領域A,Bの代表色を求める2つの方法について説明
する。 (2−1)領域A,Bの代表色を求める方法(その1) 図2に示すように、オペレータがマンマシンインタフェ
ースを使用して対象画像Sの識別したい領域A,Bから
部分領域Sa,Sbを指定する。領域A,Bの代表色
(Ra,Ga,Ba),(Rb,Gb,Bb)を下記数
13によって算出する。但し、Na,Nbはそれぞれ部
分領域Sa,Sbの画素数である。
In this method, the representative colors of the areas A and B need to be given in advance as information. Therefore, two methods for obtaining the representative colors of the areas A and B will be described next. (2-1) Method of Determining Representative Colors of Regions A and B (Part 1) As shown in FIG. 2, an operator uses a man-machine interface to extract partial regions Sa, Specify Sb. The representative colors (Ra, Ga, Ba) and (Rb, Gb, Bb) of the areas A and B are calculated by the following equation (13). Here, Na and Nb are the numbers of pixels in the partial areas Sa and Sb, respectively.

【0047】[0047]

【数13】 (Equation 13)

【0048】(2−2)領域A,Bの代表色を求める方
法(その2) カラー画像からコントラスト画像を抽出する方法(その
1)により、カラー画像の平均値R,G,B(バー付
き)と、変換ベクトルVとを算出する。次に、数14
のように、領域Aの代表色(Ra,Ga,Ba)を算出
する。NaはLij≧0の条件を満たす画素の数である。
(2-2) Method of Obtaining Representative Colors of Regions A and B (Part 2) The method of extracting a contrast image from a color image (Part 1) is used to obtain the average values R, G, B (with bars) of the color image. ) And a conversion vector V are calculated. Next, Equation 14
, The representative color (Ra, Ga, Ba) of the area A is calculated. Na is the number of pixels satisfying the condition Lij ≧ 0.

【0049】[0049]

【数14】 [Equation 14]

【0050】次に、数15のように、領域Bの代表色
(Rb,Gb,Bb)を算出する。NbはLij<0の条
件を満たす画素の数である。
Next, the representative color (Rb, Gb, Bb) of the area B is calculated as shown in Expression 15. Nb is the number of pixels that satisfy the condition of Lij <0.

【0051】[0051]

【数15】 (Equation 15)

【0052】この処理の意味を説明すれば次のようにな
る。即ち、いま、図3に示すようなカラー画像を表現す
るRGB空間を定義する。このRGB空間に数8で求め
たカラー画像の平均値(R,G,B)(バー付き)をプ
ロットすると図示のようになる。この平均値を通り、変
換ベクトルV=(Vr,Vg,Vb)を法線ベクトル
とする平面SVをRGB空間上に配置すると、この平面
SVを境にして対象画像Sの画素データを2つのグルー
プa,bに分けることができる。即ち、平面SVの変換
ベクトルVが指し示す方向の側に位置する画素は数1
4におけるLij≧0の条件を満たす画素であり、これを
グループaとする。また、平面SVの変換ベクトルV
が指し示す方向とは反対側に位置する画素は数15にお
けるLij<0の条件を満たす画素であり、これをグルー
プbとする。このように、対象画像Sに含まれる各画素
データを変換ベクトルVの軸上に投影し、得られた2
つの分布の平均値がそれぞれ領域A,Bの代表色(R
a,Ga,Ba),(Rb,Gb,Bb)である。
The meaning of this processing will be described as follows. That is, an RGB space that represents a color image as shown in FIG. 3 is defined. When the average value (R, G, B) (with a bar) of the color image obtained by Expression 8 is plotted in the RGB space, the result is as shown in the figure. When a plane SV that passes this average value and has a transformation vector V = (Vr, Vg, Vb) as a normal vector is arranged in the RGB space, the pixel data of the target image S is divided into two groups with the plane SV as a boundary. a and b. That is, the pixel located on the side of the plane SV in the direction indicated by the conversion vector V is expressed by the following equation (1).
The pixel satisfying the condition of Lij ≧ 0 in 4 is a group a. Also, the conversion vector V of the plane SV
The pixel located on the opposite side to the direction indicated by is a pixel that satisfies the condition of Lij <0 in Expression 15, and is referred to as a group b. As described above, each pixel data included in the target image S is projected onto the axis of the transformation vector V, and the obtained 2
The average value of the two distributions is the representative color (R
a, Ga, Ba) and (Rb, Gb, Bb).

【0053】なお、以上の説明では、カラー画像に含ま
れる色度情報のみならず明度情報も利用することを前提
としている。このため、色が同じで明度が異なる領域間
の識別も可能になる。もし、カラー画像から明度情報を
除去して色度情報のみの比較を行いたい場合には、各処
理の前段で、各カラー画素データCijを下記数16の
ように正規化して色度画像の画素データcijを求め、
この色度画像の画素データcijをカラー画素データと
して上記の各処理を実行すればよい。
In the above description, it is assumed that not only chromaticity information contained in a color image but also lightness information is used. For this reason, it is also possible to distinguish between regions having the same color but different lightness. If it is desired to remove the lightness information from the color image and compare only the chromaticity information, each color pixel data Cij is normalized as shown in the following Expression 16 in the preceding stage of each processing, and the pixel of the chromaticity image is obtained. Find data cij,
The above-described processing may be performed using the pixel data cij of the chromaticity image as color pixel data.

【0054】[0054]

【数16】c ij=(Rij,Gij,Bij)T/(Rij+Gij+Bi
j) =(rij,gij,bij)T
## EQU16 ## c ij = (Rij, Gij, Bij) T / (Rij + Gij + Bi
j) = (rij, gij, bij) T

【0055】この変換によって色度画像cは、r+g
+b=1となるが、実際の処理では、r+g+b=12
6のように、所定の値を利用すれば良い。このような変
換を行うと次のような利点がある。一般に画像計測や画
像認識の対象となるカラー画像は、対象物の形状や表面
物性、更には照明むらの影響で同じ色であっても同じ
R,G,B値を持つことは少ない。しかし、一般に同じ
色の領域において、明度のバラツキは大きくても色度の
バラツキは比較的少ないことが知られている。即ち、カ
ラー画像の色度情報は、光量変化や照明変化に比較的強
い性質を持っていると言える。従って、色度情報を主と
する処理を施すことにより、より安定な画像処理が可能
になる。
By this conversion, the chromaticity image c becomes r + g
+ B = 1, but in the actual processing, r + g + b = 12
A predetermined value, such as 6, can be used. Performing such a conversion has the following advantages. In general, a color image to be subjected to image measurement or image recognition rarely has the same R, G, and B values even if the color is the same due to the shape and surface physical properties of the object and the influence of uneven illumination. However, it is generally known that, in a region of the same color, variation in chromaticity is relatively small even though variation in brightness is large. That is, it can be said that the chromaticity information of the color image has a relatively strong property against a change in light amount and a change in illumination. Therefore, more stable image processing can be performed by performing processing mainly using chromaticity information.

【0056】次に、以上の方式を非接触画像計測システ
ムに具体的に適用した例について説明する。図4は、こ
の非接触画像計測システムの全体構成を示す斜視図であ
る。このシステムは、非接触画像計測型の三次元測定機
1と、この三次元測定機1を駆動制御すると共に、必要
なデータ処理を実行するコンピュータシステム2と、計
測結果をプリントアウトするプリンタ3とにより構成さ
れている。
Next, an example in which the above method is specifically applied to a non-contact image measurement system will be described. FIG. 4 is a perspective view showing the entire configuration of the non-contact image measurement system. The system includes a non-contact image measurement type coordinate measuring machine 1, a computer system 2 which controls the driving of the coordinate measuring machine 1 and executes necessary data processing, and a printer 3 which prints out measurement results. It consists of.

【0057】三次元測定機1は、次のように構成されて
いる。即ち、架台11上には、ワーク12を載置する測
定テーブル13が装着されており、この測定テーブル1
3は、図示しないY軸駆動機構によってY軸方向に駆動
される。架台11の両側縁中央部には上方に延びる支持
アーム14,15が固定されており、この支持アーム1
4,15の両上端部を連結するようにX軸ガイド16が
固定されている。このX軸ガイド16には、撮像ユニッ
ト17が支持されている。撮像ユニット17は、図示し
ないX軸駆動機構によってX軸ガイド16に沿って駆動
される。撮像ユニット17の下端部には、カラーCCD
カメラ18が測定テーブル13と対向するように装着さ
れている。また、撮像ユニット17の内部には、図示し
ない照明装置及びフォーカシング機構の他、カラーCC
Dカメラ18のZ軸方向の位置を移動させるZ軸駆動機
構が内蔵されている。
The CMM 1 is configured as follows. That is, a measurement table 13 on which a work 12 is placed is mounted on the gantry 11.
3 is driven in the Y-axis direction by a Y-axis drive mechanism (not shown). Support arms 14 and 15 extending upward are fixed to the center of both side edges of the gantry 11.
An X-axis guide 16 is fixed so as to connect both upper ends of the X-ray guides 4 and 15. An imaging unit 17 is supported by the X-axis guide 16. The imaging unit 17 is driven along the X-axis guide 16 by an X-axis driving mechanism (not shown). A color CCD is provided at the lower end of the imaging unit 17.
A camera 18 is mounted so as to face the measurement table 13. Further, in addition to a lighting device (not shown) and a focusing mechanism (not shown), a color CC
A Z-axis drive mechanism for moving the position of the D camera 18 in the Z-axis direction is built in.

【0058】コンピュータシステム2は、コンピュータ
本体21、キーボード22、ジョイスティックボックス
23、マウス24及びCRTディスプレイ25を備えて
構成されている。コンピュータ本体21は、例えば図5
に示すように構成されている。即ち、カラーCCDカメ
ラ18から入力されるカラー画像情報は、インタフェー
ス(以下、I/Fと呼ぶ)31を介してカラー画像メモ
リ32に格納される。カラー画像メモリ32に格納され
たカラー画像情報は、表示制御部33を介してCRTデ
ィスプレイ25に表示される。一方、キーボード22と
マウス24からのオペレータの指令は、I/F34を介
してCPU35に伝えられる。CPU35は、前記のオ
ペレータからの指令、又はプログラムメモリ36に格納
されたプログラムに従って、指定領域の対象画像からコ
ントラスト画像を抽出し、抽出されたコントラスト画像
からエッジを検出すると共に、ワーク12の寸法や形状
を計測するといった一連の処理を順次実行する。つま
り、CPU35と所定のプログラムとで本発明の変換ベ
クトル算出手段及びコントラスト画像抽出手段を構成す
る。また、ワークメモリ37は、CPU35での各種処
理のための作業領域を提供する。
The computer system 2 includes a computer main body 21, a keyboard 22, a joystick box 23, a mouse 24, and a CRT display 25. The computer body 21 is, for example, as shown in FIG.
It is configured as shown in FIG. That is, color image information input from the color CCD camera 18 is stored in a color image memory 32 via an interface (hereinafter, referred to as an I / F) 31. The color image information stored in the color image memory 32 is displayed on the CRT display 25 via the display control unit 33. On the other hand, operator commands from the keyboard 22 and the mouse 24 are transmitted to the CPU 35 via the I / F 34. The CPU 35 extracts a contrast image from the target image in the designated area in accordance with a command from the operator or a program stored in the program memory 36, detects edges from the extracted contrast image, and measures the size and the size of the work 12 A series of processes such as measuring a shape are sequentially executed. That is, the CPU 35 and the predetermined program constitute the conversion vector calculating means and the contrast image extracting means of the present invention. Further, the work memory 37 provides a work area for various processes in the CPU 35.

【0059】この計測システムは、例えばオートモード
とマニュアルモードとを備え、各モードにおいて、シン
グルモード、ティーチングモード及びリピートモードの
うちのいずれか1つの動作を実行する。CPU35は、
オートモードでは、対象画像から自動的にコントラスト
画像を抽出し、マニュアルモードでは、オペレータによ
るキーボード22とマウス24の操作で指定された部分
領域に基づいてコントラスト画像を抽出する。また、C
PU35は、これらの各モードにおいて、シングルモー
ドでは、与えられた対象画像から1回だけの計測を行
い、ティーチングモードでは、繰り返しの計測に必要な
事前情報(識別すべき領域の代表色等)と処理のシーケ
ンスとを測定のプログラムとしてプログラムメモリ36
に記録し、リピートモードでは、ティーチングモードで
プログラムメモリ36に記録された事前情報やプログラ
ムに従って同種のワーク12を連続的に計測するための
処理を実行する。
The measuring system includes, for example, an auto mode and a manual mode, and in each mode, executes any one of a single mode, a teaching mode, and a repeat mode. The CPU 35
In the auto mode, a contrast image is automatically extracted from a target image. In the manual mode, a contrast image is extracted based on a partial area specified by operating the keyboard 22 and the mouse 24 by the operator. Also, C
In each of these modes, the PU 35 performs only one measurement from a given target image in the single mode, and in the teaching mode, obtains prior information (representative color of an area to be identified) necessary for repeated measurement. The processing sequence and the measurement program are stored in the program memory 36.
In the repeat mode, a process for continuously measuring the same kind of work 12 is executed according to the advance information or the program recorded in the program memory 36 in the teaching mode.

【0060】図6は、オートモード時のコントラスト画
像抽出処理を示すフローチャートである。CPU35
は、まず、測定モードを判別し(S1)、測定モードが
シングルモードである場合には、前述したカラー画像か
らコントラスト画像を抽出する方法(その1)の手法を
使用してコントラスト画像Fを抽出する。即ち、対象画
像Sのカラー画素データの平均値R,G,B(バー付
き)を前述した数8に基づいて算出し(S2)、カラー
画像の分散共分散行列Aを数8に基づいて算出する
(S3)。そして、数9に示した反復法により、行列
Aの絶対値最大の固有値に対する固有ベクトルを変換
ベクトルVとして求め(S4)、得られた変換ベクト
ルVを使用してコントラスト画像Fを算出する(S
5)。
FIG. 6 is a flowchart showing a contrast image extracting process in the auto mode. CPU35
First, the measurement mode is determined (S1). If the measurement mode is the single mode, the contrast image F is extracted by using the above-described method (part 1) of extracting the contrast image from the color image. I do. That is, the average values R, G, and B (with bars) of the color pixel data of the target image S are calculated based on the aforementioned equation 8 (S2), and the variance-covariance matrix A of the color image is calculated based on the equation 8 (S3). Then, an eigenvector corresponding to the largest eigenvalue of the matrix A is obtained as a conversion vector V by the iterative method shown in Expression 9 (S4), and a contrast image F is calculated using the obtained conversion vector V (S4).
5).

【0061】測定モードがティーティングモードである
場合には(S1)、上述したシングルモード時と同様の
手法により行列Aの絶対値最大の固有値に対する固有
ベクトルを算出し(S6〜S8)、領域A,Bの代表色
を求める方法(その2)の手法を用いて、数14に基づ
き領域Aの代表色(Ra,Ga,Ba)を求め(S
9)、数15に基づき領域Bの代表色(Rb,Gb,B
b)を求める(S10)。そして、求めた領域A,Bの
代表色をプログラムメモリ36に記録する(S11)。
When the measurement mode is the teaching mode (S1), an eigenvector corresponding to the largest eigenvalue of the absolute value of the matrix A is calculated by the same method as in the single mode described above (S6 to S8). The representative color (Ra, Ga, Ba) of the area A is obtained based on the equation (14) by using the method of obtaining the representative color of B (No. 2) (S
9), the representative color (Rb, Gb, B
b) is determined (S10). Then, the representative colors of the obtained areas A and B are recorded in the program memory 36 (S11).

【0062】測定モードがリピートモードである場合に
は(S1)、ティーティングモードで予め記録されてい
る領域A,Bの代表色を読み込み(S12)、カラー画
像からコントラスト画像を抽出する方法(その2)の手
法を用い、数12に基づき変換ベクトルVを算出し
(S13)、得られた変換ベクトルVを使用してコン
トラスト画像Fを算出する(S14)。
If the measurement mode is the repeat mode (S1), the representative color of the areas A and B recorded in advance in the teaching mode is read (S12), and a contrast image is extracted from the color image (the method thereof). Using the method 2), the conversion vector V is calculated based on the equation 12 (S13), and the contrast image F is calculated using the obtained conversion vector V (S14).

【0063】一方、マニュアルモード時には、図7のよ
うな処理が実行される。まず、測定モードがシングルモ
ードである場合(S21)、オペレータの操作により、
部分領域Sa,Sbを指定する(S22)。続いて、領
域Saの平均色を領域Aの代表色として算出し(S2
3)、領域Sbの平均色を領域Bの代表色として算出す
る(S24)。そして、数12に基づいて変換ベクトル
Vを算出し(S25)、得られた変換ベクトルVを
使用してコントラスト画像Fを算出する(S26)。
On the other hand, in the manual mode, processing as shown in FIG. 7 is executed. First, when the measurement mode is the single mode (S21), the operator operates to
The partial areas Sa and Sb are specified (S22). Subsequently, the average color of the region Sa is calculated as the representative color of the region A (S2
3) The average color of the area Sb is calculated as the representative color of the area B (S24). Then, the conversion vector V is calculated based on Equation 12 (S25), and the contrast image F is calculated using the obtained conversion vector V (S26).

【0064】測定モードがティーチングモードである場
合には(S21)、シングルモードと同様にオペレータ
の操作により、部分領域Sa,Sbを指定し(S2
7)、領域Saの平均色を領域Aの代表色として算出す
ると共に(S23)、領域Sbの平均色を領域Bの代表
色として算出する(S24)。そして、求められた領域
A,Bの代表色をプログラムメモリ36に記録する(S
30)。
When the measurement mode is the teaching mode (S21), the partial areas Sa and Sb are designated by the operator as in the single mode (S2).
7) The average color of the area Sa is calculated as the representative color of the area A (S23), and the average color of the area Sb is calculated as the representative color of the area B (S24). Then, the obtained representative colors of the areas A and B are recorded in the program memory 36 (S
30).

【0065】リピートモードでは、ティーティングモー
ドで予め記録された領域A,Bの代表色を読み込み(S
31)、数12に基づき変換ベクトルVを算出し(S
32)、得られた変換ベクトルVを使用してコントラ
スト画像Fを算出する(S33)。
In the repeat mode, the representative colors of the areas A and B recorded in advance in the teaching mode are read (S
31), and calculates a conversion vector V based on Equation 12 (S
32), a contrast image F is calculated using the obtained conversion vector V (S33).

【0066】このように、各種の測定モードに適した算
出方法でコントラスト画像を抽出することにより、カラ
ー画像から識別したい各色の領域のコントラスト差が強
調されたコントラスト画像Fを抽出することができ、ワ
ーク12の寸法や形状を精度良く測定することが可能と
なる。
As described above, by extracting a contrast image by a calculation method suitable for various measurement modes, it is possible to extract a contrast image F in which the contrast difference of each color region to be identified is enhanced from the color image. The size and shape of the work 12 can be accurately measured.

【0067】なお、上記実施例では、非接触画像計測シ
ステムに本発明を適用した例について説明したが、本発
明は、画像認識装置等、コントラスト画像から必要な情
報を抽出するあるゆる画像処理システムに適用可能であ
ることはいうまでもない。
In the above embodiment, an example in which the present invention is applied to a non-contact image measurement system has been described. However, the present invention relates to any image processing system such as an image recognition device for extracting necessary information from a contrast image. It is needless to say that the present invention is applicable.

【0068】[0068]

【発明の効果】以上述べたようにこの発明によれば、カ
ラー画像に含まれる識別すべき各色の領域間でコントラ
スト差を強調するようにカラー画像の各色成分の比率を
決定するための変換ベクトルを使用してカラー画像から
コントラスト画像を抽出する。このため、従来のように
固定的な演算や特定の色を指定する方式とは異なり、隣
接する領域間の色の違いがコントラスト画像において強
調されることになり、異なる色の領域間を確実に区別す
ることが可能になるという効果を奏する。
As described above, according to the present invention, the conversion vector for determining the ratio of each color component of the color image so as to emphasize the contrast difference between the regions of each color to be identified included in the color image. Extract the contrast image from the color image using. For this reason, unlike the conventional method of specifying a fixed operation or specifying a specific color, the difference in color between adjacent areas is emphasized in the contrast image, and the area between different colors is reliably determined. This has the effect of enabling distinction.

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

【図1】 本発明の一実施例に係るカラー画像の単色変
換方式を説明するための図である。
FIG. 1 is a diagram for explaining a monochrome conversion method of a color image according to an embodiment of the present invention.

【図2】 同方式における2つの領域の代表値を求める
第1の方法を説明するための図である。
FIG. 2 is a diagram for explaining a first method for obtaining a representative value of two areas in the same method.

【図3】 同方式における2つの領域の代表値を求める
第2の方法を説明するための図である。
FIG. 3 is a diagram for explaining a second method for obtaining a representative value of two regions in the same method.

【図4】 同方式を適用した非接触画像計測システムの
斜視図である。
FIG. 4 is a perspective view of a non-contact image measurement system to which the method is applied.

【図5】 同システムにおけるコンピュータシステムの
構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a computer system in the system.

【図6】 同システムにおけるオートモードでのコント
ラスト画像の抽出手順を示すフローチャートである。
FIG. 6 is a flowchart showing a procedure for extracting a contrast image in an auto mode in the system.

【図7】 同システムにおけるマニュアルモードでのコ
ントラスト画像の抽出手順を示すフローチャートであ
る。
FIG. 7 is a flowchart showing a procedure for extracting a contrast image in a manual mode in the system.

【図8】 従来のカラー画像の単色変換方式を説明する
ための図である。
FIG. 8 is a diagram for explaining a conventional color image monochromatic conversion method.

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

1…三次元測定機、2…コンピュータシステム、3…プ
リンタ、11…架台、12…ワーク、13…測定テーブ
ル、14,15…支持アーム、16…X軸ガイド、17
…撮像ユニット、18…カラーCCDカメラ、21…コ
ンピュータ本体、22…キーボード、23…ジョイステ
ィックボックス、24…マウス、25…CRTディスプ
レイ、31,34…インタフェース、32…カラー画像
メモリ、33…表示制御部、35…CPU、36…プロ
グラムメモリ、37…ワークメモリ。
DESCRIPTION OF SYMBOLS 1 ... Coordinate measuring machine, 2 ... Computer system, 3 ... Printer, 11 ... Stand, 12 ... Work, 13 ... Measurement table, 14, 15 ... Support arm, 16 ... X-axis guide, 17
... Imaging unit, 18 ... Color CCD camera, 21 ... Computer body, 22 ... Keyboard, 23 ... Joystick box, 24 ... Mouse, 25 ... CRT display, 31,34 ... Interface, 32 ... Color image memory, 33 ... Display control unit , 35 CPU, 36 program memory, 37 work memory.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 カラー画像の各色成分を所定の比率で合
成して単色のコントラスト画像を抽出するカラー画像の
単色変換方式において、 前記カラー画像に含まれる識別すべき各色の領域間でコ
ントラスト差を強調するように前記カラー画像の各色成
分の比率を決定する変換ベクトルを算出する変換ベクト
ル算出手段と、 この変換ベクトル算出手段で算出された変換ベクトルを
用いて前記カラー画像をコントラスト画像に変換するコ
ントラスト画像変換手段とを備えたことを特徴とするカ
ラー画像の単色変換方式。
1. A color image monochromatic conversion method for combining color components of a color image at a predetermined ratio to extract a monochromatic contrast image, wherein a contrast difference between regions of each color to be identified included in the color image is determined. Conversion vector calculation means for calculating a conversion vector for determining a ratio of each color component of the color image so as to emphasize; and contrast for converting the color image into a contrast image using the conversion vector calculated by the conversion vector calculation means. A color conversion method for a color image, comprising: an image conversion unit.
【請求項2】 前記変換ベクトル算出手段は、前記コン
トラスト画像の分散を最大にする変換ベクトルを算出す
るものであることを特徴とする請求項1記載のカラー画
像の単色変換方式。
2. The color image monochromatic conversion method according to claim 1, wherein said conversion vector calculation means calculates a conversion vector that maximizes the variance of said contrast image.
【請求項3】 前記変換ベクトル算出手段は、前記カラ
ー画像の各色成分の平均値を算出し、これら各色成分の
平均値と前記カラー画像を構成する各カラー画素データ
とから前記カラー画像の分散共分散行列を求め、この分
散共分散行列の固有値のうち絶対値が最大の固有値に対
応する固有ベクトルを前記変換ベクトルとして算出する
ものであることを特徴とする請求項2記載のカラー画像
の単色変換方式。
3. The conversion vector calculation means calculates an average value of each color component of the color image, and calculates a variance of the color image based on the average value of each color component and each color pixel data constituting the color image. 3. A color image monochromatic conversion method according to claim 2, wherein a variance matrix is obtained, and an eigenvector corresponding to a largest eigenvalue among eigenvalues of the variance-covariance matrix is calculated as the conversion vector. .
【請求項4】 前記変換ベクトル算出手段は、事前情報
として与えられた前記カラー画像に含まれる識別すべき
各色の領域の代表色に基づいて、これら各色の領域間で
前記代表色を各色成分毎に比較して各色成分にそのコン
トラストの大きさに応じた重みが付与されるように前記
変換ベクトルを決定するものであることを特徴とする請
求項1記載のカラー画像の単色変換方式。
4. The conversion vector calculation means, based on a representative color of each color region to be identified included in the color image given as prior information, converts the representative color for each color component between these color regions. 2. A color image single-color conversion method according to claim 1, wherein the conversion vector is determined so that a weight corresponding to the magnitude of the contrast is given to each color component as compared with.
【請求項5】 前記カラー画像の識別すべき各色の領域
からそれぞれ部分領域を指定するための領域指定手段
と、 この領域指定手段によってそれぞれ指定された各部分領
域の色の平均値を前記各領域の代表色として算出する代
表色算出手段とを備え、 この代表色算出手段で算出された各領域の代表色を前記
変換ベクトル算出手段に供給するようにしたことを特徴
とする請求項4記載のカラー画像の単色変換方式。
5. An area designating means for designating a partial area from each color area to be identified in the color image, and calculating an average value of the colors of the partial areas designated by the area designating means in each of the areas. 5. A representative color calculating means for calculating as a representative color of the image data, wherein a representative color of each area calculated by the representative color calculating means is supplied to the conversion vector calculating means. A single color conversion method for color images.
【請求項6】 前記カラー画像の各色成分の平均値を算
出し、これら各色成分の平均値と前記カラー画像を構成
する各カラー画素データとから前記カラー画像の分散共
分散行列を求め、この分散共分散行列の固有値のうち絶
対値が最大の固有値に対応する固有ベクトルを算出し、
三次元色空間上の前記固有ベクトルの方向に前記カラー
画像の各色成分の平均値を境として前記各カラー画素デ
ータをグループ分けし、これら各グループに属するカラ
ー画素データの平均色を前記各領域の代表色として算出
する代表色算出手段を備え、 この代表色算出手段で算出された各領域の代表色を前記
変換ベクトル算出手段に供給するようにしたことを特徴
とする請求項4記載のカラー画像の単色変換方式。
6. An average value of each color component of the color image is calculated, and a variance-covariance matrix of the color image is obtained from the average value of each color component and each color pixel data constituting the color image. Calculating an eigenvector corresponding to the largest eigenvalue of the eigenvalues of the covariance matrix,
The color pixel data is grouped in the direction of the eigenvector on the three-dimensional color space with the average value of each color component of the color image as a boundary, and the average color of the color pixel data belonging to each group is represented by the representative color of each region. 5. The color image according to claim 4, further comprising: a representative color calculating unit that calculates a color as a color, wherein a representative color of each area calculated by the representative color calculating unit is supplied to the conversion vector calculating unit. Single color conversion method.
【請求項7】 前記カラー画像は、色度情報及び明度情
報を含むものであることを特徴とする請求項1〜6のい
ずれか1項記載のカラー画像の単色変換方式。
7. The color image monochromatic conversion method according to claim 1, wherein the color image includes chromaticity information and lightness information.
【請求項8】 前記カラー画像は、明度情報が除去され
た色度画像であることを特徴とする請求項1〜6のいず
れか1項記載のカラー画像の単色変換方式。
8. The color image monochromatic conversion method according to claim 1, wherein the color image is a chromaticity image from which lightness information has been removed.
【請求項9】 被測定対象を撮像して得られたカラー画
像から、請求項1〜8のいずれか1項に記載されたカラ
ー画像の単色変換方式によりコントラスト画像を抽出
し、この抽出されたコントラスト画像に対して前記被測
定対象の境界を検出することにより前記被測定対象の寸
法又は形状を計測することを特徴とする画像処理方式。
9. A contrast image is extracted from a color image obtained by imaging an object to be measured by a color image monochromatic conversion method according to any one of claims 1 to 8, and the extracted contrast image is extracted. An image processing method, wherein a size or a shape of the measured object is measured by detecting a boundary of the measured object with respect to a contrast image.
【請求項10】 被認識対象を撮像して得られたカラー
画像から、請求項1〜8のいずれか1項に記載されたカ
ラー画像の単色変換方式によりコントラスト画像を抽出
し、この抽出されたコントラスト画像に対して前記被認
識対象の境界を検出することにより前記被認識対象を認
識することを特徴とする画像処理方式。
10. A contrast image is extracted from a color image obtained by imaging an object to be recognized by a color image monochromatic conversion method according to any one of claims 1 to 8, and the extracted contrast image is extracted. An image processing method, wherein the recognition target is recognized by detecting a boundary of the recognition target in a contrast image.
JP29425696A 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image Expired - Fee Related JP3752031B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29425696A JP3752031B2 (en) 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29425696A JP3752031B2 (en) 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image

Publications (2)

Publication Number Publication Date
JPH10145612A true JPH10145612A (en) 1998-05-29
JP3752031B2 JP3752031B2 (en) 2006-03-08

Family

ID=17805372

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29425696A Expired - Fee Related JP3752031B2 (en) 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image

Country Status (1)

Country Link
JP (1) JP3752031B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7613359B2 (en) 2005-01-26 2009-11-03 Mitutoyo Corporation Single-chip color camera for high accuracy image measurements
CN101982834A (en) * 2010-09-09 2011-03-02 西安电子科技大学 Method for restraining speckles of polarized SAR data based on Bayes non-local mean value
CN110519481A (en) * 2018-05-21 2019-11-29 富士施乐株式会社 Information processing unit, information processing method and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7613359B2 (en) 2005-01-26 2009-11-03 Mitutoyo Corporation Single-chip color camera for high accuracy image measurements
CN101982834A (en) * 2010-09-09 2011-03-02 西安电子科技大学 Method for restraining speckles of polarized SAR data based on Bayes non-local mean value
CN110519481A (en) * 2018-05-21 2019-11-29 富士施乐株式会社 Information processing unit, information processing method and storage medium

Also Published As

Publication number Publication date
JP3752031B2 (en) 2006-03-08

Similar Documents

Publication Publication Date Title
EP1783685B1 (en) Image processing for point extraction
US20190180432A1 (en) Color Quality Assessment Based on Multispectral Imaging
US8526719B2 (en) Method of converting color image into grayscale image and recording medium storing program for performing the same
JP5257375B2 (en) Image processing apparatus and image processing method
US6774909B1 (en) Method and apparatus for transforming color image into monochromatic image
JP2008246631A (en) Object fetching equipment
WO2000073974A1 (en) Method and system for identifying an image feature
JP3752031B2 (en) Monochromatic conversion device and image processing device for color image
JPH1063859A (en) Method for evaluating picture quality and device therefor
CN109523594A (en) A kind of vision tray characteristic point coordinate location method and system
WO2003031956A1 (en) System and method for classifying workpieces according to tonal variations
JPH07146937A (en) Pattern matching method
CN113340405A (en) Bridge vibration mode measuring method, device and system
JP5509706B2 (en) Image processing apparatus and image processing method
JPH0856287A (en) Image discrimination device
JPH06251147A (en) Video feature processing method
JP2000155098A (en) Watermelon external appearance inspecting device
CN109592342A (en) A kind of vision cylindrical material material delivery method and system
KR100230446B1 (en) Determination method for color of light from color image
CN115063605B (en) Method for identifying color printing package by using electronic equipment
JP2000261677A (en) Processing unit
Aus et al. Computer color vision
JP2021189153A (en) Image processing system and image processing method
JP3061899B2 (en) Inspection equipment for printed matter
US20200218928A1 (en) Validation of candidate locations of a boundary

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050830

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051027

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20051122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051209

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111216

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees