JP2001216507A - Picture processing method, picture processor and recording medium - Google Patents

Picture processing method, picture processor and recording medium

Info

Publication number
JP2001216507A
JP2001216507A JP2000062691A JP2000062691A JP2001216507A JP 2001216507 A JP2001216507 A JP 2001216507A JP 2000062691 A JP2000062691 A JP 2000062691A JP 2000062691 A JP2000062691 A JP 2000062691A JP 2001216507 A JP2001216507 A JP 2001216507A
Authority
JP
Japan
Prior art keywords
value
threshold range
range
difference
pixel
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
JP2000062691A
Other languages
Japanese (ja)
Inventor
Yoshiaki Nishio
佳晃 西尾
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.)
Keyence Corp
Original Assignee
Keyence 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 Keyence Corp filed Critical Keyence Corp
Priority to JP2000062691A priority Critical patent/JP2001216507A/en
Publication of JP2001216507A publication Critical patent/JP2001216507A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a picture processing method, a picture processor and a recording medium which extend thresholds up to color component values other than those of colors displayed in a picture to stabilize an extraction result even in circumstances of uneven illumination. SOLUTION: Threshold ranges are set for the R value, the G value, the B value, the R-G value, the R-B value, and the G-B value in a pixel selected from a photographed picture, and pixels of which the R value, the G value, the B value, the R-G value, the R-B value, and the G-B value don't exceed these threshold ranges are extracted as pixels having the same color as the selected pixel, and the extraction result is displayed. When an instruction to extend the threshold ranges is given, histograms about the R value, the G value, the B value, the R-G value, the R-B value, and the G-B value are operated, and threshold ranges are extended on the basis of these histograms, and pixels are extracted on the basis of new threshold ranges.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像から色成分を
特徴量として色抽出する画像処理方法、その実施に使用
する画像処理装置、及びコンピュータを画像処理装置と
して機能させるためのコンピュータプログラムが記録さ
れている記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method for extracting a color component from an image as a feature quantity, an image processing apparatus used for implementing the method, and a computer program for causing a computer to function as the image processing apparatus. Related to a recording medium.

【0002】[0002]

【従来の技術】カラー画像の中から対象物を抽出するこ
とを目的とする抽出処理では、画像内に含まれる個々の
領域を識別することが重要であり、この領域を識別する
方法においては、画像をその濃度,色,テクスチャ等の
特徴量の均一な部分画像として識別する方法が一般的で
ある。
2. Description of the Related Art In an extraction process for extracting a target object from a color image, it is important to identify individual regions included in the image. In general, a method of identifying an image as a partial image having a uniform feature amount such as density, color, and texture is used.

【0003】色成分を特徴量として領域を識別する方法
は、様々な工業分野にて既に利用されており、例えば、
食品,薬品等の分野では、製品に貼り付けられた色付ラ
ベルの位置を検査する装置、また、混合製造ラインにお
ける製品又はそれを梱包するパッケージに印刷されたカ
ラーバーにより製品を識別する装置等に応用されてい
る。
A method of identifying a region using a color component as a feature has already been used in various industrial fields.
In the field of food, medicine, etc., a device for inspecting the position of a colored label attached to a product, a device for identifying a product on a mixed production line or a color bar printed on a package for packing the product, etc. Has been applied to

【0004】このような装置においては、カラーカメラ
等の撮影器を用いて製品等の対象物が撮影され、撮影画
像は画素毎のR値,G値,及びB値からなるアナログ信
号に分割された後で画像処理装置に取込まれ、取込まれ
たアナログのR値,G値,及びB値は、ディジタルのR
値,G値,及びB値に変換されて記憶装置に記憶され
る。画像処理装置は、記憶情報に基づいてCRT等の表
示装置に原画像を表示するとともに、原画像が表示され
た画面上にて移動自在に設けられたポインタを重畳して
表示させる。このポインタをマウス等の入力手段を用い
て操作し、原画像の中から抽出対象とする画素を選択す
る。次いで、選択された画素のR値,G値,及びB値
と、予め設定されたR値,G値,及びB値の各値に対す
る閾値の許容範囲とに基づいて、R値,G値,及びB値
の各値に対する閾値範囲が決定され、原画像中の各画素
のR値,G値,及びB値の各値が各閾値範囲を越えない
場合に抽出対象とする色と同一色であると判断して、こ
の同一色と判断された全ての画素領域を抽出して抽出結
果を表示装置に表示させる方法が用いられている。
In such an apparatus, an object such as a product is photographed using a photographing device such as a color camera, and the photographed image is divided into analog signals composed of R, G and B values for each pixel. The analog R value, G value, and B value that are captured by the image processing apparatus after the
The value is converted into a value, a G value, and a B value and stored in the storage device. The image processing apparatus displays the original image on a display device such as a CRT based on the stored information, and also displays a pointer movably provided on a screen on which the original image is displayed in a superimposed manner. The pointer is operated using input means such as a mouse to select a pixel to be extracted from the original image. Next, based on the R value, G value, and B value of the selected pixel, and the allowable range of the threshold value for each of the preset R value, G value, and B value, the R value, G value, And a threshold range for each value of the B value are determined, and when the values of the R value, G value, and B value of each pixel in the original image do not exceed the respective threshold ranges, the same color as the color to be extracted is used. A method is used in which all the pixel regions determined to be the same color are extracted and the extracted result is displayed on a display device.

【0005】しかし、このような方法では、照明むらが
発生する照明によっては、対象面の輝度に不均一が生じ
て抽出される領域が斑状となっていた。そこで、対象領
域をその全体に亘って抽出するために、設定した閾値範
囲が所要の範囲に至るまで、前記閾値範囲を所定量繰り
返し拡張する画像処理方法が用いられている。この画像
処理方法では、オペレータが表示装置に表示されている
抽出結果を監視しながら、前記閾値範囲の拡張を指示
し、この指示に伴って、各閾値範囲の上限値及び下限値
を夫々所定量加減することによって拡張し、新たな閾値
範囲によって画素領域を抽出し、この結果を表示装置に
表示する。これを繰り返し行うことによって、オペレー
タが所要の画素領域が抽出されていると判断するまで閾
値範囲を拡張することができる。
[0005] However, in such a method, depending on the illumination in which the illumination unevenness occurs, the brightness of the target surface becomes non-uniform, and the extracted area is patchy. Therefore, in order to extract the entire target region, an image processing method is used which repeatedly extends the threshold range by a predetermined amount until the set threshold range reaches a required range. In this image processing method, the operator instructs to extend the threshold range while monitoring the extraction result displayed on the display device, and in accordance with the instruction, sets the upper limit value and the lower limit value of each threshold range by a predetermined amount. The pixel area is expanded by adding and subtracting, a pixel area is extracted according to a new threshold range, and the result is displayed on a display device. By repeating this, the threshold range can be extended until the operator determines that the required pixel region has been extracted.

【0006】[0006]

【発明が解決しようとする課題】ところが、上述の如き
従来の画像処理方法では、閾値範囲の上限値及び下限値
を夫々所定量加減することによって前記閾値範囲を拡張
していたため、以下に説明するような理由によって、正
確に所要の閾値範囲とすることが困難であるという問題
があった。
However, in the conventional image processing method as described above, the threshold range is expanded by adding or subtracting the upper limit value and the lower limit value of the threshold range by a predetermined amount, respectively. For such reasons, there is a problem that it is difficult to accurately set the required threshold range.

【0007】図10はR値のヒストグラムの一例を示す
グラフである。図に示す如く、画像中のR値は、R
の区域と、R〜Rの区域と、R〜Rの区域
の3つの区域に集中して出現している。このうちR
の区域には、閾値範囲A1の下限値RL1と上限値
U1とが含まれている。一般的に、対象物上に同一色
にて着色されている部分が撮影された領域においては、
撮影環境によって色むら等が発生するため、画素によっ
て僅かに色が異なってしまう。従って、このような領域
を抽出したい場合には、領域内の色が全て含まれるよう
にR値,G値,及びB値に対して閾値範囲を設定する必
要がある。前記領域のR値(又はG値若しくはB値)
は、図中のR〜Rの区域のように集中して出現する
ため、R〜Rの区域を含むように、しかも他の領域
のR値の区間と考えられるR〜R及びR〜R
区域を含まないように閾値範囲を設定すればよい。
FIG. 10 is a graph showing an example of a histogram of R values. As shown in the figure, R values in the image are R 1 to R 1 .
And areas of R 2, and zone of R 3 to R 4, have appeared concentrated in three areas of areas of R 4 to R 5. R 3 ~
The area of the R 4, are included and the lower limit value R L1 and an upper limit value R U1 threshold range A1. Generally, in a region where a portion colored with the same color is photographed on an object,
Since color unevenness or the like occurs depending on the shooting environment, the color slightly differs depending on the pixel. Therefore, when it is desired to extract such an area, it is necessary to set a threshold range for the R value, the G value, and the B value so that all the colors in the area are included. R value (or G value or B value) of the area
Since appearing concentrated as areas of R 3 to R 4 in the figure, to include a zone of R 3 to R 4, moreover R 1 is considered as a section of the R values in the other regions to R The threshold range may be set so as not to include the areas 2 and R 4 to R 5 .

【0008】従来の画像処理方法のように、前記閾値範
囲A1の下限値RL1と上限値RU1とに夫々所定値を
加減した場合には、下限値RL2及び上限値RU2を有
する閾値範囲A2に拡張される。このとき、下限値R
L2はR〜Rの区域内に含まれていないが、上限値
U2はR〜Rの区域に含まれてしまい好ましくな
い。また、上限値がRになるように拡張した場合に
は、下限値が十分に拡張されず必要な閾値範囲が確保で
きない。
[0008] As in the conventional image processing method, when adjusting the respective predetermined value and the lower limit value R L1 and an upper limit value R U1 of the threshold range A1, the threshold with a lower limit value R L2 and the upper limit R U2 The range is extended to the range A2. At this time, the lower limit R
L2 is not included in the area of R 1 to R 2, but the upper limit value R U2 is undesirably included in the area of R 4 to R 5. The upper limit is when expanded so as to R 4 are required threshold range lower limit is not extended sufficiently can not be secured.

【0009】本発明は斯かる事情に鑑みてなされたもの
であり、色抽出のパラメータであるR値,G値,B値,
R−G値,R−B値,及びG−B値のうちの少なくとも
1つ値の各閾値範囲を設定した後で、R値,G値,B
値,R−G値,R−B値,及びG−B値のうちの少なく
とも1つの値についてヒストグラムを算出し、該ヒスト
グラムに基づいて各閾値範囲を段階的に拡張することに
より、不必要な色領域にまで閾値範囲を大きくすること
がなく、抽出結果の安定化を図ることができる画像処理
方法、その実施に使用する画像処理装置、及びコンピュ
ータを画像処理装置として機能させるためのコンピュー
タプログラムが記録されている記録媒体を提供すること
を目的とする。
The present invention has been made in view of such circumstances, and has R, G, and B values, which are parameters for color extraction.
After setting each threshold range of at least one of the RG value, the RB value, and the GB value, the R value, the G value, and the B value are set.
By calculating a histogram for at least one of the values, the RG value, the RB value, and the GB value and gradually expanding each threshold range based on the histogram, unnecessary An image processing method capable of stabilizing an extraction result without increasing a threshold range to a color region, an image processing device used for implementing the image processing method, and a computer program for causing a computer to function as an image processing device It is an object of the present invention to provide a recorded recording medium.

【0010】[0010]

