JPH04335481A - Method and device for extracting area for color image - Google Patents
Method and device for extracting area for color imageInfo
- Publication number
- JPH04335481A JPH04335481A JP3105943A JP10594391A JPH04335481A JP H04335481 A JPH04335481 A JP H04335481A JP 3105943 A JP3105943 A JP 3105943A JP 10594391 A JP10594391 A JP 10594391A JP H04335481 A JPH04335481 A JP H04335481A
- Authority
- JP
- Japan
- Prior art keywords
- color
- image data
- image
- area
- pixels
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、カラー画像から指定領
域の画像データを抽出する領域抽出方法および領域抽出
装置に関し、特に、指定領域の色に注目して画像データ
の抽出を行う領域抽出方法および領域抽出装置に関する
。コンピュータによるデザインシステムでポスターや商
品などをデザインする際およびコンピュータグラフィク
スを作成する際には、作成したカラー画像や写真などの
原稿を読み取って得られるカラー画像の指定領域に、適
切な色を割り当てたり、割り当てた色を調整したりする
必要がある。このため、カラー画像から操作者が指定し
た領域を抽出する機能が必要とされている。[Field of Industrial Application] The present invention relates to a region extraction method and a region extraction device for extracting image data of a designated region from a color image, and more particularly to a region extraction method and device for extracting image data by focusing on the color of a designated region. and a region extraction device. When designing posters, products, etc. using a computer-based design system, or when creating computer graphics, it is necessary to assign appropriate colors to specified areas of the color image obtained by scanning the created color image or photograph. , you may need to adjust the assigned colors. Therefore, there is a need for a function to extract an area specified by an operator from a color image.
【0002】0002
【従来の技術】従来は、抽出しようとする領域の画像上
の位置に着目して、領域抽出処理を行っていた。例えば
、操作者がライトペンなどの位置入力装置を用いて、カ
ラーモニタ上で抽出しようとする領域の輪郭をなぞって
指定し、これに応じて、指定された輪郭で囲まれた部分
を指定領域として抽出する方法がある。2. Description of the Related Art Conventionally, region extraction processing has been performed by focusing on the position on an image of the region to be extracted. For example, an operator uses a position input device such as a light pen to trace and specify the outline of the area to be extracted on a color monitor, and the area surrounded by the specified outline is then designated as the designated area. There is a way to extract it as
【0003】また、カラー画像の全体あるいはその一部
に対して輪郭抽出処理を行い、抽出された輪郭の中から
所望の領域を囲む輪郭を指定し、この輪郭に囲まれた画
像データを抽出する方法もある。[0003] Furthermore, contour extraction processing is performed on the entire color image or a part thereof, a contour surrounding a desired area is specified from among the extracted contours, and image data surrounded by this contour is extracted. There is a way.
【0004】0004
【発明が解決しようとする課題】ところで、ライトペン
で輪郭をなぞる作業は非常に煩雑であるので、この方式
を用いた場合は、領域抽出処理における操作者の作業負
担が大きかった。また、ライトペンの位置精度はあまり
高くないので、抽出しようとする指定領域の輪郭を正確
になぞることは難しく、指定領域を過不足なく抽出する
ためには、輪郭をなぞる作業を何度も繰り返さなければ
ならなかった。[Problems to be Solved by the Invention] Incidentally, since tracing the outline with a light pen is very complicated, when this method is used, the work burden on the operator during area extraction processing is heavy. In addition, since the positional accuracy of the light pen is not very high, it is difficult to accurately trace the outline of the specified area to be extracted, and in order to extract the specified area without too much or too little, it is necessary to trace the outline many times. I had to.
【0005】また、カラー画像から輪郭を抽出する処理
は、カラー画像の全体あるいは一部に対するマスク処理
や細線化処理など時間のかかる処理を伴っており、また
、操作者が意図した指定領域を囲む輪郭が抽出されなか
った場合には、再び輪郭抽出処理を行わなければならな
いので、領域抽出処理に要する時間が長かった。一方、
抽出しようとする領域の色に着目し、その色を指定する
ことにより、該当する領域を抽出する方法も考えられる
。[0005] Furthermore, the process of extracting contours from a color image involves time-consuming processes such as masking and thinning processes for the entire or part of the color image, and it also involves time-consuming processes such as masking and thinning processes for the entire or part of the color image. If the contour is not extracted, the contour extraction process has to be performed again, so the time required for the region extraction process is long. on the other hand,
Another possible method is to focus on the color of the area to be extracted and specify that color to extract the corresponding area.
【0006】但し、この場合は、人間が同様の色として
知覚する色が、色空間において広がりを持っていること
を考慮して、色の範囲を例えば色相,彩度および明度の
3つのパラメータの範囲として指定する必要がある。し
かしながら、これらのパラメータの範囲と人間が知覚す
る色の範囲との対応関係を把握して、適切な範囲を指定
するためには、操作者に充分な経験が必要となる。[0006] However, in this case, taking into consideration that the colors that humans perceive as similar colors have a wide range in color space, the color range is defined by three parameters, for example, hue, saturation, and brightness. Must be specified as a range. However, the operator needs sufficient experience to understand the correspondence between the range of these parameters and the range of colors perceived by humans and to specify an appropriate range.
【0007】また、上述したようにして抽出した領域が
、操作者が意図した指定領域と違っていた場合には、色
相,彩度,明度の各パラメータの範囲をそれぞれ変更す
る必要がある。しかし、このように、3つのパラメータ
をそれぞれ独立に指定するのでは、操作者が、これらの
各成分(パラメータ)の範囲の変更に伴う色の範囲の変
化を直観的に把握しにくいので、以前の結果を次回の抽
出処理にフィードバックさせて、指定領域を過不足なく
抽出することが困難である。Furthermore, if the area extracted as described above is different from the specified area intended by the operator, it is necessary to change the ranges of the hue, saturation, and brightness parameters. However, by specifying each of the three parameters independently in this way, it is difficult for the operator to intuitively grasp changes in the color range caused by changes in the range of each of these components (parameters). It is difficult to feed back the result to the next extraction process and extract exactly the specified area.
【0008】このような困難を解決する技法として、本
出願人は、特願平3−49981号『色抽出方法及び色
抽出装置』を既に出願している。この方法は、色空間に
おいて、指定領域の代表色を中心とする球体あるいは立
方体を抽出範囲とし、この抽出範囲の内部に分布する画
像データを指定領域に属する画像データとして抽出する
ものである。As a technique for solving these difficulties, the present applicant has already filed Japanese Patent Application No. 3-49981 titled ``Color Extraction Method and Color Extraction Apparatus''. In this method, a sphere or a cube centered on a representative color of a specified area is set as an extraction range in a color space, and image data distributed within this extraction range is extracted as image data belonging to the specified area.
【0009】ここで、例えば、HSV表色系においては
、彩度が低くなるに従って、異なる色相に属する色相互
間の色空間における距離が小さくなっている。従って、
このような彩度の低い色も含めて指定領域の全ての画素
を抽出しようとすると、上述した抽出範囲が大きくなり
過ぎて、指定領域の外側にある別の色相の白っぽい色の
画素や黒っぽい色の画素も一緒に抽出されてしまい、指
定領域の外側に点々と取り過ぎた画素が発生してしまう
。また、逆に、指定領域以外の画素を排除しようとする
と、上述した抽出範囲を小さくなり過ぎて、今度は、指
定領域の画素の一部が点々と抽出されずに残ってしまう
。このため、上述したような取りすぎ画素や取り残し画
素を除去するために、煩雑な修正作業が必要であった。For example, in the HSV color system, as the saturation decreases, the distance in the color space between colors belonging to different hues decreases. Therefore,
If you try to extract all the pixels in the specified area, including colors with low saturation, the extraction range described above will become too large, and the pixels outside the specified area will be whitish or blackish pixels of a different hue. , the pixels are also extracted together, resulting in too many pixels being extracted outside the specified area. On the other hand, if an attempt is made to exclude pixels outside the specified area, the above-mentioned extraction range becomes too small, and some of the pixels in the specified area remain unextracted. Therefore, in order to remove the above-mentioned over-extracted pixels and unextracted pixels, complicated correction work is required.
【0010】本発明は、指定領域を過不足なく抽出する
領域抽出方法および領域抽出装置を提供することを目的
とする。SUMMARY OF THE INVENTION An object of the present invention is to provide a region extraction method and a region extraction device that extract a specified region in just the right amount.
【0011】[0011]
【課題を解決するための手段】図1は、本発明の領域抽
出方法の原理を示す図である。請求項1の発明は、カラ
ー画像の指定領域における代表的な色を示す代表色とカ
ラー画像の各画素の色との色空間における相対位置に基
づいて、指定領域に属する画素を選択して抽出し、得ら
れた抽出結果から周囲の画素と色が異なる孤立点を除去
することを特徴とする。[Means for Solving the Problems] FIG. 1 is a diagram showing the principle of the region extraction method of the present invention. The invention of claim 1 provides for selecting and extracting pixels belonging to a specified area based on the relative position in a color space between a representative color indicating a representative color in a specified area of a color image and the color of each pixel of a color image. The method is characterized in that isolated points whose color is different from surrounding pixels are removed from the obtained extraction results.
【0012】図2は、本発明の領域抽出装置の原理ブロ
ック図である。請求項2の発明は、カラー画像の指定領
域における代表的な色を示す代表色とカラー画像の各画
素の色との色空間における相対位置に基づいて、指定領
域に属する画素を選択して抽出する領域抽出手段111
と、得られた抽出結果を平滑化して、周囲の画素と色が
異なる孤立点を除去する孤立点除去手段112とを備え
たことを特徴とする。FIG. 2 is a block diagram of the principle of the region extraction device of the present invention. The invention of claim 2 provides for selecting and extracting pixels belonging to a designated area based on the relative position in a color space between a representative color indicating a representative color in a designated area of a color image and the color of each pixel of the color image. area extraction means 111
and isolated point removing means 112 for smoothing the obtained extraction result and removing isolated points whose color is different from surrounding pixels.
【0013】請求項3の発明は、請求項2に記載の領域
抽出装置において、孤立点除去手段112が、予め、カ
ラー画像の全ての画素に対応して所定の色を表す画像デ
ータを格納しており、領域抽出手段111によって得ら
れた各画素の画像データをカラー画像における位置に応
じて保持する保持手段121と、保持手段121に保持
されたカラー画像の各画素の画像データをその画素と周
囲の複数の画素からなるブロックにおける画像データの
中間値で置き換えて、その画素の画像データとして出力
する中間値フィルタ122とを備えたことを特徴とする
。According to a third aspect of the invention, in the area extracting device according to the second aspect, the isolated point removing means 112 stores in advance image data representing a predetermined color corresponding to all pixels of the color image. A holding means 121 holds the image data of each pixel obtained by the area extraction means 111 according to the position in the color image, and a holding means 121 stores the image data of each pixel of the color image held in the holding means 121 as that pixel. It is characterized by comprising an intermediate value filter 122 that replaces image data in a block consisting of a plurality of surrounding pixels with an intermediate value and outputs the image data as the image data of that pixel.
【0014】図3は、請求項4の領域抽出装置の構成を
示す図である。請求項4の発明は、請求項2に記載の領
域抽出装置において、孤立点除去手段112が、予め、
カラー画像の全ての画素に対応して所定の色を表す画像
データを格納しており、領域抽出手段111によって得
られた各画素の画像データをカラー画像における位置に
応じて保持する保持手段121と、保持手段121に保
持されたカラー画像から周囲の画素と色が異なる画素を
少なくとも1つ含む複数の画素からなるブロックを孤立
点を含むブロックとして検出する検出手段131と、検
出手段131による検出結果の入力に応じて、保持手段
121に保持された該当するブロックの中央の画素の画
像データをそのブロックにおける画像データの中間値で
置き換えて、中央の画素の画像データとして出力する中
間値フィルタ132とを備えたことを特徴とする。FIG. 3 is a diagram showing the configuration of a region extracting device according to a fourth aspect of the present invention. According to a fourth aspect of the invention, in the area extracting device according to the second aspect, the isolated point removing means 112 may perform the following steps in advance:
holding means 121 which stores image data representing a predetermined color corresponding to all pixels of a color image, and holds image data of each pixel obtained by the area extraction means 111 according to its position in the color image; , a detection means 131 for detecting a block including a plurality of pixels including at least one pixel having a color different from surrounding pixels from the color image held in the holding means 121 as a block including an isolated point; and a detection result by the detection means 131. an intermediate value filter 132 that replaces the image data of the center pixel of the corresponding block held in the holding means 121 with the intermediate value of the image data in that block in response to the input of the image data of the center pixel; It is characterized by having the following.
【0015】[0015]
【作用】本発明は、代表色との色空間における相対位置
に基づいて、指定領域に属する画素を抽出し、この抽出
結果から孤立点を除去するので、指定領域の外側から抽
出された画素や指定領域の内側に取り残された画素を除
去して、指定領域を過不足なく抽出することができる。[Operation] The present invention extracts pixels belonging to a specified area based on the relative position in the color space with the representative color, and removes isolated points from this extraction result. By removing pixels left behind inside the designated area, the designated area can be extracted without excess or deficiency.
【0016】請求項2の発明は、孤立点除去手段112
が、領域抽出手段111によって得られた抽出結果を平
滑化することにより、周囲の画素と色が異なる孤立点を
除去するので、指定領域の外側から抽出された画素や指
定領域の内側に取り残された画素を除去して、指定領域
を過不足なく抽出することができる。また、中間値フィ
ルタ122が、保持手段121に保持された各画素の画
像データを対応するブロックの画像データの中間値で置
き換えるので、孤立点除去処理による画質の劣化を小さ
くすることができる。The invention of claim 2 provides an isolated point removing means 112.
However, by smoothing the extraction result obtained by the area extraction means 111, isolated points whose color is different from surrounding pixels are removed, so that pixels extracted from outside the specified area or left behind inside the specified area are removed. By removing the pixels that have been detected, it is possible to extract just the right amount of the specified area. Furthermore, since the intermediate value filter 122 replaces the image data of each pixel held in the holding unit 121 with the intermediate value of the image data of the corresponding block, deterioration in image quality due to isolated point removal processing can be reduced.
【0017】更に、検出手段131が、保持手段121
に保持されたカラー画像から孤立点を含むブロックを検
出し、中間値フィルタ132が、検出されたブロックに
対して上述した置き換え処理を行うので、孤立点除去処
理による画質の劣化を最小限度に抑えることができる。Furthermore, the detection means 131 is connected to the holding means 121.
Blocks containing isolated points are detected from the color image held in the color image, and the intermediate value filter 132 performs the above-mentioned replacement processing on the detected blocks, thereby minimizing deterioration in image quality due to isolated point removal processing. be able to.
【0018】[0018]
【実施例】以下、図面に基づいて本発明の実施例につい
て詳細に説明する。図4は、本発明の領域抽出装置を適
用した画像処理システムの実施例構成を示す。図4にお
いて、画像処理システムは、画像読取装置201が原稿
から読み取ったカラー画像や画像作成装置202で作成
したカラー画像の各画素の色をRGB表色系で表した画
像データを画像保持メモリ203に一旦保持し、この画
像保持メモリ203から表示用メモリ205に画像デー
タを転送してカラーモニタ206に表示する構成となっ
ている。Embodiments Hereinafter, embodiments of the present invention will be described in detail based on the drawings. FIG. 4 shows the configuration of an embodiment of an image processing system to which the region extraction device of the present invention is applied. In FIG. 4, the image processing system stores image data representing the color of each pixel of a color image read from a document by an image reading device 201 or a color image created by an image creation device 202 in an RGB color system in an image holding memory 203. The image data is temporarily stored in the image storage memory 203 and then transferred from the image storage memory 203 to the display memory 205 and displayed on the color monitor 206.
【0019】また、領域抽出装置210は、座標変換部
211とメモリ212とを備えており、この座標変換部
211が、上述した画像保持メモリ203に格納された
RGB表色系の画像データを例えばHSV表色系の画像
データ(以下、単に画像データと称する)に変換し、得
られた画像データをメモリ212に保持して、領域抽出
手段111による領域抽出処理とに供する構成となって
いる。また、領域抽出手段111によって抽出された画
像データは、孤立点除去手段112による孤立点除去処
理が施された後に、座標変換部213によってRGB表
色系の画像データに変換され、上述した表示用メモリ2
05において、画像保持メモリ203に保持された元の
カラー画像と合成されてカラーモニタ206上に表示さ
れる。The area extraction device 210 also includes a coordinate conversion section 211 and a memory 212, and the coordinate conversion section 211 converts image data in the RGB color system stored in the image holding memory 203, for example. The image data is converted into HSV color system image data (hereinafter simply referred to as image data), and the obtained image data is held in the memory 212 and subjected to area extraction processing by the area extraction means 111. Further, the image data extracted by the area extraction means 111 is subjected to isolated point removal processing by the isolated point removal means 112, and then converted to image data in the RGB color system by the coordinate conversion section 213, and is converted into image data in the RGB color system for display as described above. memory 2
05, the image is combined with the original color image held in the image holding memory 203 and displayed on the color monitor 206.
【0020】上述した座標変換部211,213は、例
えばルックアップテーブルを用いて構成すればよく、座
標変換部211としては、RGB表色系で表された画像
データそれぞれに対応して、HSV表色系の画像データ
を格納したルックアップテーブルを用意し、座標変換部
213としては、HSV表色系の画像データに対応して
、RGB表色系の画像データを格納したルックアップテ
ーブルを用意すればよい。また、RGB表色系の画像デ
ータをHSV表色系の画像データに変換する変換式およ
びHSV表色系の画像データをRGB表色系の画像デー
タに変換する変換式をそれぞれ用いて演算処理を行って
、画像データの座標系を変換する構成としてもよい。The coordinate conversion units 211 and 213 described above may be configured using, for example, a lookup table, and the coordinate conversion unit 211 converts the HSV table into an HSV table corresponding to each image data expressed in the RGB color system. A lookup table storing color system image data is prepared, and the coordinate conversion unit 213 prepares a lookup table storing RGB color system image data corresponding to the HSV color system image data. Bye. In addition, calculation processing is performed using a conversion formula for converting image data in the RGB color system to image data in the HSV color system, and a conversion formula for converting image data in the HSV color system to image data in the RGB color system. The coordinate system of the image data may also be converted.
【0021】また、図4において、領域抽出手段112
は、条件式作成部221と演算処理部222と判定処理
部223とから形成されており、条件式作成部221が
、操作者からの指示に応じて、指定領域に対応する抽出
範囲を示す色空間の立体を表す条件式を作成し、この条
件式に基づいて、演算処理部222と判定処理部223
とが、抽出範囲の内部に分布する画像データを選択して
抽出する構成となっている。Further, in FIG. 4, the area extracting means 112
is formed from a conditional expression creation section 221, an arithmetic processing section 222, and a determination processing section 223, and the conditional expression creation section 221 creates a color indicating an extraction range corresponding to a designated area in response to an instruction from an operator. A conditional expression representing a solid in space is created, and based on this conditional expression, the arithmetic processing unit 222 and the determination processing unit 223
is configured to select and extract image data distributed within the extraction range.
【0022】操作者は、条件式作成部221への指示と
して、指定領域を示すために少なくとも1つの画素の位
置と抽出領域の大きさを示す数値(以下、指標rと称す
る)とを入力すればよい。これに応じて、条件式作成部
221は、指定された少なくとも1つの画素の画像デー
タの平均値を指定領域の代表色とし、代表色を中心とす
る球体や立方体を表す条件式を作成すればよい。また、
指標rの値に応じて上述した条件式の球体の半径や立方
体の辺の長さを決定する構成とすればよい。これにより
、領域抽出処理をやり直す際に、指標rの値を変えるこ
とにより、抽出範囲の大きさを制御することができるの
で、前回の抽出処理結果をフィードバックして、最適な
抽出範囲を指定することが可能となる。The operator inputs the position of at least one pixel to indicate the specified region and a numerical value (hereinafter referred to as index r) indicating the size of the extraction region as an instruction to the conditional expression creation unit 221. Bye. In response to this, the conditional expression creation unit 221 sets the average value of the image data of at least one specified pixel as the representative color of the specified area, and creates a conditional expression representing a sphere or a cube centered on the representative color. good. Also,
The configuration may be such that the radius of the sphere and the length of the sides of the cube in the above-mentioned conditional expression are determined according to the value of the index r. As a result, when redoing the region extraction process, the size of the extraction range can be controlled by changing the value of the index r, so the results of the previous extraction process can be fed back to specify the optimal extraction range. becomes possible.
【0023】また、上述した条件式作成部221が、色
相方向の範囲を特に狭く限定し、例えば、彩度−明度方
向に長い直方体や球体と2つの色相一定の平面で表され
る色相方向の限定との交わりの部分のように、色相方向
よりも彩度−明度方向に大きく拡がる立体を抽出範囲と
してもよい。このようにして得られた条件式に、演算処
理部222が、メモリ212に格納された各画像データ
を代入して演算を行い、判定処理部223が、この演算
結果によって、上述した抽出範囲に含まれているとされ
た画像データを抽出し、孤立点除去手段112に送出す
る構成となっている。Further, the conditional expression creation unit 221 described above limits the range in the hue direction particularly narrowly, for example, in the hue direction expressed by a rectangular parallelepiped or sphere long in the saturation-brightness direction and two planes with a constant hue. The extraction range may be a solid that expands more in the saturation-brightness direction than in the hue direction, such as the intersection with the limit. The arithmetic processing unit 222 performs calculations by substituting each image data stored in the memory 212 into the conditional expression obtained in this way, and the determination processing unit 223 uses the calculation results to determine the above-mentioned extraction range. The configuration is such that the image data found to be included is extracted and sent to the isolated point removal means 112.
【0024】図4において、孤立点除去手段112は、
保持手段121と中間値フィルタ122とから構成され
ており、上述した領域抽出手段111によって抽出され
た画像データが、保持手段121にカラー画像における
位置に応じて保持され、この保持手段121の内容に対
して、中間値フィルタ122が中間値による置き換え処
理を行う構成となっている。In FIG. 4, the isolated point removing means 112 is
The image data extracted by the above-mentioned area extraction means 111 is held in the holding means 121 according to the position in the color image, and the content of this holding means 121 is On the other hand, the intermediate value filter 122 is configured to perform replacement processing using an intermediate value.
【0025】この保持手段121には、予め、カラー画
像の全画素に対応して、白色を示す画像データを格納し
ておき、領域抽出手段111によって抽出された画像デ
ータを上書きすればよい。また、中間値フィルタ122
は、保持手段121に格納された各画素を中心とする3
×3画素からなるブロックの画像データを彩度パラメー
タの値に注目してその大きさ順に並べ、5番目の画像デ
ータを中央値として、この微小領域の中央の画素の画像
データを置き換える構成とすればよい。Image data indicating white may be stored in advance in the holding means 121 in correspondence with all pixels of a color image, and the image data extracted by the area extraction means 111 may be overwritten. In addition, the intermediate value filter 122
is 3 pixels centered on each pixel stored in the holding means 121.
The configuration is such that the image data of blocks consisting of ×3 pixels are arranged in order of size, paying attention to the value of the saturation parameter, and the fifth image data is set as the median value, and the image data of the central pixel of this minute area is replaced. Bye.
【0026】この場合は、ブロックに含まれる画素のう
ち5画素以上が白色である場合は、中央値は白色を表す
画像データとなるので、このブロックの中央の画素は白
色に置き換えられ、逆に、5画素以上が有彩色である場
合は、中央値はその有彩色を示す画像データとなり、こ
の画像データで中央の画素の画像データが置き換えられ
る。例えば、図5(a) に示すように、周囲を白画素
に囲まれた少数の有彩色の画素(図において斜線を付し
て示す)はそれぞれ白画素に置き換えられ、また、図5
(b) に示すように、周囲を有彩色の画素に囲まれた
少数の白画素はそれぞれ周囲の有彩色に置き換えられる
。In this case, if 5 or more of the pixels included in the block are white, the median value becomes image data representing white, so the central pixel of this block is replaced with white, and vice versa. , when five or more pixels have a chromatic color, the median value becomes image data indicating the chromatic color, and the image data of the central pixel is replaced with this image data. For example, as shown in FIG. 5(a), a small number of chromatic pixels (shown with diagonal lines in the figure) surrounded by white pixels are each replaced with white pixels;
As shown in (b), a small number of white pixels surrounded by chromatic colored pixels are each replaced by the surrounding chromatic colored pixels.
【0027】このように、保持手段121に格納された
画像データを中間値フィルタ122を用いて平滑化する
ことにより、指定領域の外側から抽出された少数の画素
や指定領域の内部で取り残された少数の画素を孤立点と
して除去することができる。また、中間値フィルタは、
平均化フィルタなどの他の平滑化フィルタに比べて画質
を損なうことが少ないので、孤立点除去手段112を中
間値フィルタ122を用いて構成した場合は、孤立点除
去処理による画質の劣化は小さい。In this way, by smoothing the image data stored in the holding means 121 using the intermediate value filter 122, a small number of pixels extracted from outside the specified area or left behind inside the specified area can be smoothed. A small number of pixels can be removed as isolated points. Also, the median filter is
Since the image quality is less degraded than other smoothing filters such as averaging filters, when the isolated point removing means 112 is configured using the intermediate value filter 122, the deterioration of image quality due to the isolated point removing process is small.
【0028】ここで、取り過ぎ部分および取り残し部分
の大半は、少数の画素からなる島状の部分であるので、
上述したようにして、中間値フィルタを用いて孤立点を
除去することにより、大半の取り過ぎ部分および取り残
し部分を除去することができる。これにより、指定領域
を過不足なく抽出することが可能となるので、領域抽出
処理の精度を向上することができる。[0028] Here, since most of the overtaken portion and the leftover portion are island-like portions consisting of a small number of pixels,
By removing isolated points using the median filter as described above, most of the excess and leftover portions can be removed. This makes it possible to extract just the right amount of the specified area, thereby improving the accuracy of area extraction processing.
【0029】また、上述した孤立点除去処理で除去でき
なかった取り過ぎ部分や取り残し部分は極く少数であり
、また、比較的多数の画素が集まった部分であるので、
これらの部分を取り除く処理は容易であり、取り過ぎ部
分や取り残し部分を取り除くための修正処理の際の操作
者の負担を大幅に軽減することができる。ところで、中
間値フィルタは画質の劣化の少ないフィルタであるが、
指定領域の輪郭などにぼけなどの画質の劣化が生じるこ
とは避けられない。[0029] Furthermore, the overexcessed areas and unremoved areas that could not be removed by the above-mentioned isolated point removal process are extremely small, and since they are areas where a relatively large number of pixels are gathered,
Processing to remove these portions is easy, and the burden on the operator during correction processing to remove excessively removed portions and unremoved portions can be significantly reduced. By the way, the intermediate value filter is a filter that causes less deterioration in image quality, but
It is inevitable that image quality deterioration such as blurring of the outline of the designated area will occur.
【0030】以下、このような画質の劣化を最小限度に
抑えながら、孤立点の除去を行う方法について説明する
。図6に、請求項4の領域抽出装置の孤立点除去手段の
実施例構成図を示す。図6において、検出手段131は
、微分処理部311と、孤立点判別部312とから形成
されており、微分処理部311が、保持手段121に保
持された抽出結果に対して、それぞれ所定の数の画素(
例えば8×8画素)からなるブロックごとに画像データ
の微分を求め、この微分結果に基づいて、孤立点判別部
312が、各ブロックに孤立点が含まれているか否かを
判定する構成となっている。上述した微分処理部311
は、例えば、各ブロックについて順次に、各行および各
列の画像データの彩度パラメータの微分を求めればよい
。また、孤立点判別部312は、例えば、各行および各
列の微分結果の少なくとも1つが、正の極値と負の極値
との対を含んでいる場合に、そのブロックが孤立点を含
んでいると判定し、判定結果を読出回路321に送出す
ればよい。A method for removing isolated points while minimizing such deterioration in image quality will be described below. FIG. 6 shows a configuration diagram of an embodiment of the isolated point removing means of the region extracting device according to the fourth aspect. In FIG. 6, the detection means 131 is formed of a differential processing section 311 and an isolated point discriminating section 312. pixels (
For example, the differential of the image data is obtained for each block consisting of 8×8 pixels), and based on the result of this differentiation, the isolated point determination unit 312 determines whether or not each block contains an isolated point. ing. The above-mentioned differential processing section 311
For example, the differential of the saturation parameter of the image data of each row and each column may be calculated sequentially for each block. For example, if at least one of the differential results in each row and each column includes a pair of a positive extreme value and a negative extreme value, the isolated point determination unit 312 determines that the block includes an isolated point. It is only necessary to determine that there is one and send the determination result to the readout circuit 321.
【0031】読出回路321は、上述した検出手段13
1に同期して、保持手段121から画像データをブロッ
クごとに順次に読み出して、孤立点判別部312からの
判定結果の入力に応じて、孤立点を含むとされたブロッ
クを中間値フィルタ132を介して座標変換部213に
送出し、孤立点を含まないとされたブロックをそのまま
座標変換部213に送出する構成となっている。The readout circuit 321 includes the detection means 13 described above.
1, the image data is sequentially read out block by block from the holding means 121, and in accordance with the input of the determination result from the isolated point discriminating section 312, blocks determined to include isolated points are filtered through the intermediate value filter 132. The blocks that are determined not to include isolated points are sent to the coordinate conversion unit 213 as they are.
【0032】また、中間値フィルタ132は、上述した
中間値フィルタ122と同様に構成し、入力されたブロ
ックの各画素を中心とする3×3画素の微小部分の画像
データの中間値で中央の画像データを置き換える処理を
行えばよい。この場合は、図7に矢印a,bで示すブロ
ックのように、抽出された有彩色の画素が白画素で囲ま
れているブロックや、矢印cで示すブロックのように、
白画素が抽出された有彩色の画素に囲まれているブロッ
クが、上述した検出手段131によって孤立点を含むブ
ロックとして検出され、これらのブロックに対して中間
値フィルタが適用される。一方、図7に矢印dで示すブ
ロックのように、指定領域(図において点線で囲んで示
す)の輪郭部分を含むブロックが孤立点を含むとされる
ことはない。The intermediate value filter 132 is constructed in the same manner as the intermediate value filter 122 described above, and is an intermediate value of the image data of a minute portion of 3×3 pixels centered on each pixel of the input block. All that is required is to perform a process of replacing the image data. In this case, like the blocks shown by arrows a and b in FIG. 7, the extracted chromatic pixels are surrounded by white pixels, or the block shown by arrow c,
A block in which a white pixel is surrounded by extracted chromatic pixels is detected as a block containing an isolated point by the above-mentioned detection means 131, and an intermediate value filter is applied to these blocks. On the other hand, like the block indicated by arrow d in FIG. 7, a block that includes an outline of a designated area (indicated by a dotted line in the figure) is not considered to include an isolated point.
【0033】このようにして、孤立点を含むブロックを
検出し、検出されたブロックのみに中間値フィルタを適
用することにより、孤立点を選択的に除去することが可
能となるので、カラー画像全体の画質の劣化を最小限度
に抑えることができる。なお、画像データを平滑化する
フィルタとしては、上述した中間値フィルタに限らず、
単純な局所平均フィルタや局所加重平均フィルタなどを
用いてもよい。例えば、局所平均フィルタは、単純に複
数画素からなるブロックごとに画像データの平均値を求
め、この平均値をそのブロックに含まれる画素の画像デ
ータとして平滑化し、孤立点を除去するものである。こ
の方法は、単純で計算量が少ないので、孤立点除去処理
を高速化できる利点があるが、画質を大きく劣化させて
しまう可能性がある。In this way, by detecting blocks containing isolated points and applying an intermediate value filter only to the detected blocks, it is possible to selectively remove isolated points. Deterioration in image quality can be minimized. Note that filters for smoothing image data are not limited to the above-mentioned intermediate value filter;
A simple local average filter, local weighted average filter, etc. may also be used. For example, a local average filter simply calculates the average value of image data for each block consisting of a plurality of pixels, smoothes this average value as image data of pixels included in that block, and removes isolated points. This method is simple and requires a small amount of calculation, so it has the advantage of speeding up isolated point removal processing, but it may significantly degrade image quality.
【0034】[0034]
【発明の効果】以上説明したように本発明は、カラー画
像の各画素の色の色空間における位置に基づいて、指定
領域に属する画素を抽出し、得られた抽出結果から周囲
と色が異なる孤立点を除去することにより、指定領域を
過不足なく抽出することが可能となり、操作者による修
正処理の負担を軽減することができる。Effects of the Invention As explained above, the present invention extracts pixels belonging to a specified area based on the position of each pixel of a color image in the color space, and from the obtained extraction results, it is possible to determine whether the pixels are different in color from the surrounding area. By removing isolated points, it becomes possible to extract the specified area without excess or deficiency, and the burden of correction processing on the operator can be reduced.
【図1】本発明の領域抽出方法の原理を示す図である。FIG. 1 is a diagram showing the principle of the region extraction method of the present invention.
【図2】本発明の領域抽出装置の原理ブロック図である
。FIG. 2 is a principle block diagram of the region extraction device of the present invention.
【図3】請求項4の領域抽出装置の構成を示す図である
。FIG. 3 is a diagram showing the configuration of a region extracting device according to a fourth aspect of the present invention.
【図4】本発明の領域抽出装置を適用した画像処理シス
テムの実施例構成図である。FIG. 4 is a configuration diagram of an embodiment of an image processing system to which the region extraction device of the present invention is applied.
【図5】中間値フィルタによる孤立点除去処理の説明図
である。FIG. 5 is an explanatory diagram of isolated point removal processing using an intermediate value filter.
【図6】請求項4の領域抽出装置の孤立点除去手段の実
施例構成図である。FIG. 6 is a configuration diagram of an embodiment of isolated point removing means of the region extracting device according to claim 4;
【図7】請求項4の領域抽出装置の孤立点除去処理の説
明図である。FIG. 7 is an explanatory diagram of isolated point removal processing of the region extraction device according to the fourth aspect.
111 領域抽出手段 112 孤立点除去手段 121 保持手段 122,132 中間値フィルタ 131 検出手段 201 画像読取装置 202 画像作成装置 203 画像保持メモリ 205 表示用メモリ 206 カラーモニタ 210 領域抽出装置 211,213 座標変換部 212 メモリ 221 条件式作成部 222 演算処理部 223 判定処理部 311 微分処理部 312 孤立点判別部 321 読出回路 111 Area extraction means 112 Isolated point removal means 121 Holding means 122,132 Intermediate value filter 131 Detection means 201 Image reading device 202 Image creation device 203 Image holding memory 205 Display memory 206 Color monitor 210 Area extraction device 211, 213 Coordinate conversion section 212 Memory 221 Conditional expression creation part 222 Arithmetic processing unit 223 Judgment processing unit 311 Differential processing section 312 Isolated point determination unit 321 Readout circuit
Claims (4)
な色を示す代表色と前記カラー画像の各画素の色との色
空間における相対位置に基づいて、前記指定領域に属す
る画素を選択して抽出し、得られた抽出結果から周囲の
画素と色が異なる孤立点を除去することを特徴とする領
域抽出方法。1. Selecting and extracting pixels belonging to the specified area based on the relative position in a color space between a representative color indicating a representative color in the specified area of the color image and the color of each pixel of the color image. An area extraction method is characterized in that isolated points having a color different from surrounding pixels are removed from the obtained extraction results.
な色を示す代表色と前記カラー画像の各画素の色との色
空間における相対位置に基づいて、前記指定領域に属す
る画素を選択して抽出する領域抽出手段(111)と、
得られた抽出結果を平滑化して、周囲の画素と色が異な
る孤立点を除去する孤立点除去手段(112)とを備え
たことを特徴とする領域抽出装置。2. Selecting and extracting pixels belonging to the specified area based on the relative position in a color space between a representative color indicating a representative color in the specified area of the color image and the color of each pixel of the color image. area extraction means (111) for
An area extracting device characterized by comprising: isolated point removing means (112) for smoothing the obtained extraction result and removing isolated points whose color is different from surrounding pixels.
て、前記孤立点除去手段(112)が、予め、カラー画
像の全ての画素に対応して所定の色を表す画像データを
格納しており、領域抽出手段(111)によって得られ
た各画素の画像データをカラー画像における位置に応じ
て保持する保持手段(121)と、前記保持手段(12
1)に保持されたカラー画像の各画素の画像データをそ
の画素と周囲の複数の画素からなるブロックにおける画
像データの中間値で置き換えて、その画素の画像データ
として出力する中間値フィルタ(122)とを備えたこ
とを特徴とする領域抽出装置。3. The area extracting device according to claim 2, wherein the isolated point removing means (112) stores in advance image data representing a predetermined color corresponding to all pixels of the color image. , a holding means (121) for holding the image data of each pixel obtained by the area extraction means (111) according to the position in the color image; and the holding means (12).
An intermediate value filter (122) that replaces the image data of each pixel of the color image held in 1) with the intermediate value of image data in a block consisting of that pixel and a plurality of surrounding pixels, and outputs the result as image data of that pixel. A region extraction device characterized by comprising:
て、前記孤立点除去手段(112)が、予め、カラー画
像の全ての画素に対応して所定の色を表す画像データを
格納しており、領域抽出手段(111)によって得られ
た各画素の画像データをカラー画像における位置に応じ
て保持する保持手段(121)と、前記保持手段(12
1)に保持されたカラー画像から周囲の画素と色が異な
る画素を少なくとも1つ含む複数の画素からなるブロッ
クを孤立点を含むブロックとして検出する検出手段(1
31)と、前記検出手段(131)による検出結果の入
力に応じて、前記保持手段(121)に保持された該当
するブロックの中央の画素の画像データをそのブロック
における画像データの中間値で置き換えて、前記中央の
画素の画像データとして出力する中間値フィルタ(13
2)とを備えたことを特徴とする領域抽出装置。4. The area extracting device according to claim 2, wherein the isolated point removing means (112) stores in advance image data representing a predetermined color corresponding to all pixels of the color image. , a holding means (121) for holding the image data of each pixel obtained by the area extraction means (111) according to the position in the color image; and the holding means (12).
Detection means (1) for detecting a block consisting of a plurality of pixels including at least one pixel whose color is different from surrounding pixels from the color image held in (1) as a block containing an isolated point.
31), and in response to the input of the detection result by the detection means (131), the image data of the central pixel of the corresponding block held in the holding means (121) is replaced with the intermediate value of the image data in that block. and an intermediate value filter (13) that outputs the image data of the central pixel.
2) A region extraction device comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3105943A JPH04335481A (en) | 1991-05-10 | 1991-05-10 | Method and device for extracting area for color image |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3105943A JPH04335481A (en) | 1991-05-10 | 1991-05-10 | Method and device for extracting area for color image |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04335481A true JPH04335481A (en) | 1992-11-24 |
Family
ID=14420933
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3105943A Withdrawn JPH04335481A (en) | 1991-05-10 | 1991-05-10 | Method and device for extracting area for color image |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04335481A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110038533A1 (en) * | 2009-08-17 | 2011-02-17 | Fuji Xerox Co., Ltd. | Image processing apparatus and computer readable medium |
| JP2022188921A (en) * | 2021-06-10 | 2022-12-22 | Eneos株式会社 | Monitoring device, monitoring system, and monitoring method |
-
1991
- 1991-05-10 JP JP3105943A patent/JPH04335481A/en not_active Withdrawn
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110038533A1 (en) * | 2009-08-17 | 2011-02-17 | Fuji Xerox Co., Ltd. | Image processing apparatus and computer readable medium |
| US9002103B2 (en) * | 2009-08-17 | 2015-04-07 | Fuji Xerox Co., Ltd. | Image processing apparatus and computer readable medium |
| JP2022188921A (en) * | 2021-06-10 | 2022-12-22 | Eneos株式会社 | Monitoring device, monitoring system, and monitoring method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6868189B1 (en) | Image processing apparatus, an image processing method, and a computer readable medium having recorded thereon a processing program for permitting a computer to perform image processing routines | |
| EP0843464A3 (en) | Image processing system and image processing method | |
| JPH11122626A (en) | Image processing method and apparatus, and recording medium storing image processing program | |
| CN112419214A (en) | Method and device for generating labeled image, readable storage medium and terminal equipment | |
| US5412767A (en) | Image processing system utilizing brush profile | |
| CN108681989A (en) | A kind of image data Enhancement Method and device | |
| JP2006024116A (en) | Area division for color image | |
| JP2008015706A (en) | Image processing device | |
| JPH04335481A (en) | Method and device for extracting area for color image | |
| JP3052870B2 (en) | Image correction method and image correction device | |
| JP3268014B2 (en) | Color extraction device | |
| JPH04329487A (en) | Method and device for extracting area | |
| CN113498518A (en) | Image processing apparatus | |
| JPH05128224A (en) | Color extracting device for color picture and method therefor | |
| KR100539940B1 (en) | Method for displaying an image of sketch effect in portable terminal | |
| JP2002042110A (en) | Image measuring system, image measuring method, and computer-readable recording medium recording image measuring program | |
| JPH03201172A (en) | Image processor | |
| JP3075110B2 (en) | Image trimming device | |
| JPH05128225A (en) | Color designation / extraction device and color designation / extraction method | |
| JP6124127B2 (en) | Image processing apparatus and program thereof | |
| JPS6134676A (en) | Image processing system | |
| JPH0336672A (en) | Sharpening method for picture | |
| JPH09178565A (en) | Color measuring device | |
| JPH0567210A (en) | Image area detector | |
| JPH03500120A (en) | How to form a mask to highlight image fragments |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 19980806 |