JPH07160879A - Image processing method - Google Patents
Image processing methodInfo
- Publication number
- JPH07160879A JPH07160879A JP34007793A JP34007793A JPH07160879A JP H07160879 A JPH07160879 A JP H07160879A JP 34007793 A JP34007793 A JP 34007793A JP 34007793 A JP34007793 A JP 34007793A JP H07160879 A JPH07160879 A JP H07160879A
- Authority
- JP
- Japan
- Prior art keywords
- data
- area
- image
- similarity
- color space
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像処理方法に関し、
詳しくは画像データをある特徴を有する領域毎に分割を
行う画像処理方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method,
More specifically, the present invention relates to an image processing method for dividing image data into regions having certain characteristics.
【0002】[0002]
【従来の技術】印刷・写真・絵画等の分野においては、
画像の明度・色相・彩度・座標(位置)等を総合的にと
らえ、「ライト、中間、シャドウ」のように画像の部分
を分類することが多い。例えば、人物を表す写真の校正
段階において「人物のライトをさらに明るく」等のよう
に、画像のある部分を特定するために「ライト、中間、
シャドウ」という概念が用いられることが多い。「ライ
ト、中間、シャドウ」の判断は専ら作業者の判断に委ね
られており、作業者はこの判断をする際に画像の明度・
色相・彩度・座標等を総合的に考慮することが知られて
いる。2. Description of the Related Art In the fields of printing, photography, painting, etc.,
In many cases, the lightness, hue, saturation, coordinates (position), etc. of the image are comprehensively grasped, and the image portion is often classified into "light, middle, shadow". For example, in the step of proofreading a photograph representing a person, “light, middle,
The concept of "shadow" is often used. The judgment of "light, middle, shadow" is left to the judgment of the operator only, and the worker decides the brightness of the image when making this judgment.
It is known to comprehensively consider hue, saturation, coordinates, etc.
【0003】近年、印刷等の分野においては、原稿画像
をコンピュータにより処理することが多くなったため、
「ライト、中間、シャドウ」についても同様にコンピュ
ータにより自動的に抽出処理できることが好ましい。画
像中のある領域を抽出する一般的な方法として、濃度差
を有する画像を所定の閾値を用いて領域分割を行う方
法、濃度または色度等のヒストグラムにより決定された
閾値を用いて領域分割を行う方法、画像のエッジを領域
の境界線とみなして領域分割を行う方法等を用いること
が考えられる。In recent years, in the fields of printing and the like, since the image of an original document is often processed by a computer,
Similarly, it is preferable that the “light, intermediate, and shadow” can be automatically extracted by the computer. As a general method for extracting a certain area in an image, a method of dividing an image having a difference in density using a predetermined threshold value, and a method of dividing the area using a threshold value determined by a histogram such as density or chromaticity are used. It is conceivable to use a method of performing the above, a method of dividing the area by regarding the edge of the image as a boundary line of the area.
【0004】しかしながら、上記従来の画像処理方法
は、いずれも画像の明度・色相・彩度・座標等をそれぞ
れ別個に判断することにより領域分割を行うものであっ
て、これらを総合的にとらえて領域分割を行うものでは
ない。したがって、従来の画像処理方法によって分割さ
れた領域は、「ライト、中間、シャドウ」という概念に
よる領域とは異なったものとなってしまう。すなわち、
上述した画像処理方法によっては、「ライト、中間、シ
ャドウ」のように、人間の認識に合致した領域分割を行
うことはできない。However, each of the above-mentioned conventional image processing methods divides the area by separately judging the lightness, hue, saturation, coordinates, etc. of the image, and these are comprehensively considered. It does not perform area division. Therefore, the area divided by the conventional image processing method is different from the area based on the concept of “light, intermediate, shadow”. That is,
Depending on the image processing method described above, it is not possible to perform area division that matches human recognition, such as "light, intermediate, and shadow."
【0005】また、「ライト、中間、シャドウ」の分割
・分類に階層性があることに着目すれば、階層的クラス
タ分析法を画像に適用して、「ライト、中間、シャド
ウ」の各領域を分割・分類することも考えられる。とこ
ろが、この場合には以下の問題が生じる。階層的クラス
タリングを行うためには、全ての画素対についての色空
間上の距離を計算し、この中から最小距離のクラスタ対
を見つけださなければならない。このため、画素数が増
えると、計算対象とするクラスタ対の数は膨大な数とな
り、処理時間および必要とするメモリ容量は膨大なもの
となってしまう。例えば、512×512画素の画像デ
ータにあっては、全画素数n=512×512=262
144における画素対の組み合わせの数はnC2=3.4
36×106となる。この数のデータを同時にメモリに
保持しようとすると、およそ200〜400GByte
sもの大容量メモリを必要とする。また、画素数nにつ
いての画素対の数はnC2=n(n+1)/2で表される
ことから、演算対象となる画素対の数は画素数nの二乗
に比例して増加することが確認できる。したがって、か
かる方法は、膨大な計算時間およびメモリ容量を必要と
するため、高精細画像を対象としたクラスタリングには
適用できず、「ライト、中間、シャドウ」の各領域の分
割を行うことは不可能である。If attention is paid to the fact that the division / classification of "light, intermediate, shadow" has a hierarchical structure, the hierarchical cluster analysis method is applied to the image so that each area of "light, intermediate, shadow" is divided. It is also possible to divide and classify. However, in this case, the following problems occur. In order to perform hierarchical clustering, it is necessary to calculate the distances in the color space for all pixel pairs and find the cluster pair with the minimum distance from them. Therefore, if the number of pixels increases, the number of cluster pairs to be calculated becomes enormous, and the processing time and the required memory capacity also become enormous. For example, in image data of 512 × 512 pixels, the total number of pixels n = 512 × 512 = 262
The number of pixel pair combinations in 144 is n C 2 = 3.4
It becomes 36 × 10 6 . If you try to keep this number of data in memory at the same time, it will take about 200-400 GB
It requires as many as s large-capacity memory. In addition, since the number of pixel pairs for the number of pixels n is expressed by n C 2 = n (n + 1) / 2, the number of pixel pairs to be calculated should increase in proportion to the square of the number of pixels n. Can be confirmed. Therefore, such a method requires a huge amount of calculation time and memory capacity, and therefore cannot be applied to clustering for high-definition images, and it is not possible to divide each region of “light, intermediate, and shadow”. It is possible.
【0006】したがって、従来の画像処理方法のいずれ
を用いたとしても、画像を「ライト、中間、シャドウ」
の各領域に分割することはできなかった。Therefore, no matter which of the conventional image processing methods is used, the image is "light, intermediate, shadow".
Could not be divided into each area.
【0007】[0007]
【発明の目的】そこで、本発明は、画像を人間の認識に
合わせて「ライト、中間、シャドウ」の各領域に分割可
能な画像処理方法を提供することを目的としている。SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an image processing method capable of dividing an image into "light, intermediate, and shadow" regions according to human recognition.
【0008】[0008]
【課題を解決するための手段】請求項1に記載の発明
は、画像データ中の対比される2つの領域の類似度を、
色空間上における当該2つの領域の座標に基づき算出
し、上記画像データ中の一の領域に隣接した複数の他の
領域のうち、当該一の領域との類似度が最大となる他の
領域を当該一の領域に順次統合することを特徴とする画
像処理方法である。According to a first aspect of the present invention, the similarity between two areas in image data to be compared is
Of the plurality of other areas adjacent to the one area in the image data, the other area having the maximum similarity with the one area is calculated based on the coordinates of the two areas in the color space. It is an image processing method characterized by sequentially integrating into the one area.
【0009】請求項2に記載の発明は、画像データ中の
対比される2つの領域の類似度を、色空間上における当
該2つの領域の座標に基づき算出し、上記画像データ中
の一の領域に隣接した複数の他の領域のうち、当該一の
領域との類似度が最大となる他の領域を当該一の領域に
順次統合し、領域統合の順序および領域統合された領域
間の類似度を表す履歴データを生成し、上記履歴データ
に従い領域統合された画像データのうち、所定範囲の類
似度の領域対を、領域統合の順序と逆の順序で順次分割
することを特徴とする画像処理方法である。According to a second aspect of the present invention, the similarity between two areas in the image data to be compared is calculated based on the coordinates of the two areas in the color space, and one area in the image data is calculated. Among a plurality of other areas adjacent to the other area, another area having the highest similarity to the one area is sequentially integrated into the one area, and the order of area integration and the similarity between the area integrated areas Image processing characterized in that history data representing the above is generated, and in the image data area-integrated according to the history data, the area pair having a similarity in a predetermined range is sequentially divided in the reverse order of the area integration order. Is the way.
【0010】請求項3記載の発明は、請求項1または請
求項2記載の類似度を画像データ中の対比される2つの
領域を統合したことによる色空間上における各領域の分
散または重心の変化に基づき算出することを特徴とする
画像処理方法である。According to a third aspect of the present invention, the variance or the center of gravity of each region on the color space due to the integration of the two regions in the image data to which the similarity according to the first or second aspect is integrated. The image processing method is characterized by calculating based on
【0011】請求項4に記載の発明は、画像データを構
成する各領域を頂点とみなし、隣接し合う2つの頂点の
類似度を色空間上における2つの頂点の座標に基づき算
出し、算出された類似度を上記2つの頂点を連結する辺
とみなし、一の頂点に連結された複数の辺のなかから、
類似度が最大となる辺を検索するとともに、検索された
辺に連結された他の頂点を上記一の頂点に統合する処理
を繰り返すことを特徴とする画像処理方法である。According to a fourth aspect of the present invention, each region forming the image data is regarded as a vertex, and the similarity between two adjacent vertices is calculated based on the coordinates of the two vertices in the color space, and calculated. The similarity is regarded as a side connecting the above two vertices, and among the plurality of sides connected to one vertex,
The image processing method is characterized in that the side having the maximum similarity is searched, and the process of integrating other vertices connected to the searched side into one vertex is repeated.
【0012】[0012]
【作用】請求項1記載の発明において、画像データ中の
対比される2つの領域(クラスタ)の類似度を、色空間
上における当該2つの領域の座標に基づき算出する。す
なわち、2つの領域の色度等が近似している場合には、
類似度は大きくなる。そして、画像データ中の一の領域
に隣接した複数の他の領域のなかから、当該一の領域と
の類似度が最大となる他の領域を当該一の領域に順次統
合する。これにより、色度の近似した領域同士が統合さ
れ、領域間のコントラストを十分に高くすることができ
る。According to the first aspect of the invention, the degree of similarity between two regions (clusters) in the image data that are compared with each other is calculated based on the coordinates of the two regions in the color space. That is, when the chromaticities of the two areas are similar,
The degree of similarity increases. Then, of the plurality of other areas adjacent to the one area in the image data, the other area having the highest similarity to the one area is sequentially integrated into the one area. As a result, the areas having similar chromaticity are integrated, and the contrast between the areas can be sufficiently increased.
【0013】本発明によれば、色空間上座標および実画
像上の座標等を考慮することにより、明度・色度等を総
合的にとらえた領域統合が可能となる。以上のことよ
り、画像を「ライト、中間、シャドウ」のように画像を
大局的にとらえた領域抽出を行うことができる。さら
に、本発明によれば、隣接する領域対についてのみ類似
度を算出すればよいため、類似度のデータ等を保持する
ためのメモリ容量を低減できるとともに、画像に関して
階層的クラスタリングを短時間に行うことができるとい
う利点もある。According to the present invention, by considering the coordinates on the color space and the coordinates on the actual image, it is possible to integrate the areas comprehensively capturing the lightness / chromaticity. From the above, it is possible to perform the area extraction in which the image is comprehensively captured, such as “light, intermediate, and shadow”. Further, according to the present invention, since the similarity only has to be calculated for the adjacent region pairs, the memory capacity for holding the data of the similarity can be reduced, and the hierarchical clustering for the image can be performed in a short time. There is also an advantage that you can.
【0014】請求項2記載の発明において、画像データ
中の対比される2つの領域の類似度を、色空間上におけ
る当該2つの領域の座標に基づき算出する。そして、上
記画像データ中の一の領域に隣接した複数の他の領域の
うち、当該一の領域との類似度が最大となる他の領域を
当該一の領域に順次統合する。このとき、領域統合の順
序および領域統合された領域間の類似度を表す履歴デー
タを生成しておく。そして、領域統合された画像データ
のうち、上記履歴データに従い、所定範囲の類似度の領
域対を、領域統合の順序と逆の順序で順次分割する。す
なわち、領域統合された画像データは、ある程度特徴の
近似した領域毎に再度分割される。したがって、本発明
によれば、画像データ中から所望の領域を抽出すること
ができるものである。According to the second aspect of the present invention, the degree of similarity between two areas in the image data to be compared is calculated based on the coordinates of the two areas in the color space. Then, of the plurality of other areas adjacent to the one area in the image data, the other area having the maximum similarity to the one area is sequentially integrated into the one area. At this time, history data representing the order of region integration and the degree of similarity between the regions integrated is generated. Then, among the image data obtained by the region integration, the region pairs having the similarities in the predetermined range are sequentially divided in the reverse order of the region integration order according to the history data. That is, the region-integrated image data is divided again for each region having similar features. Therefore, according to the present invention, a desired area can be extracted from the image data.
【0015】請求項3記載の発明においては、請求項1
または請求項2記載の類似度を画像データ中の対比され
る2つの領域を統合した場合における色空間上の各領域
の分散または重心の変化に基づき算出する。例えば、色
度が相違するために色空間上において2領域が離れてい
る場合には、これらの2領域を統合することにより分散
は大きくなる。一方、色度が近似するために色空間上に
おいて2領域が接近している場合には、これらの2領域
を統合したとしても分散はさほど変化しない。また、色
空間上においてかけ離れた2領域を統合した場合には、
統合前後の重心位置が大きく変動する。一方、距離が近
い2領域を統合した場合には、統合前後の重心位置の変
動は少ない。よって、分散または重心の変化に基づき類
似度を算出することが可能となる。In the invention of claim 3, claim 1
Alternatively, the similarity according to claim 2 is calculated based on the variance of each area or the change of the center of gravity in the color space when the two areas to be compared in the image data are integrated. For example, when two areas are separated in the color space due to different chromaticity, the dispersion is increased by integrating these two areas. On the other hand, when the two regions are close to each other in the color space due to the similar chromaticity, the variance does not change so much even if these two regions are integrated. Also, if two areas that are far apart in the color space are integrated,
The center of gravity position before and after the integration changes greatly. On the other hand, when the two regions having a short distance are integrated, there is little variation in the position of the center of gravity before and after integration. Therefore, it is possible to calculate the similarity based on the variance or the change in the center of gravity.
【0016】請求項4に記載の発明において、先ず、画
像データを構成する各領域を頂点とみなす。次に、隣接
し合う2つの頂点の類似度を色空間上における2つの頂
点の座標に基づき算出し、算出された類似度を上記2つ
の頂点を連結する辺とみなす。すなわち、各領域、類似
度を頂点および辺を用いたグラフ構造によって表す。そ
して、一の頂点に連結された複数の辺のなかから、類似
度が最大となる辺を検索するとともに、検索された辺に
連結された他の頂点を上記一の頂点に統合する処理を繰
り返す。このようにグラフ構造を用いることにより、領
域統合を階層的に行うことが可能となるものである。In the invention described in claim 4, first, each area forming the image data is regarded as a vertex. Next, the similarity between two adjacent vertices is calculated based on the coordinates of the two vertices in the color space, and the calculated similarity is regarded as the side connecting the two vertices. That is, each area and the degree of similarity are represented by a graph structure using vertices and edges. Then, from among the plurality of sides connected to one vertex, the side having the highest degree of similarity is searched, and the process of integrating other vertices connected to the searched side into the one vertex is repeated. . By using the graph structure as described above, it becomes possible to perform region integration hierarchically.
【0017】[0017]
【実施例】以下、本発明の一実施例に係る画像処理方法
を説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An image processing method according to an embodiment of the present invention will be described below.
【0018】本実施例に係る画像処理方法を実行可能な
画像処理装置のブロック図を図1に示す。この画像処理
装置は、バス10、CPU11、入力I/F12、プロ
グラムメモリ13、ワークメモリ14、画像メモリ1
5、出力I/F16、外部記憶装置17、GDC(グラ
フィック・ディスプレイ・コントローラ)18、ディス
プレイ19等により構成されている。CPU11は、プ
ログラムメモリ13に書き込まれたプログラムに従い画
像の領域分割等の処理を実行するものである。入力I/
F12は、処理対象となる画像データを入力するための
インタフェースである。画像データは自然画像を表し、
例えば512×512画素のRGB(またはCMYK、
CIE LAB)のカラーのデータより構成される。プ
ログラムメモリ13は上述したCPU11の処理手順を
表すプログラムデータを格納するためのものである。FIG. 1 is a block diagram of an image processing apparatus capable of executing the image processing method according to this embodiment. This image processing apparatus includes a bus 10, a CPU 11, an input I / F 12, a program memory 13, a work memory 14, and an image memory 1.
5, an output I / F 16, an external storage device 17, a GDC (graphic display controller) 18, a display 19 and the like. The CPU 11 executes processing such as image area division according to a program written in the program memory 13. Input I /
F12 is an interface for inputting image data to be processed. The image data represents a natural image,
For example, RGB of 512 × 512 pixels (or CMYK,
CIE LAB) color data. The program memory 13 is for storing program data representing the processing procedure of the CPU 11 described above.
【0019】ワークメモリ14はCPU11が領域分割
の処理に伴い算出するデータ(後述するツリーデータ、
リストデータ等)を一時保持しておくためのものであ
る。画像メモリ15は入力I/F12から入力された画
像データを蓄えるためのものである。出力I/F16
は、領域分割された画像データ等を外部機器(プリンタ
等)に出力するためのディジタルインタフェースであ
る。外部記憶装置17は、ハードディスクユニット、光
磁気ディスクユニット等により構成され、画像データ、
領域分割された画像データ、ツリーデータ、リストデー
タ、プログラムデータ等を保存する大容量記憶装置であ
る。GDC18は画像データおよび領域分割後の画像デ
ータ等に基づき、表示データを生成するものである。デ
ィスプレイ19はこの表示データに基づく画像を表示す
るためのものである。The work memory 14 stores data (tree data, which will be described later) calculated by the CPU 11 in accordance with the area division processing.
List data etc.) is to be temporarily stored. The image memory 15 is for storing the image data input from the input I / F 12. Output I / F 16
Is a digital interface for outputting area-divided image data and the like to an external device (printer or the like). The external storage device 17 includes a hard disk unit, a magneto-optical disk unit, etc.
It is a large-capacity storage device that stores image data, tree data, list data, program data, and the like that have been area-divided. The GDC 18 generates display data based on the image data and the image data after the area division. The display 19 is for displaying an image based on this display data.
【0020】本実施例に係る画像処理方法の詳細を説明
する前に、階層的クラスタリングの概要を先ず説明す
る。階層的クラスタリングは、色相、明度、彩度等の特
徴が近似している(類似度の大きい)領域(クラスタ)
同士を順次統合していくことにより画像の領域分割を行
うものである。この画像処理装置によれば、与えられた
画像を人物と背景との領域に分割することが可能となる
ものである。Before describing the details of the image processing method according to this embodiment, an outline of hierarchical clustering will be first described. Hierarchical clustering is a region (cluster) in which features such as hue, brightness, and saturation are similar (large similarity).
The regions of the image are divided by sequentially integrating them. According to this image processing device, it is possible to divide a given image into areas of a person and a background.
【0021】例えば、物と背景をあらわす画像データが
画像処理装置に与えられたとする。画像処理装置は、n
画素の画像データ中の各画素の色空間上の座標点を初期
クラスタとする。色空間上におけるn個のクラスタは、
背景を表す画素と人物を表す画素とに対応して2つのか
たまった分布をなす。画像処理装置は、n個の初期クラ
スタの中の一のクラスタに着目し、色空間上においてこ
のクラスタに色度の近いクラスタを探し出す。すなわ
ち、画像処理装置は一のクラスタと他の全てのクラスタ
との色度等を色空間上の座標により計算し、色度の近似
した他のクラスタを探し出す。For example, assume that image data representing an object and a background is given to the image processing apparatus. The image processing device is n
The coordinate point on the color space of each pixel in the image data of the pixel is set as the initial cluster. The n clusters in the color space are
Two clustered distributions are formed corresponding to the pixel representing the background and the pixel representing the person. The image processing apparatus focuses on one cluster among the n initial clusters and searches for a cluster having a chromaticity close to this cluster in the color space. That is, the image processing apparatus calculates the chromaticity and the like of one cluster and all the other clusters by using the coordinates on the color space, and finds another cluster having an approximate chromaticity.
【0022】このようにして検出されたクラスタ対は、
実画像におけるる色相、明度、彩度等が互いに近似した
ものとなる。画像処理装置がこのクラスタ対を統合する
ことにより、クラスタの数はn−1個となる。この処理
を繰り返し実行し、クラスタ同士を順次統合すると、最
終的にはクラスタの数は1個となる。ここで、画像処理
装置が領域統合の過程においてクラスタの数が2個とな
った時点において領域統合を中止し、各画素を2つのク
ラスタに分類したとする。このようにして得られた2つ
のクラスタのうち、同一のクラスタを構成する画素同士
は互いに色度が近似しているが、異なるクラスタ間の画
素同士は色度が大きく異なっている。すなわち、画像デ
ータは特徴の異なる2つのグループに分割されたことに
なる。以上の処理により、画像を背景と人物との2つの
領域に分割することが可能となるものである。The cluster pair thus detected is
The hue, lightness, saturation, and the like in the actual image are similar to each other. The number of clusters becomes n-1 by the image processing apparatus integrating the cluster pairs. When this process is repeatedly executed and clusters are sequentially integrated, the number of clusters finally becomes one. Here, it is assumed that the image processing apparatus stops the area integration when the number of clusters reaches two in the area integration process and classifies each pixel into two clusters. Of the two clusters thus obtained, the pixels forming the same cluster have similar chromaticities, but the pixels between different clusters have significantly different chromaticities. That is, the image data is divided into two groups having different characteristics. With the above processing, the image can be divided into two areas, the background and the person.
【0023】図2は画像データおよび領域統合処理の概
念図である。図2中の符号21は、入力I/F12から
入力された画像データのうちの一部(9画素分)を示し
ている。図3はL*a*b*色空間上における画像データ
を表す図である。本画像処理装置にあっては、例えば画
素(クラスタ)210といずれの画素を統合させるかを
以下のように判断している。FIG. 2 is a conceptual diagram of image data and area integration processing. Reference numeral 21 in FIG. 2 indicates a part (9 pixels) of the image data input from the input I / F 12. FIG. 3 is a diagram showing image data in the L * a * b * color space. In the image processing apparatus, for example, the pixel (cluster) 210 and which pixel to integrate are determined as follows.
【0024】先ず、画像処理装置は、画素210に隣接
する画素(4近傍または8近傍)を探し出す。画素21
0に隣接する画素のみが、画素210と統合可能なもの
である。そして、画像処理装置は、画素210に隣接す
る画素のうち対比強度尺度値が最小となる(類似度が最
大となる)画素を探し出す。対比強度尺度値は、後述す
るようにL*a*b*色空間(図3)上において領域統合
をした場合に、クラスタの分散値の変化を表したもので
ある。L*a*b*色空間は均等色空間であり、この空間
上における距離は視覚上の色度の差に略比例したものと
なっている。すなわち、L*a*b*色空間における対比
強度尺度値が小さいということは、クラスタ対の色度等
が近似している(類似度が大きい)ことを意味し、対比
強度尺度値が大きいということは領域対の色度等が相違
(類似度が小さい)ということを意味している。First, the image processing apparatus searches for a pixel (4 neighborhoods or 8 neighborhoods) adjacent to the pixel 210. Pixel 21
Only pixels adjacent to 0 can be integrated with pixel 210. Then, the image processing apparatus searches for a pixel having a minimum contrast strength scale value (having a maximum degree of similarity) among pixels adjacent to the pixel 210. The contrast intensity scale value represents the change in the variance value of the cluster when the regions are integrated in the L * a * b * color space (FIG. 3) as described later. The L * a * b * color space is a uniform color space, and the distance in this space is approximately proportional to the difference in visual chromaticity. That is, the fact that the contrast intensity scale value in the L * a * b * color space is small means that the chromaticity and the like of the cluster pairs are similar (the similarity is large), and the contrast intensity scale value is large. This means that the chromaticity and the like of the pair of areas are different (the degree of similarity is small).
【0025】例えば、L*a*b*色空間において画素2
10と画素211との対比強度尺度値が最小であったと
すると、画像処理装置は画素210と画素211との領
域統合を行う。このような処理を繰り返すことにより、
隣接する画素(クラスタ)対のうち、色度等の近似した
もの同士が順次統合され、最終的には9個の画素は1つ
のクラスタ(領域)にまとめられるものである。For example, pixel 2 in the L * a * b * color space.
If the contrast intensity scale value of 10 and the pixel 211 is the minimum, the image processing apparatus performs the region integration of the pixel 210 and the pixel 211. By repeating such processing,
Among adjacent pixel (cluster) pairs, those having similar chromaticities are sequentially integrated, and finally 9 pixels are combined into one cluster (region).
【0026】上述した階層的クラスタリング処理を効率
よく行うために、本実施例はいわゆるグラフ構造による
データ処理を行っている。すなわち、画像データを構成
する画素(クラスタ)を頂点とみなし、L*a*b*色空
間における画素(クラスタ)間の対比強度尺度値を辺と
みなし、各領域および各領域間の類似度等をグラフとし
て扱うものである。これらの頂点および辺の全体をグラ
フとしてとらえると、階層的クラスタリングの処理はい
わゆる木(tree)を構成することになる。以下に、
本画像処理装置における各種データ構造を図5〜図8を
参照しながら説明する。In order to efficiently perform the above-mentioned hierarchical clustering processing, this embodiment carries out data processing by a so-called graph structure. That is, the pixels (clusters) forming the image data are regarded as vertices, the contrast intensity scale value between the pixels (clusters) in the L * a * b * color space is regarded as an edge, and the similarity between each region and each region, etc. Is treated as a graph. If the whole of these vertices and edges is grasped as a graph, the process of hierarchical clustering constitutes a so-called tree. less than,
Various data structures in the image processing apparatus will be described with reference to FIGS.
【0027】図5は、頂点のデータ50および辺のデー
タ51を表している。頂点のデータ50はクラスタの情
報を表すものであり、以下のデータにより構成されてい
る。同図において、ラベル501はグラフ中の一意の記
号であればよいが、本実施例では頂点であるクラスタの
実画像上の座標(x,y)を表している。例えば、32
ビットのデータのうちの上位16ビットをy座標値、下
位16ビットをx座標値とすると、ラベル501はy×
65536+xのように表される。また、画像の幅をw
とし、x+y×wのようにラベル501を表すことも可
能である。L*平均値502、a*平均値503、b*平
均値504は、クラスタ内の各画素についてのL*a*b
*色空間における各座標の平均値を表したものである。
サンプル数505は、クラスタを構成する全画素数を表
している。リストへのポインタ506は、ワークメモリ
14上におけるリストデータ60のアドレスを表すもの
である。リストデータ60は、辺のデータのポインタよ
りなるものであり、これについては後述する(図6)。
二分木へのポインタ507は、統合前の頂点を表す二分
木のノードを表すものである。すなわち、二分木のデー
タはクラスタの統合履歴をツリー構造のデータとして表
したものである。FIG. 5 shows vertex data 50 and edge data 51. The vertex data 50 represents cluster information, and is composed of the following data. In the figure, the label 501 may be a unique symbol in the graph, but in this embodiment, it represents the coordinates (x, y) on the real image of the cluster that is the vertex. For example, 32
If the upper 16 bits of the bit data are the y coordinate value and the lower 16 bits are the x coordinate value, the label 501 is y ×.
It is expressed as 65536 + x. Also, the width of the image is w
Then, the label 501 can be expressed as x + y × w. The L * average value 502, a * average value 503, b * average value 504 are the L * a * b values for each pixel in the cluster.
* It represents the average value of each coordinate in the color space.
The number of samples 505 represents the total number of pixels forming a cluster. The pointer 506 to the list represents the address of the list data 60 on the work memory 14. The list data 60 is composed of edge data pointers, which will be described later (FIG. 6).
The binary tree pointer 507 represents the node of the binary tree representing the vertex before integration. That is, the binary tree data represents the cluster integration history as tree-structured data.
【0028】辺のデータ51は以下のように構成されて
いる。対比強度尺度値511は辺の両端にある頂点(ク
ラスタ)間のL*a*b*色空間上における分散変化を表
している。すなわち、対比強度尺度値511は、対比さ
れる2つのクラスタを統合したと仮定して、統合前後に
おけるL*a*b*色空間上のクラスタの分散値の変化を
表したものである。したがって、対比強度尺度値が小さ
いということは、2つのクラスタを統合した場合におけ
る分散値の変化が少ないということであり、すなわち、
2つのクラスタの色度が近似している(類似度が大き
い)ということを意味している。逆に、対比強度尺度値
が大きいということは、2つのクラスタを統合した場合
における分散値の変化が大きいということであり、すな
わち、2つのクラスタの色度が相違している(類似度が
小さい)ということを意味している。なお、図3の下式
に従い対比強度尺度値を算出する際に、L*a*b*の各
成分に重み付けをしてもよい。The edge data 51 is structured as follows. The contrast intensity scale value 511 represents the variance change in the L * a * b * color space between the vertices (clusters) at both ends of the side. That is, the contrast intensity scale value 511 represents a change in the variance value of the clusters in the L * a * b * color space before and after the integration, assuming that the two clusters to be compared are integrated. Therefore, a small contrast strength scale value means a small change in the variance value when two clusters are integrated, that is,
This means that the chromaticities of the two clusters are similar (the degree of similarity is large). On the contrary, a large contrast strength scale value means a large change in the variance value when the two clusters are integrated, that is, the chromaticity of the two clusters is different (the similarity is small). ) Is meant. When calculating the contrast strength scale value according to the lower expression of FIG. 3, each component of L * a * b * may be weighted.
【0029】辺のデータ51中の頂点のデータへのポイ
ンタ512、513は、辺の両端の頂点のデータのアド
レスを示している。したがって、辺のデータ51を参照
することにより、クラスタの連結関係および各クラスタ
間の類似度を容易に判断することが可能となるものであ
る。The pointers 512 and 513 to the vertex data in the side data 51 indicate the addresses of the vertex data at both ends of the side. Therefore, by referring to the side data 51, it is possible to easily determine the connection relationship of the clusters and the similarity between the clusters.
【0030】図6は、リストデータ60、頂点のデータ
50、辺のデータ51の関係を表している。この図の頂
点のデータ50、辺のデータ51は上述したとうりのも
のである。リストデータ60は、辺のデータ51のアド
レスを示すポインタ601より構成されているものであ
る。よって、リストデータ60を参照することにより、
辺および頂点の連結関係を把握することが可能となるも
のである。また、辺のデータ51中のポインタ512、
513を参照することにより辺の両端にある2つの頂点
のデータ50を探し出すことができ、頂点のデータ50
中のリストへのポインタ506を参照することによりリ
ストデータ60を探し出すことができるものである。FIG. 6 shows the relationship between the list data 60, the vertex data 50, and the side data 51. The apex data 50 and the side data 51 in this figure are as described above. The list data 60 is composed of a pointer 601 indicating the address of the side data 51. Therefore, by referring to the list data 60,
This makes it possible to grasp the connection relationship between edges and vertices. In addition, the pointer 512 in the side data 51,
By referring to 513, it is possible to find the data 50 of the two vertices at both ends of the side.
The list data 60 can be found by referring to the pointer 506 to the inside list.
【0031】図7は、頂点のデータ50、ツリー構造の
ノードデータ70を表している。ノードデータ70に
は、2つの頂点(クラスタ)を統合する際の情報が含ま
れており、二分木のデータの一部を構成するものであ
る。ラベル701は統合後の頂点のラベルで、本実施例
では、統合前の2つの頂点のラベルのいずれかとする。
L*平均値702、a*平均値703、b*平均値704
は、2つのクラスタを統合した後の各色成分の平均値で
ある。すなわち、各クラスタの総画素数に従い各色成分
の値を加重平均したものが、L*平均値702、a*平均
値703、b*平均値704である。対比強度尺度値7
05は、上述したように2つのクラスタを統合した場合
におけるL*a*b*色空間上の分散値の変化を示してい
る。FIG. 7 shows the vertex data 50 and the tree-structured node data 70. The node data 70 includes information for integrating two vertices (clusters) and constitutes a part of binary tree data. The label 701 is the label of the vertex after integration, and in this embodiment, it is one of the labels of the two vertices before integration.
L * average value 702, a * average value 703, b * average value 704
Is the average value of each color component after integrating the two clusters. That is, L * average value 702, a * average value 703, and b * average value 704 are weighted averages of the values of the respective color components according to the total number of pixels of each cluster. Contrast strength scale value 7
Reference numeral 05 shows a change in the dispersion value in the L * a * b * color space when the two clusters are integrated as described above.
【0032】サブツリーへのポインタ706、707
は、統合されたノードデータ70を指し示すものであ
る。このように階層的構造をなすノードデータ70をた
どっていくことにより、領域統合の過程を把握すること
ができるものである。Pointers 706 and 707 to subtrees
Indicates the integrated node data 70. By tracing the node data 70 having a hierarchical structure in this manner, the process of region integration can be grasped.
【0033】図8は、B−木(tree)を表す図であ
る。このB−木80は、対比強度尺度値をキー(検索項
目)としてリスト81〜86、・・・の中から対比強度
尺度の最小となる辺のデータを検索するために用いられ
るものである。すなわち、このB−木80を参照するこ
とにより、ある頂点(クラスタ)と、この頂点に隣接し
た他の頂点とを結ぶ辺のなかから色度がもっとも類似し
たものを極めて少ないメモリアクセスで検索することが
可能となるものである。この図において、リスト81〜
86、・・・には辺のデータ51のアドレスを指し示す
ポインタが書き込まれており、同一リストのポインタで
示される辺のデータ51は同一の対比強度尺度値をもつ
ものである。これらのポインタは辺のデータ51中の対
比強度尺度値511の昇順に対応して並んでいる。した
がって、最上位のリスト81に登録されたポインタを調
べ、このポインタの示す辺のデータ51を探し出すこと
により、対比強度尺度値が最小となる辺のデータ51を
探索できるものである。なお、対比強度尺度値が同一と
なる辺が複数存在する場合には、同一のリストに複数の
ポインタが登録される。FIG. 8 is a diagram showing a B-tree. The B-tree 80 is used to search the data of the side having the minimum contrast strength scale from the lists 81 to 86, ... Using the contrast strength scale value as a key (search item). That is, by referring to the B-tree 80, the edge having the most similar chromaticity is searched for with extremely few memory accesses among the edges connecting a certain vertex (cluster) and another vertex adjacent to this vertex. It is possible. In this figure, lists 81-
A pointer indicating the address of the side data 51 is written in 86, ..., And the side data 51 indicated by the pointers in the same list have the same contrast strength scale value. These pointers are arranged corresponding to the ascending order of the contrast strength scale value 511 in the side data 51. Therefore, by examining the pointer registered in the highest list 81 and finding the side data 51 indicated by this pointer, the side data 51 having the smallest contrast strength scale value can be searched. When there are a plurality of sides having the same contrast strength scale value, a plurality of pointers are registered in the same list.
【0034】B−木80の根のノードは4つのキー81
1〜814からなり、さらにそれぞれのキーの前後に5
つのポインタ821〜825があり、各ポインタは一つ
のノードを指し、各キーは一つのリストをポイントす
る。これらは、全体として階層構造をなしている。根の
5つのポインタ821〜825はそれぞれ、キー811
より小さいキー、キー811より大きくキー812より
小さいキー、キー812より大きくキー812より小さ
いキー、キー812より大きくキー813より小さいキ
ー、・・・、キー814より大きいキーのようにデータ
が分割して割り当てられ、これらの各ポインタに接続さ
れた各ノードには、さらにデータが分割して割り当てら
れている。従って、各層ごとに最上位のノード801、
802、803をたどっていくことにより、最小の対比
強度尺度値を示す辺のデータへのポインタのリスト81
を探索することができるものである。なお、B−木80
は、リスト81、・・・の追加、削除が容易であるとい
う利点を備えている。また、同一リスト内に複数の対比
強度尺度値が登録されている場合、このうちの一つが削
除されたとしても、リストが空になるまでそのキーは削
除されることはない。すなわち、B−木80は常に平衡
状態を保つため、高速の検索が可能となる。The root node of B-tree 80 has four keys 81.
1 to 814, and 5 before and after each key
There are one pointer 821 to 825, each pointer points to one node, and each key points to one list. These have a hierarchical structure as a whole. The five root pointers 821 to 825 are respectively keys 811.
Data is divided into smaller keys, keys larger than key 811 and smaller than key 812, keys larger than key 812 and smaller than key 812, keys larger than key 812 and smaller than key 813, ..., Keys larger than key 814. Data is further divided and assigned to each node that is assigned to each node and connected to each of these pointers. Therefore, for each layer, the top node 801,
By tracing 802 and 803, a list 81 of pointers to the side data indicating the minimum contrast strength scale value
Is what you can search for. In addition, B-tree 80
Has the advantage that the lists 81, ... Can be easily added and deleted. Further, when a plurality of contrast strength scale values are registered in the same list, even if one of them is deleted, the key will not be deleted until the list becomes empty. That is, since the B-tree 80 always maintains the equilibrium state, high-speed search is possible.
【0035】続いて、本実施例に係る画像処理装置にお
ける階層的クラスタリング処理、すなわち各クラスタを
1つのクラスタに統合するまでの作用を説明する。図4
は本実施例に係る画像処理装置の領域統合の処理を表す
フローチャートである。先ず、CPU11は入力I/F
12を介して画像データを入力し、これを画像メモリ1
5に記憶させる。ここで、図2に示される画像データ2
1が入力されたとする。実際の画像データはこれよりは
るかに画素数が多いが、ここでは3×3の画素の画像デ
ータ21を例に説明を進める。Next, the hierarchical clustering processing in the image processing apparatus according to this embodiment, that is, the operation of integrating each cluster into one cluster will be described. Figure 4
3 is a flowchart showing a region integration process of the image processing apparatus according to the present embodiment. First, the CPU 11 uses the input I / F
Image data is input via 12 and is stored in the image memory 1
Store in 5. Here, the image data 2 shown in FIG.
It is assumed that 1 is input. Although the actual image data has a far larger number of pixels than this, the description will be given here by taking the image data 21 of 3 × 3 pixels as an example.
【0036】ステップS41において、CPU11は画
像データ21に基づき、頂点のデータ50、辺のデータ
51、ノードデータ70を算出することにより、いわゆ
る格子グラフを生成する(ステップS41)。このステ
ップS41の処理を詳細に表したものが、ステップS4
11、S412のサブルーチンである。In step S41, the CPU 11 calculates the vertex data 50, the edge data 51, and the node data 70 based on the image data 21 to generate a so-called lattice graph (step S41). A detailed description of the process of step S41 is made in step S4.
11, the subroutine of S412.
【0037】ステップS411において、CPU11は
画像データ21の各画素についての頂点のデータを算出
する。頂点のデータ50は上述したように、ラベル50
1、L*a*b*色空間における各色成分の平均値502
〜504、サンプル数505、リストへのポインタ50
6、二分木へのポインタ507により構成されるもので
ある。なお、この時点では領域統合は行われてないた
め、ラベル501は各画素の画像データ上の座標値とな
り、サンプル数505は”1”となる。また、各色成分
の平均値502〜504は画素毎のL*a*b*色空間上
の座標値となる。In step S411, the CPU 11 calculates the vertex data for each pixel of the image data 21. The vertex data 50 is the label 50 as described above.
1, the average value 502 of each color component in the L * a * b * color space
~ 504, number of samples 505, pointer to list 50
6, a pointer 507 to a binary tree. It should be noted that at this point in time, since area integration has not been performed, the label 501 has a coordinate value on the image data of each pixel, and the number of samples 505 is “1”. Further, the average values 502 to 504 of the respective color components become coordinate values on the L * a * b * color space for each pixel.
【0038】さらに、CPU11は各画素について、二
分木のノードデータ70を登録する。このとき、領域統
合は行われていないためいわゆるサブツリーは存在せ
ず、よってサブツリーへのポインタ706、707は空
欄(ゼロ)となる。また、クラスタの分散の変化を表す
対比強度尺度値705も空欄(ゼロ)となる。Further, the CPU 11 registers the node data 70 of the binary tree for each pixel. At this time, since region integration is not performed, so-called subtree does not exist, and therefore pointers 706 and 707 to the subtree are blank (zero). Further, the contrast strength scale value 705 indicating the change of the variance of the cluster is also blank (zero).
【0039】ステップS412において、CPU11は
辺のデータ51を以下の手順で算出する。先ず、CPU
11は、画像データ21中の画素210に着目し、この
画素210と、画素210に隣接する(例えば4近傍)
画素211〜214との間のL*a*b*色空間上におけ
る対比強度尺度値を求める。すなわち、CPU11はス
テップS411で算出された頂点データ50中のL*a*
b*の各色成分502〜504に基づき、画素210と
画素211〜214との各画素間における各色成分50
2〜504の分散の変化を調べる。これらの分散の変化
が対比強尺度値511として辺のデータ51に登録され
るものである。また、辺のデータ51のポインタ51
2、513には辺の両端にある頂点のデータ50のアド
レスが書き込まれる。このようにして、画素210を中
心とした4つの辺のデータ51が生成されるものであ
る。In step S412, the CPU 11 calculates the side data 51 according to the following procedure. First, the CPU
The pixel 11 focuses on the pixel 210 in the image data 21, and is adjacent to the pixel 210 (for example, 4 neighborhoods).
A contrast intensity scale value in the L * a * b * color space between the pixels 211 to 214 is obtained. That is, the CPU 11 causes L * a * in the vertex data 50 calculated in step S411 .
Based on the respective color components 502-504 of b * , the respective color components 50 between the pixels of the pixel 210 and the pixels 211-214
Examine the variance change from 2-504. These changes in variance are registered in the edge data 51 as the contrast strength scale value 511. In addition, the pointer 51 of the side data 51
In 2, 513, the addresses of the vertex data 50 at both ends of the side are written. In this way, the data 51 on the four sides centering on the pixel 210 is generated.
【0040】CPU11は、このようにして生成された
辺のデータ51を図8のB−木80にキーと辺のデータ
へのポインタを登録する。すなわち、CPU11は、対
比強度尺度値の小さい順に辺のデータ51のポインタを
登録し、リスト81、・・・・が完成する。以上のステ
ップS411、S412の処理により、頂点および辺の
データよりなる初期格子グラフが完成する(ステップS
41)。The CPU 11 registers the edge data 51 thus generated in the B-tree 80 of FIG. 8 as keys and pointers to the edge data. That is, the CPU 11 registers the pointers of the side data 51 in ascending order of the contrast strength scale value, and the list 81, ... Is completed. Through the processing in steps S411 and S412 described above, the initial lattice graph composed of the vertex and edge data is completed (step S
41).
【0041】続いて、CPU11はステップS42の判
断を実行する。このとき、領域統合は行われていないた
め、画素数がそのまま総クラスタ数となる。したがっ
て、ステップS42の判断結果はNOとなり、次のステ
ップS43が実行される。ステップS43において、C
PU11はB−木80を参照し、リスト81、・・・の
中から対比強度尺度値が最小となる辺のデータ51を検
索する。検索が終了すると、CPU11はリスト81を
先出し、または、後出し、もしくは何らかの規定に従っ
てリスト全体から削除する。Subsequently, the CPU 11 executes the judgment of step S42. At this time, since the region integration is not performed, the number of pixels becomes the total number of clusters as it is. Therefore, the determination result of step S42 is NO, and the next step S43 is executed. In step S43, C
The PU 11 refers to the B-tree 80 and searches the list 81, ... For the data 51 of the side having the minimum contrast strength scale value. When the search is finished, the CPU 11 deletes the list 81 from the entire list in advance or afterwards.
【0042】対比強度尺度値の最小となる辺のデータ5
1が検索されろと、CPU11はこの辺のデータ51の
両端にある頂点を統合する。例えば、画素210と画素
211との対比強度尺度値が最小であったとすると、画
素210と画素211との統合が行われる。これに伴
い、CPU11は頂点のデータ50、辺のデータ51、
二分木のデータ70等を更新する(ステップS44)。Side data 5 having the smallest contrast strength scale value 5
When 1 is retrieved, the CPU 11 integrates the vertices at both ends of the data 51 on this side. For example, if the contrast intensity scale value of the pixel 210 and the pixel 211 is the minimum, the pixel 210 and the pixel 211 are integrated. Accordingly, the CPU 11 causes the vertex data 50, the edge data 51,
The binary tree data 70 and the like are updated (step S44).
【0043】頂点のデータ50の更新処理を以下に説明
する。CPU11は、ステップS43において統合され
た画素210、211のそれぞれに対応する2つの頂点
のデータ50を読み出し、いずれか一方の頂点のデータ
50を他方の頂点のデータ50に統合する。例えば、画
素210に係る頂点のデータ50を画素211に係る頂
点のデータに統合したとする。2つの画素210、21
1が一つのクラスタに統合された結果、統合後のクラス
タのL*a*b*色空間上における各色成分の平均値50
2〜504は変動する。したがって、CPU11は統合
されたクラスタにおける各色成分の平均値502〜50
4を、画素210に係る頂点のデータ50に登録する。The updating process of the vertex data 50 will be described below. The CPU 11 reads the data 50 of the two vertices corresponding to the pixels 210 and 211 integrated in step S43, and integrates the data 50 of one of the vertices with the data 50 of the other vertex. For example, assume that the vertex data 50 relating to the pixel 210 is integrated with the vertex data relating to the pixel 211. Two pixels 210, 21
As a result of 1 being integrated into one cluster, the average value of each color component in the L * a * b * color space of the cluster after integration is 50.
2-504 varies. Therefore, the CPU 11 determines the average value 502 to 50 of each color component in the integrated cluster.
4 is registered in the vertex data 50 relating to the pixel 210.
【0044】頂点のデータ50中の二分木へのポインタ
507は、以下のように更新される。先ず、CPU11
は新たなノードデータ70を生成し、画素210に係る
頂点のデータ50中のポインタ507を新たなノードデ
ータ70のポインタ706に、画素211に係る頂点の
データ中のポインタ507を新たなノードデータ70の
ポインタ707にそれぞれ登録する。また、CPU11
は、画素210に係るラベル501を新たなノードデー
タ70のラベル701に、画素210、211に係る色
成分502〜504の平均値を新たなノードデータ70
の色成分702〜704に、画素210、211を結ぶ
辺のデータ51中の対比強度尺度値511を新たなノー
ドデータ70の対比強度尺度値705にそれぞれ登録す
る。The pointer 507 to the binary tree in the vertex data 50 is updated as follows. First, the CPU 11
Generates new node data 70, sets the pointer 507 in the vertex data 50 relating to the pixel 210 to the pointer 706 of the new node data 70, and sets the pointer 507 in the vertex data relating to the pixel 211 to the new node data 70. Are registered in the pointers 707 of. Also, the CPU 11
Represents the label 501 of the pixel 210 as the label 701 of the new node data 70 and the average value of the color components 502 to 504 of the pixels 210 and 211 as the new node data 70.
The contrast strength scale value 511 in the data 51 of the side connecting the pixels 210 and 211 is registered in the contrast strength scale value 705 of the new node data 70 in the color components 702 to 704 of FIG.
【0045】辺のデータ51の更新処理を以下に説明す
る。先ず、画素210、211の双方のリスト60から
頂点210、211に係る辺のデータを削除する。2つ
の頂点を統合した場合、各頂点が保有していた情報が重
複してしまうことがある。そこで、リストデータ60、
B−木80中の重複したデータを削除する。画素21
0、211を統合する第1回目の領域統合の段階におい
ては、画素210、211が重複して連結する辺が存在
しないため、かかる処理は必要がない。新たに統合され
た領域に対する非類似度の更新を、これに隣接するすべ
ての領域について行う。The updating process of the edge data 51 will be described below. First, the data of the sides relating to the vertices 210 and 211 are deleted from the lists 60 of both the pixels 210 and 211. When the two vertices are integrated, the information held by each vertex may be duplicated. Therefore, the list data 60,
B-Delete duplicated data in tree 80. Pixel 21
In the first stage of region integration in which 0 and 211 are integrated, there is no side where the pixels 210 and 211 are overlapped and connected, and therefore such processing is not necessary. The dissimilarity update for the newly integrated area is performed for all areas adjacent to it.
【0046】以上により、画素210、211が一つの
頂点(クラスタ)216に統合される。この後、CPU
11はステップS42に戻り、S42〜S44の処理を
繰り返し実行する。このようにして、画像データ21の
領域統合の段階で、例えば図3に示されるようにそれぞ
れ複数の画素を有するクラスタP、Q、Rが生成された
とする。以下、これらのクラスタP、Q、Rについての
処理を説明する。As described above, the pixels 210 and 211 are integrated into one vertex (cluster) 216. After this, the CPU
11 returns to step S42 and repeats the processing of S42 to S44. In this way, it is assumed that clusters P, Q, and R each having a plurality of pixels are generated at the stage of region integration of the image data 21 as shown in FIG. 3, for example. The processing for these clusters P, Q, and R will be described below.
【0047】ステップS43において、CPU11はB
−木80を参照し、リスト81、・・・の中から対比強
度尺度値が最小となる辺のデータ51を検索する。検索
が終了すると、CPU11は、リストからその検索され
た他の登録を削除し、リストが空であれば、そのキーを
B−木から削除する。対比強度尺度値の最小となる辺の
データ51が検索されろと、CPU11はこの辺のデー
タ51の両端にある頂点を統合する。例えば、クラスタ
PとクラスタQとの対比強度尺度値が最小であったとす
ると、クラスタPとクラスタQとの統合が行われる。こ
れに伴い、CPU11は頂点のデータ50、辺のデータ
51、二分木のデータ70等を更新する(ステップS4
4)。In step S43, the CPU 11 sets B
-Refer to the tree 80, and search the list 81, ... For the data 51 of the side having the minimum contrast strength scale value. When the search is completed, the CPU 11 deletes the other registered search from the list, and if the list is empty, deletes the key from the B-tree. When the side data 51 having the smallest contrast strength scale value is searched, the CPU 11 integrates the vertices at both ends of the side data 51. For example, if the contrast strength scale value of the cluster P and the cluster Q is the minimum, the cluster P and the cluster Q are integrated. Along with this, the CPU 11 updates the vertex data 50, the edge data 51, the binary tree data 70, etc. (step S4).
4).
【0048】頂点のデータ50の更新処理を以下に説明
する。CPU11は、ステップS43において統合され
たクラスタP、Qのそれぞれに対応する2つの頂点のデ
ータ50を読み出し、いずれか一方の頂点のデータ50
を他方の頂点のデータ50に統合する。例えば、クラス
タPに係る頂点のデータ50をクラスタQに係る頂点の
データに統合したとする。2つのクラスタP、Qが一つ
のクラスタに統合された結果、統合後のクラスタのL*
a*b*色空間上における各色成分の平均値502〜50
4は変動する。したがって、CPU11は統合されたク
ラスタにおける各色成分の平均値502〜504を、ク
ラスタQに係る頂点のデータ50に登録する。The process of updating the vertex data 50 will be described below. The CPU 11 reads the data 50 of two vertices corresponding to each of the clusters P and Q integrated in step S43, and the data 50 of one of the vertices is read.
Is integrated with the data 50 of the other vertex. For example, assume that the vertex data 50 related to the cluster P is integrated with the vertex data related to the cluster Q. As a result of the integration of the two clusters P and Q into one cluster, L * of the integrated cluster
Average value 502 to 50 of each color component in the a * b * color space
4 varies. Therefore, the CPU 11 registers the average values 502-504 of each color component in the integrated cluster in the vertex data 50 related to the cluster Q.
【0049】頂点のデータ50中の二分木へのポインタ
507は、以下のように更新される。先ず、CPU11
は新たなノードデータ70を生成し、クラスタPに係る
頂点のデータ50中のポインタ507を新たなノードデ
ータ70のポインタ706に、クラスタQに係る頂点の
データ中のポインタ507を新たなノードデータ70の
ポインタ707にそれぞれ登録する。また、CPU11
は、クラスタPに係るラベル501を新たなノードデー
タ70のラベル701に、クラスタP、Qに係る色成分
502〜504の平均値を新たなノードデータ70の色
成分702〜704に、クラスタP、Qを結ぶ辺のデー
タ51中の対比強度尺度値511を新たなノードデータ
70の対比強度尺度値705にそれぞれ登録する。The pointer 507 to the binary tree in the vertex data 50 is updated as follows. First, the CPU 11
Generates new node data 70, sets the pointer 507 in the vertex data 50 related to the cluster P to the pointer 706 of the new node data 70, and sets the pointer 507 in the vertex data related to the cluster Q to the new node data 70. Are registered in the pointers 707 of. Also, the CPU 11
Represents the label 501 of the cluster P as the label 701 of the new node data 70, the average value of the color components 502 to 504 of the clusters P and Q as the color components 702 to 704 of the new node data 70, and the cluster P, The contrast strength scale value 511 in the side data 51 connecting Q is registered in the contrast strength scale value 705 of the new node data 70, respectively.
【0050】辺のデータ51の更新処理を図3を参照し
ながら以下に説明する。先ず、CPU11は、頂点P、
Qを結ぶ辺PQを示すポインタ601をリストデータ6
0から削除する。また、頂点P、Qがともに連結する頂
点Rが存在する場合、CPU11は頂点P、Qに関する
リストデータ60から、辺QRRまたは辺RPのポイン
タ601を削除し、B−木80から辺QRまたは辺RP
に関するデータを削除する。さらに、CPU11は頂点
Pに連結する辺のポインタ601を頂点Qのそれにマー
ジする。以上の処理により重複したデータの削除等が行
われ、辺のデータ51に関する更新処理が終了する。The updating process of the edge data 51 will be described below with reference to FIG. First, the CPU 11 causes the vertex P,
The pointer 601 indicating the side PQ connecting Q is set to the list data 6
Delete from 0. When there is a vertex R in which the vertices P and Q are connected together, the CPU 11 deletes the pointer 601 of the side QRR or the side RP from the list data 60 regarding the vertices P and Q, and the side QR or the side QR from the B-tree 80. RP
Delete data about. Further, the CPU 11 merges the side pointer 601 connected to the vertex P with that of the vertex Q. By the above process, the duplicated data is deleted, and the update process for the edge data 51 is completed.
【0051】さらに、原点P、Qと連結していた他の頂
点Tとの辺のデータ51中の対比強度尺度値511は、
統合後のPおよびTのL*a*b*の平均値と構成画素数
に基づき更新処理される(図3中段の式)。この処理
は、上述した頂点データ50の更新処理におけるものと
同様である。統合後の新たな対比強度尺度値511の更
新に際し、更新されるべき辺のデータは一時B−木から
削除され、対比強度尺度値511が更新されると、CP
U11は新たな対比強度尺度値511をキーとしてデー
タ51へのポインタをB−木80に再登録する。Further, the contrast strength scale value 511 in the data 51 of the side with the other vertex T connected to the origins P and Q is
Update processing is performed based on the average value of L * a * b * of P and T after integration and the number of constituent pixels (equation in the middle part of FIG. 3). This processing is similar to that in the above-described updating processing of the vertex data 50. When updating the new contrast strength scale value 511 after integration, the edge data to be updated is deleted from the temporary B-tree and the contrast strength scale value 511 is updated.
U11 re-registers the pointer to the data 51 in the B-tree 80 using the new contrast strength scale value 511 as a key.
【0052】以上により、ステップS44の処理が終了
する。この後、CPU11はステップS42に戻り、画
像データ21の総クラスタ数が”1”になるまでステッ
プS42〜S44の処理を繰り返し実行する。総クラス
タ数が”1”になった時点で、領域統合処理は終了す
る。この結果、画像データ21は1つの頂点(クラス
タ)250に統合されるものである。With the above, the process of step S44 ends. After that, the CPU 11 returns to step S42 and repeats the processing of steps S42 to S44 until the total number of clusters of the image data 21 becomes "1". When the total number of clusters becomes "1", the area integration processing ends. As a result, the image data 21 is integrated into one vertex (cluster) 250.
【0053】なお、上述した領域統合処理は、一のクラ
スタに他のクラスタを順次統合させるものであるが、領
域統合を画像データの局所において並列に行うことも可
能である。このような並列処理はとくに初期の統合過程
において有効である。Although the above-described area integration processing is to integrate one cluster into another cluster in sequence, it is also possible to perform area integration in parallel in local areas of image data. Such parallel processing is particularly effective in the initial integration process.
【0054】図4のフローチャートで表された処理によ
る領域統合が終了すると、CPU11は統合履歴を表す
二分木のノードデータ70をワークメモリ14から外部
記憶装置17に書き込む。なお、二分木を構成するノー
ドデータ70の数は画像データの総画素数の約2倍とな
ることから、二分木のデータ数は膨大な数に達する。し
たがって、ワークメモリ14上に配置された二分木のデ
ータの全ての二分木探索を行っていたのでは、メモリア
クセスが膨大となる。そこで、本実施例においては、二
分木を構成するノードデータ70毎に、これを二分木探
索の順に外部記憶装置17に書き込み、読み出し時には
これと逆の順序でノードデータ70毎に外部記憶装置1
7からワークメモリ14に転送する。これにより、ワー
クメモリへの二分木再配置のためのメモリアクセスを大
幅に低減することが可能となるものである。以下に、外
部記憶装置17に対するルートノードからの書き込みお
よび読み込み時の処理を図7に基づき説明する。When the area integration by the process shown in the flowchart of FIG. 4 is completed, the CPU 11 writes the binary tree node data 70 representing the integration history from the work memory 14 to the external storage device 17. Since the number of node data 70 forming the binary tree is approximately twice the total number of pixels of the image data, the number of binary tree data is enormous. Therefore, if all the binary tree searches of the binary tree data arranged on the work memory 14 are performed, the memory access becomes enormous. Therefore, in this embodiment, for each node data 70 forming a binary tree, this is written to the external storage device 17 in the order of the binary tree search, and at the time of reading, the external storage device 1 for each node data 70 is in the reverse order.
7 to the work memory 14. This makes it possible to significantly reduce the memory access to the work memory for relocation of the binary tree. Below, processing at the time of writing and reading from the root node to the external storage device 17 will be explained based on FIG. 7.
【0055】書き込み時においては、ルートノードまた
は所定のノードを始点として以下の処理を再帰的に実行
する。先ず、始点となるノードデータ70中のラベル7
01、L*a*b*の各平均値702〜704、対比強度
尺度値705を外部記憶装置17に書き込む。次に、C
PU11はこのノードデータ70サブツリーへのポイン
タ706を参照し、サブツリーへのポインタ706が空
欄でなければ、サブツリー706が示す次のノードデー
タ70を外部記憶装置17に書き込む。ポインタ706
が空欄である場合には、このポインタ706が書き込ま
れたノードデータ70が「葉」である旨を外部記憶装置
17に書き込み一つ上の親ノードに戻り、ポインタ70
7についても同様の処理を行う。以上の処理を繰り返す
ことにより、ノードデータ70が二分木探索の順に外部
記憶装置17に書き込まれるものである。At the time of writing, the following processing is recursively executed starting from the root node or a predetermined node. First, the label 7 in the node data 70 that is the starting point
01, L * a * b * average values 702 to 704, and contrast strength scale value 705 are written in the external storage device 17. Then C
The PU 11 refers to the pointer 706 to this node data 70 subtree, and if the pointer 706 to the subtree is not blank, writes the next node data 70 indicated by the subtree 706 to the external storage device 17. Pointer 706
Is blank, the fact that the node data 70 in which the pointer 706 is written is “leaf” is written in the external storage device 17 and the process returns to the parent node one level higher, and the pointer 70
Similar processing is performed for 7. By repeating the above processing, the node data 70 is written in the external storage device 17 in the order of the binary tree search.
【0056】なお、上記書き込み処理において、二分木
の「葉」となるノードデータ70の判別をサブツリーへ
のポインタ706、707が空欄か否かにより行ってい
るが、対比強度尺度値705が空欄か否かにより行って
もよい。また、ノードデータ70に対応する頂点データ
50中のサンプル数505が”1”になったことをもっ
て当該ノードデータ70が「葉」であることを判断して
もよい。In the above writing process, the node data 70 to be the “leaf” of the binary tree is discriminated based on whether or not the pointers 706 and 707 to the subtree are blank, but whether the contrast strength scale value 705 is blank or not. It may be done depending on whether or not. Further, it may be determined that the node data 70 is a “leaf” when the number of samples 505 in the vertex data 50 corresponding to the node data 70 becomes “1”.
【0057】続いて、ノードデータ70の読み込み処理
を説明する。先ず、CPU11はワークメモリ14上に
ノードデータ70の領域を確保し、ここに外部記憶装置
17から読み出された始点となるノードデータ70中の
各データを転送する。次にワークメモリ14から読み出
されるノードデータはこのノードデータ70のポインタ
706がポイントするものとして新たなノードデータ7
0を確保し、そこにワークメモリ14からのデータを読
み込む。このとき、読み込まれたデータが「葉」でなけ
れば、ノードデータ70のポインタ706について同様
の処理を繰り返す。「葉」である場合には、このノード
データ70のポインタ706、707を空欄として一つ
上のノードに戻り、そのノードのポインタ707にポイ
ントされるものとして新たなノードデータ70の確保
と、ワークメモリ14からのデータの読み込みを行い、
このノードデータ70のワークメモリ706について処
理を継続する。Next, the process of reading the node data 70 will be described. First, the CPU 11 secures an area of the node data 70 on the work memory 14, and transfers each data in the node data 70 which is the starting point read from the external storage device 17 to the area. Next, the node data read from the work memory 14 is assumed to be the one pointed by the pointer 706 of this node data 70, and the new node data 7
0 is secured and the data from the work memory 14 is read there. At this time, if the read data is not a “leaf”, the same processing is repeated for the pointer 706 of the node data 70. If it is a “leaf”, the pointers 706 and 707 of the node data 70 are left blank and the node returns to the node one level higher, and the pointer 707 of the node is pointed to to secure new node data 70, and Read the data from the memory 14,
The process is continued for the work memory 706 of this node data 70.
【0058】続いて、この二分木をもとにした領域抽出
の処理について説明する。上述した領域統合処理によ
り、図2の(A)に示されるように画像データは最終的
に1つのクラスタ(頂点)250に統合された。この領
域統合の過程を逆にたどることにより、図2の(B)に
示されるように、画像データ21を分割した画像データ
22を得ることが可能である。すなわち、背景、人物等
を表す画像データを、背景の画像領域、人物の画像領域
等に分割し、所望の画像領域を抽出することができるも
のである。Next, the area extraction processing based on this binary tree will be described. By the area integration processing described above, the image data is finally integrated into one cluster (vertex) 250 as shown in FIG. By reversing the process of region integration, it is possible to obtain image data 22 obtained by dividing the image data 21 as shown in FIG. That is, image data representing a background, a person, etc. can be divided into a background image area, a person's image area, etc., and a desired image area can be extracted.
【0059】二分木(履歴データ)をルートノードから
「葉」に向かってたどっていくことにより、1のクラス
タを順次2つのクラスタに分割することができるわけで
あるが、二分木をどの深さまでたどるかを以下の手順で
予め決定しておく。先ず、分割を終了させる条件として
対比強度尺度値の下限(類似度の範囲)を、オペレータ
が画像処理装置に与えておく。すなわち、二分木に従い
一つのクラスタを分割していく過程において、各クラス
タの色度がある程度近似したならば分割処理を中止させ
る。これにより、画像を特徴の全く相違する領域毎に分
割することができるものである。By tracing the binary tree (history data) from the root node toward the "leaf", one cluster can be sequentially divided into two clusters. To what depth can the binary tree be divided? Whether to follow is determined in advance by the following procedure. First, the operator gives the image processing apparatus a lower limit of the contrast strength scale value (similarity range) as a condition for ending the division. That is, in the process of dividing one cluster according to the binary tree, if the chromaticity of each cluster approximates to some extent, the dividing process is stopped. As a result, the image can be divided into areas having completely different characteristics.
【0060】対比強度尺度値の下限値が画像処理装置に
与えられると、CPU11はルートのノードデータ70
中の対比強度尺度値705が指示された下限値より小さ
いか否かを判断する。このとき、対比強度尺度値705
が下限値より小さい(類似度が所定値以上)場合には処
理を終了する。一方、対比強度尺度値705が下限値よ
りも大きい(類似度が所定値以下)場合には、CPU1
1はノードデータ70中のポインタ706、707を参
照する。そして、ポインタ706、707が空欄である
場合(サブツリーが存在しない場合)には、CPU11
は処理を終了する。ポインタ706、707が空欄でな
い場合には、ポインタ706、707で示されたサブツ
リーのノードデータ70を参照する。このサブツリーの
対比強度尺度値705が下限値よりも小さい場合には処
理を終了する。これらの処理を繰り返すことにより、二
分木が限定される(二分木の枝が途中で切断される)も
のである。このようにして限定された二分木の「葉」に
よって示される各クラスタは、ある程度特徴が相違した
ものとなっている。When the lower limit value of the contrast strength scale value is given to the image processing apparatus, the CPU 11 causes the root node data 70
It is determined whether the contrast strength scale value 705 therein is smaller than the instructed lower limit value. At this time, the contrast strength scale value 705
Is smaller than the lower limit value (similarity is greater than or equal to a predetermined value), the processing ends. On the other hand, when the contrast strength scale value 705 is larger than the lower limit value (the similarity is equal to or less than the predetermined value), the CPU 1
1 refers to pointers 706 and 707 in the node data 70. If the pointers 706 and 707 are blank (no subtree exists), the CPU 11
Ends the process. If the pointers 706 and 707 are not blank, the node data 70 of the subtree indicated by the pointers 706 and 707 is referred to. If the contrast strength scale value 705 of this subtree is smaller than the lower limit value, the processing ends. By repeating these processes, the binary tree is limited (the branch of the binary tree is cut in the middle). The clusters represented by the “leaves” of the binary tree defined in this way have different characteristics to some extent.
【0061】図2の(B)に示されるように、ノード2
50をルートとする二分木は画像データ21の各画素に
向かって延びているが、この二分木を途中で切断するこ
とにより、4つのクラスタを「葉」とする二分木が得ら
れるものである。As shown in FIG. 2B, node 2
A binary tree having 50 as a root extends toward each pixel of the image data 21, but a binary tree having four clusters as “leafs” can be obtained by cutting this binary tree in the middle. .
【0062】このようにして限定された二分木の各葉
を、それ以下のサブツリーのルートノードとして、分割
された領域を示す領域指定データを生成する。なお、こ
の領域指定データは画像データ21に対応した座標値を
持つ二次元データである。先ず、CPU11はルートノ
ードのポインタ706、707を参照する。ポインタ7
06、707が空欄である場合には、CPU11はラベ
ル701から実画像におけるx、y座標を算出し、この
x、y座標に対応した領域指定データの座標にラベル7
01を書き込む。ポインタ706、707が空欄でない
場合には、ポインタ706、707で示されたサブツリ
ーのノードデータ70を参照し、上記と同様の処理を繰
り返していく。このような処理により、分割された各領
域にラベル701が付されるものである。また、各領域
に付されたラベル701を基に、画像データ21から所
望の領域を抽出することが可能となるものである。例え
ば、人物と背景とを表す画像データから、人物を表す領
域のみを抽出することができるものである。The area designation data indicating the divided area is generated by using each leaf of the binary tree thus limited as the root node of the subtrees below it. The area designation data is two-dimensional data having coordinate values corresponding to the image data 21. First, the CPU 11 refers to the pointers 706 and 707 of the root node. Pointer 7
If 06 and 707 are blank, the CPU 11 calculates the x and y coordinates in the real image from the label 701, and the label 7 is added to the coordinates of the area designation data corresponding to these x and y coordinates.
Write 01. If the pointers 706 and 707 are not blank, the node tree 70 of the subtree indicated by the pointers 706 and 707 is referred to, and the same processing as above is repeated. By such processing, the label 701 is attached to each of the divided areas. In addition, it is possible to extract a desired area from the image data 21 based on the label 701 attached to each area. For example, it is possible to extract only an area representing a person from image data representing a person and a background.
【0063】本実施例の画像処理装置により領域分割さ
れた画像の一例を図9および図10に示す。図9は原画
像を表している。図10はこの画像を領域分割したデー
タを表している。図9の原画像の階層的クラスタリング
を行うことにより、図10の(A)、(B)、(C)の
ように、順にクラスタが統合されていくものである。図
11は、図9の原画像を領域統合する過程を表したツリ
ーである。このツリーの横軸は領域統合の非類似度を対
数で表したものである。また、図11に付された矢印
(A)、(B)、(C)の各段階の画像が、図10の
(A)、(B)、(C)にそれぞれ対応している。図1
3、図14、図15は、それぞれ図10の(A)、
(B)、(C)に対応しており、領域統合の各段階にお
ける頂点および辺を示すグラフである。図13は同図の
矢印(A)の段階のグラフであり、図14は同図の矢印
(B)の段階のグラフである。さらに、図15は同図の
矢印(C)の段階のグラフを表している。図12は、原
画像121(図9に示されたものと同一)を領域統合す
る各段階の画像121〜126を示している。この図の
画像123、124、125は、図10の(A)、
(B)、(C)に対応している。An example of an image divided into areas by the image processing apparatus of this embodiment is shown in FIGS. 9 and 10. FIG. 9 shows an original image. FIG. 10 shows data obtained by dividing this image into regions. By performing the hierarchical clustering of the original image of FIG. 9, the clusters are sequentially integrated as shown in (A), (B), and (C) of FIG. FIG. 11 is a tree showing the process of region integration of the original image of FIG. The horizontal axis of this tree is the logarithm of the dissimilarity of region integration. Further, images at respective stages of arrows (A), (B), and (C) attached to FIG. 11 correspond to (A), (B), and (C) of FIG. 10, respectively. Figure 1
3, FIG. 14 and FIG. 15 are respectively shown in FIG.
It is a graph corresponding to (B) and (C) and showing the vertices and edges at each stage of region integration. 13 is a graph at the stage indicated by the arrow (A) in FIG. 14, and FIG. 14 is a graph at the stage indicated by the arrow (B) in FIG. Further, FIG. 15 shows a graph at the stage indicated by the arrow (C) in FIG. FIG. 12 shows images 121-126 at each stage of region integration of the original image 121 (identical to that shown in FIG. 9). The images 123, 124, and 125 of this figure are (A) of FIG.
It corresponds to (B) and (C).
【0064】以上述べたように、本実施例によれば、隣
接するクラスタ対のうち、色空間上の対比強度尺度値の
最小となる(類似度の最大となる)もの同士を統合する
ことにより階層的クラスタリングを行っている。したが
って、領域統合の判断を隣接するクラスタについてのみ
行えばよいため、処理時間を大幅に短縮できるとともに
処理に要するメモリ容量を軽減できる。As described above, according to this embodiment, among the adjacent cluster pairs, those having the smallest contrast strength scale value in the color space (having the highest similarity) are integrated. Hierarchical clustering is performed. Therefore, since it is only necessary to determine the area integration for adjacent clusters, it is possible to significantly reduce the processing time and the memory capacity required for the processing.
【0065】また、L*a*b*色空間上の分散変化の最
小となるクラスタ同士を統合するため、大局的な対比関
係を捉えるという視覚特性に合致した領域分割が可能と
なるものである。例えば、写真、映像、印刷等の分野に
おいては、階調を「ライト、中間、シャドウ」のように
主観的に分類することがある。本実施例によれば、視覚
特性に合致したL*a*b*色空間を用いて領域分割を行
っているため「ライト、中間、シャドウ」のような主観
的な画像の分割が可能となるものである。Further, since the clusters having the smallest variance change in the L * a * b * color space are integrated, it is possible to perform area segmentation that matches the visual characteristic of capturing a global contrast relationship. . For example, in the fields of photography, video, printing, etc., gradation may be subjectively classified as "light, intermediate, shadow". According to the present embodiment, since the L * a * b * color space that matches the visual characteristics is used for the region division, subjective image division such as "light, intermediate, shadow" is possible. It is a thing.
【0066】なお、L*a*b*色空間の他、U*V*W色
空間、L*u*v色空間等の色空間を使用することも可能
である。色空間上の各成分に重み付けを持たして、対比
強度尺度値を算出することにより、明度、色相、彩度の
いずれを重視した領域分割を行うかを適宜選択してもよ
い。また、本実施例においては、4近傍の画素について
領域統合を行っているが、8近傍の画素について領域統
合を行ってもよい。In addition to the L * a * b * color space, it is also possible to use a color space such as the U * V * W color space or the L * u * v color space. By weighting each component in the color space and calculating the contrast intensity scale value, it is possible to appropriately select which of the lightness, the hue, and the saturation is to be subjected to the region division. Further, in the present embodiment, the area integration is performed on the pixels in the four neighborhoods, but the area integration may be performed on the pixels in the eight neighborhoods.
【0067】[0067]
【発明の効果】以上説明したように、本発明にあって
は、色空間上の座標および実画像上の座標等を考慮して
階層的クラスタリングを行っている。したがって、画像
の明度・色相・彩度等を総合的にとらえることができ、
視覚特性に合わせて画像を「ライト、中間、シャドウ」
の各領域に分割することができる。As described above, according to the present invention, hierarchical clustering is performed in consideration of the coordinates on the color space and the coordinates on the actual image. Therefore, it is possible to comprehensively capture the brightness, hue, saturation, etc. of the image,
Image "light, middle, shadow" according to visual characteristics
Can be divided into areas.
【0068】また、隣接するクラスタ対のうち、色空間
上の対比強度尺度値の最小(類似度が最大)となるもの
同士を統合することにより、領域統合の判断対象となる
クラスタ対を限定することができ、クラスタ分割の処理
時間および画像処理装置の負担を軽減することが可能と
なる。また、実画像上において隣接する画素対を統合す
るため、統合された領域に不連続な部分が生じることも
ない。Further, among the adjacent cluster pairs, those having the smallest contrast strength scale value (maximum similarity) in the color space are integrated, thereby limiting the cluster pairs to be subjected to the area integration determination. It is possible to reduce the processing time for cluster division and the load on the image processing apparatus. Further, since adjacent pixel pairs are integrated on the actual image, no discontinuous portion is generated in the integrated area.
【図1】本発明の一実施例に係る画像処理装置のブロッ
ク図である。FIG. 1 is a block diagram of an image processing apparatus according to an embodiment of the present invention.
【図2】本発明の一実施例に係る画像データ、グラフ構
造のデータ等を表す図である。FIG. 2 is a diagram showing image data, graph structure data, and the like according to an embodiment of the present invention.
【図3】本発明の一実施例に係る対比強度尺度値の計算
式およびL*a*b*色空間色空間を表す図である。FIG. 3 is a diagram illustrating a calculation formula of a contrast intensity scale value and an L * a * b * color space color space according to an embodiment of the present invention.
【図4】本発明の一実施例に係る画像処理装置の領域統
合処理を表すフローチャートである。FIG. 4 is a flowchart showing a region integration process of the image processing apparatus according to the embodiment of the present invention.
【図5】本発明の一実施例に係る頂点のデータ、辺のデ
ータを表す図であるFIG. 5 is a diagram showing vertex data and edge data according to an embodiment of the present invention.
【図6】本発明の一実施例に係る頂点のデータ、辺のデ
ータ、リストデータを表す図である。FIG. 6 is a diagram showing vertex data, edge data, and list data according to an embodiment of the present invention.
【図7】本発明の一実施例に係る頂点のデータ、ノード
データを表す図である。FIG. 7 is a diagram showing vertex data and node data according to an embodiment of the present invention.
【図8】本発明の一実施例に係るB−木等を表す図であ
る。FIG. 8 is a diagram showing a B-tree or the like according to an embodiment of the present invention.
【図9】本発明の一実施例に係る画像データを表す図で
ある。FIG. 9 is a diagram showing image data according to an embodiment of the present invention.
【図10】本発明の一実施例に係る領域分割された画像
データを示す図である。FIG. 10 is a diagram showing region-divided image data according to an embodiment of the present invention.
【図11】本発明の一実施例に係る領域統合を表すツリ
ーである。FIG. 11 is a tree showing region integration according to an embodiment of the present invention.
【図12】本発明の一実施例に係る領域分割された画像
データを示す図である。FIG. 12 is a diagram showing region-divided image data according to an embodiment of the present invention.
【図13】本発明の一実施例に係る領域統合過程におけ
る頂点および辺を表すグラフである。FIG. 13 is a graph showing vertices and edges in a region integration process according to an embodiment of the present invention.
【図14】本発明の一実施例に係る領域統合過程におけ
る頂点および辺を表すグラフである。FIG. 14 is a graph showing vertices and edges in a region integration process according to an embodiment of the present invention.
【図15】本発明の一実施例に係る領域統合過程におけ
る頂点および辺を表すグラフである。FIG. 15 is a graph showing vertices and edges in a region integration process according to an embodiment of the present invention.
11 CPU 70 ノードデータ(履歴データ) 511、705 対比強度尺度値(類似度) 11 CPU 70 node data (historical data) 511, 705 contrast strength scale value (similarity)
Claims (4)
類似度を、色空間上における当該2つの領域の座標に基
づき算出し、 上記画像データ中の一の領域に隣接した複数の他の領域
のうち、当該一の領域との類似度が最大となる他の領域
を当該一の領域に順次統合することを特徴とする画像処
理方法。1. A similarity between two regions in image data to be compared is calculated based on the coordinates of the two regions in a color space, and a plurality of other regions adjacent to one region in the image data are calculated. An image processing method, characterized in that, of regions, other regions having a maximum degree of similarity to the one region are sequentially integrated into the one region.
類似度を、色空間上における当該2つの領域の座標に基
づき算出し、 上記画像データ中の一の領域に隣接した複数の他の領域
のうち、当該一の領域との類似度が最大となる他の領域
を当該一の領域に順次統合し、 領域統合の順序および領域統合された領域間の類似度を
表す履歴データを生成し、 上記履歴データに従い領域統合された画像データのう
ち、所定範囲の類似度の領域対を、領域統合の順序と逆
の順序で順次分割することを特徴とする画像処理方法。2. A similarity between two areas to be compared in image data is calculated based on coordinates of the two areas in a color space, and a plurality of other areas adjacent to one area in the image data are calculated. Of the regions, other regions having the highest similarity to the one region are sequentially integrated into the one region, and history data indicating the order of region integration and the similarity between the region integrated regions is generated. An image processing method, characterized in that, of the image data that has been area-integrated according to the history data, an area pair having a similarity within a predetermined range is sequentially divided in the reverse order of the area integration order.
画像データ中の対比される2つの領域を統合したことに
よる色空間上における各領域の分散または重心の変化に
基づき算出することを特徴とする画像処理方法。3. The calculation of the similarity according to claim 1 or 2 based on the variance of each area or the change of the center of gravity in the color space due to the integration of two areas to be compared in the image data. Characterized image processing method.
なし、 隣接し合う2つの頂点の類似度を色空間上における2つ
の頂点の座標に基づき算出し、 算出された類似度を上記2つの頂点を連結する辺とみな
し、 一の頂点に連結された複数の辺のなかから、類似度が最
大となる辺を検索するとともに、検索された辺に連結さ
れた他の頂点を上記一の頂点に統合する処理を繰り返す
ことを特徴とする画像処理方法。4. Each area constituting the image data is regarded as a vertex, the similarity between two adjacent vertices is calculated based on the coordinates of the two vertices in a color space, and the calculated similarity is calculated based on the above two values. The vertices are regarded as connecting edges, and the edge with the highest degree of similarity is searched from among the multiple edges connected to one vertex, and the other vertices connected to the searched edges are searched for. An image processing method, characterized in that the process of integrating into the image is repeated.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP34007793A JPH07160879A (en) | 1993-12-07 | 1993-12-07 | Image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP34007793A JPH07160879A (en) | 1993-12-07 | 1993-12-07 | Image processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH07160879A true JPH07160879A (en) | 1995-06-23 |
Family
ID=18333507
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP34007793A Pending JPH07160879A (en) | 1993-12-07 | 1993-12-07 | Image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07160879A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007149139A (en) * | 2001-12-06 | 2007-06-14 | Nec Corp | Method and apparatus for segmenting multidimensional images |
| JP2010183416A (en) * | 2009-02-06 | 2010-08-19 | Ricoh Co Ltd | Image processing apparatus and method, program, and recording medium |
| JP2011034410A (en) * | 2009-08-03 | 2011-02-17 | Canon Inc | Clustering processing method, clustering processing apparatus and program |
| WO2012005242A1 (en) * | 2010-07-05 | 2012-01-12 | 日本電気株式会社 | Image processing device and image segmenting method |
| JP2012094126A (en) * | 2010-09-29 | 2012-05-17 | Nikon Corp | Image processing device and image processing program |
-
1993
- 1993-12-07 JP JP34007793A patent/JPH07160879A/en active Pending
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007149139A (en) * | 2001-12-06 | 2007-06-14 | Nec Corp | Method and apparatus for segmenting multidimensional images |
| JP2010183416A (en) * | 2009-02-06 | 2010-08-19 | Ricoh Co Ltd | Image processing apparatus and method, program, and recording medium |
| JP2011034410A (en) * | 2009-08-03 | 2011-02-17 | Canon Inc | Clustering processing method, clustering processing apparatus and program |
| WO2012005242A1 (en) * | 2010-07-05 | 2012-01-12 | 日本電気株式会社 | Image processing device and image segmenting method |
| JPWO2012005242A1 (en) * | 2010-07-05 | 2013-09-02 | 日本電気株式会社 | Image processing apparatus and image dividing method |
| JP2012094126A (en) * | 2010-09-29 | 2012-05-17 | Nikon Corp | Image processing device and image processing program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4236116B2 (en) | Image feature extraction method and apparatus | |
| CN109918969B (en) | Face detection method and device, computer device and computer readable storage medium | |
| JP5008572B2 (en) | Image processing method, image processing apparatus, and computer-readable medium | |
| US6690828B2 (en) | Method for representing and comparing digital images | |
| JP2816241B2 (en) | Image information retrieval device | |
| CN109740603A (en) | Vehicle Character Recognition Method Based on CNN Convolutional Neural Network | |
| JP2001273302A (en) | Image search system and image search method | |
| JP4545641B2 (en) | Similar image retrieval method, similar image retrieval system, similar image retrieval program, and recording medium | |
| US7370059B2 (en) | Model of documents and method for automatically classifying a document | |
| Zhang et al. | Improved adaptive image retrieval with the use of shadowed sets | |
| US8429163B1 (en) | Content similarity pyramid | |
| CN110517270A (en) | A kind of indoor scene semantic segmentation method based on super-pixel depth network | |
| KR19980070101A (en) | Method and apparatus for deriving a coupling rule between data, and method and apparatus for extracting orthogonal convex region | |
| Song et al. | Analyzing scenery images by monotonic tree | |
| JP4245872B2 (en) | Similarity determination method, apparatus, and program | |
| US6233352B1 (en) | Information processing method and apparatus | |
| KR100312331B1 (en) | System and method for searching image based on contents | |
| JPH07160879A (en) | Image processing method | |
| JP2004192555A (en) | Information management method, device and program | |
| JPH08167028A (en) | Image processing method | |
| JP2001319232A (en) | Device and method for retrieving similar image | |
| JP3065332B2 (en) | Image processing method | |
| Bhatia | Hierarchical clustering for image databases | |
| Guan et al. | Spectral images and features co-clustering with application to content-based image retrieval | |
| WO2020255223A1 (en) | Identification result explanation device, identification result explanation method, and identification result explanation program |