【課題を解決するための手段】第1発明に係る画像処理
方法は、撮像手段により撮影され、画像表示手段の画面
上に表示された画像から、色抽出を行うために画素を選
択し、該選択された画素におけるR値,G値,B値,R
値及びG値の差分値,R値及びB値の差分値,並びにG
値及びB値の差分値のうち少なくとも1つのパラメータ
に対する値を基準に第1閾値範囲を設定し、上記画像中
の画素の中から該第1閾値範囲にある画素を抽出し、抽
出結果を表示後、順次抽出すべき画素範囲を拡大すべ
く、上記第1閾値範囲を拡張する画像処理方法におい
て、前記第1閾値範囲を設定する第1ステップと、上記
基準としてのパラメータにおいて、上記第1ステップで
設定された前記第1閾値範囲とそれ以外の非色抽出範囲
に存在する、画像内の画素の濃度分布で、最も第1閾値
範囲と近接する画素濃度と第1閾値範囲との間隔を算出
する第2ステップと、前記算出された間隔に基づいて、
第1閾値範囲を拡張する範囲を決定し、それに基づいた
第2閾値範囲を設定する第3ステップと、前記第2閾値
範囲に基づいて、その範囲に対応する画素を抽出する第
4ステップとを有することを特徴とする。
According to a first aspect of the present invention, there is provided an image processing method, wherein pixels are selected for color extraction from an image photographed by an imaging means and displayed on a screen of an image display means. R value, G value, B value, R at the selected pixel
Difference between G and G values, difference between R and B values, and G
A first threshold range is set based on a value for at least one parameter of the difference between the value and the B value, and a pixel in the first threshold range is extracted from the pixels in the image, and an extraction result is displayed. Then, in the image processing method for expanding the first threshold range so as to expand the pixel range to be sequentially extracted, the first step of setting the first threshold range and the first step of the parameter as the reference In the density distribution of the pixels in the image existing in the first threshold range set in the above and other non-color extraction ranges, the interval between the pixel density closest to the first threshold range and the first threshold range is calculated. Based on the second step and the calculated interval,
A third step of determining a range to extend the first threshold range and setting a second threshold range based on the third step; and a fourth step of extracting pixels corresponding to the range based on the second threshold range. It is characterized by having.

【0011】第2発明に係る画像処理方法は、第1発明
に係る画像処理方法において、前記第2ステップは、前
記非色抽出範囲に対して、第1閾値範囲からみた上限値
方向ならびに下限値方向の各々において、第1閾値範囲
と近接する画素濃度との間隔を算出することを特徴とす
る。
In the image processing method according to a second aspect of the present invention, in the image processing method according to the first aspect, the second step includes the step of setting an upper limit direction and a lower limit value of the non-color extraction range as viewed from a first threshold range. In each of the directions, an interval between the first threshold range and a pixel density adjacent thereto is calculated.

【0012】第3発明に係る画像処理方法は、第1発明
に係る画像処理方法において、前記第3ステップは、前
記間隔と予め定められた閾値とを比較し、前記間隔が閾
値より大きい場合は、予め定められた第1拡張値を前記
第1閾値範囲に加減することにより拡張範囲を設定し、
前記間隔が閾値より小さい場合は、前記第1拡張値より
小さい第2拡張値を前記第1閾値範囲に加減することに
よって設定することを特徴とする。
The image processing method according to a third aspect of the present invention is the image processing method according to the first aspect, wherein the third step compares the interval with a predetermined threshold value. Setting an extended range by adding or subtracting a predetermined first extended value to or from the first threshold range;
When the interval is smaller than a threshold value, the interval is set by adding or subtracting a second extension value smaller than the first extension value to the first threshold range.

【0013】第4発明に係る画像処理方法は、撮像手段
により撮影され、画像表示手段の画面上に表示された画
像から、色抽出を行うために画素を選択し、該選択され
た画素におけるR値,G値,B値,R値及びG値の差分
値,R値及びB値の差分値,並びにG値及びB値の差分
値のうち少なくとも1つのパラメータに対する値を基準
に第1閾値範囲を設定し、上記画像中の画素の中から該
第1閾値範囲にある画素を抽出し、抽出結果を表示後、
順次抽出すべき画素範囲を拡大すべく、上記第1閾値範
囲を拡張する画像処理方法において、前記第1閾値範囲
を設定する第1ステップと、上記基準としてのパラメー
タにおいて、各濃度における画素の出現頻度を算出する
第2ステップと、前記出現頻度に基づいて前記第1閾値
範囲を拡張する範囲を決定し、それに基づいた第2閾値
範囲を設定する第3ステップと、前記第2閾値範囲に基
づいて、その範囲に対応する画素を抽出する第4ステッ
プとを有することを特徴とする。
According to a fourth aspect of the present invention, in the image processing method, a pixel is selected for performing color extraction from an image photographed by an imaging unit and displayed on a screen of an image display unit, and R in the selected pixel is selected. A first threshold range based on a value for at least one of a parameter, a G value, a B value, a difference value between the R value and the G value, a difference value between the R value and the B value, and a difference value between the G value and the B value. Is set, and the pixels in the first threshold range are extracted from the pixels in the image, and after displaying the extraction result,
In the image processing method for expanding the first threshold range in order to expand the pixel range to be sequentially extracted, a first step of setting the first threshold range, and the appearance of pixels at each density in the parameter as the reference A second step of calculating a frequency, a third step of determining a range to extend the first threshold range based on the appearance frequency, and setting a second threshold range based on the third step; And extracting a pixel corresponding to the range.

【0014】第5発明に係る画像処理方法は、第1又は
第4発明に係る画像処理方法において、前記第1閾値範
囲の拡張は、前記第1ステップ後で且つ、第4ステップ
開始前までに、前記第1閾値範囲の拡張の指示を受けて
行われることを特徴とする。
The image processing method according to a fifth aspect of the present invention is the image processing method according to the first or fourth aspect, wherein the expansion of the first threshold range is performed after the first step and before the start of the fourth step. , In response to an instruction to extend the first threshold range.

【0015】第6発明に係る画像処理方法は、第4発明
に係る画像処理方法において、前記第3ステップは、前
記出現頻度に基づいて前記R値,G値,B値,R値及び
G値の差分値,R値及びB値の差分値,並びにG値及び
B値の差分値のうちの少なくとも1つについて出現頻度
が集中する区間を演算し、前記第1閾値範囲を含む区間
と、これに相隣る区間との間隔に基づいて第2閾値範囲
を設定することを特徴とする。
The image processing method according to a sixth aspect of the present invention is the image processing method according to the fourth aspect, wherein the third step includes the step of determining the R value, the G value, the B value, the R value, and the G value based on the appearance frequency. Calculating a section in which the appearance frequency is concentrated on at least one of the difference value of the R value, the difference value of the R value and the B value, and the difference value of the G value and the B value; The second threshold range is set based on the interval between adjacent sections.

【0016】第7発明に係る画像処理装置は、撮像手段
により撮影され、画像表示手段の画面上に表示された画
像から、色抽出を行うために画素を選択し、該選択され
た画素におけるR値,G値,B値,R値及びG値の差分
値,R値及びB値の差分値,並びにG値及びB値の差分
値のうち少なくとも1つのパラメータに対する値を基準
に第1閾値範囲を設定し、上記画像中の画素の中から該
第1閾値範囲にある画素を抽出し、抽出結果を表示後、
順次抽出すべき画素範囲を拡大すべく、上記第1閾値範
囲を拡張する画像処理装置において、前記第1閾値範囲
を設定する第1設定手段と、上記基準としてのパラメー
タにおいて、上記第1設定手段で設定された前記第1閾
値範囲とそれ以外の非色抽出範囲に存在する、画像内の
画素の濃度分布で、最も第1閾値範囲と近接する画素濃
度と第1閾値範囲との間隔を算出する算出手段と、該算
出手段によって算出された間隔に基づいて、第1閾値範
囲を拡張する拡張範囲を決定し、それに基づいた第2閾
値範囲を設定する第2設定手段と、該第2設定手段によ
って設定された第2閾値範囲に基づいて、その範囲に対
応する画素を抽出する抽出手段とを備えることを特徴と
する。
An image processing apparatus according to a seventh aspect of the present invention selects a pixel for performing color extraction from an image photographed by an image pickup unit and displayed on a screen of an image display unit, and selects R in the selected pixel. A first threshold range based on a value for at least one of a parameter, a G value, a B value, a difference value between the R value and the G value, a difference value between the R value and the B value, and a difference value between the G value and the B value. Is set, and the pixels in the first threshold range are extracted from the pixels in the image, and after displaying the extraction result,
In the image processing apparatus for expanding the first threshold range so as to sequentially expand the pixel range to be extracted, the first setting means for setting the first threshold range, and the first setting means for the parameter as the reference In the density distribution of the pixels in the image existing in the first threshold range set in the above and other non-color extraction ranges, the interval between the pixel density closest to the first threshold range and the first threshold range is calculated. Calculating means for determining, based on the interval calculated by the calculating means, an extended range for extending the first threshold range, and a second setting means for setting a second threshold range based on the extended range; Extracting means for extracting a pixel corresponding to the second threshold range set by the means based on the second threshold range.

【0017】第8発明に係る画像処理装置は、第7発明
に係る画像処理装置において、前記算出手段は、前記非
色抽出範囲に対して、第1閾値範囲からみた上限値方向
ならびに下限値方向の各々において、第1閾値範囲と近
接する画素濃度との間隔を算出すべくなしてあることを
特徴とする。
An image processing apparatus according to an eighth aspect of the present invention is the image processing apparatus according to the seventh aspect, wherein the calculating means is configured to set the non-color extraction range in an upper limit direction and a lower limit direction as viewed from a first threshold range. Is characterized by calculating an interval between the first threshold range and the pixel density adjacent thereto.

【0018】第9発明に係る画像処理装置は、第7発明
に係る画像処理装置において、前記第2設定手段は、前
記間隔が予め定められた閾値より大きいか否かを判別す
る判別手段と、該判別手段により、前記間隔が閾値より
大きいと判別された場合は、予め定められた第1拡張値
を前記第1閾値範囲に加減することにより拡張範囲を設
定する第1拡張範囲設定手段と、前記判別手段により、
前記間隔が閾値より小さいと判別された場合は、前記第
1拡張値より小さい第2拡張値を前記第1閾値範囲に加
減することによって拡張範囲を設定する第2拡張範囲設
定手段とを有することを特徴とする。
An image processing apparatus according to a ninth aspect of the present invention is the image processing apparatus according to the seventh aspect, wherein the second setting means determines whether the interval is greater than a predetermined threshold value, When the determination unit determines that the interval is greater than a threshold, a first extended range setting unit that sets an extended range by adding or subtracting a predetermined first extended value to or from the first threshold range; By the determining means,
When the interval is determined to be smaller than a threshold value, a second extended range setting means for setting an extended range by adding or subtracting a second extended value smaller than the first extended value to the first threshold range. It is characterized by.

【0019】第10発明に係る画像処理装置は、第7発
明に係る画像処理装置において、前記第1閾値範囲の拡
張の指示を受け付ける受付手段を備えることを特徴とす
る。
An image processing apparatus according to a tenth aspect of the present invention is the image processing apparatus according to the seventh aspect of the invention, further comprising a receiving unit that receives an instruction to extend the first threshold range.

【0020】第11発明に係る画像処理装置は、撮影し
た画像から選択された画素におけるR値,G値,B値,
R値及びG値の差分値,R値及びB値の差分値,並びに
G値及びB値の差分値のうちの少なくとも1つについて
第1閾値範囲を設定し、前記画像における任意の画素の
R値,G値,B値,R値及びG値の差分値,R値及びB
値の差分値,並びにG値及びB値の差分値のうちの少な
くとも1つが前記第1閾値範囲を越えない画素を抽出
し、抽出結果を表示する画像処理装置において、前記第
1閾値範囲を設定する第1設定手段と、前記第1閾値範
囲を記憶する記憶手段と、前記第1閾値範囲の拡張の指
示を受け付ける受付手段と、前記R値,G値,B値,R
値及びG値の差分値,R値及びB値の差分値,並びにG
値及びB値の差分値のうちの少なくとも1つの値につい
て画像中の出現頻度を演算する演算手段と、該出現頻度
に基づいて前記第1閾値範囲を拡張して第2閾値範囲を
設定し、該第2閾値範囲を前記記憶手段に記憶する拡張
手段と、前記画像における任意の画素のR値,G値,B
値,R値及びG値の差分値,R値及びB値の差分値,並
びにG値及びB値の差分値のうちの少なくとも1つが前
記第1閾値範囲又は第2閾値範囲を越えない画素を抽出
する抽出手段と、抽出結果を表示する表示手段とを備え
ることを特徴とする。
An image processing apparatus according to an eleventh aspect of the present invention provides an image processing apparatus comprising: an R value, a G value, a B value,
A first threshold range is set for at least one of a difference value between the R value and the G value, a difference value between the R value and the B value, and a difference value between the G value and the B value. Value, G value, B value, difference value of R value and G value, R value and B value
The first threshold range is set in an image processing apparatus that extracts a pixel in which at least one of a difference value between values and a difference value between a G value and a B value does not exceed the first threshold range and displays an extraction result. First setting means for performing the setting, storage means for storing the first threshold range, receiving means for receiving an instruction to extend the first threshold range, and R value, G value, B value, and R value.
Difference between G and G values, difference between R and B values, and G
Calculating means for calculating the appearance frequency in the image for at least one of the difference value between the value and the B value, and setting the second threshold range by expanding the first threshold range based on the appearance frequency; Expansion means for storing the second threshold value range in the storage means; R value, G value, and B value of an arbitrary pixel in the image;
Pixel in which at least one of the value, the difference between the R and G values, the difference between the R and B values, and the difference between the G and B values does not exceed the first threshold range or the second threshold range. It is characterized by comprising extraction means for extracting and display means for displaying the extraction result.

【0021】第12発明に係る画像処理装置は、第11
発明に係る画像処理装置において、前記拡張手段は、前
記出現頻度に基づいて前記R値,G値,B値,R値及び
G値の差分値,R値及びB値の差分値,並びにG値及び
B値の差分値のうちの少なくとも1つについて出現頻度
が集中する区間を演算する区間演算手段と、前記第1閾
値範囲を含む区間と、これに相隣る区間との間隔に基づ
いて第2閾値範囲を設定する第2設定手段とを有するこ
とを特徴とする。
The image processing apparatus according to the twelfth aspect is characterized in that
In the image processing apparatus according to the present invention, the expansion unit may be configured to determine the R value, the G value, the B value, the difference between the R and G values, the difference between the R and B values, and the G value based on the appearance frequency. And a section calculating means for calculating a section where the appearance frequency is concentrated for at least one of the difference values of the B value and the B value, based on an interval between a section including the first threshold range and a section adjacent thereto. And a second setting means for setting two threshold ranges.

【0022】第13発明に係る記録媒体は、コンピュー
タに、撮像手段により撮影され、画像表示手段の画面上
に表示された画像から、色抽出を行うために画素を選択
させ、該選択された画素におけるR値,G値,B値,R
値及びG値の差分値,R値及びB値の差分値,並びにG
値及びB値の差分値のうち少なくとも1つのパラメータ
に対する値を基準に第1閾値範囲を設定させ、上記画像
中の画素の中から該第1閾値範囲にある画素を抽出さ
せ、抽出結果を表示後、順次抽出すべき画素範囲を拡大
すべく、上記第1閾値範囲を拡張させるプログラムが記
録してあるコンピュータでの読み取りが可能な記録媒体
において、コンピュータに、前記第1閾値範囲を設定さ
せるプログラムコード手段と、上記基準としてのパラメ
ータにおいて、設定した前記第1閾値範囲とそれ以外の
非色抽出範囲に存在する、画像内の画素の濃度分布で、
最も第1閾値範囲と近接する画素濃度と第1閾値範囲と
の間隔を算出させるプログラムコード手段と、前記算出
された間隔に基づいて、第1閾値範囲を拡張する範囲を
決定させるプログラムコード手段と、決定した範囲に基
づいた第2閾値範囲を設定させるプログラムコード手段
と、前記第2閾値範囲に基づいて、その範囲に対応する
画素を抽出させるプログラムコード手段とを有するプロ
グラムが記録してあることを特徴とする。
A recording medium according to a thirteenth aspect of the present invention causes a computer to select a pixel for performing color extraction from an image photographed by an image pickup means and displayed on a screen of an image display means, and Value, G value, B value, R
Difference between G and G values, difference between R and B values, and G
A first threshold range is set based on a value for at least one parameter of the difference between the value and the B value, and a pixel in the first threshold range is extracted from the pixels in the image, and an extraction result is displayed. A program for causing a computer to set the first threshold range on a computer-readable recording medium on which a program for expanding the first threshold range is recorded so as to expand a pixel range to be sequentially extracted. Code means and, in the parameter as the reference, the density distribution of the pixels in the image existing in the set first threshold range and other non-color extraction ranges,
Program code means for calculating an interval between the pixel density closest to the first threshold range and the first threshold range; and program code means for determining a range for extending the first threshold range based on the calculated interval. And a program having program code means for setting a second threshold range based on the determined range, and program code means for extracting pixels corresponding to the second threshold range based on the second threshold range. It is characterized by.

【0023】第14発明に係る記録媒体は、コンピュー
タに、撮影した画像から選択された画素におけるR値,
G値,B値,R値及びG値の差分値,R値及びB値の差
分値,並びにG値及びB値の差分値のうちの少なくとも
1つについて第1閾値範囲を設定させ、前記画像におけ
る任意の画素のR値,G値,B値,R値及びG値の差分
値,R値及びB値の差分値,並びにG値及びB値の差分
値のうちの少なくとも1つが前記第1閾値範囲を越えな
い画素を選択された画素と同一色であるとして抽出さ
せ、抽出結果を表示させるプログラムが記録してあるコ
ンピュータでの読み取りが可能な記録媒体において、コ
ンピュータに、前記第1閾値範囲を設定させるプログラ
ムコード手段と、前記第1閾値範囲の拡張の指示を受け
付けさせるプログラムコード手段と、前記R値,G値,
B値,R値及びG値の差分値,R値及びB値の差分値,
並びにG値及びB値の差分値のうちの少なくとも1つの
値について画像中の出現頻度を演算させるプログラムコ
ード手段と、該出現頻度に基づいて前記第1閾値範囲を
拡張して第2閾値範囲を設定させるプログラムコード手
段と、設定された前記第2閾値範囲に基づいて画素を抽
出させるプログラムコード手段とを有するプログラムが
記録してあることを特徴とする。
According to a fourteenth aspect of the present invention, there is provided a computer-readable recording medium comprising:
A first threshold range is set for at least one of a G value, a B value, a difference value between the R value and the G value, a difference value between the R value and the B value, and a difference value between the G value and the B value; At least one of an R value, a G value, a B value, a difference value between the R value and the G value, a difference value between the R value and the B value, and a difference value between the G value and the B value of an arbitrary pixel in the first pixel. In a computer-readable recording medium storing a program for causing a pixel not exceeding the threshold range to have the same color as the selected pixel and having the same color as the selected pixel and displaying a result of the extraction, the computer provides the computer with the first threshold range Program code means for setting an R value, a G value, and a program code means for receiving an instruction to extend the first threshold range.
B value, difference value of R value and G value, difference value of R value and B value,
And program code means for calculating the appearance frequency in the image for at least one of the difference values of the G value and the B value, and expanding the first threshold range based on the appearance frequency to obtain a second threshold range. A program having program code means for setting and program code means for extracting pixels based on the set second threshold range is recorded.

【0024】第1発明、第4発明、第7発明、第11発
明、第13発明、及び第14発明による場合は、既に抽
出に用いられたR値,G値,B値,R値及びG値の差分
値,R値及びB値の差分値,並びにG値及びB値の差分
値のうちの少なくとも1つの各第1閾値範囲を、夫々の
ヒストグラムに基づいて拡張し、第2閾値範囲を設定し
て抽出する。これを繰り返すことにより、同一色と考え
られる対象領域だけを正確に抽出するための第2閾値範
囲を設定することができ、抽出結果の安定化を図ること
ができる。
According to the first, fourth, seventh, eleventh, thirteenth, and fourteenth inventions, the R, G, B, R, and G values already used for extraction are used. The first threshold range of at least one of the difference value of the value, the difference value of the R value and the B value, and the difference value of the G value and the B value is extended based on each histogram, and the second threshold range is expanded. Set and extract. By repeating this, it is possible to set the second threshold range for accurately extracting only the target region considered to be the same color, and to stabilize the extraction result.

【0025】第2発明、第6発明、第8発明、及び第1
2発明による場合は、ヒストグラムから出現頻度が集中
する区間(画素濃度)を求め、第1閾値範囲を含む区間
と、これに相隣る区間との間隔(又は第1閾値範囲と近
接する画素濃度との間隔)に基づいて、前記第1閾値範
囲を含む区間だけを含むように第2閾値範囲を設定す
る。図10に示すR値のヒストグラムによって、R
の区間とR〜Rの区間との間隔はR〜R
あることがわかり、R〜Rの区間とR〜Rの区
間とはRで接していることがわかる。従って、例え
ば、第1閾値範囲の下限値をR〜R間の一点に設定
し、上限値をRに設定するなどとすることにより、対
象領域のみを確実に抽出する第2閾値範囲を設定するこ
とができる。
The second invention, the sixth invention, the eighth invention, and the first invention
In the case of the second invention, a section (pixel density) where the appearance frequency is concentrated is obtained from the histogram, and the interval between the section including the first threshold range and the adjacent section (or the pixel density close to the first threshold range) is determined. The second threshold range is set so as to include only the section including the first threshold range based on the second threshold range. The histogram of R values shown in FIG. 10, R 1 ~
Interval between R 2 sections and R 3 to R 4 sections was found to be R 2 to R 3, and R 3 to R 4 sections and R 4 to R 5 of the section is in contact with R 4 You can see that. Therefore, for example, by setting the lower limit value of the first threshold range to one point between R 2 and R 3 and setting the upper limit value to R 4 , the second threshold range for reliably extracting only the target region is set. Can be set.

【0026】第3発明及び第9発明による場合は、第1
閾値範囲と近接する画素濃度との間隔を所定の閾値と比
較し、前記間隔が閾値より大きい場合には、第1拡張値
を第1閾値範囲に加減し、前記間隔が閾値より小さい場
合には、第2拡張値を第1閾値範囲に加減して、拡張範
囲を決定する。前記間隔が大きい場合には、第1閾値範
囲から大幅に範囲を広げる必要があり、前記間隔が小さ
い場合には、第1閾値範囲から大幅に範囲を広げたとき
に、抽出すべきでない濃度まで含んでしまうこととな
る。このため、第1拡張値は、第2拡張値よりも大きく
することにより、第1閾値範囲の拡張を適切に行うこと
ができ、対象領域のみを確実に抽出する第2閾値範囲を
設定することができる。
According to the third and ninth aspects, the first aspect
The interval between the threshold range and the pixel density adjacent thereto is compared with a predetermined threshold. If the interval is larger than the threshold, the first extended value is added to or subtracted from the first threshold range, and if the interval is smaller than the threshold, , The second extended value is added to or subtracted from the first threshold range to determine the extended range. If the interval is large, it is necessary to greatly expand the range from the first threshold range. If the interval is small, when the range is greatly expanded from the first threshold range, the density should not be extracted. Will be included. Therefore, by setting the first extension value larger than the second extension value, the first threshold range can be appropriately extended, and the second threshold range for reliably extracting only the target region is set. Can be.

【0027】第5発明、第10発明、第11発明、及び
第14発明による場合は、オペレータからの第1閾値範
囲の拡張の指示を受け付けたときに、第1閾値範囲を拡
張し、第2閾値範囲を設定することにより、第2閾値範
囲が所望の閾値範囲となるまで、第1閾値範囲の拡張を
繰り返し行うことができ、オペレータが抽出された画素
を表示画面によって確認しつつ適宜第1閾値範囲の拡張
の指示を与えることにより、対象領域のみを確実に抽出
する第2閾値範囲を設定することができる。
According to the fifth, tenth, eleventh, and fourteenth aspects of the present invention, when an instruction to extend the first threshold range is received from the operator, the first threshold range is extended and the second threshold range is extended. By setting the threshold range, the expansion of the first threshold range can be repeatedly performed until the second threshold range becomes a desired threshold range, and the operator checks the extracted pixels on the display screen and appropriately performs the first threshold range. By giving an instruction to extend the threshold range, it is possible to set the second threshold range for reliably extracting only the target area.

【0028】[0028]

【発明の実施の形態】以下本発明をその実施の形態を示
す図面に基づいて詳述する。図1は、本発明に係る画像
処理装置の構成を示すブロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to the drawings showing the embodiments. FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to the present invention.

【0029】図1において、1は撮影対象となる例えば
製造ライン上の薬品チューブ等のワークであり、その側
面には色付ラベル11が貼り付けられている。ワーク1
は、その上方に設けられたカラーカメラ2により撮影さ
れ、撮影された原画像のアナログのR値,G値,及びB
値をカラーカメラ2に接続された画像処理装置3に与え
る。
In FIG. 1, reference numeral 1 denotes a work such as a chemical tube on a production line to be photographed, and a colored label 11 is attached to a side surface thereof. Work 1
Are analog R-values, G-values, and B-values of the original image taken by the color camera 2 provided thereabove.
The value is given to the image processing device 3 connected to the color camera 2.

【0030】画像処理装置3は、A/D変換器等を用い
てなる画像入力部31、演算処理を行なうCPU32、
本発明のプログラムが記録されているCD−ROM又は
フレキシブルディスク等の可搬型記録媒体6から本発明
に係る画像処理装置のプログラムを読み取るCD−RO
Mドライブ又はフレキシブルディスクドライブ等からな
る外部記憶装置35、CPU32から与えられる情報及
び外部記憶装置35により読み取った本発明のプログラ
ムを格納するメモリ34、D/A変換器等を用いてなる
画像出力部33、及び外部と通信を行うための通信イン
タフェース36を備えてなる。
The image processing device 3 includes an image input unit 31 using an A / D converter and the like, a CPU 32 for performing arithmetic processing,
CD-RO for reading the program of the image processing apparatus according to the present invention from a portable recording medium 6 such as a CD-ROM or a flexible disk on which the program of the present invention is recorded
An external storage device 35 such as an M drive or a flexible disk drive; a memory 34 for storing information provided from the CPU 32 and a program of the present invention read by the external storage device 35; an image output unit using a D / A converter or the like 33, and a communication interface 36 for communicating with the outside.

【0031】画像処理装置3は、通信インタフェース3
6により通信ネットワーク70に接続されている。この
通信ネットワーク70はルータ等の接続装置71により
インターネット等の外部ネットワーク回線72に接続さ
れている。
The image processing device 3 includes a communication interface 3
6 is connected to the communication network 70. The communication network 70 is connected to an external network line 72 such as the Internet by a connection device 71 such as a router.

【0032】本発明に係る画像処理装置のプログラムは
可搬型記録媒体6から読み取る以外にも、外部ネットワ
ーク回線72を介して外部サーバコンピュータ73に接
続し、外部サーバコンピュータ73に内蔵された前記プ
ログラムを記録してある記録媒体74から画像処理装置
3へ前記プログラムをダウンロードすることによりメモ
リ34に格納することによって、画像処理装置3は後述
する本発明の画像処理装置における処理手順を実行する
ことができる。
The program of the image processing apparatus according to the present invention is connected to an external server computer 73 via an external network line 72 in addition to reading the program from the portable recording medium 6, and executes the program stored in the external server computer 73. By downloading the program from the recorded recording medium 74 to the image processing apparatus 3 and storing the program in the memory 34, the image processing apparatus 3 can execute a processing procedure in the image processing apparatus of the present invention described later. .

【0033】画像入力部31は、カラーカメラ2から与
えられたアナログのR値,G値,及びB値をディジタル
のR値,G値,及びB値に変換してCPU32に与え
る。CPU32は、与えられたR値,G値,及びB値を
メモリ34に格納するとともに、このR値,G値,及び
B値を画像出力部33に与える。画像出力部33は、与
えられたディジタルのR値,G値,及びB値をアナログ
のR値,G値,及びB値に変換し、これを画像処理装置
3に接続されたCRT等の表示装置5に原画像を出力
し、図2に示す如き表示画面51を表示させるととも
に、表示画面51に表示される原画像の画像情報をメモ
リ34に格納するようにしてある。
The image input unit 31 converts the analog R value, G value, and B value given from the color camera 2 into digital R value, G value, and B value, and supplies the digital R value, G value, and B value to the CPU 32. The CPU 32 stores the given R value, G value, and B value in the memory 34, and provides the R value, G value, and B value to the image output unit 33. The image output unit 33 converts the given digital R, G, and B values into analog R, G, and B values, and displays them on a CRT or the like connected to the image processing apparatus 3. The original image is output to the device 5 and a display screen 51 as shown in FIG. 2 is displayed, and the image information of the original image displayed on the display screen 51 is stored in the memory 34.

【0034】図2は、表示画面51を示す模式図であ
る。表示画面51は、左右に2つの領域に分割され、そ
の左方の領域には、撮影された原画像又は抽出結果を表
示する画像表示領域51aが設けられている。図2にお
ける画像表示領域51aには、色付ラベル11の原画像
が表示され、原画像には、色付ラベル11の略白色の背
景に黄色,緑色,青色,及び赤色の2つ〜3つの円形模
様が夫々着色されている部分を表示してある。また、表
示画面51に重畳して、入力手段4からの入力操作に応
じて動作するポインタpが表示画面51内での移動自在
に設けられており、このポインタpを、画面上に表示さ
れている原画像の中から抽出対象とする色を有する画素
上に配置させ、その状態で例えば、上述した入力手段4
に設けられた図示しない決定ボタンを押すことにより、
その抽出対象としての画素を特定できるようになってい
る。また、このポインタpを用いた抽出対象としての画
素の特定方法としては、上述した入力手段4を用いる方
法以外に、このポインタpをマウス等の外部からの操作
手段により抽出対象位置に位置させ、クリック操作もあ
る。入力手段4からは、R値,G値,及びB値に加え
て、これらの値の差分値であるR−G値,B−G値,及
びR−B値3つ差分値の閾値の許容範囲である色抽出の
感度kが数値で入力される。この色抽出の感度kとは、
上述した抽出対象位置、つまり抽出された対象画像の持
つ濃度に対し、若干の幅を持たせるために設定されてい
るもので、その程度や必要性については、使用条件等に
より変化するものである。
FIG. 2 is a schematic diagram showing the display screen 51. The display screen 51 is divided into two regions on the left and right sides, and an image display region 51a for displaying a captured original image or an extraction result is provided in the left region. The original image of the colored label 11 is displayed in the image display area 51a in FIG. 2, and the original image has two to three colors of yellow, green, blue, and red on a substantially white background of the colored label 11. The portions where the circular patterns are colored are displayed. Further, a pointer p that operates in response to an input operation from the input unit 4 is provided movably on the display screen 51 so as to be superimposed on the display screen 51, and the pointer p is displayed on the screen. From the original image that is to be extracted, and placed on a pixel having a color to be extracted.
By pressing the OK button (not shown) provided in
A pixel to be extracted can be specified. As a method of specifying a pixel to be extracted using the pointer p, in addition to the method using the input means 4 described above, the pointer p is positioned at an extraction target position by an external operation means such as a mouse. There is also a click operation. From the input means 4, in addition to the R value, the G value, and the B value, a threshold value of three difference values of the RG value, the BG value, and the RB value is set. The sensitivity k of the color extraction, which is the range, is input as a numerical value. The sensitivity k of this color extraction is
The above-described extraction target position, that is, the density set in the extracted target image is set to have a certain width, and the degree and necessity vary depending on use conditions and the like. .

【0035】また、表示画面51の右方には、感度k
と、非抽出対象となる画面領域(背景)の表示色と、抽
出処理をするセンタク・モードと、第1閾値範囲の拡張
処理をした後で抽出処理するオート・モードとを設定す
る設定領域51bが設けられている。感度kは、メモリ
34に格納されているR値,G値,B値,R−G値,B
−G値,及びR−B値に対する単一の感度kが表示され
ており、数値が設定されるようになっている。また、背
景色は、予めメモリ34に格納されている黒色,白色,
青色等の色情報から入力手段4により選択し、選択され
た色を示す「クロ」等の文字が表示されている。また、
センタク・モードは、選択された抽出対象とする画素の
R値,G値,B値,R−G値,B−G値,及びR−B値
の各パラメータに対して第1閾値範囲を演算し、演算さ
れた第1閾値範囲に基づいて、その全てのパラメータの
第1閾値範囲を満足する画素を抽出処理し、オート・モ
ードは、R値,G値,B値,R−G値,B−G値,及び
R−B値の各パラメータに対してヒストグラムを演算
し、上記演算された第1閾値範囲に該ヒストグラムに基
づき、設定された拡張値を加算又は減算することにより
拡張し、拡張された第2閾値範囲に基づいて抽出処理す
るようになっており、入力手段4により何れかを選択す
ることによりセンタク・モード又はオート・モードとな
る。なお、これら設定情報は、メモリ34に格納され
る。
On the right side of the display screen 51, the sensitivity k
A setting area 51b for setting a display color of a screen area (background) to be a non-extraction target, a select mode for performing extraction processing, and an auto mode for performing extraction processing after extending the first threshold range. Is provided. The sensitivity k is calculated based on the R value, G value, B value, RG value, and B value stored in the memory 34.
A single sensitivity k for the G value and the RB value is displayed, and a numerical value is set. The background colors are black, white,
Characters such as “black” indicating the selected color are displayed by selecting from the color information such as blue by the input means 4. Also,
In the select mode, a first threshold range is calculated for each of the R value, G value, B value, RG value, BG value, and RB value parameters of the selected pixel to be extracted. Then, based on the calculated first threshold range, a pixel that satisfies the first threshold range of all the parameters is extracted and processed. The auto mode sets the R value, G value, B value, RG value, A histogram is calculated for each parameter of BG value and RB value, and expansion is performed by adding or subtracting a set expansion value to the calculated first threshold range based on the histogram, Extraction processing is performed based on the extended second threshold range, and selection of either of them by the input means 4 results in selection mode or auto mode. The setting information is stored in the memory 34.

【0036】メモリ34には、上述した画像表示領域5
1aの画像情報に加えて、抽出結果を表示する等して画
面が更新されるのに応じて画像情報が時系列的に格納さ
れるほか、上述の如き第1閾値範囲の拡張値が格納され
ている。
The memory 34 stores the image display area 5 described above.
In addition to the image information of 1a, the image information is stored in chronological order as the screen is updated, such as by displaying the extraction result, and the extended value of the first threshold range as described above is stored. ing.

【0037】図3は、本発明に係る画像処理装置の処理
手順を示すフローチャートであり、センタク・モードで
の抽出処理を示している。CPU32は、まず、原画像
内の全ての画素についてR値,G値,及びB値を取込ん
でメモリ34に格納する(ステップ1)。次いで、メモ
リ34に格納されたR値,G値,及びB値を取り込み、
この結果に基づいて、R−G値,B−G値,及びR−B
値の3つ差分値を各画素に対応させて演算し(ステップ
2)、ポインタpを用いて抽出対象とする色を有する画
面上の位置がCPU32に入力されるのに伴って、感度
kをメモリ34から読み込む(ステップ3)。
FIG. 3 is a flowchart showing the processing procedure of the image processing apparatus according to the present invention, and shows the extraction processing in the select mode. First, the CPU 32 fetches the R value, the G value, and the B value for all the pixels in the original image and stores them in the memory 34 (step 1). Next, the R value, the G value, and the B value stored in the memory 34 are fetched,
Based on this result, the RG value, the BG value, and the RB
The three difference values are calculated in correspondence with each pixel (step 2), and the sensitivity k is changed as the position on the screen having the color to be extracted is input to the CPU 32 using the pointer p. The data is read from the memory 34 (step 3).

【0038】ステップ1にて取り込まれたR値,G値,
及びB値と、ステップ2にて演算されたR−G値,B−
G値,及びR−B値と、ステップ3にて読み込んだ感度
kとからR値,G値,B値,R−G値,B−G値,及び
R−B値の各値に対して、R−k〜R+k,G−k〜G
+k,B−k〜B+k,(R−G)−k〜(R−G)+
k,(B−G)−k〜(B−G)+k,及び(R−B)
−k〜(R−B)+kを夫々上限値及び下限値とするR
値,G値,B値,R−G値,B−G値,及びR−B値の
第1閾値範囲を演算する(ステップ4)。
The R value, G value captured in step 1,
, B value and the RG value, B−
From the G value, the RB value, and the sensitivity k read in step 3, the R value, the G value, the B value, the RG value, the BG value, and the RB value are calculated. , R−k to R + k, G−k to G
+ K, Bk to B + k, (RG) -k to (RG) +
k, (BG) -k to (BG) + k, and (RB)
R where −k to (RB) + k are the upper limit and the lower limit, respectively.
A first threshold range of the value, the G value, the B value, the RG value, the BG value, and the RB value is calculated (step 4).

【0039】次いで、原画像内の全ての画素を対応する
各第1閾値範囲と比較し(ステップ5)、R値,G値,
B値,R−G値,B−G値,及びR−B値の全ての値が
第1閾値範囲内である場合には、比較した画素が抽出対
象となる画素と同一色である抽出色であると判断し、各
画素に応じたR値,G値,及びB値を画像出力部33に
出力する(ステップ6)。また、R値,G値,B値,R
−G値,B−G値,又はR−B値の何れかの値が第1閾
値範囲外である場合には、背景色であると判断し、設定
されている背景色に基づいた色成分値を演算し(ステッ
プ7)、この画素に応じた色成分値を画像出力部33に
出力し(ステップ8)、画像表示領域51aの表示内容
を更新させるとともに、抽出結果の画面情報と、ステッ
プ4にて演算された各第1閾値範囲とをメモリ34に格
納する(ステップ9)。なお、画像表示領域51aの表
示内容は、更新の都度、メモリ34に格納してあるの
で、誤って対象外の画素を抽出した場合にも、設定領域
51bの図示しない抽出取消メニューを選択することに
より、更新前の表示内容を再度表示させることができる
ようになっている。ここでは、第1閾値範囲を決定する
方法として、ポインタpによって選択、抽出された画素
における各パラメータであるR値,G値,B値,R−G
値,B−G値,及びR−B値に感度kを加えることで、
閾値として幅を持たすようにしたが、画像処理のニーズ
によっては、この感度kを「0」とし、第1閾値範囲を
特定の単一の値としてもよい。また、第1閾値範囲に幅
を持たせる方法としては、この第1閾値範囲設定時にユ
ーザにポインタpを複数画素をクリックさせることを前
提とすることにより、画面を目視する上では同一色と見
える複数画素に対する、R値,G値,B値,R−G値,
B−G値,及びR−B値を算出し、この各パラメータの
第1閾値範囲に幅を持たせることも可能である。もちろ
ん、上述した複数の画素をクリックし、更にそれによっ
て得られた各パラメータにおける値(数値範囲)に感度
kを加算することにより、第1閾値範囲を設定してもよ
い。
Next, all the pixels in the original image are compared with the corresponding first threshold ranges (step 5), and the R value, G value,
When all of the B value, the RG value, the BG value, and the RB value are within the first threshold range, an extracted color in which the compared pixel has the same color as the pixel to be extracted Is determined, and the R, G, and B values corresponding to each pixel are output to the image output unit 33 (step 6). Also, R value, G value, B value, R value
If any of the G value, the BG value, or the RB value is outside the first threshold range, it is determined to be the background color, and the color component based on the set background color The value is calculated (step 7), the color component value corresponding to this pixel is output to the image output unit 33 (step 8), the display content of the image display area 51a is updated, and the screen information of the extraction result and the step Each of the first threshold ranges calculated in step 4 is stored in the memory 34 (step 9). Note that the display contents of the image display area 51a are stored in the memory 34 each time an update is performed. Therefore, even when a pixel that is not a target is erroneously extracted, the extraction cancel menu (not shown) of the setting area 51b may be selected. Thus, the display content before the update can be displayed again. Here, as a method of determining the first threshold range, each parameter of the pixel selected and extracted by the pointer p, that is, R value, G value, B value, and RG
Value, BG value, and RB value by adding sensitivity k,
Although the threshold has a width, the sensitivity k may be set to “0” and the first threshold range may be a specific single value depending on the needs of image processing. Further, as a method of providing a width to the first threshold range, it is assumed that the user clicks a plurality of pixels with the pointer p at the time of setting the first threshold range, so that the screen looks the same color when viewed. R value, G value, B value, RG value,
It is also possible to calculate the BG value and the RB value, and to give a range to the first threshold range of each parameter. Of course, the first threshold range may be set by clicking the plurality of pixels described above and further adding the sensitivity k to the value (numeric range) of each parameter obtained thereby.

【0040】図4は、抽出結果の一例を示す模式図であ
り、原画像の青色領域をポインタpにて選択し、この青
色領域の一部が抽出された状態を示している。図5にお
いて、抽出対象となる青色領域はその一部を斑状に抽出
されている。これは、照明むら等の要因から生じるもの
である。
FIG. 4 is a schematic diagram showing an example of the extraction result, in which a blue region of the original image is selected by the pointer p, and a part of the blue region is extracted. In FIG. 5, a part of a blue region to be extracted is extracted in a patchy manner. This is caused by factors such as uneven illumination.

【0041】図5,6は、本発明に係る画像処理装置の
処理手順を示すフローチャートであり、オート・モード
での抽出処理を示している。また、図7は、オート・モ
ードによる抽出結果の一例を示す模式図である。センタ
ク・モードで抽出処理された後、オート・モードを選択
するのに伴って、CPU32は、まず、R値,G値,B
値,R−G値,B−G値,及びR−B値の各パラメータ
単位で、ヒストグラムを演算する(ステップ21)。こ
こでのヒストグラムでは、縦軸は画素数、いわゆる出現
頻度を意味し、横軸は、R値,G値,B値の場合、各画
素のそのパラメータにおける濃度、R−G値,B−G
値,及びR−B値の場合、各画素のそのパラメータにお
ける濃度の差分値を意味するものである。次に、センタ
ク・モードで演算されたR値,G値,B値,R−G値,
B−G値,及びR−B値の各値に対する第1閾値範囲を
メモリ34から取り込み(ステップ22)、第1閾値範
囲を有する区間とこれに相隣る区間との間隔を求める
(ステップ23)。言い換えれば、各パラメータ毎のヒ
ストグラムには、センタク・モードで設定された第1閾
値範囲と第1閾値範囲外の上限方向と下限方向の範囲に
おいて、各濃度に対する、画像中に存在する画素数が表
示されている。このため、このステップ23では、この
ヒストグラムに基づき、第1閾値範囲と、それ以外の範
囲における上限方向と下限方向の各々において最も近接
する、画素数を有する濃度範囲を求め、これにより、こ
の最も近接する濃度範囲と第1閾値範囲との相対的な距
離(間隔)を求める。
FIGS. 5 and 6 are flowcharts showing the processing procedure of the image processing apparatus according to the present invention, and show the extraction processing in the auto mode. FIG. 7 is a schematic diagram showing an example of the extraction result in the auto mode. After the extraction process is performed in the select mode, the CPU 32 first selects the R value, the G value,
A histogram is calculated for each parameter value, RG value, BG value, and RB value (step 21). In the histogram, the vertical axis represents the number of pixels, that is, the so-called appearance frequency, and the horizontal axis represents the density, RG value, and BG of each pixel in the case of R value, G value, and B value.
In the case of the value and the RB value, it means a difference value of the density of each pixel in the parameter. Next, the R value, the G value, the B value, the RG value calculated in the select mode,
The first threshold range for each of the BG value and the RB value is fetched from the memory 34 (step 22), and the interval between the section having the first threshold range and the adjacent section is obtained (step 23). ). In other words, in the histogram for each parameter, the number of pixels present in the image for each density in the first threshold range set in the centering mode and the upper and lower limits outside the first threshold range is shown. Is displayed. Therefore, in step 23, based on the histogram, a density range having the number of pixels closest to the first threshold range and the other ranges in each of the upper limit direction and the lower limit direction is obtained. A relative distance (interval) between the adjacent density range and the first threshold range is obtained.

【0042】以下に第1閾値範囲の拡張の一例を説明す
る。図8は、R値のヒストグラムの一例を示すグラフで
ある。図に示す如く、画像中のR値は、R〜Rの区
域と、R〜Rの区域と、R〜Rの区域の3つの
区域に集中して出現している。このうちR〜Rの区
域には、第1閾値範囲A1の下限値RL1と上限値R
U1とが含まれている。CPU32は、まず第1閾値範
囲A1の出現頻度の極大値を求め、これが下限値RL1
又は上限値RU1におけるものであるか否かを調べる。
このときに、前記極大値が下限値RL1又は上限値R
U1におけるものであった場合には、次のように下限値
L1又は上限値RU1を変更する。図9は第1閾値範
囲A1の上限値RU1における出現頻度が極大値の場合
のR値のヒストグラムを示すグラフである。図に示すよ
うに、上限値RU1を出現頻度の極大値を越えるまで増
加させる。
An example of extending the first threshold range will be described below. FIG. 8 is a graph showing an example of a histogram of the R value. As shown in FIG, R values in an image, the area of R 1 to R 2, and zone of R 3 to R 4, have appeared concentrated in three areas of areas of R 4 to R 5. The area of these R 3 to R 4, the lower limit value of the first threshold value range A1 R L1 and the upper limit value R
U1 is included. The CPU 32 first finds the maximum value of the appearance frequency of the first threshold range A1, and this is the lower limit value R L1
Alternatively, it is determined whether or not the upper limit value RU1 is satisfied.
At this time, the maximum value is the lower limit value R L1 or the upper limit value R L1.
If it is at U1 , the lower limit value RL1 or the upper limit value RU1 is changed as follows. FIG. 9 is a graph showing a histogram of R values when the appearance frequency at the upper limit value RU1 of the first threshold range A1 is a local maximum value. As shown in the figure, the upper limit value RU1 is increased until it exceeds the maximum value of the appearance frequency.

【0043】次に、第1閾値範囲A1が含まれる区間の
下限値及び上限値を求める。前記下限値RL1及び上限
値RU1の外側において、第1閾値範囲A1に近い部分
から順次隣り合う出現頻度の差分値を求め、両外側で夫
々該差分値が最初に所定値以下となるR値を求める。説
明を簡単にするため、ここでは前記差分値が0以下とな
るR値を求めることとする。図8に示すように、R
の区間では、第1閾値範囲A1の両外側で隣り合う
出現頻度の差分値が0以下となるR値は夫々R,R
である。そこで、この区間の下限値はR、上限値はR
とする。
Next, a lower limit value and an upper limit value of a section including the first threshold range A1 are obtained. Outside the lower limit value R L1 and the upper limit value R U1 , the difference values of the appearance frequencies adjacent to each other are sequentially obtained from the portion close to the first threshold range A1. Find the value. For the sake of simplicity, it is assumed here that the R value at which the difference value becomes 0 or less is obtained. As shown in FIG. 8, R 3 ~
In the interval R 4, R value the difference value of the appearance frequency adjacent at both sides of the first threshold value range A1 is 0 or less each R 3, R 4
It is. Therefore, the lower limit of this section is R 3 , and the upper limit is R
4 is assumed.

【0044】さらに、前記区間に相隣る区間の上限値及
び下限値を求める。これは、R〜Rの区間の外側に
おいて、該区間に近い部分から順次隣り合う出現頻度の
差分値を求め、両外側で夫々最初に該差分値が0を越え
るR値を求めることによってなされる。図8では、R
〜Rの外側で前記差分値が最初に0を越えるのは夫々
,Rである。従って、R〜Rの区間に相隣る
区間R〜Rの上限値はRとし、同様に区間R
の下限値はRとする。
Further, an upper limit value and a lower limit value of a section adjacent to the section are determined. This is achieved by calculating the difference values of the appearance frequencies adjacent to each other sequentially from the portion close to the section outside the section of R 3 to R 4 , and first calculating the R value whose difference value exceeds 0 on both sides. Done. In FIG. 8, R 3
It is R 2 and R 4 that the difference value first exceeds 0 outside 〜R 4 . Therefore, the upper limit value of the sections R 1 to R 2 adjacent to the section of R 3 to R 4 is R 2, and similarly, the sections R 4 to R 4
The lower limit of R 5 is a R 4.

【0045】なお、出現頻度の変化がなだらかであり、
前述した差分値が何れの値でも所定の値よりも小さい場
合には、第1閾値範囲を含む区間の両外側において、該
区間に近い部分から最初に出現頻度が所定値以下になる
値を上限値及び下限値としてもよい。
It should be noted that the change in the appearance frequency is gentle,
If any of the above-mentioned difference values is smaller than the predetermined value, the upper limit is set to a value at which the frequency of appearance first becomes equal to or lower than the predetermined value from the portion close to the section on both outer sides of the section including the first threshold range. It may be a value and a lower limit.

【0046】また、区間の上限値及び下限値を求める手
順はこれに限ったものではなく、他のアルゴリズムによ
るものであってもよいことはいうまでもない。
The procedure for obtaining the upper and lower limits of the section is not limited to this, and it goes without saying that another algorithm may be used.

【0047】以上で求めたR,R,Rから、第1
閾値範囲A1を含む区間と相隣る区間との間隔は、一方
がR〜Rであり、他方がRの一点で接するため0
であるということが求められる。
From R 2 , R 3 , and R 4 obtained above, the first
The interval between the section including the threshold range A1 and the adjacent section is R 2 to R 3 on one side and 0 on the other side at one point of R 4.
Is required.

【0048】そして、前記第1閾値範囲を含む区間の下
限値及び上限値を新たな第2閾値範囲の下限値及び上限
値とする(ステップ24)。次いで、前記間隔、例えば
上述した例でいえば、R〜R及びRの値が、予め
設定された第1閾値を越えるか否かを判別し(ステップ
25)、越える場合は、第1閾値範囲の上限値(又は下
限値)に対して予め設定された最大拡張値MAXを加算
(又は減算)する(ステップ26)。越えない場合は、
前記間隔が前記第1閾値より小さい第2閾値を越えるか
否かを判別し(ステップ27)、越える場合は、例えば
前記間隔の半分の値を前記上限値(又は下限値)に加算
(又は減算)する(ステップ28)。越えない場合は、
前記上限値(又は下限値)に対して予め設定された最小
拡張値MINを加算(又は減算)する(ステップ2
9)。
Then, the lower and upper limits of the section including the first threshold range are set as the lower and upper limits of the new second threshold range (step 24). Next, it is determined whether or not the intervals, for example, in the above-described example, the values of R 2 to R 3 and R 4 exceed a preset first threshold value (step 25). A preset maximum expansion value MAX is added (or subtracted) to the upper limit (or lower limit) of one threshold range (step 26). If not,
It is determined whether or not the interval exceeds a second threshold smaller than the first threshold (step 27). If so, for example, a half value of the interval is added (or subtracted) to the upper limit (or lower limit). ) (Step 28). If not,
A predetermined minimum extension value MIN is added (or subtracted) to the upper limit value (or lower limit value) (step 2).
9).

【0049】そして、図3に示したセンタク・モードの
ステップ5〜ステップ9と同様の処理する(ステップ3
0〜ステップ34)。以上のステップ21〜ステップ2
8の処理を例えば入力手段4に設けられた図示しない決
定ボタンが押される都度繰り返すことにより、図7に示
す如く青色領域の全体部分が抽出される。上述した実施
例において、本画像処理装置のオペレータがポインタp
を用いて第2閾値範囲への拡張のための指示は、本実施
例がセンタク・モードとオート・モードとにモードを分
けているので、センタク・モードにて第1閾値範囲を設
定した後、オート・モードに対応する各ステップに先立
ち、行われるようになっている。しかし、このオペレー
タによる指示のタイミングは、第1閾値範囲の設定後、
第2閾値範囲に基づいて、その第2閾値範囲に含まれる
画素を画像表示する工程の前までであれば、どこに位置
させてもよいことは、いうまでもない。
Then, the same processing as steps 5 to 9 in the select mode shown in FIG. 3 is performed (step 3).
0 to step 34). Steps 21 and 2 above
By repeating the process of step 8 every time a decision button (not shown) provided on the input means 4 is pressed, the entire blue region is extracted as shown in FIG. In the embodiment described above, the operator of the image processing apparatus
The instruction for extending to the second threshold range by using the following is because, in this embodiment, the mode is divided into the select mode and the auto mode, so after setting the first threshold range in the select mode, This is performed before each step corresponding to the auto mode. However, the timing of the instruction by the operator is set after setting the first threshold range.
Based on the second threshold range, it goes without saying that the pixels may be located anywhere before the step of displaying the pixels included in the second threshold range.

【0050】このように、各第1閾値範囲をヒストグラ
ムに基づいて非抽出対象の色が含まれている区間を含む
ないように拡張するため、不要な色領域を抽出すること
がない。
As described above, since each first threshold range is extended based on the histogram so as not to include the section including the color to be not extracted, unnecessary color regions are not extracted.

【0051】[0051]

【発明の効果】以上詳述した如く第1発明、第4発明、
第7発明、第11発明、第13発明、及び第14発明に
よる場合は、既に抽出に用いられたR値,G値,B値,
R値及びG値の差分値,R値及びB値の差分値,並びに
G値及びB値の差分値のうちの少なくとも1つの各第1
閾値範囲を、夫々のヒストグラムに基づいて拡張し、第
2閾値範囲を設定して抽出する。これを繰り返すことに
より、同一色と考えられる対象領域だけを正確に抽出す
るための第2閾値範囲を設定することができ、抽出結果
の安定化を図ることができる。
As described in detail above, the first invention, the fourth invention,
According to the seventh, eleventh, thirteenth, and fourteenth inventions, the R value, G value, B value,
The first value of at least one of the difference value between the R value and the G value, the difference value between the R value and the B value, and the difference value between the G value and the B value
The threshold range is extended based on each histogram, and a second threshold range is set and extracted. By repeating this, it is possible to set the second threshold range for accurately extracting only the target region considered to be the same color, and to stabilize the extraction result.

【0052】第2発明、第6発明、第8発明、及び第1
2発明による場合は、ヒストグラムから出現頻度が集中
する区間を求め、第1閾値範囲を含む区間と、これに相
隣る区間との間隔に基づいて、前記第1閾値範囲を含む
区間だけを含むように第2閾値範囲を設定することによ
り、対象領域のみを確実に抽出する第2閾値範囲を設定
することができる。
The second invention, the sixth invention, the eighth invention, and the first invention
In the case of the second invention, a section where the appearance frequency is concentrated is obtained from the histogram, and based on the interval between the section including the first threshold range and the adjacent section, only the section including the first threshold range is included. By setting the second threshold range in this way, it is possible to set the second threshold range for reliably extracting only the target region.

【0053】第3発明及び第9発明による場合は、第1
閾値範囲と近接する画素濃度との間隔を所定の閾値と比
較し、前記間隔が閾値より大きい場合には、第1拡張値
を第1閾値範囲に加減し、前記間隔が閾値より小さい場
合には、第2拡張値を第1閾値範囲に加減して、拡張範
囲を決定することにより、対象領域のみを確実に抽出す
る第2閾値範囲を設定することができる。
In the case of the third invention and the ninth invention, the first
The interval between the threshold range and the pixel density adjacent thereto is compared with a predetermined threshold. If the interval is larger than the threshold, the first extended value is added to or subtracted from the first threshold range, and if the interval is smaller than the threshold, By adding or subtracting the second extended value to or from the first threshold range and determining the extended range, it is possible to set the second threshold range for reliably extracting only the target region.

【0054】第5発明、第10発明、第11発明、及び
第14発明による場合は、オペレータからの第1閾値範
囲の拡張の指示を受け付けたときに、第1閾値範囲を拡
張し、第2閾値範囲を設定することにより、第2閾値範
囲が所望の閾値範囲となるまで、第1閾値範囲の拡張を
繰り返し行うことができ、オペレータが抽出された画素
を表示画面によって確認しつつ適宜第1閾値範囲の拡張
の指示を与えることにより、対象領域のみを確実に抽出
する第2閾値範囲を設定することができる等、本発明は
優れた効果を奏する。
According to the fifth, tenth, eleventh, and fourteenth inventions, when an instruction to extend the first threshold range is received from the operator, the first threshold range is extended, and the second threshold range is extended. By setting the threshold range, the expansion of the first threshold range can be repeatedly performed until the second threshold range becomes a desired threshold range, and the operator checks the extracted pixels on the display screen and appropriately performs the first threshold range. By providing an instruction to extend the threshold range, the present invention has an excellent effect, for example, it is possible to set a second threshold range for reliably extracting only the target region.

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

【図1】本発明に係る画像処理装置の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to the present invention.

【図2】表示画面を示す模式図である。FIG. 2 is a schematic diagram showing a display screen.

【図3】本発明に係る画像処理装置の処理手順を示すフ
ローチャートである(センタク・モード)。
FIG. 3 is a flowchart showing a processing procedure of the image processing apparatus according to the present invention (select mode).

【図4】抽出結果の一例を示す模式図である。FIG. 4 is a schematic diagram showing an example of an extraction result.

【図5】本発明に係る画像処理装置の処理手順を示すフ
ローチャートである(オート・モード)。
FIG. 5 is a flowchart showing a processing procedure of the image processing apparatus according to the present invention (auto mode).

【図6】本発明に係る画像処理装置の処理手順を示すフ
ローチャートである(オート・モード)。
FIG. 6 is a flowchart showing a processing procedure of the image processing apparatus according to the present invention (auto mode).

【図7】オート・モードによる抽出結果の一例を示す模
式図である。
FIG. 7 is a schematic diagram showing an example of an extraction result in an auto mode.

【図8】R値のヒストグラムの一例を示すグラフであ
る。
FIG. 8 is a graph showing an example of an R value histogram.

【図9】第1閾値範囲の上限値における出現頻度が極大
値の場合のR値のヒストグラムを示すグラフである。
FIG. 9 is a graph showing a histogram of R values when the appearance frequency at the upper limit of the first threshold range is a local maximum.

【図10】R値のヒストグラムの一例を示すグラフであ
る。
FIG. 10 is a graph showing an example of an R value histogram.

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

