JP3825916B2 - Image processing method and apparatus - Google Patents

Image processing method and apparatus Download PDF

Info

Publication number
JP3825916B2
JP3825916B2 JP15001298A JP15001298A JP3825916B2 JP 3825916 B2 JP3825916 B2 JP 3825916B2 JP 15001298 A JP15001298 A JP 15001298A JP 15001298 A JP15001298 A JP 15001298A JP 3825916 B2 JP3825916 B2 JP 3825916B2
Authority
JP
Japan
Prior art keywords
image
material image
partial
average density
color
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.)
Expired - Fee Related
Application number
JP15001298A
Other languages
Japanese (ja)
Other versions
JPH11341266A (en
Inventor
邦浩 山本
澄 草間
健太郎 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP15001298A priority Critical patent/JP3825916B2/en
Priority to EP99304188A priority patent/EP0961230A3/en
Priority to US09/322,026 priority patent/US6556210B1/en
Publication of JPH11341266A publication Critical patent/JPH11341266A/en
Application granted granted Critical
Publication of JP3825916B2 publication Critical patent/JP3825916B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明、複数の素材画像をモザイク様に組み合わせてモザイク画像を生成する画像処理方法及び装置に関するものである。
【0002】
【従来の技術】
モザイクとは、「種々の色彩の石・ガラス・大理石等の小片を組み合わせて、床・壁などにはめ込み、図案化したもの、またはその技法」(三省堂 現代国語辞典)として広く知られている。この技法を用いて、多数の写真画像を組み合わせて図案、或は1つの写真画像を構成することが可能である。
【0003】
【発明が解決しようとする課題】
このようなモザイク画像を作成する場合、元の画像の上に素材画像と呼ばれるタイル画像を順次貼り付けて作成される。この場合、元の画像の領域とそこに貼り付けられる素材画像の色合いが近似しているが望ましいが、素材画像がエッジ成分を含む場合や、元の画像の領域がエッジ成分や色分布を有している場合には、それら領域と素材画像との間で適切な色の整合をとることができず、得られたモザイク画像の品質が低下するという問題があった。
【0004】
本発明は上記従来例に鑑みてなされたもので、元の画像を分割した領域(タイル領域)をさらに複数の部分領域に分割し、素材画像も複数の部分領域に分割して、元の画像の部分領域と素材画像の部分領域との平均濃度差の総計が最小になる素材画像を用いてモザイク画像を作成する画像処理法方法及び装置を提供することを目的とする。
【0005】
本発明の目的は、元の画像の色の分布の特徴を維持しながら、その画像に基づくモザイク画像を生成できる画像処理法方法及び装置を提供することにある。
【0006】
【課題を解決するための手段】
上記目的を達成するために本発明の画像処理装置は以下のような構成を備える。即ち、
複数の素材画像をモザイク様に組み合わせてモザイク画像を生成する画像処理装置であって、
元になる画像を複数の領域に分割し、前記複数の領域を更に分割した各部分領域の平均濃度を計算する演算手段と、
複数の素材画像の夫々を複数の素材画像部分領域に分割し、前記複数の素材画像部分領域のそれぞれの平均濃度を算出する計算手段と、
前記演算手段により演算された各部分領域の平均濃度と前記計算手段により得られた前記複数の素材画像部分領域のそれぞれの平均濃度に応じて、前記元になる画像を分割した領域に割り当てる素材画像を選択する素材画像選択手段と、
前記素材画像選択手段により選択された素材画像をもとにモザイク画像を作成するモザイク画作成手段とを有し
前記演算手段は、前記各部分領域の任意の色空間における各色毎の平均濃度を計算し、前記計算手段は、前記各素材画像部分領域の任意の色空間における各色毎の平均濃度を計算することを特徴とする。
【0007】
又上記目的を達成するために本発明の画像処理方法は以下のような工程を備える。即ち、
複数の素材画像をモザイク様に組み合わせてモザイク画像を生成する画像処理方法であって、
元になる画像を複数の領域に分割し、前記複数の領域を更に分割した各部分領域の平均濃度を計算する演算工程と、
複数の素材画像の夫々を複数の素材画像部分領域に分割し、前記複数の素材画像部分領域のそれぞれの平均濃度を算出する計算工程と、
前記演算工程で演算された各部分領域の平均濃度と前記計算工程で得られた前記複数の素材画像部分領域のそれぞれの平均濃度に応じて、前記元になる画像を分割した領域に割り当てる素材画像を選択する素材画像選択工程と、
前記素材画像選択工程で選択された素材画像をもとにモザイク画像を作成するモザイク画作成工程とを有し
前記演算工程では、前記各部分領域の任意の色空間における各色毎の平均濃度を計算し、前記計算工程では、前記各素材画像部分領域の任意の色空間における各色毎の平均濃度を計算することを特徴とする。
【0008】
【発明の実施の形態】
[実施の形態1]
以下、添付図面を参照して本発明の好適な実施の形態を詳細に説明する。
【0009】
図1は、本発明の実施の形態の画像処理が実行されるコンピュータ・システムの構成を示すブロック図である。
【0010】
図1において、101はCPUで、ハードディスク106に記憶されRAM105にロードされたプログラムに従ってシステム全体の制御を行っている。102はキーボードで、マウス102aとともに、本実施の形態のシステムに各種コマンドやデータを入力するために使用される。103は表示部で、例えばCRTや液晶等を備えている。104はROM、105はRAMで、本実施の形態のシステムにおける記憶部を構成し、システムが実行するプログラムやシステムが利用するデータなどを記憶している。106はハードディスク、107はフロッピーディスク装置で、本実施の形態のシステムのファイルシステムで使用される外部記憶装置を構成している。108はプリンタである。
【0011】
ハードディスク106にはモザイク画の構成要素となるタイル画像が複数(P)枚格納されており、後述するプログラムに従って、この中から選択されたM×N枚の画像を、図2に示すように、水平方向にM枚、垂直方向にN枚並べて組み合わせることでモザイク画像を作成する。こうして作成されたモザイク画像は、ハードディスク106に画像ファイルとして記憶され、CRT103に表示されたり、或はプリンタ108に出力されて印刷される。
【0012】
図3は、モザイク手法で用いられる複数種類の画像の関係を説明する図である。
【0013】
図3において、画像201は、モザイク手法を使って画像を構成する際に元になる図案或は画像を示している。画像202は、モザイク手法により複数の小さな画像(タイル)を使って構成されたモザイク画像である。素材画像203は画像202を構成するために使われる素材画像である。これら素材画像の枚数Pは、一般に画像202を構成するに必要となる色・テクスチャの種類が用意できるだけの十分大きな数である。ここでは説明のために、P枚の素材画像のそれぞれのサイズをタイルと同じサイズにしているが、各素材画像のサイズは必ずしもタイルのサイズと一致している必要はなく、またP枚が全て同じサイズである必要はない。このように各素材画像のサイズが異なる場合などでは、画像202の該当するタイルに貼り付ける際に、素材画像のサイズを変換する必要が生じる。なお、ここで枚数Pは、上述のM×N枚よりも十分に大きい数である。
【0014】
次に図4のフローチャートを参照して、P枚の素材画像203から適切なM×N枚の画像を選択し、元の画像201からモザイク画像202を作成する方法を説明する。
【0015】
図4は本実施の形態のコンピュータシステムで実行されるモザイク画像の作成処理を示すフローチャートで、この処理を実行するプログラムは、例えばハードディスク106に記憶されており、RAM105のロードされて実行される。
【0016】
まずステップS31で、元の画像201をM×N個の領域(タイル領域)に分割する。その結果、図5に示すように、M×N個の矩形領域TL(0,0),TL(1,0),TL(2,0),TL(3,0),…,TL(M−1,N−1)が生成される。
【0017】
図5において、X,Yはそれぞれ画像201の水平及び垂直方向の画素数である。またp,qは画像201をM×N個の矩形領域TL(0,0),…,TL(M−1,N−1)に分割した際の各領域の水平、垂直方向の画素数である。従って、X=p×M,Y=q×Nという関係が成り立っている。尚、図5は、M=4,N=5の場合を示している。
【0018】
図6は、こうして画像201が分割された個々の領域の色構成を示しており、各領域はp×q個の3原色、赤(R)、緑(G)、青(B)の画素で構成されている。
【0019】
次にステップS32に進み、M×N個の各領域を更にα×β個に分割し、ステップS33で、それら分割した部分領域のそれぞれのRGBの平均濃度を計算する。
【0020】
図7は、各領域を更に分割する様子を説明する図で、ここでは各領域は前述のようにp×q画素の大きさを持つが、これをα×β個の領域に均等に分割する。図7では、α=3,β=2の場合を例示している。こうして分割された部分領域の大きさをv×ω画素とすると、一般には、
v×α=p
ω×β=q
の関係が成り立つ。
【0021】
ここで、0≦I≦α−1,0≦J≦β−1の各I,Jについて
【0022】
【数1】
【0023】
RI,J = ΣRi/(v×w)(部分領域(I,J)の平均R濃度)
GI,J = ΣGi/(v×w)(部分領域(I,J)の平均G濃度)
BI,J = ΣBi/(v×w)(部分領域(I,J)の平均B濃度)
により、各部分領域毎の平均濃度を計算する。ここでΣRiは、その部分領域に含まれる画素のR成分の総和であり、以下他の色成分に関しても同様である。
【0024】
例えばR1,0は、図7で示した領域の斜線で示した部分領域700のR平均濃度を示す。
【0025】
次にステップS34に進み、P枚の素材画像のそれぞれについても画像201と同様にα×β個に均等分割する。そしてステップS35に進み、こうして分割された各部分領域のR,G,B平均濃度を算出する。いま各素材画像のサイズをp'×q'画素とすると、これをα×β個に均等分割し、v'×ω'画素の領域に分割する。これにより、
v'×α=p'
ω'×β=q'
の関係が成り立つ。同様に、0≦I≦α−1,0≦J≦β−1のI,Jについても前述の数式1と同様に、下記の数式2の関係が成り立つ
【0026】
【数2】
【0027】
R'I,J = ΣRi/(v'×w')
G'I,J = ΣGi/(v'×w')
B'I,J = ΣBi/(v'×w')
次にステップS36に進み、処理対象となる画像201の領域の位置を示すカウンタXpos(0≦Xpos≦M−1),Ypos(0≦Ypos≦N−1)をともに“0”に初期化する。ここで(Xpos,Ypos)=(0,0)は、元の画像201の領域TL(0,0)の座標位置を示している。
【0028】
そしてステップS37に進み、位置カウンタXpos,Yposが示す領域に最もふさわしい素材画像を、P枚の素材画像の中から選択する。
【0029】
ここでは各領域と素材画像の平均濃度の距離ΔEを以下のように定義する。
【0030】
【数3】
【0031】
ΔE=ΣΣ{(R'I,J−RI,J)の2乗+(G'I,J−GI,J)の2乗+(B'I,J−BI,J)の2乗}
ここで「ΣΣ」の最初の「Σ」は、I=0からI=(α−1)迄の総和を意味し、2番目の「Σ」は、J=0からJ=(β−1)迄の総和を意味している。
【0032】
即ち、ここでは、素材画像を分割した各部分領域の各色毎の平均濃度(R'I,J,G'I,J,B'I,J)と、画像201を分割した各領域の各部分領域の各色毎の平均濃度(RI,J,GI,J,BI,J)との差の2乗の合計ΔEを求め、このΔEの値が最小になる素材画像を、その領域に最適な素材画像として選択する。
【0033】
ここで、α=β=1の場合には、画像201の各領域の内部での色差、輝度の分布の情報が失われてしまうため、色分布が平坦な領域では問題ないが、その領域内にエッジを含むような場合には、最適な素材画像が選択できない場合がある。
【0034】
これに対しα>1,β>1(α、βは共に正の整数)とすると、画像201の各領域内における色分布を反映した素材画像との整合を図ることができ、適切な素材画像を選択することができる。その結果、こうして生成されるモザイク画像の品質を向上できる。
【0035】
この処理を、ステップS38で位置カウンタXposを+1して次の領域を参照し、位置カウンタXposの値が右端(図5の例では“3”)以上になると位置カウンタYposを+1して位置カウンタXposを“0”にセットし、ステップS39で画像201の全ての領域(タイル領域)に対して前述の処理が完了するまで繰返しステップS36〜S39が実行される。
【0036】
尚、上述の数式1及び数式2の演算は、上述のようにソフトウェアで実行されても、或は専用のハードウェアにより実行されても良い。
[他の実施の形態]
部分領域への分割は、前述の矩形の場合に限らず、例えば図8に示すように、非矩形領域に分割してもよい。
【0037】
又前述の実施の形態では、平均濃度を画素のRGBの値で計算しているが、これ以外にも例えば、Yuv,Lab等の色空間で規定される画素データに基づいて求めても良い。
【0038】
なお、本発明は、複数の機器(例えばホストコンピュータ,インタフェイス機器,リーダ,プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用してもよい。
【0039】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても達成される。
【0040】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0041】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。
【0042】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。
【0043】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。
【0044】
以上説明したように本実施の形態によれば、素材画像とタイルの適切なマッチングをとることができ、モザイク画の品質を向上することができる。
【0045】
【発明の効果】
以上説明したように本発明によれば、元の画像を分割した領域(タイル領域)をさらに複数の部分領域に分割し、素材画像も複数の部分領域に分割して、元の画像の部分領域と素材画像の部分領域との平均濃度差の総数が最小になる素材画像を用いてモザイク画像を作成するので、元の領域の色分布或は色の変化を生かしたモザイク画を作成できる。
【0046】
また本発明によれば、元の画像の色の特徴を維持しながら、その画像に基づくモザイク画像を生成できる。
【図面の簡単な説明】
【図1】本実施の形態のコンピュータシステムの構成を示すブロック図である。
【図2】モザイク画像を説明する図である。
【図3】モザイク画の生成過程を説明する図である。
【図4】本実施の形態のコンピュータシステムにおけるモザイク画の作成処理の流れを説明するフローチャートである。
【図5】モザイク画像の一例を説明する図である。
【図6】モザイク画を構成する個々のタイルの色構成を説明する図である。
【図7】素材画像の分割例を説明する図である。
【図8】素材画像の他の分割例を説明する図である。
【符号の説明】
101 CPU
102 キーボード
102a マウス
103 表示部
104 ROM
105 RAM
106 ハードディスク
107 フロッピーディスク
108 プリンタ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and apparatus for generating a mosaic image by combining a plurality of material images in a mosaic manner.
[0002]
[Prior art]
Mosaic is widely known as “a combination of small pieces of stone, glass, marble, etc. of various colors, which are inlaid on floors and walls and designed, or its technique” (Sanseido Contemporary Japanese Dictionary). Using this technique, it is possible to combine a large number of photographic images into a design or a single photographic image.
[0003]
[Problems to be solved by the invention]
When creating such a mosaic image, tile images called material images are sequentially pasted on the original image. In this case, it is desirable that the original image area and the color of the material image to be pasted are approximated, but it is desirable that the material image contains edge components, or the original image area has edge components and color distribution. In such a case, there is a problem that appropriate color matching cannot be achieved between these regions and the material image, and the quality of the obtained mosaic image is deteriorated.
[0004]
The present invention has been made in view of the above-described conventional example. An area (tile area) obtained by dividing an original image is further divided into a plurality of partial areas, and a material image is also divided into a plurality of partial areas. It is an object of the present invention to provide an image processing method and apparatus for creating a mosaic image using a material image that minimizes the sum of the average density differences between the partial area of the image and the partial area of the material image.
[0005]
An object of the present invention is to provide an image processing method and apparatus capable of generating a mosaic image based on an image while maintaining the color distribution characteristics of the original image.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the image processing apparatus of the present invention comprises the following arrangement. That is,
An image processing apparatus that generates a mosaic image by combining a plurality of material images in a mosaic manner,
An arithmetic unit that divides an original image into a plurality of regions and calculates an average density of each partial region obtained by further dividing the plurality of regions;
A calculation means for dividing each of the plurality of material images into a plurality of material image partial areas and calculating an average density of each of the plurality of material image partial areas;
The material image assigned to the divided region of the original image according to the average density of each partial area calculated by the calculating means and the average density of each of the plurality of material image partial areas obtained by the calculating means. Material image selection means for selecting,
And a mosaic generation means for generating a mosaic image based on the material image selected by the material image selection means,
The computing means calculates an average density for each color in an arbitrary color space of each partial area, and the calculating means calculates an average density for each color in an arbitrary color space of each material image partial area. It is characterized by.
[0007]
In order to achieve the above object, the image processing method of the present invention includes the following steps. That is,
An image processing method for generating a mosaic image by combining a plurality of material images like a mosaic,
A calculation step of dividing an original image into a plurality of regions, and calculating an average density of each partial region obtained by further dividing the plurality of regions;
A calculation step of dividing each of the plurality of material images into a plurality of material image partial regions and calculating an average density of each of the plurality of material image partial regions;
The material image assigned to the divided region of the original image according to the average density of each partial region calculated in the calculation step and the average density of each of the plurality of material image partial regions obtained in the calculation step Material image selection process to select,
And a mosaic generation step of generating a mosaic image based on the material image selected by the material image selection step,
In the calculation step, an average density for each color in an arbitrary color space of each partial area is calculated, and in the calculation step, an average density for each color in an arbitrary color space of each material image partial area is calculated . It is characterized by.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
[Embodiment 1]
DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0009]
FIG. 1 is a block diagram showing the configuration of a computer system that executes image processing according to an embodiment of the present invention.
[0010]
In FIG. 1, reference numeral 101 denotes a CPU which controls the entire system in accordance with a program stored in the hard disk 106 and loaded into the RAM 105. A keyboard 102 is used together with the mouse 102a to input various commands and data to the system according to the present embodiment. A display unit 103 includes, for example, a CRT, a liquid crystal, and the like. Reference numeral 104 denotes a ROM, and 105 denotes a RAM, which constitutes a storage unit in the system of the present embodiment and stores programs executed by the system, data used by the system, and the like. Reference numeral 106 denotes a hard disk and 107 denotes a floppy disk device, which constitutes an external storage device used in the file system of the system according to the present embodiment. Reference numeral 108 denotes a printer.
[0011]
The hard disk 106 stores a plurality (P) of tile images that are constituent elements of a mosaic image. According to a program described later, M × N images selected from the tile images are stored as shown in FIG. A mosaic image is created by combining M sheets in the horizontal direction and N sheets in the vertical direction. The mosaic image thus created is stored as an image file on the hard disk 106 and displayed on the CRT 103 or output to the printer 108 for printing.
[0012]
FIG. 3 is a diagram for explaining the relationship between a plurality of types of images used in the mosaic method.
[0013]
In FIG. 3, an image 201 indicates a design or image that is a base when an image is constructed using the mosaic technique. The image 202 is a mosaic image configured using a plurality of small images (tiles) by a mosaic method. A material image 203 is a material image used to construct the image 202. The number P of these material images is a sufficiently large number so that the types of colors and textures that are generally required for constructing the image 202 can be prepared. Here, for the sake of explanation, the size of each of the P material images is the same as the size of the tile, but the size of each material image does not necessarily match the size of the tile, and all the P images are the same. They do not have to be the same size. Thus, when the size of each material image is different, it is necessary to convert the size of the material image when pasting on the corresponding tile of the image 202. Here, the number P is sufficiently larger than the above-mentioned M × N sheets.
[0014]
Next, a method for selecting an appropriate M × N images from the P material images 203 and creating the mosaic image 202 from the original image 201 will be described with reference to the flowchart of FIG.
[0015]
FIG. 4 is a flowchart showing a mosaic image creation process executed in the computer system according to the present embodiment. A program for executing this process is stored in, for example, the hard disk 106 and loaded into the RAM 105 for execution.
[0016]
First, in step S31, the original image 201 is divided into M × N areas (tile areas). As a result, as shown in FIG. 5, M × N rectangular regions TL (0, 0), TL (1, 0), TL (2, 0), TL (3, 0),. −1, N−1) is generated.
[0017]
In FIG. 5, X and Y are the numbers of pixels in the horizontal and vertical directions of the image 201, respectively. P and q are the number of pixels in the horizontal and vertical directions of each area when the image 201 is divided into M × N rectangular areas TL (0, 0),..., TL (M−1, N−1). is there. Therefore, the relationships X = p × M and Y = q × N are established. FIG. 5 shows a case where M = 4 and N = 5.
[0018]
FIG. 6 shows the color configuration of the individual areas into which the image 201 is thus divided, and each area is composed of p × q three primary colors, red (R), green (G), and blue (B) pixels. It is configured.
[0019]
In step S32, the M × N areas are further divided into α × β, and in step S33, the average density of each of the divided partial areas is calculated.
[0020]
FIG. 7 is a diagram for explaining how each region is further divided. Here, each region has a size of p × q pixels as described above, but it is equally divided into α × β regions. . FIG. 7 illustrates a case where α = 3 and β = 2. If the size of the partial area thus divided is v × ω pixels, in general,
v × α = p
ω × β = q
The relationship holds.
[0021]
Here, for each of I and J satisfying 0 ≦ I ≦ α−1 and 0 ≦ J ≦ β−1.
[Expression 1]
[0023]
RI, J = ΣRi / (v × w) (average R concentration in partial region (I, J))
GI, J = ΣGi / (v × w) (average G concentration in partial region (I, J))
BI, J = ΣBi / (v × w) (average B concentration in partial area (I, J))
Thus, the average density for each partial region is calculated. Here, ΣRi is the total sum of the R components of the pixels included in the partial area, and the same applies to the other color components.
[0024]
For example, R1,0 represents the R average density of the partial region 700 indicated by oblique lines in the region shown in FIG.
[0025]
In step S34, each of the P material images is equally divided into α × β pieces similarly to the image 201. In step S35, the R, G, B average densities of the partial areas thus divided are calculated. Assuming that the size of each material image is p ′ × q ′ pixels, it is equally divided into α × β and divided into v ′ × ω ′ pixel areas. This
v ′ × α = p ′
ω ′ × β = q ′
The relationship holds. Similarly, for I and J where 0 ≦ I ≦ α−1 and 0 ≦ J ≦ β−1, the relationship of the following Equation 2 is established as in Equation 1 described above.
[Expression 2]
[0027]
R′I, J = ΣRi / (v ′ × w ′)
G′I, J = ΣGi / (v ′ × w ′)
B′I, J = ΣBi / (v ′ × w ′)
In step S 36, counters Xpos (0 ≦ Xpos ≦ M−1) and Ypos (0 ≦ Ypos ≦ N−1) indicating the position of the region of the image 201 to be processed are both initialized to “0”. . Here, (Xpos, Ypos) = (0, 0) indicates the coordinate position of the region TL (0, 0) of the original image 201.
[0028]
In step S37, the material image most suitable for the area indicated by the position counters Xpos and Ypos is selected from the P material images.
[0029]
Here, the distance ΔE of the average density of each region and the material image is defined as follows.
[0030]
[Equation 3]
[0031]
ΔE = ΣΣ {(R′I, J−RI, J) squared + (G′I, J−GI, J) squared + (B′I, J−BI, J) squared}
Here, the first “Σ” of “ΣΣ” means the sum from I = 0 to I = (α−1), and the second “Σ” is from J = 0 to J = (β−1). It means the sum of up to.
[0032]
That is, here, the average density (R′I, J, G′I, J, B′I, J) of each color of each partial area into which the material image is divided and each part of each area into which the image 201 is divided. The sum of squares of the difference from the average density (RI, J, GI, J, BI, J) for each color of the area is obtained, and the material image that minimizes the value of ΔE is determined as the optimum material for the area. Select as an image.
[0033]
Here, when α = β = 1, the color difference and luminance distribution information in each area of the image 201 is lost, so there is no problem in the area where the color distribution is flat. If the image includes an edge, an optimal material image may not be selected.
[0034]
On the other hand, if α> 1, β> 1 (α and β are both positive integers), it is possible to achieve alignment with the material image reflecting the color distribution in each region of the image 201, and an appropriate material image. Can be selected. As a result, the quality of the mosaic image thus generated can be improved.
[0035]
In this process, in step S38, the position counter Xpos is incremented by 1 to refer to the next area, and when the value of the position counter Xpos becomes equal to or larger than the right end (“3” in the example of FIG. 5), the position counter Ypos is incremented by 1. Xpos is set to “0”, and steps S36 to S39 are repeatedly executed until the above-described processing is completed for all regions (tile regions) of the image 201 in step S39.
[0036]
It should be noted that the operations of Equation 1 and Equation 2 described above may be executed by software as described above, or may be executed by dedicated hardware.
[Other embodiments]
The division into partial areas is not limited to the above-described rectangular shape, and may be divided into non-rectangular areas as shown in FIG. 8, for example.
[0037]
In the above-described embodiment, the average density is calculated using the RGB values of the pixels. However, other than this, for example, the average density may be obtained based on pixel data defined in a color space such as Yuv or Lab.
[0038]
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), or a device (for example, a copier, a facsimile device, etc.) including a single device. You may apply to.
[0039]
In addition, an object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus stores the storage medium. This can also be achieved by reading and executing the program code stored in.
[0040]
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
[0041]
As a storage medium for supplying the program code, for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0042]
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. A case where part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included.
[0043]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. This includes a case where the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0044]
As described above, according to the present embodiment, appropriate matching between a material image and a tile can be achieved, and the quality of a mosaic image can be improved.
[0045]
【The invention's effect】
As described above, according to the present invention, a region (tile region) obtained by dividing the original image is further divided into a plurality of partial regions, and the material image is also divided into a plurality of partial regions, so that a partial region of the original image is obtained. Since the mosaic image is created using the material image that minimizes the total number of average density differences between the image and the partial area of the material image, it is possible to create a mosaic image that makes use of the color distribution or color change of the original region.
[0046]
Further, according to the present invention, a mosaic image based on the original image can be generated while maintaining the color characteristics of the original image.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a computer system according to an embodiment.
FIG. 2 is a diagram illustrating a mosaic image.
FIG. 3 is a diagram illustrating a process of generating a mosaic image.
FIG. 4 is a flowchart illustrating a flow of mosaic image creation processing in the computer system according to the present embodiment.
FIG. 5 is a diagram illustrating an example of a mosaic image.
FIG. 6 is a diagram for explaining a color configuration of individual tiles constituting a mosaic image.
FIG. 7 is a diagram illustrating an example of dividing a material image.
FIG. 8 is a diagram illustrating another example of dividing a material image.
[Explanation of symbols]
101 CPU
102 Keyboard 102a Mouse 103 Display unit 104 ROM
105 RAM
106 Hard disk 107 Floppy disk 108 Printer

Claims (12)

複数の素材画像をモザイク様に組み合わせてモザイク画像を生成する画像処理装置であって、
元になる画像を複数の領域に分割し、前記複数の領域を更に分割した各部分領域の平均濃度を計算する演算手段と、
複数の素材画像の夫々を複数の素材画像部分領域に分割し、前記複数の素材画像部分領域のそれぞれの平均濃度を算出する計算手段と、
前記演算手段により演算された各部分領域の平均濃度と前記計算手段により得られた前記複数の素材画像部分領域のそれぞれの平均濃度に応じて、前記元になる画像を分割した領域に割り当てる素材画像を選択する素材画像選択手段と、
前記素材画像選択手段により選択された素材画像をもとにモザイク画像を作成するモザイク画作成手段とを有し
前記演算手段は、前記各部分領域の任意の色空間における各色毎の平均濃度を計算し、前記計算手段は、前記各素材画像部分領域の任意の色空間における各色毎の平均濃度を計算することを特徴とする画像処理装置。
An image processing apparatus that generates a mosaic image by combining a plurality of material images in a mosaic manner,
An arithmetic unit that divides an original image into a plurality of regions and calculates an average density of each partial region obtained by further dividing the plurality of regions;
A calculation means for dividing each of the plurality of material images into a plurality of material image partial areas and calculating an average density of each of the plurality of material image partial areas;
The material image assigned to the divided region of the original image according to the average density of each partial area calculated by the calculating means and the average density of each of the plurality of material image partial areas obtained by the calculating means. Material image selection means for selecting,
And a mosaic generation means for generating a mosaic image based on the material image selected by the material image selection means,
The computing means calculates an average density for each color in an arbitrary color space of each partial area, and the calculating means calculates an average density for each color in an arbitrary color space of each material image partial area. An image processing apparatus.
前記複数の領域を更に分割した各部分領域の数と前記素材画像を分割した前記素材画像部分領域の数とが等しいことを特徴とする請求項1に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the number of partial regions obtained by further dividing the plurality of regions is equal to the number of material image partial regions obtained by dividing the material image. 前記素材画像選択手段は、前記元になる画像のある領域の部分画像領域の各色の平均濃度と前記素材画像の素材画像部分領域の各色の平均濃度との差分が最小になる素材画像を当該領域に割り当てる素材画像として選択することを特徴とする請求項1又は2に記載の画像処理装置。The material image selection means selects a material image in which the difference between the average density of each color of the partial image area of the area having the original image and the average density of each color of the material image partial area of the material image is minimized. the image processing apparatus according to claim 1 or 2, characterized in that selected as material image to be allocated to. 前記素材画像選択手段は、前記元になる画像のある領域の部分画像領域の各色の平均濃度と前記素材画像の素材画像部分領域の各色の平均濃度の差分の二乗を合計した値が最小の素材画像を選択することを特徴とする請求項1に記載の画像処理装置。  The material image selecting means is a material having a minimum value obtained by summing a square of a difference between an average density of each color of a partial image area of an area having the original image and an average density of each color of the material image partial area of the material image. The image processing apparatus according to claim 1, wherein an image is selected. 複数の素材画像をモザイク様に組み合わせてモザイク画像を生成する画像処理方法であって、
元になる画像を複数の領域に分割し、前記複数の領域を更に分割した各部分領域の平均濃度を計算する演算工程と、
複数の素材画像の夫々を複数の素材画像部分領域に分割し、前記複数の素材画像部分領域のそれぞれの平均濃度を算出する計算工程と、
前記演算工程で演算された各部分領域の平均濃度と前記計算工程で得られた前記複数の素材画像部分領域のそれぞれの平均濃度に応じて、前記元になる画像を分割した領域に割り当てる素材画像を選択する素材画像選択工程と、
前記素材画像選択工程で選択された素材画像をもとにモザイク画像を作成するモザイク画作成工程とを有し
前記演算工程では、前記各部分領域の任意の色空間における各色毎の平均濃度を計算し、前記計算工程では、前記各素材画像部分領域の任意の色空間における各色毎の平均濃度を計算することを特徴とする画像処理方法。
An image processing method for generating a mosaic image by combining a plurality of material images like a mosaic,
A calculation step of dividing an original image into a plurality of regions, and calculating an average density of each partial region obtained by further dividing the plurality of regions;
A calculation step of dividing each of the plurality of material images into a plurality of material image partial regions and calculating an average density of each of the plurality of material image partial regions;
The material image assigned to the divided region of the original image according to the average density of each partial region calculated in the calculation step and the average density of each of the plurality of material image partial regions obtained in the calculation step Material image selection process to select,
And a mosaic generation step of generating a mosaic image based on the material image selected by the material image selection step,
In the calculation step, an average density for each color in an arbitrary color space of each partial area is calculated, and in the calculation step, an average density for each color in an arbitrary color space of each material image partial area is calculated . An image processing method characterized by the above.
前記複数の領域を更に分割した各部分領域の数と前記素材画像を分割した前記素材画像部分領域の数とが等しいことを特徴とする請求項に記載の画像処理方法。6. The image processing method according to claim 5 , wherein the number of each partial area obtained by further dividing the plurality of areas is equal to the number of the material image partial areas obtained by dividing the material image. 前記素材画像選択工程では、前記元になる画像のある領域の部分画像領域の各色の平均濃度と前記素材画像の素材画像部分領域の各色の平均濃度との差分が最小になる素材画像を当該領域に割り当てる素材画像として選択することを特徴とする請求項5又は6に記載の画像処理方法。In the material image selection step, a material image that minimizes the difference between the average density of each color of the partial image area of the area having the original image and the average density of each color of the material image partial area of the material image The image processing method according to claim 5, wherein the image processing method is selected as a material image to be assigned to an image. 前記素材画像選択工程では、前記元になる画像のある領域の部分画像領域の各色の平均濃度と前記素材画像の素材画像部分領域の各色の平均濃度の差分の二乗を合計した値が最小の素材画像を選択することを特徴とする請求項に記載の画像処理方法。In the material image selection step, the material having the smallest value obtained by summing the squares of the difference between the average density of each color of the partial image region of the region having the original image and the average density of each color of the material image partial region of the material image 6. The image processing method according to claim 5 , wherein an image is selected. 複数の素材画像をモザイク様に組み合わせてモザイク画像を生成する画像処理方法を実行するプログラムを記憶したコンピュータにより読み取り可能な記憶媒体であって、
元になる画像を複数の領域に分割し、前記複数の領域を更に分割した各部分領域の平均濃度を計算する演算工程モジュールと、
複数の素材画像の夫々を複数の素材画像部分領域に分割し、前記複数の素材画像部分領域のそれぞれの平均濃度を算出する計算工程モジュールと、
前記演算工程モジュールにより演算された各部分領域の平均濃度と前記計算工程モジュールにより得られた前記複数の素材画像部分領域のそれぞれの平均濃度に応じて、前記元になる画像を分割した領域に割り当てる素材画像を選択する素材画像選択工程モジュールと、
前記素材画像選択工程モジュールで選択された素材画像をもとにモザイク画像を作成するモザイク画作成工程モジュールとを有し
前記演算工程モジュールは、前記各部分領域の任意の色空間における各色毎の平均濃度を計算し、前記計算工程モジュールは、前記各素材画像部分領域の任意の色空間における各色毎の平均濃度を計算することを特徴とする記憶媒体。
A computer-readable storage medium storing a program for executing an image processing method for generating a mosaic image by combining a plurality of material images in a mosaic manner,
An arithmetic process module that divides an original image into a plurality of regions and calculates an average density of each partial region obtained by further dividing the plurality of regions;
A calculation process module that divides each of the plurality of material images into a plurality of material image partial regions and calculates an average density of each of the plurality of material image partial regions;
According to the average density of each partial area calculated by the calculation process module and the average density of each of the plurality of material image partial areas obtained by the calculation process module, the original image is assigned to a divided area. A material image selection process module for selecting a material image;
And a mosaic forming process module to create a mosaic image based on the material image selected by the material image selection process module,
The calculation process module calculates an average density for each color in an arbitrary color space of each partial area, and the calculation process module calculates an average density for each color in an arbitrary color space of each material image partial area. A storage medium characterized by:
前記複数の領域を更に分割した各部分領域の数と前記素材画像を分割した前記素材画像部分領域の数とが等しいことを特徴とする請求項に記載の記憶媒体。10. The storage medium according to claim 9 , wherein the number of each partial area obtained by further dividing the plurality of areas is equal to the number of the material image partial areas obtained by dividing the material image. 前記素材画像選択工程モジュールでは、前記元になる画像のある領域の部分画像領域の各色の平均濃度と前記素材画像の素材画像部分領域の各色の平均濃度との差分が最小になる素材画像を当該領域に割り当てる素材画像として選択することを特徴とする請求項9又は10に記載の記憶媒体。In the material image selection process module, the material image that minimizes the difference between the average density of each color of the partial image area of the region having the original image and the average density of each color of the material image partial area of the material image The storage medium according to claim 9 or 10 , wherein the storage medium is selected as a material image to be assigned to an area. 前記素材画像選択工程モジュールでは、前記元になる画像のある領域の部分画像領域の各色の平均濃度と前記素材画像の素材画像部分領域の各色の平均濃度の差分の二乗を合計した値が最小の素材画像を選択することを特徴とする請求項に記載の記憶媒体。In the material image selection process module, a value obtained by summing a square of a difference between an average density of each color of a partial image area of the region having the original image and an average density of each color of the material image partial area of the material image is the smallest. The storage medium according to claim 9 , wherein a material image is selected.
JP15001298A 1998-05-29 1998-05-29 Image processing method and apparatus Expired - Fee Related JP3825916B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP15001298A JP3825916B2 (en) 1998-05-29 1998-05-29 Image processing method and apparatus
EP99304188A EP0961230A3 (en) 1998-05-29 1999-05-28 Image processing method and apparatus therefor
US09/322,026 US6556210B1 (en) 1998-05-29 1999-05-28 Image processing method and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15001298A JP3825916B2 (en) 1998-05-29 1998-05-29 Image processing method and apparatus

Publications (2)

Publication Number Publication Date
JPH11341266A JPH11341266A (en) 1999-12-10
JP3825916B2 true JP3825916B2 (en) 2006-09-27

Family

ID=15487556

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15001298A Expired - Fee Related JP3825916B2 (en) 1998-05-29 1998-05-29 Image processing method and apparatus

Country Status (1)

Country Link
JP (1) JP3825916B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011054080A (en) 2009-09-04 2011-03-17 Sony Corp Image processing apparatus, method and program
JP2011054081A (en) 2009-09-04 2011-03-17 Sony Corp Image processing apparatus, method, and program
ES2593407T3 (en) * 2009-12-25 2016-12-09 Rakuten, Inc. Image generation device, image generation procedure, image generation program and recording medium
KR101291008B1 (en) * 2009-12-25 2013-07-30 라쿠텐 인코포레이티드 Image generation device, image generation method and recording medium
JP5113929B1 (en) * 2011-06-24 2013-01-09 楽天株式会社 Image providing apparatus, image processing method, image processing program, and recording medium
JP5144789B2 (en) * 2011-06-24 2013-02-13 楽天株式会社 Image providing apparatus, image processing method, image processing program, and recording medium
JP5113930B1 (en) * 2011-06-24 2013-01-09 楽天株式会社 Image providing apparatus, image processing method, image processing program, and recording medium

Also Published As

Publication number Publication date
JPH11341266A (en) 1999-12-10

Similar Documents

Publication Publication Date Title
US6556210B1 (en) Image processing method and apparatus therefor
US6351557B1 (en) Method and apparatus for color manipulation
US7639262B2 (en) Selecting rendering intents
JP2009038523A (en) Unit and method for processing image
US6724946B1 (en) Image processing method, apparatus and storage medium therefor
JP3825916B2 (en) Image processing method and apparatus
JP3584179B2 (en) Image processing method, image processing device, and storage medium
US6665451B1 (en) Image processing method and apparatus
JPH11341264A (en) Mosaic image generation method and recording medium
US6456295B1 (en) Method for simulating diffusion on a raster
JP3814412B2 (en) Image processing method and apparatus
JP3584195B2 (en) Image processing method and apparatus
JP3652167B2 (en) Image processing apparatus and method and storage medium therefor
JP2008145608A (en) Liquid crystal projector apparatus and control method thereof
JP3584198B2 (en) Image processing method and apparatus
JP2000298722A (en) Image processing method and its device
JPH11341265A (en) Method and device for picture processing
JPH11345311A (en) Picture processor and picture processing method
JPH11345309A (en) Picture processor and picture processing method
JPH11345329A (en) Picture processor and picture processing method
JP3647261B2 (en) Image processing apparatus and method
JPH1021377A (en) Image processor
JP3647262B2 (en) Image processing apparatus and method
JP2000276584A (en) Method and device for image processing, and storage medium
JP3984704B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040531

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20040531

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040531

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050829

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051019

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060609

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060703

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090707

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100707

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100707

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110707

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120707

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees