JP3984704B2 - Image processing apparatus and method - Google Patents
Image processing apparatus and method Download PDFInfo
- Publication number
- JP3984704B2 JP3984704B2 JP15022798A JP15022798A JP3984704B2 JP 3984704 B2 JP3984704 B2 JP 3984704B2 JP 15022798 A JP15022798 A JP 15022798A JP 15022798 A JP15022798 A JP 15022798A JP 3984704 B2 JP3984704 B2 JP 3984704B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- partial
- image processing
- value
- feature amount
- 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
Links
Images
Landscapes
- Editing Of Facsimile Originals (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は画像処理方法及び装置に関し、特に、モザイク画像を形成するのに好適な画像処理方法及び装置に関する。
【0002】
【従来技術】
モザイクとは、「種々の色彩の石・ガラス・大理石等の小片を組み合わせて、床・壁などにはめ込み、図案化したもの、またはその技法」(三省堂、現代国語辞典)として広く知られている。この技法を用いて、多数の写真画像を組み合わせて図案あるいは一つの写真画像を構成することが可能である。
【0003】
このようなモザイク技法を画像データ処理に適用することで、オリジナル画像を複数の素材画像に置き換えてモザイク画像を形成することが考えられる。すなわち、オリジナル画像よりも小さな複数種類の素材画像を用意しておき、これをオリジナル画像の内容に応じて選択、配置していくことで、複数の素材画像からなるモザイク画像が得られることになる。
【0004】
【発明が解決しようとする課題】
しかしながら、上述のモザイク手法では、素材画像の枚数は、一般にモザイク画像を構成するために必要となる、色・テクスチャの種類を備えるべく、十分に大きな数であることが前提となる。しかしながら、実際には、膨大な量の画像を予めイメージファイルとして用意しておくことは困難であり、また、大量のメモリを必要とするためにコストアップを招き、あまり実用的ではない。この結果、モザイク手法を実践するには不十分な、少数の素材画像を用いることになり、モザイク画像を構成する個々の素材画像はオリジナル画像の色やテクスチャとあまりにも異なるものとなる場合があり、モザイク画としての画質が悪くなるという問題があった。
【0005】
また、対象とする第一の画像によっても、第二の画像の画質が十分満足できるものにならないことがあった。
【0006】
本発明は上記の問題に鑑みてなされたものであり、少数の素材画像で多様な元画像を適切に反映したモザイク画像を生成することが可能な画像処理方法及び装置を提供することを目的とする。
【0007】
【課題を解決するための手段】
上記の目的を達成するために、本発明の一態様による画像処理装置はたとえば以下の構成を備える。すなわち、
画像を複数の部分画像に分割する分割手段と、
前記分割手段によって得られた部分画像の各々について、部分画像の特徴量に基づいて予め用意された複数の素材画像の一つを選択する選択手段と、
前記選択手段で選択された素材画像と前記部分画像とを合成する合成手段と、
前記合成手段によって得られた合成画像を前記部分画像に置き換えることによって画像を生成する生成手段とを備える。
【0008】
また、上記の目的を達成するための本発明の他の態様による画像処理方法は、たとえば以下の工程を備えている。すなわち、
画像処理装置による画像処理方法であって、
分割手段が、画像を複数の部分画像に分割する分割工程と、
選択手段が、前記分割工程によって得られた部分画像の各々について、部分画像の特徴量に基づいて予め用意された複数の素材画像の一つを選択する選択工程と、
合成手段が、前記選択工程で選択された素材画像と前記部分画像とを合成する合成工程と、
生成手段が、前記合成工程によって得られた合成画像を前記部分画像に置き換えることによって画像を生成する生成工程とを備える。
【0009】
【発明の実施の形態】
以下、添付の図面を参照して、本発明の好適な実施形態を説明する。
【0010】
[第1の実施形態]
図1は本発明の一実施形態に係る、モザイク画像生成方法を実現するハードウェア構成図である。図1において、101はCPU、102はメモリ、103はハードディスク、104はキーボードおよびマウス(以下、キーボード104という)、105はディスプレイ、106はネットワークインタフェース、107はDVD−ROMドライブ、108はスキャナ、109はビデオキャプチャカード、110はネットワークを介して接続されているデータベース、111はバスである。
【0011】
CPU101は、メモリ102に格納された制御プログラムを実行することにより、上記各構成の制御等を行なう。メモリ102は図2のフローチャートを参照して後述する処理手順をCPU101によって実現するソフトウェアの実行モジュールを格納する。また、ハードディスク103から読み出された画像データを格納したり、生成されたモザイク画像を格納したりする。
【0012】
キーボード104はユーザインタフェースを介してユーザの意図を入力するためのものである。ディスプレイ105は、第一の画像、第二の画像、素材画像等の表示を行う。なお、画像の入力は、ネットワークを介してデーベース110より画像を取り込んだり、CD−ROM107によってCD−ROMに記録された画像を取り込んだり、スキャナ108より画像を取り込んだりする。なお、画像の入力装置としてDVD−ROM等を用いてもよいことはいうまでもない。
【0013】
またDVD−ROMに記録された映像を取り込むために、DVD−ROMドライブを利用することも可能である。
【0014】
図5はモザイク手法において用いられる画像(第一の画像(オリジナル画像)、第二の画像(モザイク画像)、素材画像)の関係を示す概念図である。図5において、第一の画像2001は、モザイク手法を使って画像を構成する際の元となる図案あるいは画像を表す画像データである。第二の画像2002はモザイク手法により複数の小さな画像を使って構成された画像である。すなわち、第二の画像2002はM×Nに分割され、M×N個の素材画像を各分割領域に配置して得られる素材画像の組み合わせによって構成される。
【0015】
また、素材画像2003は第二の画像2002を構成するために使われる画像である。素材画像の枚数Pは一般に第二の画像を構成するために必要とする色・テクスチャの種類が用意できるだけの十分大きな数である。ここでは説明を簡単にするためにP枚の素材画像のサイズをタイルと同じサイズ、すなわち以下で説明する通りp×q(画素)としているが、これは必ずしも一致している必要はなく、また、P枚すべてが同じサイズである必要もない。ただし、サイズの異なる素材画像を含む場合は、該当するタイル部分に貼り付ける際に、素材画像のサイズをタイルサイズに変換する必要がある。
【0016】
次にモザイク画像の構成方法について図2及び図6を用いて説明する。図2は第1の実施形態によるモザイク画像の生成手順を示すフローチャートである。また、図6はモザイク手法における第一の画像及び第二の画像の分割方法を示す図である。
【0017】
まず、ステップS201において、第一の画像(オリジナル画像)を図6のごとくM×N個のタイルに分割する。分割の結果、図6に示すように、第一の画像はM×N個の矩形タイルTL(0,0),TL(1,0),TL(2,0)‥‥TL(2,4),TL(3,4)に区切られる。図6においてX,Yはそれぞれ第一の画像2001の水平方向、垂直方向の画素数である。p,qは各タイルの水平方向、垂直方向の画素数である。したがって、X=p×M,Y=q×Nという関係が成り立っている。ここでは説明を簡単にするために、タイルのサイズはすべて等しいものとするが、必ずしもその必要はない。
【0018】
ステップS202ではステップS201で分割したM×N個の各タイルについて、評価目標値を計算する。モザイク画像を構成するためには、第一の画像を分割したタイルと、そのタイルを摸して貼り付ける素材画像とがある評価基準のもとで似ている必要がある。すなわち、画像より所定の方法で変量(以下、特徴量という)を算出し、各タイルの画像について得られる値(以下、評価目標値という)と素材画像より得られる値(以下、被評価値という)を比較する。そして、近い値を有する素材画像で当該タイル画像を置換する。
【0019】
ここで、評価目標値とは、第一の画像を分割して得られた個々のタイルの画像について、ある一定の手法で特徴量を算出したものである。たとえば、この特徴量としてR,G,Bの平均輝度値を用いることができる。この場合、評価目標値(Rd-av,Gd-av,Bd-av)は、以下の式(1)によって算出される。なお、評価目標値としては、例えば、各画像の平均濃度値等、他の特徴量を用いてもよいことはいうまでもない。
【0020】
Rd-av=(1/(p×q))×ΣRi
Gd-av=(1/(p×q))×ΣGi
Bd-av=(1/(p×q))×ΣBi …(1)
ただし、iはタイル中のすべての画素を示す。
【0021】
ステップS203では、P枚の素材画像について被評価値を算出する。被評価値はステップS202で用いた特徴量と同じものを、各素材画像について求めたものである。従って、特徴量としてR,G,Bの平均輝度値を用いる場合、被評価値(Rs-av,Gs-av,Bs-av)は以下の式(2)で得る。
【0022】
Rs-av=(1/p×q))×ΣRi
Gs-av=(1/p×q))×ΣGi
Bs-av=(1/p×q))×ΣBi …(2)
ただし、iは素材画像中のすべての画素を示す。
【0023】
次に、ステップS204ではM×N個のタイルの中から処理対象とするタイルを一つ選択する。ここでは、タイルの位置を示すカウンタX−Pos(0≦X−Pos≦M−1),Y−Pos(0≦Y−Pos≦N−1)を用いてタイルを指定する。例として画像の左上から右端まで処理し、順次下まで処理する場合には、まず、X−Pos及びY−Pos共に0に初期化し、ステップS2104〜S2107の繰り返しにおいて(X−pos、Y−pos)=(0,0)、(1,0)…(3,0)、(0,1)、…(3,1)、…(0,4)、…(3,4)というようにカウンタ値を変化させてゆく。
【0024】
ステップS205では処理対象のタイルの評価目標値(Rd-av,Gd-av,Bd-av)とP枚の素材画像のそれぞれの被評価値(Rs-av,Gs-av,Bs-av)とを、評価関数f()によって評価する。評価関数f()の一例としては、評価目標値と被評価値の差の二乗平均があげられる。すなわち、評価値は以下の式(3)で得られる。
【0025】
なお、上記式(3)において、「^」はべき乗を表し、たとえば「X^2」はXの2乗を表す。この結果△E0〜△Ep-1のP個の評価結果が選られる。
【0026】
ステップS206ではP回の評価関数の結果から、その値の最も小さくなる素材画像を選択し、第二の画像の対応するタイル位置(すなわち,(X−pos,Y−pos)で指定されるタイル)に貼り込むタイルとする。
【0027】
ステップS207では第一の画像のすべてのタイルについて上述の処理が行われたかどうかを判断し、未処理のタイルがあれば、ステップS204に戻り,上記処理を繰り返す。一方、すべてのタイルについて処理が終わっていれば、ステップS208に進む。
【0028】
ステップS208では、キーボード104から操作者により入力されるα値を読み出す。ただしαの値は0以上1以下として説明する。ステップS209では第一の画像、第二の画像、αを用いて、第三の画像を合成し、これを最終的なモザイク画像とする。
【0029】
αを用いた画像の合成方法の一例としては、第一の画像のα倍と第二の画像の(1−α)倍を加えることが挙げられる。すなわち、第一の画像と第二の画像の同じ位置の画素値をそれぞれ、(R1,G1,B1)、(R2,G2,B2)とすると、合成の結果得られる第三の画像の同じ位置の画素値(R3,G3,B3)は、以下の式(4)によって求まる。
【0030】
R3=α×R1+(1−α)R2
G3=α×G1+(1−α)G2
B3=α×B1+(1−α)B2
となる。
【0031】
以上説明したように、本実施形態によれば、モザイク画像構成方法により作成された第二の画像の個々のタイルが、第一の画像の色・テクスチャとあまりにも異なるものとなるような場合でも、設定された率で第1の画像が反映されるので、全体として第一の画像をよく摸した画像を得ることが可能となる。従って、少ない素材画像数で良好なモザイク画像を得ることができる。
【0032】
[第2の実施形態]
次に本発明の第2の実施形態について説明する。なお、以下では、第1の実施形態と第2の実施形態の相違点について説明する。
【0033】
図3は第2の実施形態によるモザイク画像生成の手順を説明するフローチャートである。第1の実施形態と同様にステップS201〜S209を実行し、その結果として、第一の画像と第二の合成画像である第三の画像を得る。次に、ステップS310では第三の画像をディスプレイ装置に表示する。そして、ステップS311では、α値の変更入力が可能なインターフェースを表示し、操作者によってα値の変更入力が行われたかどうかを判定する。ここでα値が変更された場合はステップS208に戻り、変更後のαを用いて第3の画像生成を行う。
【0034】
図4は、α値の変更を行うためのユーザインターフェース例を示す図である。図4に示されるようなユーザインターフェースがディスプレイ装置105に表示される。図4において、401は第一の画像、402は第3の画像をそれぞれ表示する表示部、403は処理の開始を指示するスタートボタン、404はα値を変更するスライダーである。なお、さらに第二の画像を表示するようにしても良い。第二の画像も表示するようにすれば、αの値を操作者が設定する際の参照となる。
【0035】
スタートボタン403を押す以前は、401に第一の画像が表示されている。スタートボタン403を押すと、フローチャートのステップS201から処理を開始する。そして、ステップS209を終了すると表示部402に第三の画像が表示される。つづいて、スライダー404をマウスにより操作する。スライダー404は最左端でα=0、最右端でα=1となり、その間は均等にわけられている。
【0036】
スライダー404が最左端では、α=0であるから、式(4)において、
R3=α×R1+(1−α)R2=R2
G3=α×G1+(1−α)G2=G2
B3=α×B1+(1−α)B2=B2
となり、第三の画換は第二の画像と等しくなる。
【0037】
また、スライダー404が最右端では、α=1であるから、式(4)において、
R3=α×R1+(1−α)R2=R1
G3=α×G1十(1−α)G2=G1
B3=α×B1+(1−α)B2=B1
となり、第三の画像は第一の画像と等しくなる。
【0038】
αの値が0と1の間では、第三の画像は第一の画像と第二の画像が混ぜ合わされた画像となる。
【0039】
以上説明したように、第二の実施形態によれば、マウス等の入力装置を用いて対話的にαの値を制御する構成を付加したことにより、ユーザが、容易に、好みの度合いで第一の画像と第二の画像を混ぜることが可能になる。
【0040】
なお、本発明は、複数の機器(例えばホストコンピュータ,インタフェイス機器,リーダ,プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用してもよい。
【0041】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0042】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0043】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。
【0044】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0045】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0046】
【発明の効果】
以上説明したように、本発明によれば、小数の素材画像で多様な元画像を適切に反映したモザイク画像を生成することが可能となる。
【0047】
【図面の簡単な説明】
【図1】本発明の一実施形態に係る、モザイク画像生成方法を実現するハードウェア構成図である。
【図2】第1の実施形態によるモザイク画像のせいせい手順を示すフローチャートである。
【図3】第2の実施形態によるモザイク画像生成の手順を説明するフローチャートである。
【図4】α値の変更を行うためのユーザインターフェース例を示す図である。
【図5】モザイク手法において用いられる画像(第一の画像、第二の画像、素材画像)の関係を示す概念図である。
【図6】モザイク手法における第一の画像及び第二の画像の分割方法を示す図である。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and apparatus, and more particularly to an image processing method and apparatus suitable for forming a mosaic image.
[0002]
[Prior art]
Mosaic is widely known as “a combination of small pieces of stone, glass, marble, etc. of various colors, designed on floors, walls, etc. and designed” (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]
By applying such a mosaic technique to image data processing, it may be possible to replace the original image with a plurality of material images to form a mosaic image. That is, by preparing a plurality of types of material images smaller than the original image, and selecting and arranging them according to the contents of the original image, a mosaic image composed of a plurality of material images can be obtained. .
[0004]
[Problems to be solved by the invention]
However, in the above-described mosaic method, it is assumed that the number of material images is a sufficiently large number so as to have the types of colors and textures that are generally required for constructing a mosaic image. However, in practice, it is difficult to prepare an enormous amount of images as image files in advance, and a large amount of memory is required, resulting in an increase in cost and not so practical. This results in the use of a small number of material images that are insufficient for practicing the mosaic method, and the individual material images that make up the mosaic image may be too different from the color and texture of the original image. There was a problem that the image quality as a mosaic image deteriorated.
[0005]
In addition, even the first target image may not satisfy the image quality of the second image sufficiently.
[0006]
The present invention has been made in view of the above problems, and an object thereof is to provide an image processing method and apparatus capable of generating a mosaic image that appropriately reflects various original images with a small number of material images. To do.
[0007]
[Means for Solving the Problems]
In order to achieve the above object, an image processing apparatus according to an aspect of the present invention includes, for example, the following configuration. That is,
Dividing means for dividing the image into a plurality of partial images;
For each of the partial images obtained by the dividing means, a selection means for selecting one of a plurality of material images prepared in advance based on the feature amount of the partial image;
Combining means for combining the material image selected by the selecting means and the partial image;
Generating means for generating an image by replacing the synthesized image obtained by the synthesizing means with the partial image.
[0008]
An image processing method according to another aspect of the present invention for achieving the above object includes the following steps, for example. That is,
An image processing method by an image processing apparatus,
Dividing means, a dividing step of dividing an image into a plurality of partial images,
A selection step in which the selection means selects one of a plurality of material images prepared in advance based on the feature amount of the partial image for each of the partial images obtained by the dividing step;
A synthesizing unit that synthesizes the material image selected in the selection step and the partial image;
And a generating unit that generates an image by replacing the composite image obtained in the combining step with the partial image.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
[0010]
[First Embodiment]
FIG. 1 is a hardware configuration diagram for realizing a mosaic image generating method according to an embodiment of the present invention. In FIG. 1, 101 is a CPU, 102 is a memory, 103 is a hard disk, 104 is a keyboard and mouse (hereinafter referred to as a keyboard 104), 105 is a display, 106 is a network interface, 107 is a DVD-ROM drive, 108 is a scanner, 109 Is a video capture card, 110 is a database connected via a network, and 111 is a bus.
[0011]
The
[0012]
The
[0013]
It is also possible to use a DVD-ROM drive to capture video recorded on a DVD-ROM.
[0014]
FIG. 5 is a conceptual diagram showing the relationship between images (first image (original image), second image (mosaic image), material image) used in the mosaic technique. In FIG. 5, a first image 2001 is image data representing a design or image that is a base when an image is constructed using a mosaic technique. The second image 2002 is an image configured using a plurality of small images by a mosaic method. That is, the second image 2002 is divided into M × N, and is configured by a combination of material images obtained by arranging M × N material images in each divided region.
[0015]
A
[0016]
Next, a method for constructing a mosaic image will be described with reference to FIGS. FIG. 2 is a flowchart showing a mosaic image generation procedure according to the first embodiment. FIG. 6 is a diagram showing a method for dividing the first image and the second image in the mosaic method.
[0017]
First, in step S201, the first image (original image) is divided into M × N tiles as shown in FIG. As a result of the division, as shown in FIG. 6, the first image has M × N rectangular tiles TL (0,0), TL (1,0), TL (2,0)... TL (2,4 ), TL (3, 4). In FIG. 6, X and Y are the numbers of pixels in the horizontal direction and the vertical direction of the first image 2001, respectively. p and q are the numbers of pixels in the horizontal and vertical directions of each tile. Therefore, the relationship X = p × M, Y = q × N is established. Here, for the sake of simplicity, it is assumed that the tiles are all equal in size, but this is not necessary.
[0018]
In step S202, an evaluation target value is calculated for each of M × N tiles divided in step S201. In order to construct a mosaic image, it is necessary that the tile obtained by dividing the first image and the material image pasted with the tile are similar under a certain evaluation criterion. That is, a variable (hereinafter referred to as a feature value) is calculated from an image by a predetermined method, and a value obtained from an image of each tile (hereinafter referred to as an evaluation target value) and a value obtained from a material image (hereinafter referred to as an evaluated value). ). Then, the tile image is replaced with a material image having a close value.
[0019]
Here, the evaluation target value is a feature amount calculated for each tile image obtained by dividing the first image by a certain method. For example, the average luminance value of R, G, B can be used as this feature amount. In this case, the evaluation target values (Rd-av, Gd-av, Bd-av) are calculated by the following equation (1). Needless to say, as the evaluation target value, for example, another feature amount such as an average density value of each image may be used.
[0020]
Rd-av = (1 / (p × q)) × ΣRi
Gd-av = (1 / (p × q)) × ΣGi
Bd-av = (1 / (p × q)) × ΣBi (1)
Here, i represents all the pixels in the tile.
[0021]
In step S203, an evaluated value is calculated for P material images. The evaluated value is obtained for each material image, which is the same as the feature amount used in step S202. Therefore, when the average luminance values of R, G, and B are used as feature amounts, the evaluated values (Rs-av, Gs-av, Bs-av) are obtained by the following equation (2).
[0022]
Rs-av = (1 / p × q)) × ΣRi
Gs-av = (1 / p × q)) × ΣGi
Bs-av = (1 / p × q)) × ΣBi (2)
Here, i represents all the pixels in the material image.
[0023]
In step S204, one tile to be processed is selected from the M × N tiles. Here, the tile is specified using counters X-Pos (0 ≦ X-Pos ≦ M−1) and Y-Pos (0 ≦ Y-Pos ≦ N−1) indicating the position of the tile. As an example, when processing from the upper left to the right edge of the image and processing sequentially from the lower end, first, both X-Pos and Y-Pos are initialized to 0, and in the repetition of steps S2104 to S2107 (X-pos, Y-pos ) = (0,0), (1,0) ... (3,0), (0,1), ... (3,1), ... (0,4), ... (3,4) Change the value.
[0024]
In step S205, the evaluation target values (Rd-av, Gd-av, Bd-av) of the tiles to be processed and the evaluated values (Rs-av, Gs-av, Bs-av) of the P material images are obtained. Is evaluated by the evaluation function f (). As an example of the evaluation function f (), the mean square of the difference between the evaluation target value and the evaluated value can be mentioned. That is, the evaluation value is obtained by the following formula (3).
[0025]
In the above formula (3), “^” represents a power, for example, “X ^ 2” represents the square of X. As a result, P evaluation results of ΔE0 to ΔEp-1 are selected.
[0026]
In step S206, the material image having the smallest value is selected from the results of the P evaluation functions, and the tile specified by the corresponding tile position (ie, (X-pos, Y-pos)) of the second image. ) Tiles to be pasted on.
[0027]
In step S207, it is determined whether or not the above processing has been performed for all tiles of the first image. If there is an unprocessed tile, the processing returns to step S204 and the above processing is repeated. On the other hand, if all tiles have been processed, the process proceeds to step S208.
[0028]
In step S208, the α value input by the operator is read from the
[0029]
An example of an image composition method using α is to add α times the first image and (1−α) times the second image. That is, if the pixel values at the same position of the first image and the second image are (R1, G1, B1) and (R2, G2, B2), respectively, the same position of the third image obtained as a result of the synthesis The pixel values (R3, G3, B3) are obtained by the following equation (4).
[0030]
R3 = α × R1 + (1-α) R2
G3 = α × G1 + (1-α) G2
B3 = α × B1 + (1-α) B2
It becomes.
[0031]
As described above, according to the present embodiment, even when the individual tiles of the second image created by the mosaic image construction method are too different from the colors and textures of the first image. Since the first image is reflected at the set rate, it is possible to obtain an image in which the first image is well-defined as a whole. Therefore, a good mosaic image can be obtained with a small number of material images.
[0032]
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the following, differences between the first embodiment and the second embodiment will be described.
[0033]
FIG. 3 is a flowchart for explaining a procedure for generating a mosaic image according to the second embodiment. Steps S201 to S209 are executed in the same manner as in the first embodiment, and as a result, a first image and a third image that is a second composite image are obtained. In step S310, the third image is displayed on the display device. In step S311, an interface through which an α value can be changed is displayed, and it is determined whether or not the α value has been changed by the operator. If the α value is changed, the process returns to step S208, and the third image is generated using the changed α.
[0034]
FIG. 4 is a diagram illustrating an example of a user interface for changing the α value. A user interface as shown in FIG. 4 is displayed on the
[0035]
Before the
[0036]
Since α = 0 at the leftmost position of the
R3 = α × R1 + (1-α) R2 = R2
G3 = α × G1 + (1−α) G2 = G2
B3 = α × B1 + (1-α) B2 = B2
Thus, the third change is equal to the second image.
[0037]
In addition, since α = 1 at the right end of the
R3 = α × R1 + (1-α) R2 = R1
G3 = α × G1 + (1-α) G2 = G1
B3 = α × B1 + (1−α) B2 = B1
And the third image is equal to the first image.
[0038]
When the value of α is between 0 and 1, the third image is an image obtained by mixing the first image and the second image.
[0039]
As described above, according to the second embodiment, by adding a configuration that interactively controls the value of α using an input device such as a mouse, the user can easily set It is possible to mix one image with a second image.
[0040]
Note that the present invention can be applied to a system composed of a plurality of devices (for example, a host computer, interface device, reader, printer, etc.), or a device (for example, a copier, a facsimile device, etc.) composed of a single device. You may apply to.
[0041]
Another object of the present invention is to supply a storage medium storing software program codes for implementing the functions of the above-described embodiments to a system or apparatus, and the computer (or CPU or MPU) of the system or apparatus stores the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in the.
[0042]
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.
[0043]
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.
[0044]
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. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0045]
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. It goes without saying that 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.
[0046]
【The invention's effect】
As described above, according to the present invention, it is possible to generate a mosaic image that appropriately reflects various original images with a small number of material images.
[0047]
[Brief description of the drawings]
FIG. 1 is a hardware configuration diagram for realizing a mosaic image generating method according to an embodiment of the present invention.
FIG. 2 is a flowchart showing a procedure for culling a mosaic image according to the first embodiment.
FIG. 3 is a flowchart for explaining a procedure for generating a mosaic image according to a second embodiment;
FIG. 4 is a diagram illustrating an example of a user interface for changing an α value.
FIG. 5 is a conceptual diagram illustrating a relationship between images (first image, second image, and material image) used in the mosaic method.
FIG. 6 is a diagram illustrating a method of dividing a first image and a second image in a mosaic method.
Claims (13)
前記分割手段によって得られた部分画像の各々について、部分画像の特徴量に基づいて予め用意された複数の素材画像の一つを選択する選択手段と、
前記選択手段で選択された素材画像と前記部分画像とを合成する合成手段と、
前記合成手段によって得られた合成画像を前記部分画像に置き換えることによって画像を生成する生成手段と
を備えることを特徴とする画像処理装置。Dividing means for dividing the image into a plurality of partial images;
For each of the partial images obtained by the dividing means, a selection means for selecting one of a plurality of material images prepared in advance based on the feature amount of the partial image;
Combining means for combining the material image selected by the selecting means and the partial image;
An image processing apparatus comprising: generating means for generating an image by replacing the synthesized image obtained by the synthesizing means with the partial image.
ことを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the selection unit uses a luminance value of each color component as a feature amount of the partial image.
ことを特徴とする請求項1または2に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the selection unit selects a material image having a feature amount closest to a feature amount of the partial image from the plurality of material images.
ことを特徴とする請求項1に記載の画像処理装置。The image processing according to claim 1, wherein the synthesizing unit synthesizes the material image selected by the selection unit and the partial image at a synthesis ratio determined in accordance with a preset coefficient. apparatus.
ことを特徴とする請求項4に記載の画像処理装置。The synthesizing means sets the value obtained by multiplying the pixel value of the material image selected by the selection means by α and the pixel value of the partial image as 1-α when the coefficient is in a range of 0 to 1. The image processing apparatus according to claim 4, wherein a value obtained by adding the value multiplied by α is a pixel value of the composite image.
ことを特徴とする請求項4または5に記載の画像処理装置。The image processing apparatus according to claim 4, further comprising a user interface that allows an operator to set the coefficient.
分割手段が、画像を複数の部分画像に分割する分割工程と、
選択手段が、前記分割工程によって得られた部分画像の各々について、部分画像の特徴量に基づいて予め用意された複数の素材画像の一つを選択する選択工程と、
合成手段が、前記選択工程で選択された素材画像と前記部分画像とを合成する合成工程と、
生成手段が、前記合成工程によって得られた合成画像を前記部分画像に置き換えることによって画像を生成する生成工程と
を備えることを特徴とする画像処理方法。 An image processing method by an image processing apparatus,
Dividing means, a dividing step of dividing an image into a plurality of partial images,
A selection step in which the selection means selects one of a plurality of material images prepared in advance based on the feature amount of the partial image for each of the partial images obtained by the dividing step;
A synthesizing unit that synthesizes the material image selected in the selection step and the partial image;
The image processing method of generating means, characterized in that the synthesized image obtained by the synthesis step and a generation step of generating an image by replacing the partial image.
ことを特徴とする請求項7に記載の画像処理方法。The image processing method according to claim 7, wherein in the selection step , a luminance value of each color component is used as a feature amount of the partial image.
ことを特徴とする請求項7または8に記載の画像処理方法。The image processing method according to claim 7 or 8, wherein, in the selection step , a material image having a feature amount closest to a feature amount of the partial image is selected from the plurality of material images.
ことを特徴とする請求項7に記載の画像処理方法。Wherein in the synthesizing step, the synthesis ratio determined according to a preset coefficients, image according to claim 7, wherein the synthesis of selected material image and in the selection step and the partial image Processing method.
ことを特徴とする請求項10に記載の画像処理方法。In the synthesizing step , when the coefficient is α in the range of 0 to 1, the value obtained by multiplying the pixel value of the material image selected in the selection step by α and the pixel value of the partial image are set to 1 The image processing method according to claim 10, wherein a value obtained by adding the value multiplied by −α is used as a pixel value of the composite image.
ことを特徴とする請求項10または11に記載の画像処理方法。 The control means further comprises a control step of controlling a user interface that allows the coefficient to be set by an operator and providing the coefficient set via the user interface to the synthesis step. The image processing method according to 10 or 11.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP15022798A JP3984704B2 (en) | 1998-05-29 | 1998-05-29 | Image processing apparatus and method |
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 |
---|---|---|---|
JP15022798A JP3984704B2 (en) | 1998-05-29 | 1998-05-29 | Image processing apparatus and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11345328A JPH11345328A (en) | 1999-12-14 |
JP3984704B2 true JP3984704B2 (en) | 2007-10-03 |
Family
ID=15492334
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP15022798A Expired - Fee Related JP3984704B2 (en) | 1998-05-29 | 1998-05-29 | Image processing apparatus and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3984704B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100859501B1 (en) | 2007-08-01 | 2008-09-22 | 김학수 | Method and apparatus producing text patterning data corresponding to image data and reconstructing image date using the text patterning data |
-
1998
- 1998-05-29 JP JP15022798A patent/JP3984704B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH11345328A (en) | 1999-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6184888B1 (en) | Method and apparatus for rapidly rendering and image in response to three-dimensional graphics data in a data rate limited environment | |
US20110012912A1 (en) | Image processing device and image processing method | |
WO2013082832A1 (en) | Method and device for image processing | |
TWI238978B (en) | Two-dimensional image rendering processing method and device, and computer-readable medium thereof | |
JP3984704B2 (en) | Image processing apparatus and method | |
TW472214B (en) | Image processing apparatus, recording medium, and program | |
JP3825916B2 (en) | Image processing method and apparatus | |
EP1027682B1 (en) | Method and apparatus for rapidly rendering an image in response to three-dimensional graphics data in a data rate limited environment | |
JP3584179B2 (en) | Image processing method, image processing device, and storage medium | |
JP3584198B2 (en) | Image processing method and apparatus | |
EP1132865A2 (en) | Texture mapping method | |
JP2012033012A (en) | Image tone conversion device, image tone conversion system, image tone conversion method and program | |
JP2007028548A (en) | Apparatus and program for editing image | |
JPH11345311A (en) | Picture processor and picture processing method | |
JP2009005081A (en) | Apparatus and method for creating profile | |
JPH11345313A (en) | Picture processor and picture processing method | |
JP3495948B2 (en) | Image processing method, image processing apparatus, and storage medium | |
JP4136073B2 (en) | Image processing apparatus and method | |
JP4139990B2 (en) | Image processing apparatus, image processing method, image processing program, and image processing program storage medium | |
JP2713677B2 (en) | Color image color change processing method and color image synthesis processing method | |
JP2000298722A (en) | Image processing method and its device | |
JP3768679B2 (en) | Image processing method and apparatus | |
JP4904013B2 (en) | Image generation program and image generation apparatus | |
JP3647348B2 (en) | Image processing apparatus and image processing method | |
JP3780102B2 (en) | Mosaic image generation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040607 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7426 Effective date: 20040607 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20040607 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061115 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070607 |
|
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: 20070615 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070709 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100713 Year of fee payment: 3 |
|
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: 20100713 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110713 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120713 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |