JPH11341264A - Mosaic image generation method and recording medium - Google Patents

Mosaic image generation method and recording medium

Info

Publication number
JPH11341264A
JPH11341264A JP10150007A JP15000798A JPH11341264A JP H11341264 A JPH11341264 A JP H11341264A JP 10150007 A JP10150007 A JP 10150007A JP 15000798 A JP15000798 A JP 15000798A JP H11341264 A JPH11341264 A JP H11341264A
Authority
JP
Japan
Prior art keywords
image
calculating
average
parameter
mosaic
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.)
Abandoned
Application number
JP10150007A
Other languages
Japanese (ja)
Inventor
Kentaro Matsumoto
健太郎 松本
Kunihiro Yamamoto
邦浩 山本
Kiyoshi Kusama
澄 草間
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 JP10150007A priority Critical patent/JPH11341264A/en
Priority to EP99304188A priority patent/EP0961230A3/en
Priority to US09/322,026 priority patent/US6556210B1/en
Publication of JPH11341264A publication Critical patent/JPH11341264A/en
Abandoned legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide visually natural mosaic images by using luminance information or a coordinate in an uniform color matching space as an evaluation reference at the time of selecting an optimum image. SOLUTION: An image 701 to be the base of image constitution is divided into M×N pieces of tiles, the respective average luminance values of R, G and B are calculated and obtained for the respective tiles and the smallest one of the square sums of the errors of RGB tristimulus values is selected as the image optimum for a specified tile, variable-power-processed to an appropriate size and stuck. At the time, for the P sheets of material images 703, average luminance is obtained in advance and compared with the average luminance of the tile unit of a first image 701 and the closest one is selected. In such a manner, by calculating a luminance average based on the luminance value of color-mixing the RGB tristimulus values by an appropriate ratio, the mosaic of excellent color matching is generated for an object tile image. Also, by selecting the one of the minimum square error of the difference of the average stimulus value of the material image, a halftone part is appropriately expressed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、モザイク画像生成
方法及び記録媒体に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to a mosaic image generating method and a recording medium.

【0002】[0002]

【従来の技術】従来モザイクとは、「種々の色彩の石・
ガラス・大理石などの小片を組み合わせて、床・壁など
にはめ込み、図案化したもの、またはその技法」(三省
堂 現代国語辞典)として広く知られてきた。この技法
を用いて、多数の写真画像を組み合わせて図案あるいは
ひとつの写真画像を構成することが可能である。
2. Description of the Related Art Conventional mosaics are "stones of various colors.
It is widely known as "a technique that combines small pieces of glass, marble, etc., and fits them into floors, walls, etc., and uses them as a pattern, or a technique based on it" (Sanseido Modern Japanese Dictionary). Using this technique, it is possible to construct a design or one photographic image by combining a number of photographic images.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、ある画
像を模した画像をこのモザイク手法を用いて形成する場
合、前記画像を良好に反映した画像の形成については十
分な検討がされていなかった。本発明は、かかる点を鑑
みてなされたもので視覚的に自然なモザイク画像生成方
法、及びコンピュータにより読取り可能な記録媒体を提
供することを目的とする。
However, when an image imitating a certain image is formed using this mosaic technique, there has not been a sufficient study on the formation of an image that reflects the image well. It is an object of the present invention to provide a visually natural mosaic image generation method and a computer-readable recording medium made in view of the above points.

【0004】[0004]

【課題を解決するための手段】上記問題点を解決するた
めに、本発明では最適画像を選択する際の評価基準とし
て輝度情報、あるいは均等色空間における座標を用いる
ことを特徴としている。すなわち、複数の素材画像を管
理し、該複数の素材画像から複数を組み合わせて、図案
あるいは写真画像による第一の画像を模した第二の画像
を構成するモザイク画像生成方法は、前記第一の画像を
2次元のタイル領域に分割する分割工程と、前記分割工
程で分割された各タイル領域の色刺激による平均輝度値
を算出する領域内平均輝度値算出工程と、前記複数の素
材画像の平均輝度値を算出する素材画像平均輝度値算出
工程と、前記領域内平均輝度値算出工程によって算出さ
れた平均輝度値と、前記素材画像平均輝度値算出工程で
算出された素材画像の平均輝度値とに基づき、最適な画
像を前記複数の素材画像から選択する最適画像選択工程
とを備えることを特徴とする。
In order to solve the above-mentioned problems, the present invention is characterized in that luminance information or coordinates in a uniform color space are used as evaluation criteria when selecting an optimum image. That is, the mosaic image generation method of managing a plurality of material images, combining a plurality of the plurality of material images, and forming a second image that imitates the first image of a design or a photographic image, A dividing step of dividing the image into two-dimensional tile areas; an average luminance value calculating step for calculating an average luminance value by color stimulation of each tile area divided in the dividing step; and an averaging of the plurality of material images A material image average brightness value calculating step of calculating a brightness value, an average brightness value calculated by the in-region average brightness value calculating step, and a material image average brightness value calculated by the material image average brightness value calculating step. And an optimal image selecting step of selecting an optimal image from the plurality of material images based on

【0005】また、前記色刺激とは各画素の赤,緑,青
のRGB三刺激値の重ね合わせに基づき算出される輝度
値であることを特徴とする。また、前記最適画像選択工
程は、前記各タイル領域の領域内平均輝度値と、前記素
材画像の平均輝度値の差の二乗の和が最小となるものを
最適な素材画像として選択することを特徴とする。
The color stimulus is a luminance value calculated based on the superposition of red, green and blue RGB tristimulus values of each pixel. Further, the optimal image selecting step is to select, as the optimal material image, an image in which the sum of the square of the difference between the average luminance value in the area of each tile region and the average luminance value of the material image is the minimum. And

【0006】また、複数の素材画像を管理し、該複数の
素材画像から複数を組み合わせて、図案あるいは写真画
像による第一の画像を模した第二の画像を構成するモザ
イク画像生成方法は、前記第一の画像を2次元のタイル
領域に分割する分割工程と、前記分割工程で分割された
各タイル領域の色刺激によるL*a*b*空間パラメータ
を算出する領域内パラメータ算出工程と、前記複数の素
材画像のL*a*b*空間パラメータを算出する素材画像
パラメータ算出工程と、前記領域内パラメータ算出工程
によって算出されたL*a*b*空間パラメータと、前記
素材画像パラメータ算出工程で算出された素材画像のL
*a*b*空間パラメータとに基づき、最適な画像を前記
複数の素材画像から選択する最適画像選択工程とを備え
ることを特徴とする。
Further, a mosaic image generating method for managing a plurality of material images and combining a plurality of the plurality of material images to form a second image imitating a first image of a design or a photographic image, A dividing step of dividing the first image into two-dimensional tile areas; an in-area parameter calculating step of calculating L * a * b * spatial parameters by color stimulation of each tile area divided in the dividing step; A material image parameter calculating step of calculating L * a * b * spatial parameters of a plurality of material images; an L * a * b * spatial parameter calculated by the in-region parameter calculating step; and a material image parameter calculating step. L of the calculated material image
an optimal image selecting step of selecting an optimal image from the plurality of material images based on the * a * b * spatial parameters.

【0007】また、前記L*a*b*空間パラメータと
は、明度指数を示すL*と、知覚色度を示すa*及びb*
を示すパラメータであり、均等的な知覚色空間を記述す
るパラメータであることを特徴とする。また、前記最適
画像選択工程は、前記各タイル領域のL*a*b*空間パ
ラメータと、前記素材画像のL*a*b*空間パラメータ
との差の二乗の和が最小となるものを最適な素材画像と
して選択することを特徴とする。
The L * a * b * spatial parameters include L * indicating a lightness index, and a * and b * indicating perceived chromaticity.
And a parameter that describes an equivalent perceived color space. Further, the optimal image selecting step is an optimal image selecting step in which a sum of squares of a difference between an L * a * b * spatial parameter of each tile area and an L * a * b * spatial parameter of the material image is minimized. It is characterized in that it is selected as a natural material image.

【0008】また、前記第一の画像が白黒かカラーかの
属性を入力するための画像属性入力工程をさらに備え、
前記入力された属性に従い、白黒画像の場合は前記平均
輝度値に基づき、カラー画像の場合は前記L*a*b*空
間パラメータに基づきモザイク画像を構成することを特
徴とする。また、複数の素材画像を管理し、該複数の素
材画像から複数を組み合わせて、図案あるいは写真画像
による第一の画像を模した第二の画像を構成するモザイ
ク画像生成方法は、前記第一の画像を2次元のタイル領
域に分割する分割工程と、前記分割工程で分割された各
タイル領域の赤,緑,青の三刺激値成分の平均輝度値を
算出する領域内平均輝度値算出工程と、前記複数の素材
画像の平均輝度値を算出する素材画像平均輝度値算出工
程と、前記領域内平均輝度値算出工程によって算出され
た平均輝度値と、前記素材画像平均輝度値算出工程で算
出された素材画像の平均輝度値とに基づき、最適な画像
を前記複数の素材画像から選択する最適画像選択工程と
を備えることを特徴とする。
[0008] The image processing apparatus may further include an image attribute input step for inputting an attribute of whether the first image is monochrome or color,
According to the input attribute, a mosaic image is formed based on the average luminance value for a black-and-white image and based on the L * a * b * spatial parameters for a color image. Further, a mosaic image generation method for managing a plurality of material images, combining a plurality of the plurality of material images, and forming a second image imitating a first image by a design or a photographic image, the A dividing step of dividing the image into two-dimensional tile areas; an area average luminance value calculating step of calculating an average luminance value of red, green, and blue tristimulus value components of each tile area divided in the dividing step; A material image average luminance value calculating step of calculating an average luminance value of the plurality of material images, an average luminance value calculated in the area average luminance value calculating step, and a material image average luminance value calculating step. And selecting an optimum image from the plurality of material images based on the average luminance value of the material images thus obtained.

【0009】また、コンピュータ読み取り可能な記録媒
体は画像を2次元のタイル領域に分割する分割工程と、
前記分割工程で分割された各タイル領域の色刺激による
平均輝度値を算出する領域内平均輝度値算出工程と、前
記複数の素材画像の平均輝度値を算出する素材画像平均
輝度値算出工程と、前記領域内平均輝度値算出工程によ
って算出された平均輝度値と、前記素材画像平均輝度値
算出工程で算出された素材画像の平均輝度値とに基づ
き、最適な画像を前記複数の素材画像から選択する最適
画像選択工程とを実行させるためのプログラムを記録し
たことを特徴とする。
The computer-readable recording medium may further include a dividing step of dividing the image into two-dimensional tile areas;
An area average luminance value calculation step of calculating an average luminance value by color stimulation of each tile area divided in the division step, and a material image average luminance value calculation step of calculating an average luminance value of the plurality of material images, An optimal image is selected from the plurality of material images based on the average luminance value calculated in the area average luminance value calculation step and the average luminance value of the material image calculated in the material image average luminance value calculation step. And a program for executing the optimum image selecting step.

【0010】また、コンピュータ読み取り可能な記録媒
体は画像を2次元のタイル領域に分割する分割工程と、
前記分割工程で分割された各タイル領域の色刺激による
L*a*b*空間パラメータを算出する領域内パラメータ
算出工程と、前記複数の素材画像のL*a*b*空間パラ
メータを算出する素材画像パラメータ算出工程と、前記
領域内パラメータ算出工程によって算出されたL*a*b
*空間パラメータと、前記素材画像パラメータ算出工程
で算出された素材画像のL*a*b*空間パラメータとに
基づき、最適な画像を前記複数の素材画像から選択する
最適画像選択工程と、を実行させるためのプログラムを
記録したことを特徴とする。
The computer-readable recording medium further comprises a dividing step of dividing the image into two-dimensional tile areas;
An in-region parameter calculating step of calculating an L * a * b * spatial parameter by a color stimulus of each tile area divided in the dividing step, and a material for calculating an L * a * b * spatial parameter of the plurality of material images L * a * b calculated in the image parameter calculation step and the in-area parameter calculation step
Performing an optimal image selecting step of selecting an optimal image from the plurality of material images based on the spatial parameters and the L * a * b * spatial parameters of the material images calculated in the material image parameter calculating step. A program for causing the program to be recorded.

【0011】[0011]

【発明の実施の形態】[実施形態1]以下、図に従って本
実施形態にかかるモザイク画像生成方法について説明す
る。図7はモザイク手法で用いられる複数種類の画像の
関係を図示している。図7において、第一の画像701
は、モザイク手法を使って画像を構成する際、基となる
図案あるいは画像である。第二の画像702はモザイク
手法により、複数の小さな画像を使って構成された画像
である。素材画像703は第二の画像702を構成する
ために使われる素材画像である。素材画像の枚数Pは一
般に第二の画像を構成するに必要となる色・テクスチャ
の種類が用意できるだけの、十分大きな数である。ここ
では説明のためにP枚の画像のサイズをタイルと同じも
のとしているが、これは必ずしもタイルのサイズと一致
している必要はなく、また、P枚すべてが同じサイズで
ある必要はない。その場合は該当するタイル部分に貼り
付ける際に、素材画像のサイズをタイルサイズに変換す
る必要がある。
[Embodiment 1] A mosaic image generating method according to the present embodiment will be described below with reference to the drawings. FIG. 7 illustrates the relationship between a plurality of types of images used in the mosaic method. In FIG. 7, a first image 701
Is a design or an image which is a base when an image is constructed using the mosaic method. The second image 702 is an image formed using a plurality of small images by a mosaic method. The material image 703 is a material image used to compose the second image 702. The number P of the material images is generally large enough to prepare the types of colors and textures necessary to compose the second image. Here, the size of the P images is assumed to be the same as the size of the tile for the sake of explanation, but this does not necessarily have to match the size of the tile, and it is not necessary that all the P images have the same size. In such a case, it is necessary to convert the size of the material image into a tile size when pasting the material image on the corresponding tile portion.

【0012】次に図8によりモザイク画像構成方法を説
明する。図8において、ステップS801では第一の画
像をM×N個のタイルに分割する。その結果M×N個の
矩形タイルTL(0,0),TL(0,1),TL
(0,2),……,TL(4,2),TL(4,3)が
生成される。図9はM×N=4×5個の矩形に分割され
た第一の画像を図示している。
Next, a method for constructing a mosaic image will be described with reference to FIG. In FIG. 8, in step S801, the first image is divided into M × N tiles. As a result, M × N rectangular tiles TL (0,0), TL (0,1), TL
(0,2),..., TL (4,2), TL (4,3) are generated. FIG. 9 illustrates a first image divided into M × N = 4 × 5 rectangles.

【0013】図9においてX、Yはそれぞれ第一の画像
701の水平方向、垂直方向の画素数である。p、qは
第一の画像をM×N個の矩形タイルTL(0,0),T
L(1,0),TL(2,0),…TL(M、N)…,
TL(2,4),TL(3,4)に分割した際の各タイ
ルの水平方向、垂直方向の画素数である。したがって、
X=p×M,Y=q×Nという関係が成り立っている。
In FIG. 9, X and Y are the numbers of pixels of the first image 701 in the horizontal and vertical directions, respectively. p and q represent the first image as M × N rectangular tiles TL (0,0), T
L (1,0), TL (2,0), ... TL (M, N) ...,
This is the number of pixels in the horizontal and vertical directions of each tile when divided into TL (2, 4) and TL (3, 4). Therefore,
The relationship of X = p × M and Y = q × N is established.

【0014】図10は各タイルの3原色構成を示してい
る。各タイルはp×q個の画素からなり、それぞれ3原
色、赤(R)、緑(G)、青(B)に分解される。各画
素の分解されたRGB成分をRi,Gi,Biとする。図
8のステップS802はステップS801で分割したM
×N個の各タイルについて、次式に従いR,G,Bの各
平均輝度を計算する。左辺R、G、Bの添え字dはdest
inationの意である。
FIG. 10 shows the three primary colors of each tile. Each tile is composed of p × q pixels and is separated into three primary colors, red (R), green (G), and blue (B). Assume that the separated RGB components of each pixel are Ri, Gi, and Bi. Step S802 in FIG. 8 is the M divided in step S801.
For each of the × N tiles, the average luminance of each of R, G, and B is calculated according to the following equation. Subscript d of R, G, B on the left side is dest
It means ination.

【0015】 Rd-av={1/(p・q)}・ΣRi …(1) Gd-av={1/(p・q)}・ΣGi …(2) Bd-av={1/(p・q)}・ΣBi …(3) ステップS803は、P枚の素材画像について次式に従
い、それぞれR,G,Bの平均輝度を算出する。左辺
R、G、Bの添え字sははsourceの意である。
Rd-av = {1 / (p · q)} · {R i (1) Gd-av = {1 / (p · q)} · ΣG i (2) Bd-av = {1 / (p Q)}} Bi (3) In step S803, the average luminance of R, G, and B is calculated for each of the P material images according to the following equation. The suffix s of R, G, B on the left side means source.

【0016】 Rs-av={1/(p・q)}・ΣRi …(4) Gs-av={1/(p・q)}・ΣGi …(5) Bs-av={1/(p・q)}・ΣBi …(6) ステップS804は処理中のタイルの位置を示すカウン
タX_Pos(0≦X_Pos≦M−1),Y−Pos
(0≦Y−Pos≦N−1)を初期値として共に0に初
期化する。ここで、(X−Pos,Y−Pos)=
(0,0)は第一の画像の左上端タイルを示すものとす
る。
Rs-av = {1 / (p · q)} · {R i (4) Gs-av = {1 / (p · q)} · ΣG i (5) Bs-av = {1 / (p) · Q)} · ΣBi (6) Step S804 is a counter X_Pos (0 ≦ X_Pos ≦ M−1) indicating the position of the tile being processed, Y-Pos
(0 ≦ Y−Pos ≦ N−1) is initialized to 0 as an initial value. Here, (X-Pos, Y-Pos) =
(0,0) indicates the upper left tile of the first image.

【0017】ステップS805は位置カウンタX_Po
s,Y_Posで特定されるタイルに最もふさわしい
(最適な)画像を素材画像から選択する処理を行う。選
択方法はRGB3刺激値の誤差の2乗和(△E)を算出
し((7)式)、その値の最も小さいものを選択する。
評価式を以下に示す。 △E=(Rs-av−Rd-av)2+(Gs-av−Gd-av)2 +(Bs-av−Bd-av)2 …(7) 選択された画像をタイル部分に貼り付ける際、サイズが
合わない場合は適正なサイズに変倍処理を行う。
Step S805 is a position counter X_Po.
A process is performed to select the most appropriate (optimal) image from the material image for the tile specified by s, Y_Pos. The selection method calculates the sum of squares (の E) of the errors of the RGB tristimulus values (Equation (7)), and selects the one with the smallest value.
The evaluation formula is shown below. ΔE = (Rs−av−Rd−av) 2 + (Gs−av−Gd−av) 2 + (Bs−av−Bd−av) 2 (7) When pasting the selected image to the tile portion If the sizes do not match, the magnification is changed to an appropriate size.

【0018】この処理を順次水平方向、垂直方向に連続
して行い、すべてのタイルに対して処理が行われるまで
続ける(S806,S807)。上記実施形態1によ
り、各タイルに最適な画像を抽出する際にRGBの三刺
激値の各成分を独立のパラメータとして抽出し、各成分
の刺激値ごとに輝度誤差を最小とする素材の貼り付けを
行いモザイク画像を構成することができる。
This process is sequentially performed in the horizontal and vertical directions, and is continued until the process is performed on all tiles (S806, S807). According to the first embodiment, when extracting an optimal image for each tile, each component of the RGB tristimulus values is extracted as an independent parameter, and a material that minimizes a luminance error for each component stimulus value is pasted. To form a mosaic image.

【0019】しかしながら、各刺激値について輝度近傍
の波長を有する最適な画像が選択されていても、その重
ね合わせが必ずしもタイル画像として優れた構成となら
ない場合が多い。従って、色によっては第一の画像のタ
イル部分と素材画像から選んだ画像との色あいの違いが
まちまちであったり、中間調部分がおおざっぱに表現さ
れ、人肌などの細かい再現は困難であった。この課題を
以下に示す実施形態2または3により解決する。
However, even if an optimal image having a wavelength near the luminance is selected for each stimulus value, the superimposition does not always result in an excellent configuration as a tile image. Therefore, depending on the color, the color difference between the tile portion of the first image and the image selected from the material image is varied, or the halftone portion is roughly expressed, and it is difficult to reproduce human skin and the like finely. . This problem is solved by the second or third embodiment described below.

【0020】[実施形態2]以下、図面に基づいて実施
形態2にかかるモザイク画像生成方法を説明する。図1
は本実施形態を実現するハードウェア構成図である。1
01はCPU、102はメモリ、103はハードディス
ク、104はキーボードおよびマウスである。105は
モニタ、106はネットワークインタフェース、107
はCD−ROM、108はスキャナ、109はプリン
タ、110はネットワークを介して接続されているデー
タベース、111はバスである。
[Embodiment 2] Hereinafter, a mosaic image generating method according to Embodiment 2 will be described with reference to the drawings. FIG.
Is a hardware configuration diagram for implementing the present embodiment. 1
01 is a CPU, 102 is a memory, 103 is a hard disk, and 104 is a keyboard and a mouse. 105 is a monitor, 106 is a network interface, 107
Denotes a CD-ROM, 108 denotes a scanner, 109 denotes a printer, 110 denotes a database connected via a network, and 111 denotes a bus.

【0021】CPU101は上記構成の制御を行ない、
メモリ102は本実施形態を実現するソフトウェアの実
行モジュールあるいは画像データをハードディスク10
3からロードする。キーボード、マウスは処理対象の画
像を、モニタに表示されるユーザインタフェースを介し
てハードディスク、あるいはネットワークを介したデー
タベースから選択取得する。
The CPU 101 controls the above configuration,
The memory 102 stores an execution module of software for realizing the present embodiment or image data in the hard disk 10.
Load from 3. The keyboard and mouse select and acquire an image to be processed from a hard disk or a database via a network via a user interface displayed on a monitor.

【0022】モニタ105は、第一の画像、第二の画
像、素材画像の表示を行う。また画像はCD−ROMに
あらかじめ記録されているものを使用することも可能で
ある。その際はCD−ROMドライブ107から読み取
る。CD−ROM107に記録される画像フォーマット
としては、PhotoCD、FlashPix、JFI
F等が広く知られている。
The monitor 105 displays a first image, a second image, and a material image. Further, the image may be an image previously recorded on a CD-ROM. In this case, the data is read from the CD-ROM drive 107. The image formats recorded on the CD-ROM 107 include PhotoCD, FlashPix, JFI
F and the like are widely known.

【0023】また、必要に応じてスキャナ108で読み
取ることも可能である。プリンタ109は画像を記録紙
に印刷するものである。111はデータおよび制御信号
をやりとりするバスである。図2は本実施形態における
処理を示す第一のフローチャートである。本フローチャ
ートは素材画像P枚について、あらかじめその平均輝度
を計算する処理を実施するものである。
Further, the image can be read by the scanner 108 as needed. The printer 109 prints an image on recording paper. A bus 111 exchanges data and control signals. FIG. 2 is a first flowchart showing the processing in the present embodiment. In this flowchart, a process of calculating the average luminance of P material images in advance is performed.

【0024】ステップS201で処理回数を制御するカ
ウンタ変数Countを初期化する。ステップS202でカ
ウンタの値(Count=i)と等しい画像識別番号をもつ
素材画像(ImageID=i)を選択取得する。ただし、こ
こではCountと画像識別番号が同一なものとして実施形
態をあげているが、この例にかぎらず、素材画像とCoun
tが一対一に対応するものであれば構わない。この素材
画像は図1のハードディスク上に蓄積されているものだ
けでなく、CD−ROM107あるいはスキャナ108
から読み込むものであっても構わない。各素材画像の平
均輝度を算出するには(ステップS203)、具体的に
は図3のフローチャートに従う。
In step S201, a counter variable Count for controlling the number of times of processing is initialized. In step S202, a material image (ImageID = i) having an image identification number equal to the counter value (Count = i) is selected and acquired. However, although the embodiment is described here assuming that the Count and the image identification number are the same, the present invention is not limited to this example.
It does not matter if t corresponds to one-to-one. This material image is not only stored on the hard disk of FIG.
It may be read from. To calculate the average luminance of each material image (step S203), specifically, the flowchart of FIG. 3 is followed.

【0025】ステップS301で輝度の合計値を保持す
る変数sumを初期化する。ステップS302、S30
3では画像の縦方向、横方向の画素位置を示す変数y,
xをそれぞれ初期化する。S304では(x,y)に位
置する画素のRGB情報から次式(8)に従い画素単位
の輝度Y(x、y)を算出する。 Y(x、y)=0.3R+0.59G+0.11B … (8) (8)式により与えられる輝度はR、G、Bの各波長が
一定の光刺激に対する等色性を加法混色により実現する
ものである。
In step S301, a variable sum for holding a total value of luminance is initialized. Step S302, S30
3, variables y and y indicating the vertical and horizontal pixel positions of the image.
Initialize x respectively. In S304, the luminance Y (x, y) of each pixel is calculated from the RGB information of the pixel located at (x, y) according to the following equation (8). Y (x, y) = 0.3R + 0.59G + 0.11B (8) The luminance given by the expression (8) realizes the color matching to the light stimulus in which the R, G, and B wavelengths are constant by additive color mixture. Things.

【0026】ステップS305で輝度値の累積加算値を
求める。ステップS306ではx方向の画素位置を示す
カウンタを1インクリメントし、S307で画像の横方
向画素数xsizeを超えていなければ、ふたたびS3
04に戻り輝度算出を行い、算出結果を加算していく。
この処理は、分割された横方向の画素数に達するまで繰
り返される。
In step S305, a cumulative addition value of the luminance value is obtained. In step S306, the counter indicating the pixel position in the x direction is incremented by 1. If it is determined in step S307 that the number of pixels in the horizontal direction of the image does not exceed xsize, step S3 is performed again.
Returning to step 04, the brightness is calculated, and the calculation results are added.
This process is repeated until the number of divided horizontal pixels is reached.

【0027】ステップS307で画素の横方向画素数x
sizeとなった場合(S307−Yes)、ステップ
S308で縦方向画素位置カウンタyを1インクリメン
トし、次の画素行に移行する。ステップS309で画像
の縦方向画素数ysizeを超えていなければ、再びS
303に戻り、同様の処理を繰り返す。ステップS30
9で画像の縦方向画素数ysizeとなった場合は(S
309Yes)、輝度値の累積加算結果sumを累積画
素数xsize×ysizeで除し、平均輝度値を得る
(ステップS310)。各素材画像単位の平均輝度値が
同様に算出される。
In step S307, the number x of pixels in the horizontal direction
If the size has reached (S307-Yes), the vertical pixel position counter y is incremented by one in step S308, and the process proceeds to the next pixel row. If the number of pixels in the vertical direction ysize of the image does not exceed ysize in step S309, S
Returning to step 303, the same processing is repeated. Step S30
9, when the number of pixels in the vertical direction of the image becomes ysize (S
309 Yes), the cumulative sum of the luminance values sum is divided by the cumulative number of pixels xsize × ysize to obtain an average luminance value (step S310). The average luminance value for each material image unit is calculated in the same manner.

【0028】素材画像の輝度の平均値を求めた後、ステ
ップS204に戻る。S204では得られた平均輝度値
を画像識別番号と対応づけして記録する。これにより素
材画像の平均輝度値と識別番号とが一対一に対応する。
ステップS205は繰り返し制御を行うための制御変数
countの値をインクリメントし、ステップS206でそ
の素材画像の分割数(P)に達していなければ(S20
−No)、ステップS202にもどり同様の処理を繰り
返す。ステップS206で制御変数countが素材画像の
分割数Pに達した場合(S206−Yes)、処理を終
了する。以上の処理により各素材画像に対する平均輝度
値が算出されたことになる。
After obtaining the average value of the luminance of the material image, the process returns to step S204. In S204, the obtained average luminance value is recorded in association with the image identification number. Thereby, the average luminance value of the material image and the identification number correspond one-to-one.
Step S205 is a control variable for performing repetitive control.
The value of the count is incremented. If the number of divisions (P) of the material image has not been reached in step S206 (S20)
-No), returning to step S202 and repeating the same processing. If the control variable count has reached the number of divisions P of the material image in step S206 (S206-Yes), the process ends. With the above processing, the average luminance value for each material image has been calculated.

【0029】次に図4に従って本実施形態にかかるモザ
イク画像生成方法の処理を説明する。ステップS401
で第一の画像からモザイク画像の対象となる画像を取得
する。第一の画像はハードディスク103に蓄積されて
いるものであっても、CD−ROM107に記録されて
いるものであっても、ネットワークを介したデータベー
ス110に蓄積されているものであっても、また、スキ
ャナ108、あるいは不図示のデジタルカメラによって
得られる画像であっても構わない。
Next, the processing of the mosaic image generating method according to this embodiment will be described with reference to FIG. Step S401
To obtain an image to be a mosaic image from the first image. The first image may be one stored in the hard disk 103, one stored in the CD-ROM 107, one stored in the database 110 via a network, , Scanner 108, or an image obtained by a digital camera (not shown).

【0030】選択の際は候補となる複数の画像を表示し
ておき、キーボードあるいはマウス104を使って指示
選択する。表示される画像は蓄積された画像の大きさに
よっては縮小表示されたものである。画像のフォーマッ
トはPhotoCD、FlashPix、JPEGなど
である。第一の画像を選択取得後、ステップS402で
第一の画像をM×Nの領域に分割する。その結果M×N
個の矩形タイルTL(0,0),TL(0,1),TL
(0,2),…,TL(4,2),TL(4,3)…、
TL(M、N)が生成される。図9は4×5個の矩形に
分割された第一の画像を図示している。
At the time of selection, a plurality of candidate images are displayed, and an instruction is selected using the keyboard or the mouse 104. The displayed image is reduced in size depending on the size of the stored image. The format of the image is PhotoCD, FlashPix, JPEG, or the like. After selecting and acquiring the first image, in step S402, the first image is divided into M × N regions. The result is M × N
Rectangular tiles TL (0,0), TL (0,1), TL
(0,2), ..., TL (4,2), TL (4,3) ...,
TL (M, N) is generated. FIG. 9 illustrates a first image divided into 4 × 5 rectangles.

【0031】図9においてX、Yはそれぞれ第一の画像
701の水平方向、垂直方向の画素数である。p、qは
第一の画像をM×N個の矩形タイルTL(0,0),T
L(1,0),TL(2,0),…TL(M、N)…,
TL(2,4),TL(3,4)に分割した際の各タイ
ルの水平方向、垂直方向の画素数である。従って、X=
p×M,Y=q×Nという関係が成り立つ。このタイル
画像はメモリ102上に保持されている。
In FIG. 9, X and Y are the numbers of pixels of the first image 701 in the horizontal and vertical directions, respectively. p and q represent the first image as M × N rectangular tiles TL (0,0), T
L (1,0), TL (2,0), ... TL (M, N) ...,
This is the number of pixels in the horizontal and vertical directions of each tile when divided into TL (2, 4) and TL (3, 4). Therefore, X =
The following relationship holds: p × M, Y = q × N. This tile image is stored in the memory 102.

【0032】次に、ステップS403、S404でタイ
ルの処理回数を制御するための位置の変数X−Pos,
Y−Posを初期化する。ステップS405では、位置
変数X−Pos、Y−Posが示す位置のタイルの平均
輝度Y−TLを算出をする。平均輝度の算出方法は図3
に示したフローチャートにおいて、変数xsize,y
sizeをそれぞれp,qとすることで算出できる。
Next, in steps S403 and S404, the position variable X-Pos,
Initialize Y-Pos. In step S405, the average luminance Y-TL of the tile at the position indicated by the position variables X-Pos and Y-Pos is calculated. The method of calculating the average luminance is shown in FIG.
In the flowchart shown in, the variables xsize, y
It can be calculated by setting size to p and q, respectively.

【0033】次にステップS406では算出されたタイ
ル単位の平均輝度Y−TLとP枚の素材画像の平均輝度
を比較する。平均輝度比較の方法について詳細なフロー
チャートを図5に基づき説明する。図5において、ステ
ップS501で最も平均輝度の差の小さい画像を示す変
数Min_IDを初期化する。S502では平均輝度の
差の初期値Y−Diff_minを、またS503では
反復回数制御用変数iをそれぞれ初期化する。
In step S406, the calculated average luminance Y-TL in tile units is compared with the average luminance of the P material images. A detailed flowchart of the average luminance comparison method will be described with reference to FIG. In FIG. 5, in step S501, a variable Min_ID indicating an image having the smallest difference in average luminance is initialized. In S502, an initial value Y-Diff_min of the difference in average luminance is initialized, and in S503, a variable i for controlling the number of repetitions is initialized.

【0034】ステップS504ではi番目の画像(カウ
ンタiが示す画像)を取り出し、ステップS505では
図3のS301〜S310で求めた識別番号iの示す素
材画像の平均輝度Yと、注目しているタイルの平均輝度
(Y−TL)との差の二乗Y−Diffを計算する。こ
こでは差の二乗としているが、二乗平均であっても構わ
ない。
In step S504, the i-th image (the image indicated by the counter i) is extracted. In step S505, the average luminance Y of the material image indicated by the identification number i obtained in S301 to S310 in FIG. Calculate the square Y-Diff of the difference from the average luminance (Y-TL). Although the square of the difference is used here, the mean square may be used.

【0035】ステップS506ではY−DiffとY−
Diff_minを比較し、Y−DiffがY−Dif
f_minよりも小さい場合のみ、S507でY_Di
ff_minとMinIDを更新する。ステップS50
8で比較対象である画像を示すIDをインクリメントし
(S508)、素材画像P枚すべてについて大小関係の
比較を行う(S509)。この処理により、注目してい
るタイルに対して最小の平均輝度値誤差となる素材画像
を特定することができる。
In step S506, Y-Diff and Y-Diff
Diff_min is compared, and Y-Diff is compared with Y-Dif.
Only when it is smaller than f_min, Y_Di in S507
Update ff_min and MinID. Step S50
In step S508, the ID indicating the image to be compared is incremented (S508), and a comparison is made between the magnitudes of all P material images (S509). By this processing, it is possible to specify the material image having the minimum average luminance value error with respect to the tile of interest.

【0036】図4に戻り、ステップS407で得られた
画像IDを該当タイルの画像として関連付ける。ステッ
プS408でタイル位置を示す横方向ポインタ(例えば
図9におけるi番目のピクセルを識別表示するための制
御変数。TL(i,y)で0≦i≦M)をインクリメン
トし、S409でMに達していなかったらS405に戻
り同様の処理を繰り返す。また、S409で横方向にM
個のタイルの処理が終了していた場合は、ステップS4
10で縦方向ポインタY−Posをインクリメントし、
S411でN個に達していない場合、S404に戻り、
同様の処理を繰り返す。S411でN個に達していた場
合は処理を終了する(S411)。以上の処理により、
分割された全てのタイルに対して、最小の平均輝度値誤
差となる素材画像が特定されたことになる。
Returning to FIG. 4, the image ID obtained in step S407 is associated as an image of the corresponding tile. In step S408, the horizontal pointer indicating the tile position (for example, a control variable for identifying and displaying the i-th pixel in FIG. 9; 0 ≦ i ≦ M in TL (i, y)) is incremented, and reaches M in S409. If not, the process returns to S405 and the same processing is repeated. Also, in step S409, M
If the processing of the tiles has been completed, step S4
At 10, the vertical pointer Y-Pos is incremented,
If the number has not reached N in S411, the process returns to S404,
The same processing is repeated. If the number has reached N in S411, the process ends (S411). By the above processing,
This means that the material image having the minimum average luminance value error has been specified for all the divided tiles.

【0037】[実施形態2の効果]RGB刺激値を適切
な割合で混色した輝度値に基づき、輝度値平均を算出す
ることで、対象タイル画像に対して等色性に優れたモザ
イクの生成を可能とする。各タイル領域の領域内平均色
刺激値と、素材画像の平均色刺激値の差の二乗誤差が最
小となるものを選択することで中間調部分を適切に表現
することが可能となり、再構成されたモザイク画像を白
黒印刷、あるいはセピア色にて印刷する際に、輝度変化
を忠実に再現できる。
[Effect of Second Embodiment] By calculating the average of the luminance values based on the luminance values obtained by mixing the RGB stimulus values at an appropriate ratio, it is possible to generate a mosaic with excellent color matching for the target tile image. Make it possible. By selecting the average color stimulus value in the area of each tile area and the one that minimizes the square error of the difference between the average color stimulus values of the material image, it is possible to appropriately express the halftone part, When the mosaic image is printed in black and white or in sepia, the luminance change can be faithfully reproduced.

【0038】[実施形態3]均等知覚色空間(L*a*b
*)で記述されたパラメータを用いて、分割されたタイ
ルと素材画像の対応付けを行うことも可能である。すな
わち、実施形態1で平均輝度値を算出しているステップ
S304の処理を下記の算出式に従い、置換算出するも
のである。この算出式は、L*a*b*表示系に基づくも
のである。ここで、L*は明度指数、a*,b*は知覚色
度である。物体色のXYZ表示系の3刺激値X、Y、Z
を用いると以下の各式で与えられる。
[Embodiment 3] Uniform perceived color space (L * a * b)
It is also possible to associate the divided tiles with the material images using the parameters described in *). In other words, the process of step S304 in which the average luminance value is calculated in the first embodiment is replaced and calculated according to the following calculation formula. This calculation formula is based on the L * a * b * display system. Here, L * is a lightness index, and a * and b * are perceived chromaticities. Tristimulus values X, Y, Z of XYZ display system of object color
Is given by the following equations.

【0039】 (Y/Y0>0.008856のときのL*) L*=116(Y/Y0)1/3−16 …(9a) (Y/Y0≦0.008856のときのL*) L*=903.3(Y/Y0) …(9b) a*=500((X/X0)1/3−(Y/Y0)1/3) …(10) b*=200((Y/Y0)1/3−(Z/Z0)1/3) …(11) X0,Y0,Z0は照明に使用する標準光源または標準
の光の三刺激値である。X、Y、ZはRGB値から(1
2)式の行列の展開式により求めることができる。ただ
し、係数aijは画像入力装置のRGBの取り扱いによっ
て異なるパラメータである。
(L * when Y / Y0> 0.008856) L * = 116 (Y / Y0) 1/3 −16 (9a) (L * when Y / Y0 ≦ 0.008856) L * = 903.3 (Y / Y0) (9b) a * = 500 ((X / X0) 1/3 − (Y / Y0) 1/3 ) (10) b * = 200 ((Y / Y0 ) 1/3 − (Z / Z0) 1/3 ) (11) X0, Y0, Z0 are standard light sources used for illumination or tristimulus values of standard light. X, Y, and Z are (1
2) It can be obtained by the expansion formula of the matrix of the formula. However, the coefficient aij is a parameter that varies depending on how the image input device handles RGB.

【0040】 X=a11R+a12G+a13B …(12) Y=a21R+a22G+a23B Z=a31R+a32G+a33B 上記の(9a),(9b),(10)〜(12)式によ
り、素材画像とタイル画像の明度指数L*、知覚色度a
*,b*が算出される。この処理は実施形態1で説明した
図3のフローチャートで輝度平均の算出プロセスをL
*、a*、b*算出のプロセスに置き換えることで求める
ことができる。タイル画像と素材画像との対応付けは、
(13)式の色差ΔE-Labに基づき求める。
X = a11R + a12G + a13B (12) Y = a21R + a22G + a23B Z = a31R + a32G + a33B According to the above equations (9a), (9b), (10) to (12), the lightness index L * of the material image and the tile image, and the perceived chromaticity a
* And b * are calculated. In this process, the calculation process of the luminance average is L in the flowchart of FIG. 3 described in the first embodiment.
It can be obtained by replacing the process of calculating *, a *, b *. The correspondence between the tile image and the material image is
It is determined based on the color difference ΔE-Lab in equation (13).

【0041】 ΔE−Lab={(ΔL*)2+(Δa*)2+(Δb*)2}1/2…(13) すなわち、実施形態1で説明した図4、5のフローチャ
ートの処理で、平均輝度値の誤差平均が最小となる素材
画像を選択するプロセスをL*、a*,b*の各パラメー
タの誤差(ΔL*,Δa*,Δb*)が最小となる素材画
像を所定のタイルに貼り付ける処理に置換することで、
L*a*b*表示系に基づくモザイク画像構成が可能とな
る。
ΔE−Lab = {(ΔL *) 2 + (Δa *) 2 + (Δb *) 2 } 1/2 (13) That is, in the processing of the flowcharts of FIGS. The process of selecting a material image in which the average error of the average luminance value is the smallest is defined as a material image in which the error (ΔL *, Δa *, Δb *) of each parameter of L *, a *, b * is minimized. By replacing the process with pasting on the tile,
A mosaic image configuration based on the L * a * b * display system becomes possible.

【0042】[実施形態3の効果]第一の画像の分割さ
れたタイル画像と素材画像との比較、対応付けにL*a*
b*表色系のパラメータ(明度指数、知覚色度)を用い
ることで、均等的な知覚色の表現に基づく素材画像の特
定が可能となり、人間の目にとってより自然なモザイク
画像を構成することが可能となる。
[Effects of Third Embodiment] L * a * is used for comparing and associating the divided tile image of the first image with the material image.
By using b * color system parameters (brightness index and perceived chromaticity), it is possible to specify a material image based on uniform representation of perceived color, thereby forming a mosaic image more natural for human eyes. Becomes possible.

【0043】[実施形態4]図6を使って第三の実施形
態を説明する。図6においてステップS601はモニタ
105に印刷目的物がカラーかあるいは白黒かを問い合
わせるメッセージを出力する。ステップS602はキー
ボードあるいはマウス104によってカラーあるいは白
黒を選択する。 ステップS603では選択結果に応じ
て、カラーであればS604の処理を行い、白黒の場合
はS605の処理を行う。ステップS604の処理は実
施形態2に示した、評価基準としてL*a*b*空間に基
づく表示系を用いる方法であり、S605は実施形態1
に示した平均輝度値を用いる方法である。
[Embodiment 4] A third embodiment will be described with reference to FIG. In FIG. 6, a step S601 outputs a message to the monitor 105 asking whether the printing object is color or black and white. In step S602, color or black and white is selected by the keyboard or the mouse 104. In step S603, according to the selection result, the process of S604 is performed if the image is color, and the process of S605 is performed if the image is monochrome. The processing in step S604 is a method using the display system based on the L * a * b * space as the evaluation criterion shown in the second embodiment, and S605 is the first embodiment.
Is a method using the average luminance value shown in FIG.

【0044】[実施形態4の効果]出力画像の属性(カ
ラー若しくは白黒)をあらかじめ問い合わせ、その結果
に応じて処理方式を選択的に変更することにより、出力
画像の属性に応じた最適なモザイク画像の構成が可能と
なる。
[Effect of Embodiment 4] The optimum mosaic image according to the attribute of the output image is obtained by inquiring in advance the attribute (color or black and white) of the output image and selectively changing the processing method according to the result. Is possible.

【0045】[0045]

【他の実施形態】なお、本発明は、複数の画像形成機器
(例えばホストコンピュータ,インタフェイス機器,リ
ーダ,プリンタなど)から構成されるシステムに適用し
ても、一つの機器からなる装置(例えば、複写機,ファ
クシミリ装置など)に適用してもよい。
[Other Embodiments] The present invention is applicable to a system including a plurality of image forming apparatuses (for example, a host computer, an interface apparatus, a reader, a printer, etc.), and is not limited to a single apparatus (for example, an apparatus). , A copying machine, a facsimile machine, etc.).

【0046】また、本発明の目的は、前述した実施形態
の機能を実現するソフトウェアのプログラムコードを記
録した記憶媒体を、システムあるいは装置に供給し、そ
のシステムあるいは装置のコンピュータ(またはCPU
やMPU)が記憶媒体に格納されたプログラムコードを
読出し実行することによっても、達成されることは言う
までもない。
Another object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or apparatus, and to provide a computer (or CPU) of the system or apparatus.
And MPU) read and execute the program code stored in the storage medium.

【0047】この場合、記憶媒体から読出されたプログ
ラムコード自体が前述した実施形態の機能を実現するこ
とになり、そのプログラムコードを記憶した記憶媒体は
本発明を構成することになる。プログラムコードを供給
するための記憶媒体としては、例えば、フロッピディス
ク,ハードディスク,光ディスク,光磁気ディスク,C
D−ROM,CD−R,磁気テープ,不揮発性のメモリ
カード,ROMなどを用いることができる。
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. Examples of a storage medium for supplying the program code include a floppy disk, hard disk, optical disk, magneto-optical disk, and C
A D-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, and the like can be used.

【0048】また、コンピュータが読出したプログラム
コードを実行することにより、前述した実施形態の機能
が実現されるだけでなく、そのプログラムコードの指示
に基づき、コンピュータ上で稼働しているOS(オペレ
ーティングシステム)などが実際の処理の一部または全
部を行い、その処理によって前述した実施形態の機能が
実現される場合も含まれることは言うまでもない。
When the computer executes the readout program code, not only the functions of the above-described embodiment are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. ) May perform some or all of the actual processing, and the processing may realize the functions of the above-described embodiments.

【0049】さらに、記憶媒体から読出されたプログラ
ムコードが、コンピュータに挿入された機能拡張ボード
やコンピュータに接続された機能拡張ユニットに備わる
メモリに書込まれた後、そのプログラムコードの指示に
基づき、その機能拡張ボードや機能拡張ユニットに備わ
るCPUなどが実際の処理の一部または全部を行い、そ
の処理によって前述した実施形態の機能が実現される場
合も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written into a memory provided on a function expansion board inserted into the computer or a function expansion unit connected to the computer, based on the instructions of the program code, It goes without saying that the CPU included in the function expansion board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0050】本発明を上記記憶媒体に適用する場合、そ
の記憶媒体には、先に説明したフローチャートに対応す
るプログラムコードを格納することになるが、簡単に説
明すると、図11のメモリマップ例に示す各モジュール
を記憶媒体に格納することになる。すなわち、少なくと
も「分割モジュール1101」「領域内平均輝度値算出
モジュール1102」および「素材画像平均輝度値算出
モジュール1103」「最適画像選択モジュール110
4」「領域内パラメータ算出モジュール1105」「素
材画像パラメータ算出モジュール1106」「画像属性
入力モジュール1107」の各モジュールのプログラム
コードを記憶媒体に格納すればよい。
When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the above-described flowcharts. Each module shown will be stored in a storage medium. That is, at least “division module 1101”, “intra-region average luminance value calculation module 1102”, “material image average luminance value calculation module 1103”, “optimum image selection module 110”
4), the program code of each module of “area parameter calculation module 1105”, “material image parameter calculation module 1106”, and “image attribute input module 1107” may be stored in the storage medium.

【0051】[0051]

【発明の効果】RGB刺激値を適切な割合で混色した輝
度値に基づき、輝度値平均を算出することで、対象タイ
ル画像に対して等色性に優れたモザイクの生成を可能と
する。各タイル領域の領域内平均色刺激値と、素材画像
の平均色刺激値の差の二乗誤差が最小となるものを選択
することで中間調部分を適切に表現することが可能とな
り、再構成されたモザイク画像を白黒印刷、あるいはセ
ピア色にて印刷する際に、輝度変化を忠実に再現でき
る。
The average of the luminance values is calculated based on the luminance values obtained by mixing the RGB stimulus values at an appropriate ratio, thereby making it possible to generate a mosaic with excellent color matching for the target tile image. By selecting the average color stimulus value in the area of each tile area and the one that minimizes the square error of the difference between the average color stimulus values of the material image, it is possible to appropriately express the halftone part, When the mosaic image is printed in black and white or in sepia, the luminance change can be faithfully reproduced.

【0052】第一の画像の分割されたタイル画像と素材
画像との比較、対応付けにL*a*b*表色系のパラメー
タ(明度指数、知覚色度)を用いることで、均等的な知
覚色の表現に基づく素材画像の特定が可能となり、人間
の目にとってより自然なモザイク画像を構成することが
可能となる。出力画像の属性(カラー若しくは白黒)を
あらかじめ問い合わせ、その結果に応じて処理方式を選
択的に変更することにより、出力画像の属性に応じた最
適なモザイク画像の構成が可能となる。
By using the L * a * b * color system parameters (brightness index, perceived chromaticity) for comparing and associating the divided tile image of the first image with the material image, an even The material image can be specified based on the expression of the perceived color, and a mosaic image more natural for human eyes can be formed. By inquiring in advance the attributes (color or black and white) of the output image and selectively changing the processing method according to the result, it is possible to configure an optimal mosaic image according to the attributes of the output image.

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

【図1】本発明の実施形態に係るハードウェア構成を示
す図である。
FIG. 1 is a diagram showing a hardware configuration according to an embodiment of the present invention.

【図2】複数枚の素材画像から輝度平均を算出処理のフ
ローチャートである。
FIG. 2 is a flowchart of a process of calculating a luminance average from a plurality of material images.

【図3】1枚の素材画像から輝度平均を算出処理のフロ
ーチャートである。
FIG. 3 is a flowchart of a process of calculating a luminance average from one material image.

【図4】第一の画像が与えられた時に、モザイク画像を
構成する処理のフローチャートである。
FIG. 4 is a flowchart of a process for forming a mosaic image when a first image is provided.

【図5】分割されたタイル画像と素材画像との対応づけ
で、最適な画像を選択する処理のフローチャートであ
る。
FIG. 5 is a flowchart of a process of selecting an optimum image by associating a divided tile image with a material image.

【図6】実施形態4を説明するフローチャートである。FIG. 6 is a flowchart illustrating a fourth embodiment.

【図7】モザイク画像の構成概念を説明する図である。FIG. 7 is a diagram illustrating a configuration concept of a mosaic image.

【図8】モザイク画像を構成するフローチャートであ
る。
FIG. 8 is a flowchart for forming a mosaic image.

【図9】第一の画像をM×Nのタイル領域に分割した図
である。
FIG. 9 is a diagram in which a first image is divided into M × N tile areas.

【図10】各画素とRGBの対応を示した図である。FIG. 10 is a diagram showing correspondence between each pixel and RGB.

【図11】記録媒体のメモリマップを示す図である。FIG. 11 is a diagram showing a memory map of a recording medium.

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

101 CPU 102 メモリ 103 ハードディスク 104 入力装置(キーボード、マウス) 105 モニタ 106 ネットワークインタフェース 107 CD−ROM 108 スキャナ 109 レーザプリンタ 101 CPU 102 Memory 103 Hard Disk 104 Input Device (Keyboard, Mouse) 105 Monitor 106 Network Interface 107 CD-ROM 108 Scanner 109 Laser Printer

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 複数の素材画像を管理し、該複数の素材
画像から複数を組み合わせて、図案あるいは写真画像に
よる第一の画像を模した第二の画像を構成するモザイク
画像生成方法であって、 前記第一の画像を2次元のタイル領域に分割する分割工
程と、 前記分割工程で分割された各タイル領域の色刺激による
平均輝度値を算出する領域内平均輝度値算出工程と、 前記複数の素材画像の平均輝度値を算出する素材画像平
均輝度値算出工程と、 前記領域内平均輝度値算出工程によって算出された平均
輝度値と、前記素材画像平均輝度値算出工程で算出され
た素材画像の平均輝度値とに基づき、最適な画像を前記
複数の素材画像から選択する最適画像選択工程と、 を備えることを特徴とするモザイク画像生成方法。
1. A mosaic image generating method for managing a plurality of material images and combining the plurality of material images to form a second image imitating a first image of a design or a photographic image. A dividing step of dividing the first image into two-dimensional tile areas; an area average luminance value calculating step of calculating an average luminance value by a color stimulus of each tile area divided in the dividing step; A material image average brightness value calculating step of calculating an average brightness value of the material image of the source image; an average brightness value calculated by the in-region average brightness value calculating step; and a material image calculated by the material image average brightness value calculating step. A mosaic image generation method, comprising: selecting an optimum image from the plurality of material images based on the average luminance value of the mosaic image.
【請求項2】 前記色刺激とは各画素の赤,緑,青のR
GB三刺激値の重ね合わせに基づき算出される輝度値で
あることを特徴とする請求項1記載のモザイク画像生成
方法。
2. The color stimulus is a red, green, and blue R of each pixel.
2. The mosaic image generating method according to claim 1, wherein the luminance value is calculated based on the superposition of the GB tristimulus values.
【請求項3】 前記最適画像選択工程は、前記各タイル
領域の領域内平均輝度値と、前記素材画像の平均輝度値
の差の二乗の和が最小となるものを最適な素材画像とし
て選択することを特徴とする請求項1記載のモザイク画
像生成方法。
3. The optimum image selecting step selects an image in which the sum of squares of the difference between the average luminance value in each tile area and the average luminance value of the material image is minimum as the optimum material image. 2. The mosaic image generating method according to claim 1, wherein:
【請求項4】 複数の素材画像を管理し、該複数の素材
画像から複数を組み合わせて、図案あるいは写真画像に
よる第一の画像を模した第二の画像を構成するモザイク
画像生成方法であって、 前記第一の画像を2次元のタイル領域に分割する分割工
程と、 前記分割工程で分割された各タイル領域の色刺激による
L*a*b*空間パラメータを算出する領域内パラメータ
算出工程と、 前記複数の素材画像のL*a*b*空間パラメータを算出
する素材画像パラメータ算出工程と、 前記領域内パラメータ算出工程によって算出されたL*
a*b*空間パラメータと、前記素材画像パラメータ算出
工程で算出された素材画像のL*a*b*空間パラメータ
とに基づき、最適な画像を前記複数の素材画像から選択
する最適画像選択工程と、 を備えることを特徴とするモザイク画像生成方法。
4. A mosaic image generating method for managing a plurality of material images and combining the plurality of material images to form a second image imitating a first image of a design or a photographic image, A dividing step of dividing the first image into two-dimensional tile areas; and an in-area parameter calculating step of calculating an L * a * b * spatial parameter by a color stimulus of each tile area divided in the dividing step. A material image parameter calculating step of calculating L * a * b * spatial parameters of the plurality of material images; and L * calculated by the in-region parameter calculating step.
an a * b * space parameter and an L * a * b * space parameter of the material image calculated in the material image parameter calculating step, and an optimum image selecting step of selecting an optimum image from the plurality of material images. A mosaic image generation method, comprising:
【請求項5】 前記L*a*b*空間パラメータとは、明
度指数を示すL*と、知覚色度を示すa*及びb*を示す
パラメータであり、均等的な知覚色空間を記述するパラ
メータであることを特徴とする請求項4記載のモザイク
画像生成方法。
5. The L * a * b * space parameters are L * indicating a lightness index, and parameters indicating a * and b * indicating a perceived chromaticity, and describe an equivalent perceived color space. 5. The mosaic image generation method according to claim 4, wherein the method is a parameter.
【請求項6】 前記最適画像選択工程は、前記各タイル
領域のL*a*b*空間パラメータと、前記素材画像のL*
a*b*空間パラメータとの差の二乗の和が最小となるも
のを最適な素材画像として選択することを特徴とする請
求項4記載のモザイク画像生成方法。
6. The optimal image selecting step includes: an L * a * b * spatial parameter of each tile region; and an L * of the material image.
5. The mosaic image generation method according to claim 4, wherein the one that minimizes the sum of the square of the difference from the a * b * spatial parameter is selected as the optimal material image.
【請求項7】 前記第一の画像が白黒かカラーかの属性
を入力するための画像属性入力工程をさらに備え、前記
入力された属性に従い、白黒画像の場合は前記平均輝度
値に基づき、カラー画像の場合は前記L*a*b*空間パ
ラメータに基づきモザイク画像を構成することを特徴と
する請求項1または4記載のモザイク画像生成方法。
7. An image attribute inputting step for inputting an attribute of whether the first image is black and white or color, and in the case of a black and white image, a color based on the average luminance value according to the input attribute. 5. The mosaic image generation method according to claim 1, wherein a mosaic image is formed based on the L * a * b * spatial parameters in the case of an image.
【請求項8】 複数の素材画像を管理し、該複数の素材
画像から複数を組み合わせて、図案あるいは写真画像に
よる第一の画像を模した第二の画像を構成するモザイク
画像生成方法であって、 前記第一の画像を2次元のタイル領域に分割する分割工
程と、 前記分割工程で分割された各タイル領域の赤,緑,青の
三刺激値成分の平均輝度値を算出する領域内平均輝度値
算出工程と、 前記複数の素材画像の平均輝度値を算出する素材画像平
均輝度値算出工程と、 前記領域内平均輝度値算出工程によって算出された平均
輝度値と、前記素材画像平均輝度値算出工程で算出され
た素材画像の平均輝度値とに基づき、最適な画像を前記
複数の素材画像から選択する最適画像選択工程と、 を備えることを特徴とするモザイク画像生成方法。
8. A mosaic image generating method for managing a plurality of material images and combining the plurality of material images to form a second image imitating a first image of a design or a photographic image, A dividing step of dividing the first image into two-dimensional tile areas; and an average in a region for calculating an average luminance value of red, green, and blue tristimulus value components of each tile area divided in the dividing step. A brightness value calculating step, a material image average brightness value calculating step of calculating an average brightness value of the plurality of material images, an average brightness value calculated by the in-region average brightness value calculating step, and the material image average brightness value A mosaic image generating method, comprising: selecting an optimum image from the plurality of material images based on the average luminance value of the material images calculated in the calculating step.
【請求項9】 画像を2次元のタイル領域に分割する分
割工程と、 前記分割工程で分割された各タイル領域の色刺激による
平均輝度値を算出する領域内平均輝度値算出工程と、 前記複数の素材画像の平均輝度値を算出する素材画像平
均輝度値算出工程と、 前記領域内平均輝度値算出工程によって算出された平均
輝度値と、前記素材画像平均輝度値算出工程で算出され
た素材画像の平均輝度値とに基づき、最適な画像を前記
複数の素材画像から選択する最適画像選択工程と、 を実行させるためのプログラムを記録したことを特徴と
するコンピュータ読み取り可能な記録媒体。
9. A dividing step of dividing an image into two-dimensional tile areas; an area average luminance value calculating step of calculating an average luminance value of each tile area divided in the dividing step by a color stimulus; A material image average brightness value calculating step of calculating an average brightness value of the material image of the source image; an average brightness value calculated by the in-region average brightness value calculating step; and a material image calculated by the material image average brightness value calculating step. A computer-readable recording medium having recorded thereon a program for executing an optimum image selecting step of selecting an optimum image from the plurality of material images based on the average luminance value of the plurality of material images.
【請求項10】 画像を2次元のタイル領域に分割する
分割工程と、 前記分割工程で分割された各タイル領域の色刺激による
L*a*b*空間パラメータを算出する領域内パラメータ
算出工程と、 前記複数の素材画像のL*a*b*空間パラメータを算出
する素材画像パラメータ算出工程と、 前記領域内パラメータ算出工程によって算出されたL*
a*b*空間パラメータと、前記素材画像パラメータ算出
工程で算出された素材画像のL*a*b*空間パラメータ
とに基づき、最適な画像を前記複数の素材画像から選択
する最適画像選択工程と、 を実行させるためのプログラムを記録したことを特徴と
するコンピュータ読み取り可能な記録媒体。
10. A dividing step of dividing an image into two-dimensional tile areas, and an in-area parameter calculating step of calculating L * a * b * spatial parameters by color stimulation of each tile area divided in the dividing step. A material image parameter calculating step of calculating L * a * b * spatial parameters of the plurality of material images; and L * calculated by the in-region parameter calculating step.
an a * b * space parameter and an L * a * b * space parameter of the material image calculated in the material image parameter calculating step, and an optimum image selecting step of selecting an optimum image from the plurality of material images. A computer-readable recording medium having recorded thereon a program for executing the program.
JP10150007A 1998-05-29 1998-05-29 Mosaic image generation method and recording medium Abandoned JPH11341264A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP10150007A JPH11341264A (en) 1998-05-29 1998-05-29 Mosaic image generation method and recording medium
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
JP10150007A JPH11341264A (en) 1998-05-29 1998-05-29 Mosaic image generation method and recording medium

Publications (1)

Publication Number Publication Date
JPH11341264A true JPH11341264A (en) 1999-12-10

Family

ID=15487445

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10150007A Abandoned JPH11341264A (en) 1998-05-29 1998-05-29 Mosaic image generation method and recording medium

Country Status (1)

Country Link
JP (1) JPH11341264A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6927874B1 (en) 1999-04-02 2005-08-09 Canon Kabushiki Kaisha Image processing method, apparatus and storage medium therefor
WO2005117412A1 (en) * 2004-05-27 2005-12-08 Konica Minolta Photo Imaging, Inc. Image processing method, image processing program and image processing apparatus
KR100792827B1 (en) 2006-12-01 2008-01-14 중앙대학교 산학협력단 Method of generating mosaic image and storage medium storing program therefor
JP2009049515A (en) * 2007-08-14 2009-03-05 Olympus Corp Content generating device and camera
JP2010074405A (en) * 2008-09-17 2010-04-02 Canon Inc Image processing apparatus and method
CN102013086A (en) * 2009-09-03 2011-04-13 索尼公司 Image processing apparatus and method, and program
JP2012142996A (en) * 2012-04-10 2012-07-26 Olympus Corp Content creation device and camera
US8437542B2 (en) 2009-09-04 2013-05-07 Sony Corporation Image processing apparatus, method, and program
US8456721B2 (en) 2008-01-15 2013-06-04 Pitmedia Marketing Incorporated Mosaic image generating apparatus and method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6927874B1 (en) 1999-04-02 2005-08-09 Canon Kabushiki Kaisha Image processing method, apparatus and storage medium therefor
WO2005117412A1 (en) * 2004-05-27 2005-12-08 Konica Minolta Photo Imaging, Inc. Image processing method, image processing program and image processing apparatus
KR100792827B1 (en) 2006-12-01 2008-01-14 중앙대학교 산학협력단 Method of generating mosaic image and storage medium storing program therefor
JP2009049515A (en) * 2007-08-14 2009-03-05 Olympus Corp Content generating device and camera
US8456721B2 (en) 2008-01-15 2013-06-04 Pitmedia Marketing Incorporated Mosaic image generating apparatus and method
JP2010074405A (en) * 2008-09-17 2010-04-02 Canon Inc Image processing apparatus and method
US8670169B2 (en) 2008-09-17 2014-03-11 Canon Kabushiki Kaisha Image processing apparatus and image processing method for selecting an image for monochromatic output
CN102013086A (en) * 2009-09-03 2011-04-13 索尼公司 Image processing apparatus and method, and program
US8437542B2 (en) 2009-09-04 2013-05-07 Sony Corporation Image processing apparatus, method, and program
JP2012142996A (en) * 2012-04-10 2012-07-26 Olympus Corp Content creation device and camera

Similar Documents

Publication Publication Date Title
US6556210B1 (en) Image processing method and apparatus therefor
JP4174090B2 (en) Image processing method, apparatus, and recording medium
US6657746B1 (en) Look-up table constructing method and color conversion apparatus
JPH11341264A (en) Mosaic image generation method and recording medium
JP2006262446A (en) Image processing equipment, image processing method, and image processing program
US6373980B2 (en) Image processing method and apparatus for transforming the color space of entered image data
US6665451B1 (en) Image processing method and apparatus
JPH10210312A (en) Color converter, color conversion method and medium with color conversion program recorded
JP3825916B2 (en) Image processing method and apparatus
JP2004096560A (en) Compositing plotting system, method and program, and recording medium
JP2011130184A (en) Image processing apparatus, image processing method and image processing program, and image forming apparatus
JP3814412B2 (en) Image processing method and apparatus
JPH11345309A (en) Picture processor and picture processing method
JP2004153337A (en) Image processing apparatus
JP6318889B2 (en) Display processing apparatus, display processing method, and program
JP3584198B2 (en) Image processing method and apparatus
JPH0787302A (en) Document processor
JP2006024971A (en) Creating method, creating device and program for creating color conversion definition
JP2004140645A (en) Video signal treatment apparatus
JP3495948B2 (en) Image processing method, image processing apparatus, and storage medium
JP2004064546A (en) Image processing apparatus and color reproduction method
JP3984704B2 (en) Image processing apparatus and method
JPH10200769A (en) Color conversion device for color printing
JP2004128538A (en) Inspection system, inspection method, program, and recording medium
JPH11345329A (en) Picture processor and picture processing 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: 20050815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050829

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051024

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20051125

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20051226