1 ワーク 2 カラーカメラ 3 画像処理装置 4 入力手段 5 表示装置 6 可搬型記録媒体 11 色付ラベル 31 画像入力部 32 CPU 33 画像出力部 34 メモリ 35 外部記憶装置 36 通信インタフェース 70 通信ネットワーク 71 接続装置 72 外部ネットワーク回線 73 外部サーバコンピュータ 74 記録媒体 REFERENCE SIGNS LIST 1 work 2 color camera 3 image processing device 4 input means 5 display device 6 portable recording medium 11 colored label 31 image input unit 32 CPU 33 image output unit 34 memory 35 external storage device 36 communication interface 70 communication network 71 connection device 72 External network line 73 External server computer 74 Recording medium

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) 9A001 Fターム(参考) 5B057 AA11 BA19 CA01 CA08 CA12 CB08 CB12 CB16 CE11 CE17 DB02 DB06 DB09 DC19 DC23 5C066 AA01 AA13 CA19 GA01 HA03 KD04 KE02 KE07 KM01 KM11 5C077 MP08 PP31 PP32 PP47 PQ08 PQ12 PQ19 PQ20 SS05 SS06 TT09 5C079 HB01 JA23 LA02 LA10 LA31 MA11 MA17 NA03 5L096 AA02 FA15 9A001 HH31 ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification code FI Theme coat ゛ (Reference) 9A001 F-term (Reference) 5B057 AA11 BA19 CA01 CA08 CA12 CB08 CB12 CB16 CE11 CE17 DB02 DB06 DB09 DC19 DC23 5C066 AA01 AA13 CA19 GA01 HA03 KD04 KE02 KE07 KM01 KM11 5C077 MP08 PP31 PP32 PP47 PQ08 PQ12 PQ19 PQ20 SS05 SS06 TT09 5C079 HB01 JA23 LA02 LA10 LA31 MA11 MA17 NA03 5L096 AA02 FA15 9A001 HH31

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 撮像手段により撮影され、画像表示手段
の画面上に表示された画像から、色抽出を行うために画
素を選択し、該選択された画素におけるR値,G値,B
値,R値及びG値の差分値,R値及びB値の差分値,並
びにG値及びB値の差分値のうち少なくとも1つのパラ
メータに対する値を基準に第1閾値範囲を設定し、上記
画像中の画素の中から該第1閾値範囲にある画素を抽出
し、抽出結果を表示後、順次抽出すべき画素範囲を拡大
すべく、上記第1閾値範囲を拡張する画像処理方法にお
いて、 前記第1閾値範囲を設定する第1ステップと、上記基準
としてのパラメータにおいて、上記第1ステップで設定
された前記第1閾値範囲とそれ以外の非色抽出範囲に存
在する、画像内の画素の濃度分布で、最も第1閾値範囲
と近接する画素濃度と第1閾値範囲との間隔を算出する
第2ステップと、前記算出された間隔に基づいて、第1
閾値範囲を拡張する範囲を決定し、それに基づいた第2
閾値範囲を設定する第3ステップと、前記第2閾値範囲
に基づいて、その範囲に対応する画素を抽出する第4ス
テップとを有することを特徴とする画像処理方法。
1. A pixel is selected for performing color extraction from an image captured by an imaging unit and displayed on a screen of an image display unit, and an R value, a G value, and a B value of the selected pixel are selected.
Setting a first threshold range based on a value for at least one of a parameter, a difference between R and G values, a difference between R and B values, and a difference between G and B values; In the image processing method of extracting a pixel in the first threshold range from the middle pixels, displaying the extraction result, and expanding the first threshold range in order to sequentially expand a pixel range to be extracted, A first step of setting one threshold range, and a density distribution of pixels in an image existing in the first threshold range set in the first step and other non-color extraction ranges in the parameter as the reference. A second step of calculating an interval between the pixel density closest to the first threshold range and the first threshold range; and a first step based on the calculated interval.
A range to extend the threshold range is determined, and a second
An image processing method comprising: a third step of setting a threshold range; and a fourth step of extracting a pixel corresponding to the second threshold range based on the second threshold range.
【請求項2】 前記第2ステップは、前記非色抽出範囲
に対して、第1閾値範囲からみた上限値方向ならびに下
限値方向の各々において、第1閾値範囲と近接する画素
濃度との間隔を算出することを特徴とする請求項1記載
の画像処理方法。
2. The method according to claim 2, wherein in the non-color extraction range, in each of an upper limit direction and a lower limit direction viewed from the first threshold range, an interval between pixel densities adjacent to the first threshold range is determined. The image processing method according to claim 1, wherein the calculation is performed.
【請求項3】 前記第3ステップは、前記間隔と予め定
められた閾値とを比較し、前記間隔が閾値より大きい場
合は、予め定められた第1拡張値を前記第1閾値範囲に
加減することにより拡張範囲を設定し、前記間隔が閾値
より小さい場合は、前記第1拡張値より小さい第2拡張
値を前記第1閾値範囲に加減することによって設定する
ことを特徴とする請求項1記載の画像処理方法。
3. The third step compares the interval with a predetermined threshold, and if the interval is larger than a threshold, adds or subtracts a first predetermined extension value to the first threshold range. 2. An extended range is set by this, and when the interval is smaller than a threshold, the extended range is set by adding or subtracting a second extended value smaller than the first extended value to the first threshold range. Image processing method.
【請求項4】 撮像手段により撮影され、画像表示手段
の画面上に表示された画像から、色抽出を行うために画
素を選択し、該選択された画素におけるR値,G値,B
値,R値及びG値の差分値,R値及びB値の差分値,並
びにG値及びB値の差分値のうち少なくとも1つのパラ
メータに対する値を基準に第1閾値範囲を設定し、上記
画像中の画素の中から該第1閾値範囲にある画素を抽出
し、抽出結果を表示後、順次抽出すべき画素範囲を拡大
すべく、上記第1閾値範囲を拡張する画像処理方法にお
いて、 前記第1閾値範囲を設定する第1ステップと、上記基準
としてのパラメータにおいて、各濃度における画素の出
現頻度を算出する第2ステップと、前記出現頻度に基づ
いて前記第1閾値範囲を拡張する範囲を決定し、それに
基づいた第2閾値範囲を設定する第3ステップと、前記
第2閾値範囲に基づいて、その範囲に対応する画素を抽
出する第4ステップとを有することを特徴とする画像処
理方法。
4. A pixel is selected for performing color extraction from an image captured by an imaging unit and displayed on a screen of an image display unit, and an R value, a G value, and a B value of the selected pixel are selected.
Setting a first threshold range based on a value for at least one of a parameter, a difference between R and G values, a difference between R and B values, and a difference between G and B values; In the image processing method of extracting a pixel in the first threshold range from the middle pixels, displaying the extraction result, and expanding the first threshold range in order to sequentially expand a pixel range to be extracted, A first step of setting one threshold range, a second step of calculating the frequency of appearance of pixels at each density based on the parameter as the reference, and determining a range to extend the first threshold range based on the frequency of appearance. An image processing method comprising: a third step of setting a second threshold range based on the range; and a fourth step of extracting a pixel corresponding to the range based on the second threshold range.
【請求項5】 前記第1閾値範囲の拡張は、前記第1ス
テップ後で且つ、第4ステップ開始前までに、前記第1
閾値範囲の拡張の指示を受けて行われることを特徴とす
る請求項1ならびに請求項4記載の画像処理方法。
5. The method according to claim 5, wherein the first threshold range is expanded after the first step and before the start of the fourth step.
5. The image processing method according to claim 1, wherein the method is performed in response to an instruction to extend a threshold range.
【請求項6】 前記第3ステップは、前記出現頻度に基
づいて前記R値,G値,B値,R値及びG値の差分値,
R値及びB値の差分値,並びにG値及びB値の差分値の
うちの少なくとも1つについて出現頻度が集中する区間
を演算し、前記第1閾値範囲を含む区間と、これに相隣
る区間との間隔に基づいて第2閾値範囲を設定すること
を特徴とする請求項4記載の画像処理方法。
6. The method according to claim 1, wherein the third step is a step of determining a difference between the R value, the G value, the B value, the R value, and the G value based on the appearance frequency.
A section where the appearance frequency is concentrated is calculated for at least one of a difference value between the R value and the B value and a difference value between the G value and the B value, and a section including the first threshold range and a section adjacent thereto are calculated. The image processing method according to claim 4, wherein the second threshold range is set based on an interval with the section.
【請求項7】 撮像手段により撮影され、画像表示手段
の画面上に表示された画像から、色抽出を行うために画
素を選択し、該選択された画素におけるR値,G値,B
値,R値及びG値の差分値,R値及びB値の差分値,並
びにG値及びB値の差分値のうち少なくとも1つのパラ
メータに対する値を基準に第1閾値範囲を設定し、上記
画像中の画素の中から該第1閾値範囲にある画素を抽出
し、抽出結果を表示後、順次抽出すべき画素範囲を拡大
すべく、上記第1閾値範囲を拡張する画像処理装置にお
いて、 前記第1閾値範囲を設定する第1設定手段と、上記基準
としてのパラメータにおいて、上記第1設定手段で設定
された前記第1閾値範囲とそれ以外の非色抽出範囲に存
在する、画像内の画素の濃度分布で、最も第1閾値範囲
と近接する画素濃度と第1閾値範囲との間隔を算出する
算出手段と、該算出手段によって算出された間隔に基づ
いて、第1閾値範囲を拡張する拡張範囲を決定し、それ
に基づいた第2閾値範囲を設定する第2設定手段と、該
第2設定手段によって設定された第2閾値範囲に基づい
て、その範囲に対応する画素を抽出する抽出手段とを備
えることを特徴とする画像処理装置。
7. A pixel is selected for performing color extraction from an image photographed by an imaging unit and displayed on a screen of an image display unit, and an R value, a G value, and a B value of the selected pixel are selected.
Setting a first threshold range based on a value for at least one of a parameter, a difference between R and G values, a difference between R and B values, and a difference between G and B values; In the image processing apparatus, after extracting a pixel in the first threshold range from the middle pixels, displaying the extraction result, and expanding the pixel range to be sequentially extracted, the first threshold range is extended. A first setting unit that sets one threshold range; and a parameter as the criterion, wherein the pixels in the image existing in the first threshold range set by the first setting unit and other non-color extraction ranges Calculating means for calculating an interval between the pixel density closest to the first threshold range and the first threshold range in the density distribution; and an extended range for expanding the first threshold range based on the interval calculated by the calculating means. Determined and based on it An image, comprising: a second setting unit that sets a second threshold range; and an extracting unit that extracts a pixel corresponding to the second threshold range based on the second threshold range set by the second setting unit. Processing equipment.
【請求項8】 前記算出手段は、前記非色抽出範囲に対
して、第1閾値範囲からみた上限値方向ならびに下限値
方向の各々において、第1閾値範囲と近接する画素濃度
との間隔を算出すべくなしてあることを特徴とする請求
項7記載の画像処理装置。
8. The calculation means calculates an interval between a pixel density close to the first threshold range and a pixel density in the upper limit direction and the lower limit direction viewed from the first threshold range with respect to the non-color extraction range. The image processing apparatus according to claim 7, wherein the image processing apparatus is configured to perform the processing.
【請求項9】 前記第2設定手段は、前記間隔が予め定
められた閾値より大きいか否かを判別する判別手段と、
該判別手段により、前記間隔が閾値より大きいと判別さ
れた場合は、予め定められた第1拡張値を前記第1閾値
範囲に加減することにより拡張範囲を設定する第1拡張
範囲設定手段と、前記判別手段により、前記間隔が閾値
より小さいと判別された場合は、前記第1拡張値より小
さい第2拡張値を前記第1閾値範囲に加減することによ
って拡張範囲を設定する第2拡張範囲設定手段とを有す
ることを特徴とする請求項7記載の画像処理装置。
9. The determining means for determining whether the interval is greater than a predetermined threshold,
When the determination unit determines that the interval is greater than a threshold, a first extended range setting unit that sets an extended range by adding or subtracting a predetermined first extended value to or from the first threshold range; If the determination unit determines that the interval is smaller than a threshold, a second extended range setting that sets an extended range by adding or subtracting a second extended value smaller than the first extended value to the first threshold range. The image processing apparatus according to claim 7, further comprising:
【請求項10】 前記第1閾値範囲の拡張の指示を受け
付ける受付手段を備えることを特徴とする請求項7記載
の画像処理装置。
10. The image processing apparatus according to claim 7, further comprising a receiving unit that receives an instruction to extend the first threshold range.
【請求項11】 撮影した画像から選択された画素にお
けるR値,G値,B値,R値及びG値の差分値,R値及
びB値の差分値,並びにG値及びB値の差分値のうちの
少なくとも1つについて第1閾値範囲を設定し、前記画
像における任意の画素のR値,G値,B値,R値及びG
値の差分値,R値及びB値の差分値,並びにG値及びB
値の差分値のうちの少なくとも1つが前記第1閾値範囲
を越えない画素を抽出し、抽出結果を表示する画像処理
装置において、 前記第1閾値範囲を設定する第1設定手段と、前記第1
閾値範囲を記憶する記憶手段と、前記第1閾値範囲の拡
張の指示を受け付ける受付手段と、前記R値,G値,B
値,R値及びG値の差分値,R値及びB値の差分値,並
びにG値及びB値の差分値のうちの少なくとも1つの値
について画像中の出現頻度を演算する演算手段と、該出
現頻度に基づいて前記第1閾値範囲を拡張して第2閾値
範囲を設定し、該第2閾値範囲を前記記憶手段に記憶す
る拡張手段と、前記画像における任意の画素のR値,G
値,B値,R値及びG値の差分値,R値及びB値の差分
値,並びにG値及びB値の差分値のうちの少なくとも1
つが前記第1閾値範囲又は第2閾値範囲を越えない画素
を抽出する抽出手段と、抽出結果を表示する表示手段と
を備えることを特徴とする画像処理装置。
11. An R value, a G value, a B value, a difference between R and G values, a difference between R and B values, and a difference between G and B values at a pixel selected from a captured image. A first threshold range is set for at least one of R, G, B, R, and G values of any pixel in the image.
Value difference value, R value and B value difference value, and G value and B value
An image processing apparatus for extracting a pixel in which at least one of the difference values of the values does not exceed the first threshold range and displaying an extraction result; a first setting unit for setting the first threshold range;
Storage means for storing a threshold value range; receiving means for receiving an instruction to extend the first threshold value range;
Calculating means for calculating an appearance frequency in an image for at least one of a value, a difference between R and G values, a difference between R and B values, and a difference between G and B values; Expanding means for expanding the first threshold range based on the frequency of appearance to set a second threshold range, and storing the second threshold range in the storage means;
At least one of a value, a difference between the R and G values, a difference between the R and B values, and a difference between the G and B values.
An image processing apparatus comprising: an extraction unit that extracts a pixel that does not exceed the first threshold range or the second threshold range; and a display unit that displays an extraction result.
【請求項12】 前記拡張手段は、前記出現頻度に基づ
いて前記R値,G値,B値,R値及びG値の差分値,R
値及びB値の差分値,並びにG値及びB値の差分値のう
ちの少なくとも1つについて出現頻度が集中する区間を
演算する区間演算手段と、前記第1閾値範囲を含む区間
と、これに相隣る区間との間隔に基づいて第2閾値範囲
を設定する第2設定手段とを有することを特徴とする請
求項11記載の画像処理装置。
12. The expansion means according to claim 6, wherein said R value, G value, B value, difference value between R value and G value,
Section calculating means for calculating a section in which the appearance frequency is concentrated on at least one of the difference value between the G value and the B value, and the difference value between the G value and the B value; and a section including the first threshold range; 12. The image processing apparatus according to claim 11, further comprising: a second setting unit configured to set a second threshold range based on an interval between adjacent sections.
【請求項13】 コンピュータに、撮像手段により撮影
され、画像表示手段の画面上に表示された画像から、色
抽出を行うために画素を選択させ、該選択された画素に
おけるR値,G値,B値,R値及びG値の差分値,R値
及びB値の差分値,並びにG値及びB値の差分値のうち
少なくとも1つのパラメータに対する値を基準に第1閾
値範囲を設定させ、上記画像中の画素の中から該第1閾
値範囲にある画素を抽出させ、抽出結果を表示後、順次
抽出すべき画素範囲を拡大すべく、上記第1閾値範囲を
拡張させるプログラムが記録してあるコンピュータでの
読み取りが可能な記録媒体において、 コンピュータに、前記第1閾値範囲を設定させるプログ
ラムコード手段と、上記基準としてのパラメータにおい
て、設定した前記第1閾値範囲とそれ以外の非色抽出範
囲に存在する、画像内の画素の濃度分布で、最も第1閾
値範囲と近接する画素濃度と第1閾値範囲との間隔を算
出させるプログラムコード手段と、前記算出された間隔
に基づいて、第1閾値範囲を拡張する範囲を決定させる
プログラムコード手段と、決定した範囲に基づいた第2
閾値範囲を設定させるプログラムコード手段と、前記第
2閾値範囲に基づいて、その範囲に対応する画素を抽出
させるプログラムコード手段とを有するプログラムが記
録してあることを特徴とするコンピュータでの読み取り
が可能な記録媒体。
13. A computer causes a computer to select a pixel for performing color extraction from an image photographed by an imaging unit and displayed on a screen of an image display unit, and to select an R value, a G value, Setting a first threshold range based on a value for at least one of a B value, an R value and a G value difference value, an R value and a B value difference value, and a G value and a B value difference value; A program for extracting the pixels in the first threshold range from the pixels in the image, displaying the extraction result, and then expanding the first threshold range so as to sequentially expand the pixel range to be extracted is recorded. A recording medium readable by a computer, a program code means for causing the computer to set the first threshold range, and the first threshold range and the set threshold value in the parameter as the reference. Program code means for calculating an interval between a pixel density closest to the first threshold range and a first threshold range in a density distribution of pixels in an image existing in a non-color extraction range other than the above, and the calculated interval Program code means for determining a range in which the first threshold range is extended based on
A program having program code means for setting a threshold range and program code means for extracting pixels corresponding to the second threshold range based on the second threshold range is recorded. Possible recording medium.
【請求項14】 コンピュータに、撮影した画像から選
択された画素におけるR値,G値,B値,R値及びG値
の差分値,R値及びB値の差分値,並びにG値及びB値
の差分値のうちの少なくとも1つについて第1閾値範囲
を設定させ、前記画像における任意の画素のR値,G
値,B値,R値及びG値の差分値,R値及びB値の差分
値,並びにG値及びB値の差分値のうちの少なくとも1
つが前記第1閾値範囲を越えない画素を選択された画素
と同一色であるとして抽出させ、抽出結果を表示させる
プログラムが記録してあるコンピュータでの読み取りが
可能な記録媒体において、 コンピュータに、前記第1閾値範囲を設定させるプログ
ラムコード手段と、前記第1閾値範囲の拡張の指示を受
け付けさせるプログラムコード手段と、前記R値,G
値,B値,R値及びG値の差分値,R値及びB値の差分
値,並びにG値及びB値の差分値のうちの少なくとも1
つの値について画像中の出現頻度を演算させるプログラ
ムコード手段と、該出現頻度に基づいて前記第1閾値範
囲を拡張して第2閾値範囲を設定させるプログラムコー
ド手段と、設定された前記第2閾値範囲に基づいて画素
を抽出させるプログラムコード手段とを有するプログラ
ムが記録してあることを特徴とするコンピュータでの読
み取りが可能な記録媒体。
14. A computer, wherein a R value, a G value, a B value, a difference value between the R value and the G value, a difference value between the R value and the B value, and a G value and the B value at a pixel selected from a captured image are provided. , A first threshold range is set for at least one of the difference values of R, G, and R of an arbitrary pixel in the image.
At least one of a value, a difference between the R and G values, a difference between the R and B values, and a difference between the G and B values.
A computer-readable recording medium storing a program for causing a pixel that does not exceed the first threshold range to have the same color as the selected pixel and displaying the extraction result, comprising: Program code means for setting a first threshold value range, program code means for receiving an instruction to extend the first threshold value range,
At least one of a value, a difference between the R and G values, a difference between the R and B values, and a difference between the G and B values.
Program code means for calculating an appearance frequency in an image for two values, program code means for expanding the first threshold range based on the appearance frequency and setting a second threshold range, and the set second threshold value A computer-readable recording medium having recorded thereon a program having program code means for extracting pixels based on a range.
JP2000062691A 2000-01-31 2000-01-31 Picture processing method, picture processor and recording medium Pending JP2001216507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000062691A JP2001216507A (en) 2000-01-31 2000-01-31 Picture processing method, picture processor and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000062691A JP2001216507A (en) 2000-01-31 2000-01-31 Picture processing method, picture processor and recording medium

Publications (1)

Publication Number Publication Date
JP2001216507A true JP2001216507A (en) 2001-08-10

Family

ID=18582663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000062691A Pending JP2001216507A (en) 2000-01-31 2000-01-31 Picture processing method, picture processor and recording medium

Country Status (1)

Country Link
JP (1) JP2001216507A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014127154A (en) * 2012-12-27 2014-07-07 Canon Inc Subject area tracking device, and control method and program thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10214341A (en) * 1997-01-29 1998-08-11 Matsushita Electric Ind Co Ltd Color extraction device
JPH11134503A (en) * 1997-10-31 1999-05-21 Keyence Corp Color extraction method for picture and picture processor using the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10214341A (en) * 1997-01-29 1998-08-11 Matsushita Electric Ind Co Ltd Color extraction device
JPH11134503A (en) * 1997-10-31 1999-05-21 Keyence Corp Color extraction method for picture and picture processor using the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014127154A (en) * 2012-12-27 2014-07-07 Canon Inc Subject area tracking device, and control method and program thereof

Similar Documents

Publication Publication Date Title
JP3264273B2 (en) Automatic color correction device, automatic color correction method, and recording medium storing control program for the same
US8254630B2 (en) Subject extracting method and device by eliminating a background region using binary masks
JP4375781B2 (en) Image processing apparatus, image processing method, program, and recording medium
US8781249B2 (en) Image processing apparatus and image processing method
KR100612835B1 (en) A method and apparatus for generating user preference data regarding color characteristic of image, and method and apparatus for converting color preference of image using the method and appatatus
EP3361717B1 (en) Image processing apparatus, image processing method, program and imaging apparatus
JPWO2006036027A1 (en) Image processing apparatus and method, and image processing program
CN116563570B (en) Color recognition method and device, electronic equipment and storage medium
US20050141771A1 (en) Generation of decorative picture suitable for input picture
JP2003006654A (en) Method and device for extracting feature amount of moving object in moving image and method and device for automatically tracking moving object in moving image, program for executing the method and recording medium with the program recorded thereon
KR101733125B1 (en) Method of chroma key image synthesis without background screen
JP2001216507A (en) Picture processing method, picture processor and recording medium
JP2002056371A (en) Information discriminating marker, detecting method thereof, related information gaining system using information discriminating marker and related information gaining method using information discriminating marker
JP2005346474A (en) Image processing method and image processor and program and storage medium
JP2936599B2 (en) Color image processing equipment
JP3716466B2 (en) Image processing device
JPH09265538A (en) Automatic tracking device
JPH08123940A (en) Method and device for extracting picture area
JP2001218070A (en) Method and device for image processing
CN112511890A (en) Video image processing method and device and electronic equipment
CN111784574A (en) Single-screen multi-picture boundary display method and device, electronic equipment and storage medium
JP2002208013A (en) Device for extracting image area and method for the same
JP6187119B2 (en) Image color adjustment apparatus, image color adjustment method, and program
JP2001195561A (en) Method, device and system for processing image, and recording medium
JP2000235647A (en) Binarization method for picture and picture processor using the method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091124

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100323