JP2015188164A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2015188164A
JP2015188164A JP2014064917A JP2014064917A JP2015188164A JP 2015188164 A JP2015188164 A JP 2015188164A JP 2014064917 A JP2014064917 A JP 2014064917A JP 2014064917 A JP2014064917 A JP 2014064917A JP 2015188164 A JP2015188164 A JP 2015188164A
Authority
JP
Japan
Prior art keywords
image
stamp
data
arrangement
image data
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.)
Granted
Application number
JP2014064917A
Other languages
Japanese (ja)
Other versions
JP6110807B2 (en
Inventor
岸川 喜代成
Kiyonari Kishikawa
喜代成 岸川
翼 冨高
Tsubasa Tomitaka
翼 冨高
昌也 阿田
Masaya Ada
昌也 阿田
達治 木村
Tatsuji Kimura
達治 木村
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.)
GEO Technical Laboratory Co Ltd
Original Assignee
GEO Technical Laboratory Co Ltd
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 GEO Technical Laboratory Co Ltd filed Critical GEO Technical Laboratory Co Ltd
Priority to JP2014064917A priority Critical patent/JP6110807B2/en
Publication of JP2015188164A publication Critical patent/JP2015188164A/en
Application granted granted Critical
Publication of JP6110807B2 publication Critical patent/JP6110807B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Processing Or Creating Images (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device that can increase the processing speed of generating a composite image in which plural stamp images are superimposed on an original image.SOLUTION: Arrangement data for recording positions at which stamp images are combined with an original image are prepared. When the stamp images are combined, the arrangement data around a processing target pixel are searched to specify all stamp images to be combined so that parts of the stamp images are overlapped with the processing target pixel. On the basis of this specifying result, pixel values to be combined with the processing target pixel are calculated, and the combination is performed. By using the arrangement data as described above, it is unnecessary to repetitively perform the combination processing of the stamp images with the processing target pixel, and the combination result of plural stamp images can be obtained by one processing. Therefore, the processing speed of superimposing and combining many stamp images can be increased.

Description

本発明は、原画像に複数のスタンプ画像を重畳した合成画像を生成する画像処理装置に関する。   The present invention relates to an image processing apparatus that generates a composite image in which a plurality of stamp images are superimposed on an original image.

ナビゲーション装置やコンピュータの画面等に用いられる電子地図では、建物などの地物を3次元的に表現した3次元地図が用いられることがある。電子地図は、昼間の景色だけでなく夜景の表示も行うことがある。例えば、地図の表示時刻に応じて、昼間の景色と夜景とを使い分けることによって、電子地図のリアリティをより向上させることができる。
図1は、夜景の3次元地図の表示例を示す説明図である。こうした夜景の地図は、3次元モデルを投影した画像上に、点光源を表す多数のスタンプ画像を重畳することで生成できる。線状の部分は道路を表す道路夜景であり、上方の光源が固まった部分は街を表す建物夜景である。
このように多数のスタンプ画像を重畳して画像を生成するには、多大な処理負荷がかかるため、処理負荷を軽減することが課題となる。特許文献1は、処理負荷を軽減する一つの方法として、多数のパーティクルを描いて水しぶき等を表現する際に、視点からの距離に応じてパーティクルの描画順序をソートする技術を開示している。
An electronic map used for a navigation device, a computer screen, or the like may use a three-dimensional map that three-dimensionally represents a feature such as a building. Electronic maps may display not only daytime views but also night views. For example, the reality of an electronic map can be further improved by selectively using a daytime view and a night view according to the display time of the map.
FIG. 1 is an explanatory diagram illustrating a display example of a three-dimensional map of a night view. Such a night view map can be generated by superimposing a number of stamp images representing point light sources on an image obtained by projecting a three-dimensional model. The linear part is a road night view representing a road, and the upper part of the light source is a building night view representing a city.
In order to generate an image by superimposing a large number of stamp images in this manner, a large processing load is applied, and thus it is a problem to reduce the processing load. Patent Document 1 discloses a technique for sorting the drawing order of particles according to the distance from the viewpoint when drawing a large number of particles to represent splashes and the like as one method for reducing the processing load.

特開2002−216153号公報JP 2002-216153 A

図1に示した夜景画像では、点光源の数は億にも至ることがあり、このように多大な数となると、処理負荷は看過できないほど大きなものとなる。従来技術の方法では、処理に多大な時間を要し、円滑な表示を実現するには、まだ多大な改善の余地がある。かかる課題は、夜景画像に限らず、多数のスタンプ画像を合成する画像処理において共通の課題である。本発明は、かかる課題に鑑み、多数の3次元のスタンプ画像を合成する際の処理の高速化を図ることを目的とする。   In the night scene image shown in FIG. 1, the number of point light sources may reach 100 million, and when the number is large, the processing load becomes so large that it cannot be overlooked. In the prior art method, the processing takes a lot of time, and there is still much room for improvement in order to realize a smooth display. Such a problem is not limited to a night view image, and is a common problem in image processing for combining a large number of stamp images. SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and an object of the present invention is to increase the processing speed when combining a large number of three-dimensional stamp images.

本発明は、複数のピクセルからなる原画像に対して、複数のスタンプ画像を重畳した合成画像を生成する画像処理装置であって、
前記原画像を表す原画像データを記憶する原画像データ記憶部と、
前記スタンプ画像を表すスタンプ画像データを記憶するスタンプ画像データ記憶部と、
前記スタンプ画像が配置されるべき位置を、前記原画像データのピクセルで表した配置データを記憶する配置データ記憶部と、
前記原画像データに、前記スタンプ画像データを重畳する重畳処理部とを備え、
前記重畳処理部は、
前記原画像データから前記重畳処理を施す対象ピクセルを選択し、
前記配置データに基づいて、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その配置を特定し、
前記特定された結果に基づいて、前記スタンプ画像データを参照して、前記対象ピクセルに全ての前記スタンプ画像を重畳した場合の画素値を算出し、
該算出結果を、前記合成画像における前記対象ピクセルの画素値として記憶する画像処理装置として構成することができる。
The present invention is an image processing device for generating a composite image in which a plurality of stamp images are superimposed on an original image composed of a plurality of pixels,
An original image data storage unit for storing original image data representing the original image;
A stamp image data storage unit for storing stamp image data representing the stamp image;
An arrangement data storage unit for storing arrangement data in which the position where the stamp image is to be arranged is represented by pixels of the original image data;
A superimposition processing unit that superimposes the stamp image data on the original image data,
The superimposition processing unit
Select a target pixel to be subjected to the superimposition process from the original image data,
Based on the arrangement data, specify all the stamp images to be superimposed on the target pixel, and the arrangement thereof,
Based on the identified result, referring to the stamp image data, calculate a pixel value when all the stamp images are superimposed on the target pixel,
The calculation result can be configured as an image processing apparatus that stores the calculation result as a pixel value of the target pixel in the composite image.

本発明によれば、配置データを用いることにより、スタンプ画像を重畳する処理の高速化を図ることができる。本発明において高速化が実現される原理について説明する。
図2は、スタンプ画像の重畳方法を示す説明図である。図の下側にはスタンプ画像が重畳されるべき原画像データ、図の上方には重畳するスタンプ画像を、それぞれ模式的に示した。図中の破線で区切ったマス目は、それぞれピクセルを表している。スタンプ画像とは、このように画像上に多数貼り付けられる画像を言う。原画像上に多数貼り付けることを考えると、スタンプ画像は、原画像データよりも小さいサイズとすることが好ましいが、原画像データ以上のサイズとすることもできる。
矢印M1、M2で示すように、図中のピクセルP1、P2の位置にそれぞれスタンプ画像を重畳する場合を考える。従来技術においては、かかる場合、まず、ピクセルP1を中心とする太線の枠内の9つのピクセルに対して、それぞれスタンプ画像の画素値を合成する。そして、次に、ピクセルP2を中心とする太線の枠内の9つのピクセルに対して、それぞれスタンプ画像の画素値を合成する。かかる方法では、例えば、ピクセルP1に着目すると、矢印M1での合成のときと、矢印M2での合成の2回にわたって合成処理が行われる。このように、従来技術の合成方法では、合成すべきスタンプ画像の数が増えるほど、原画像データを繰り返し読み出し、合成処理を行って、その結果を書き込む処理の回数が増えることとなる。
これに対し、本発明では、配置データを参照することにより、対象ピクセルに全てのスタンプ画像を重畳した場合の画素値を算出することができる。図2の例で説明する。この例によれば、配置データには、スタンプ画像の位置として、ピクセルP1、P2が記録されることになる。そして、ピクセルP1の処理を行う場合には、この配置データを参照することにより、ピクセルP1にはスタンプ画像の中央の画素が合成され、またピクセルP2にスタンプ画像を配置することによって、ピクセルP1にはスタンプ画像の左上の画素が合成されることが特定できる。このように本発明の方法によれば、配置データを用いることにより、処理対象のピクセルP1に重畳される全てのスタンプ画像を特定でき、ピクセルP1に合成される画素値を一義的に算出することができる。
このように本発明によれば、多数のスタンプ画像を合成する場合であっても、原画像データの読み出し、書き込みを繰り返す必要がなくなり、原画像データの各ピクセルの合成処理を一度で済ませることができる。
一方、本発明の方法では、スタンプ画像を合成する過程で配置データを繰り返し参照する必要が生じるが、配置データへの書き込みは一切、行われない。即ち、従来技術では、原画像データに対して、読み出し、書き込みの双方の処理が行われるのに対し、本発明の方法では、配置データに対しては読み出しのみの処理が行われ、原画像データに対しては主として書き込みの処理が行われることになり、配置データと原画像データとの間で、読み出し/書き込みの処理を分離することができる。一般にデータへのアクセスは、読み出しと書き込みとを同時に行うことはできないため、原画像データに対して、読み出し、書き込みの双方の処理が行われる従来技術では、読み出しが完了するまで書き込みを待つ必要があり処理時間を要するが、本発明では、読み出し/書き込みの処理が分離されるため、配置データからの読み出しと、原画像データへの書き込みを同時に行うことも可能となる。こうした並列処理効果も奏し、本発明ではさらに処理速度を高速化することができる。
According to the present invention, it is possible to speed up the process of superimposing the stamp image by using the arrangement data. The principle of achieving high speed in the present invention will be described.
FIG. 2 is an explanatory diagram showing a stamp image superimposing method. The original image data on which the stamp image is to be superimposed is schematically shown on the lower side of the figure, and the stamp image to be superimposed is schematically shown on the upper side of the figure. The squares separated by broken lines in the figure represent pixels. A stamp image is an image that is pasted on the image in this manner. Considering that a large number of images are pasted on the original image, the stamp image is preferably smaller than the original image data, but may be larger than the original image data.
Consider a case in which stamp images are superimposed on the positions of pixels P1 and P2 in the figure as indicated by arrows M1 and M2. In the prior art, in such a case, first, the pixel values of the stamp image are respectively synthesized with the nine pixels within the thick line frame centered on the pixel P1. Next, the pixel values of the stamp image are combined with the nine pixels in the thick line frame centered on the pixel P2. In such a method, for example, focusing on the pixel P1, the combining process is performed twice at the time of combining at the arrow M1 and at the combining at the arrow M2. As described above, in the conventional combining method, as the number of stamp images to be combined increases, the number of times of repeatedly reading the original image data, performing the combining process, and writing the result increases.
On the other hand, in the present invention, by referring to the arrangement data, it is possible to calculate the pixel value when all the stamp images are superimposed on the target pixel. This will be described with reference to the example of FIG. According to this example, the pixels P1 and P2 are recorded as the position of the stamp image in the arrangement data. When processing the pixel P1, by referring to this arrangement data, the pixel at the center of the stamp image is synthesized with the pixel P1, and by placing the stamp image on the pixel P2, the pixel P1 Can specify that the upper left pixel of the stamp image is synthesized. As described above, according to the method of the present invention, by using the arrangement data, it is possible to specify all the stamp images to be superimposed on the pixel P1 to be processed, and to uniquely calculate the pixel value synthesized with the pixel P1. Can do.
As described above, according to the present invention, even when a large number of stamp images are combined, it is not necessary to repeatedly read and write the original image data, and the combining process of each pixel of the original image data can be completed only once. it can.
On the other hand, in the method of the present invention, it is necessary to repeatedly refer to the arrangement data in the process of synthesizing the stamp image, but writing to the arrangement data is not performed at all. That is, in the conventional technique, both reading and writing processes are performed on the original image data, whereas in the method of the present invention, only the reading process is performed on the arrangement data, and the original image data is processed. Therefore, the writing process is mainly performed, and the reading / writing process can be separated between the arrangement data and the original image data. In general, since access to data cannot be performed simultaneously with reading and writing, in the conventional technology in which both reading and writing processes are performed on the original image data, it is necessary to wait for the writing until the reading is completed. Although a certain processing time is required, in the present invention, since reading / writing processing is separated, reading from the arrangement data and writing to the original image data can be performed simultaneously. Such a parallel processing effect is also achieved, and the processing speed can be further increased in the present invention.

本発明において、スタンプ画像のサイズは、任意に設定可能である。また、原画像データに合成されるスタンプ画像は一種類である必要はなく、種々のサイズの複数種類のスタンプ画像が混在していてもよい。
配置データは、スタンプ画像を合成する位置が特定できるものであれば、種々の構造で用意することができる。図2に示した例では、例えば、原画像データと同じ解像度の仮想的な画像データを用意し、スタンプ画像を配置すべきピクセルP1、P2に何らかの画素値を記録したものを配置データとして用意してもよい。この場合には、画素値によって、スタンプ画像を配置する数を表すこともできる。また、別の態様として、スタンプ画像を配置すべき原画像データ上の座標値と、そこに配置するスタンプ画像の数とを表すテーブルなどの形で配置データを用意してもよい。
また、配置データは、原画像データ内だけでなく、その周囲の画素に対するスタンプ画像の合成位置を特定可能なデータとしてもよい。例えば、図2のように仮想的な画像データの形式で配置データを用意する場合には、原画像データよりも縦横のサイズが大きい画像データを配置データとして使用する態様に相当する。
原画像よりも外側にスタンプ画像が配置される場合であっても、位置関係によっては、スタンプ画像の一部が原画像に重なることがある。原画像データの周囲の画素に対する情報も含める形で配置データを用意しておけば、このように原画像の外側に配置されるスタンプ画像についても、原画像の各ピクセルへの影響を特定することができ、隣接する原画像間での連続性を確保しつつ、原画像の境界付近の画素に対しても効率的にスタンプ画像の合成を行うことができる。
上述の態様において、配置データのサイズは任意に設定可能である。例えば、配置データは、原画像データの境界上のピクセルにスタンプ画像の境界上のピクセルが重なる位置までカバーしていれば足りることを考慮し、概ねスタンプ画像の縦方向、横方向の最大幅のそれぞれ半分を原画像データの周囲に付加した状態で用意してもよい。
In the present invention, the size of the stamp image can be arbitrarily set. Further, the stamp image to be combined with the original image data need not be one type, and a plurality of types of stamp images of various sizes may be mixed.
The arrangement data can be prepared in various structures as long as the position where the stamp image is synthesized can be specified. In the example shown in FIG. 2, for example, virtual image data having the same resolution as the original image data is prepared, and the pixel P1 and P2 where some stamp values are to be recorded are prepared as arrangement data. May be. In this case, the number of stamp images to be arranged can be represented by pixel values. As another aspect, the arrangement data may be prepared in the form of a table or the like representing the coordinate values on the original image data where the stamp image is to be arranged and the number of stamp images arranged there.
Further, the arrangement data may be data that can specify not only the original image data but also the combined position of the stamp image with respect to surrounding pixels. For example, as shown in FIG. 2, when arrangement data is prepared in the form of virtual image data, this corresponds to an aspect in which image data having a larger vertical and horizontal size than the original image data is used as the arrangement data.
Even when the stamp image is arranged outside the original image, a part of the stamp image may overlap the original image depending on the positional relationship. If arrangement data is prepared in such a way that information on the surrounding pixels of the original image data is included, the influence on each pixel of the original image can be specified even for the stamp image arranged outside the original image in this way. Thus, it is possible to efficiently synthesize a stamp image even for pixels near the boundary of the original image while ensuring continuity between adjacent original images.
In the above-described aspect, the size of the arrangement data can be arbitrarily set. For example, considering that the arrangement data only needs to cover the pixels on the boundary of the original image data to the position where the pixels on the boundary of the stamp image overlap, the maximum width in the vertical and horizontal directions of the stamp image is generally sufficient. Each half may be prepared in a state where it is added around the original image data.

本発明の画像処理装置において、
前記重畳処理部は、前記対象ピクセルを中心として、前記スタンプ画像のサイズに応じた距離だけ離れた範囲内を検出範囲と設定し、
前記配置データから前記検出範囲内の各ピクセルに対応するデータを検索することによって、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その配置を特定するようにしてもよい。
In the image processing apparatus of the present invention,
The superimposition processing unit sets a detection range within a range separated by a distance according to the size of the stamp image with the target pixel as a center,
By searching data corresponding to each pixel in the detection range from the arrangement data, all the stamp images superimposed on the target pixel and their arrangement may be specified.

こうすることにより、配置データの検索を効率的に行うことができる。図2に即して説明する。例えば、ピクセルP1の処理を考えると、ピクセルP2に配置されるスタンプ画像はピクセルP1にも影響を与えるが、矢印M3のようにピクセルP3に配置されるスタンプ画像は、ピクセルP1には影響を与えない。従って、配置データを参照して、ピクセルP1に影響を与えるスタンプ画像の位置を特定する場合、ピクセルP1から離れたピクセルP3は参照する必要はないことになる。
上記態様では、スタンプ画像のサイズに応じて配置データを参照する範囲を絞り込むため、無用な参照を抑制することができ、処理速度の向上を図ることが可能となる。
上記態様においても、スタンプ画像のサイズは統一されている必要はない。サイズの異なるスタンプ画像が用いられる場合には、例えば、最もサイズの大きいスタンプ画像に合わせて検出範囲を設定すればよい。
By doing so, the arrangement data can be searched efficiently. This will be described with reference to FIG. For example, considering the processing of the pixel P1, the stamp image arranged at the pixel P2 also affects the pixel P1, but the stamp image arranged at the pixel P3 as indicated by the arrow M3 affects the pixel P1. Absent. Therefore, when the position of the stamp image that affects the pixel P1 is specified by referring to the arrangement data, it is not necessary to refer to the pixel P3 away from the pixel P1.
In the above aspect, since the range for referring to the arrangement data is narrowed according to the size of the stamp image, useless reference can be suppressed, and the processing speed can be improved.
Also in the above aspect, the sizes of the stamp images need not be unified. When stamp images having different sizes are used, for example, the detection range may be set according to the stamp image having the largest size.

本発明において、
前記スタンプ画像は、透過部分を有する画像であり、
前記配置データは、さらに、前記スタンプ画像を重畳する回数を表す重畳回数を記憶しており、
前記重畳処理部は、前記重畳回数だけ繰り返し前記スタンプ画像を適用して、前記画素値を算出するものとしてもよい。
このように透過部分を有するスタンプ画像の場合は、同じ位置に繰り返し重畳することによって得られる画像が異なってくる。上記態様では、配置データにおいて、スタンプ画像を重畳する位置だけでなく、その回数まで記憶しているため、この繰り返し数も踏まえて処理対象画素に重畳される画素値を一義的に特定することが可能となり、処理速度の向上を図ることができる。
In the present invention,
The stamp image is an image having a transparent portion,
The arrangement data further stores the number of times of superimposition representing the number of times of superimposing the stamp image,
The superimposition processing unit may calculate the pixel value by repeatedly applying the stamp image for the number of times of superimposition.
In this way, in the case of a stamp image having a transmissive portion, the images obtained by repeatedly superimposing them at the same position are different. In the above aspect, the arrangement data stores not only the position where the stamp image is superimposed, but also the number of times, so that it is possible to uniquely identify the pixel value to be superimposed on the processing target pixel based on the number of repetitions. The processing speed can be improved.

本発明の画像処理装置においては、さらに、
前記配置データ記憶部は、前記配置データとは別に、前記スタンプ画像が配置されるべき位置を、前記原画像データより粗い解像度の粗ピクセルで表した粗配置データを記憶しており、
前記重畳処理部は、
前記粗配置データに基づいて、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その粗ピクセルでの配置を特定し、
前記特定された粗ピクセルでの配置に基づいて、前記配置データを参照することによって、前記原画像のピクセル単位での前記スタンプ画像の配置を特定するものとしてもよい。
In the image processing apparatus of the present invention,
The arrangement data storage unit stores, apart from the arrangement data, coarse arrangement data in which the position where the stamp image is to be arranged is represented by coarse pixels having a coarser resolution than the original image data.
The superimposition processing unit
Based on the coarse arrangement data, specify all the stamp images to be superimposed on the target pixel and the arrangement of the coarse pixels,
The arrangement of the stamp image in units of pixels of the original image may be specified by referring to the arrangement data based on the arrangement of the specified coarse pixels.

粗配置データは、原画像データの数ピクセル分の範囲にスタンプ画像が配置されるべきか否かを記録したものである。この粗配置データのある粗ピクセルを参照したときに、スタンプ画像が配置されないという結果が得られれば、その粗ピクセルに対応する箇所については、配置データを参照するまでなくスタンプ画像は配置されないことが明らかとなる。従って、粗配置データを利用することによって、配置データを無駄に参照することを抑制することができる。
粗配置データと配置データとの併用は、原画像データの全ての領域で一様に行う必要はなく、スタンプ画像の密度が比較的低い領域においてのみ粗配置データを併用するようにしてもよい。例えば、配置データを参照することによってスタンプ画像の位置が特定できた割合を監視しておき、これが所定値を下回ったときには、スタンプ画像が疎な領域に到達したと判断して、粗配置データの併用を開始し、所定値以上となったときには、粗配置データの併用を停止するなどの方法が考えられる。
粗配置データを、配置データに対してどの程度粗くするかは、任意に設定することができる。また上記態様においては、解像度に応じて、粗配置データを2段階以上備えるようにしてもよい。
The coarse arrangement data is a record of whether or not the stamp image should be arranged in a range of several pixels of the original image data. If a result is obtained that the stamp image is not arranged when a coarse pixel having the coarse arrangement data is referred to, the stamp image may not be arranged for the portion corresponding to the coarse pixel without referring to the arrangement data. It becomes clear. Therefore, it is possible to suppress unnecessary reference to the arrangement data by using the coarse arrangement data.
The combined use of the rough placement data and the placement data does not need to be performed uniformly in all regions of the original image data, and the rough placement data may be used only in a region where the density of the stamp image is relatively low. For example, the ratio at which the position of the stamp image can be identified by referring to the arrangement data is monitored, and when the ratio falls below a predetermined value, it is determined that the stamp image has reached a sparse area, and the coarse arrangement data A method of starting the combined use and stopping the combined use of the coarsely arranged data when the value exceeds a predetermined value is conceivable.
It is possible to arbitrarily set how coarse the coarse arrangement data is with respect to the arrangement data. Moreover, in the said aspect, you may make it provide rough arrangement | positioning data 2 steps or more according to the resolution.

本発明は、種々の画像の処理に適用可能であるが、
前記原画像データは、地物の3次元モデルを投影して明度を低下させた夜景画像であり、
前記スタンプ画像は、前記地物の明かりを表す光源画像であり、
前記配置データは、前記夜景画像内での前記地物の位置を前記光源画像の配置位置とし、該夜景画像において同一のピクセルとなる地物の数を前記重畳回数として記憶するものとしてもよい。
図1に示したように、夜景画像においては、地物の位置に応じて光源画像を配置することにより、道路や建物、その密度などを反映させることができ、リアリティの高い夜景を実現することができる。しかしながら、地図内の地物の数は非常に多く、これに光源画像をスタンプ画像として重畳していくと、その処理は非常に大きな負荷となる。従って、かかる画像には、本発明の有用性が特に高くなる。
このように、本発明を適用すれば、短い時間で、リアリティの高い夜景画像を実現することが可能となるのである。
The present invention is applicable to various image processing,
The original image data is a night scene image in which brightness is lowered by projecting a three-dimensional model of a feature,
The stamp image is a light source image representing the light of the feature,
The arrangement data may store the position of the feature in the night view image as the arrangement position of the light source image, and store the number of features that are the same pixel in the night view image as the number of times of superimposition.
As shown in FIG. 1, in a night scene image, a light source image is arranged according to the position of a feature, so that roads, buildings, density thereof, and the like can be reflected, thereby realizing a night scene with high reality. Can do. However, the number of features in the map is very large, and if a light source image is superimposed on this as a stamp image, the processing becomes a very heavy load. Therefore, the utility of the present invention is particularly high for such images.
As described above, when the present invention is applied, a night scene image with high reality can be realized in a short time.

本発明においては、上述した種々の特徴を必ずしも全て備えている必要はなく、適宜、その一部を省略したり、組み合わせたりして構成してもよい。
本発明は、その他、コンピュータによって画像処理を行う画像処理方法として構成してもよいし、かかる表示をコンピュータに実行させるためのコンピュータプログラムとして構成してもよい。また、かかるコンピュータプログラムを記録したCD−R、DVDその他のコンピュータが読み取り可能な記録媒体として構成してもよい。
In the present invention, it is not always necessary to include all of the various features described above, and some of the features may be omitted or combined as appropriate.
In addition, the present invention may be configured as an image processing method for performing image processing by a computer, or may be configured as a computer program for causing a computer to execute such display. Further, it may be configured as a CD-R, DVD or other computer-readable recording medium on which such a computer program is recorded.

夜景の3次元地図の表示例を示す説明図である。It is explanatory drawing which shows the example of a display of the three-dimensional map of a night view. スタンプ画像の重畳方法を示す説明図である。It is explanatory drawing which shows the superimposition method of a stamp image. 3次元地図表示システムの構成例を示す説明図である。It is explanatory drawing which shows the structural example of a three-dimensional map display system. 夜景テクスチャ生成処理のフローチャートである。It is a flowchart of a night view texture generation process. スタンプ描画処理のフローチャート(1)である。It is a flowchart (1) of a stamp drawing process. スタンプ描画処理のフローチャート(2)である。It is a flowchart (2) of a stamp drawing process. 本実施例における処理方法による効果を示す説明図である。It is explanatory drawing which shows the effect by the processing method in a present Example. 地図表示処理のフローチャートである。It is a flowchart of a map display process. 変形例としての地図表示処理のフローチャートである。It is a flowchart of the map display process as a modification. 第2実施例におけるスタンプ画像の重畳方法を示す説明図である。It is explanatory drawing which shows the superimposition method of the stamp image in 2nd Example. 第2実施例におけるスタンプ描画処理のフローチャート(1)である。It is a flowchart (1) of the stamp drawing process in 2nd Example. 第2実施例におけるスタンプ描画処理のフローチャート(2)である。It is a flowchart (2) of the stamp drawing process in 2nd Example.

本発明の実施例について、夜景を表示する3次元地図表示システムを例にとって説明する。この3次元地図表示システムでは、光源のスタンプ画像を多数重畳したテクスチャを貼付することによって夜景を表現する。本発明の画像処理装置は、点光源を重畳したテクスチャを生成するための装置として実現されることになる。
A.装置構成:
図3は、実施例における3次元地図表示システムの構成を示す説明図である。サーバ200からネットワークNE2等を介して提供される地図データに基づいて、端末300に地図を表示する構成例を示した。地図を表示する端末としては、スマートフォン、携帯電話、タブレットなどの携帯端末の他、パーソナルコンピュータ、ナビゲーション装置などを用いてもよい。また、3次元地図表示システムは、端末300とサーバ200とからなるシステムの他、スタンドアロンで稼働するシステムとして構成してもよい。
図中には、3次元地図データを生成するデータ生成装置100も併せて示した。データ生成装置100は、点光源を重畳したテクスチャも生成する画像処理装置としての機能も有している。
An embodiment of the present invention will be described by taking a three-dimensional map display system for displaying a night view as an example. In this three-dimensional map display system, a night scene is expressed by attaching a texture in which a number of stamp images of light sources are superimposed. The image processing apparatus of the present invention is realized as an apparatus for generating a texture on which a point light source is superimposed.
A. Device configuration:
FIG. 3 is an explanatory diagram illustrating the configuration of the three-dimensional map display system in the embodiment. The example of a structure which displays a map on the terminal 300 based on the map data provided from the server 200 via the network NE2 or the like is shown. As a terminal for displaying a map, a personal computer, a navigation device, or the like may be used in addition to a mobile terminal such as a smartphone, a mobile phone, or a tablet. The 3D map display system may be configured as a stand-alone system in addition to the system including the terminal 300 and the server 200.
In the figure, a data generation device 100 that generates three-dimensional map data is also shown. The data generation apparatus 100 also has a function as an image processing apparatus that generates a texture on which a point light source is superimposed.

端末300には、主制御部304の下で稼働する種々の機能ブロックが構成されている。本実施例では、主制御部304および各機能ブロックは、それぞれの機能を実現するソフトウェアをインストールすることによって構成したが、その一部または全部をハードウェア的に構成してもよい。
送受信部301は、サーバ200とのネットワークNE2を介した通信を行う。本実施例では、3次元地図を表示するための地図データおよびコマンドの送受信が主として行われる。
コマンド入力部302は、端末の操作等を通じて、ユーザからの指示を入力する。本実施例における指示としては、3次元地図の表示範囲、拡大・縮小の指定、経路案内を行う際の出発地、目的地の設定などが揚げられる。
GPS入力部303は、GPS(Global Positioning System)の信号に基づいて緯度経度の座標値を得る。また、経路案内では、緯度経度の変化に基づいて進行方向を算出する。
地図情報記憶部305は、サーバ200から提供された地図データを一時的に記憶しておくバッファである。経路案内時のように表示すべき地図が時々刻々と移動していく場合、地図情報記憶部305では不足する範囲の地図データをサーバ200から受信して地図を表示する。
マップマッチング変換部307は、経路案内をする場合に、探索された経路および現在位置を、平行投影された3次元地図上の道路上にずれなく表示するため、経路位置および現在位置の座標値に対して必要な座標変換を施す。
表示制御部306は、地図情報記憶部305およびマップマッチング変換部307から提供されるデータに基づいて、端末300のディスプレイ300dに3次元地図を表示する。
The terminal 300 is configured with various functional blocks that operate under the main control unit 304. In the present embodiment, the main control unit 304 and each functional block are configured by installing software that realizes the respective functions, but part or all of them may be configured by hardware.
The transmission / reception unit 301 communicates with the server 200 via the network NE2. In the present embodiment, transmission / reception of map data and commands for displaying a three-dimensional map is mainly performed.
The command input unit 302 inputs an instruction from the user through operation of the terminal or the like. As an instruction in the present embodiment, a display range of a three-dimensional map, designation of enlargement / reduction, setting of a starting point and a destination when performing route guidance, and the like are listed.
The GPS input unit 303 obtains latitude and longitude coordinate values based on a GPS (Global Positioning System) signal. In the route guidance, the traveling direction is calculated based on changes in latitude and longitude.
The map information storage unit 305 is a buffer that temporarily stores map data provided from the server 200. When a map to be displayed moves from moment to moment as in route guidance, the map information storage unit 305 receives map data in an insufficient range from the server 200 and displays the map.
The map matching conversion unit 307 displays the searched route and the current position on the road on the parallel projected three-dimensional map without any deviation when performing route guidance. Necessary coordinate transformations are applied to it.
The display control unit 306 displays a three-dimensional map on the display 300 d of the terminal 300 based on the data provided from the map information storage unit 305 and the map matching conversion unit 307.

サーバ200には、図示する機能ブロックが構成されている。本実施例では、これらの機能ブロックは、それぞれの機能を実現するソフトウェアをインストールすることによって構成したが、その一部または全部をハードウェア的に構成してもよい。
地図データベース210は、3次元地図を表示するためのデータベースである。本実施例では、平行投影データ211、文字データ212、ネットワークデータ213を含む地図データを格納する。平行投影データ211は、道路、建物などの地物を3次元的に表示するためのデータであり、地物の3次元モデルを平行投影することで得られた2次元のポリゴンデータである。本実施例では、昼間の景色を表した平行投影データと、夜景を表した平行投影データとが用意されている。
文字データ212は、地図に表示すべき文字、例えば、地物の名称や地名などのデータである。ネットワークデータ213は、道路をノード、リンクの集まりで表現したデータである。
送受信部201は、ネットワークNE2を介して端末300とのデータの送受信を行う。本実施例では、3次元地図を表示するための地図データおよびコマンドの送受信が主として行われる。また、送受信部201は、ネットワークNE1を介してデータ生成装置100との通信も行う。本実施例では、生成された地図データの授受が主として行われる。
データベース管理部202は、地図データベース210からのデータの読み出し、書き込みを制御する。
経路探索部203は、地図データベース210内のネットワークデータ213を用いて、経路探索を行う。経路探索には、ダイクストラ法などを用いることができる。
The server 200 includes functional blocks shown in the figure. In the present embodiment, these functional blocks are configured by installing software that realizes the respective functions, but a part or all of the functional blocks may be configured by hardware.
The map database 210 is a database for displaying a three-dimensional map. In this embodiment, map data including parallel projection data 211, character data 212, and network data 213 is stored. The parallel projection data 211 is data for three-dimensionally displaying features such as roads and buildings, and is two-dimensional polygon data obtained by parallel projection of a three-dimensional model of the features. In this embodiment, parallel projection data representing a daytime scene and parallel projection data representing a night scene are prepared.
The character data 212 is data such as characters and names of features to be displayed on the map. The network data 213 is data representing a road as a collection of nodes and links.
The transmission / reception unit 201 transmits / receives data to / from the terminal 300 via the network NE2. In the present embodiment, transmission / reception of map data and commands for displaying a three-dimensional map is mainly performed. The transmission / reception unit 201 also communicates with the data generation device 100 via the network NE1. In the present embodiment, the generated map data is mainly exchanged.
The database management unit 202 controls reading and writing of data from the map database 210.
The route search unit 203 performs route search using the network data 213 in the map database 210. A Dijkstra method or the like can be used for the route search.

データ生成装置100には、図示する機能ブロックが構成されている。本実施例では、これらの機能ブロックは、パーソナルコンピュータに、それぞれの機能を実現するソフトウェアをインストールすることによって構成したが、その一部または全部をハードウェア的に構成してもよい。
送受信部104は、ネットワークNE1を介してサーバ200とデータの授受を行う。
コマンド入力部101は、キーボード等を介してオペレータの指示を入力する。本実施例では、地図データを生成すべき領域の指定、平行投影パラメータの指定、夜景モードの指定等が含まれる。
3D地図データベース110は、地図データを生成するために用いられる3次元モデルを格納するデータベースである。道路、建物などの地物については、3次元形状を表す電子データが格納されている。3D地図データベース110は、従来、透視投影によって3次元地図を表示するために備えられる3次元モデルを利用することができる。
平行投影部103は、3D地図データベース110に基づいて平行投影による描画を行って平行投影データを生成する。描画された投影図は、平行投影データ113に格納され、送受信部104を介してサーバ200の地図データベース210の平行投影データ211に格納される。
The data generation device 100 includes functional blocks shown in the figure. In this embodiment, these functional blocks are configured by installing software that realizes the respective functions in a personal computer, but a part or all of the functional blocks may be configured by hardware.
The transmission / reception unit 104 exchanges data with the server 200 via the network NE1.
The command input unit 101 inputs an operator instruction via a keyboard or the like. In the present embodiment, designation of an area where map data is to be generated, designation of parallel projection parameters, designation of night view mode, and the like are included.
The 3D map database 110 is a database that stores a three-dimensional model used for generating map data. Electronic features representing a three-dimensional shape are stored for features such as roads and buildings. The 3D map database 110 can use a 3D model that is conventionally provided for displaying a 3D map by perspective projection.
The parallel projection unit 103 performs parallel projection based on the 3D map database 110 to generate parallel projection data. The drawn projection drawing is stored in the parallel projection data 113 and stored in the parallel projection data 211 of the map database 210 of the server 200 via the transmission / reception unit 104.

本実施例では、3次元モデルに対して夜景のテクスチャを貼り付けた上で平行投影することによって、夜景の平行投影データも生成される。
夜景テクスチャ生成部102は、3D地図データベース110に格納された3次元モデルを真上から投影した2次元地図上の建物および道路の位置に、スタンプ画像を重畳することで、夜景テクスチャを生成する。このスタンプ画像は、スタンプ画像データベース111に格納されている。夜景テクスチャ生成部102によって生成された夜景テクスチャは、夜景テクスチャデータベース112に格納される。本実施例では、夜景テクスチャは、3次元モデルが管理される地図上のメッシュ単位で生成される。
夜景の平行投影データを生成する際には、平行投影部103は、仮想3次元空間に3次元モデルを配置した上で、全体に夜景テクスチャデータベース112の夜景テクスチャを貼付し、平行投影を行う。こうすることによって、図1に示すような夜景を表した平行投影データが生成される。
In the present embodiment, the parallel projection data of the night scene is also generated by pasting the night scene texture on the three-dimensional model and performing parallel projection.
The night view texture generation unit 102 generates a night view texture by superimposing the stamp image on the position of the building and road on the two-dimensional map obtained by projecting the three-dimensional model stored in the 3D map database 110 from directly above. This stamp image is stored in the stamp image database 111. The night view texture generated by the night view texture generation unit 102 is stored in the night view texture database 112. In this embodiment, the night scene texture is generated in units of meshes on the map where the three-dimensional model is managed.
When generating the parallel projection data of the night view, the parallel projection unit 103 arranges the 3D model in the virtual 3D space, attaches the night view texture of the night view texture database 112 to the whole, and performs parallel projection. By doing so, parallel projection data representing a night view as shown in FIG. 1 is generated.

平行投影データとは、上述の通り3次元モデルを鉛直方向に対して所定の投影角度だけ傾けた斜め方向から平行投影した2次元の描画データである。平行投影を用いることにより、左右方向および奥行き方向のそれぞれにおいて、相対的に縮尺を維持することができる利点がある。また、地図の画像を生成する際に、透視投影では投影する基準となる視点を定める必要があるのに対し、平行投影では視点を定める必要がない。透視投影では、視点が指定される度にレンダリングを施して投影図を得る必要があるが、平行投影では視点を指定する必要がないため、所定の投影方向に対する描画結果を予め用意しておくことができるのである。視点と無関係に生成された描画結果は、地図の描画範囲をどのように指定した場合でも共通して利用することができる。この結果、本発明では、3次元地図を描画する際のレンダリング処理が不要となるため、地図の描画時の処理負荷を激減させることが可能となる。   The parallel projection data is two-dimensional drawing data obtained by parallel projecting the three-dimensional model from an oblique direction inclined by a predetermined projection angle with respect to the vertical direction as described above. By using parallel projection, there is an advantage that the scale can be relatively maintained in each of the left-right direction and the depth direction. Further, when generating a map image, it is necessary to determine a viewpoint as a reference for projection in perspective projection, whereas it is not necessary to determine a viewpoint in parallel projection. In perspective projection, it is necessary to render each time a viewpoint is specified to obtain a projection drawing. In parallel projection, however, it is not necessary to specify a viewpoint, so a drawing result for a predetermined projection direction must be prepared in advance. Can do it. The drawing result generated regardless of the viewpoint can be used in common regardless of how the drawing range of the map is designated. As a result, in the present invention, rendering processing when drawing a three-dimensional map becomes unnecessary, so that the processing load at the time of drawing a map can be drastically reduced.

B.夜景テクスチャ生成処理:
B1.全体処理:
図4は、夜景テクスチャ生成処理のフローチャートである。データ生成装置100の夜景テクスチャ生成部102が実行する処理であり、ハードウェア的にはデータ生成装置100のCPUが実行する処理である。
データ生成装置100は、処理対象メッシュを選択する(ステップS10)。オペレータの指示に従うようにしてもよいし、未処理のメッシュから順次、自動的に選択するようにしてもよい。
次に、データ生成装置100は、処理対象メッシュ内の建物データ、ネットワークデータを読み込む(ステップS12)。そして、建物の重心位置を光源位置として設定する(ステップS14)。光源位置とは、点光源を表すスタンプ画像を重畳する位置を意味する。光源は、各位置に一定の数を重畳するように設定してもよいし、建物が高くなるほど光源の数が増えるように設定させてもよい。
また、データ生成装置100は、ネットワークデータのリンク上に光源位置を設定する(ステップS16)。図中に、光源位置の設定方法例を示した。高速道路の場合、ネットワークデータのリンクを所定の間隔d1で等間隔に分割した点においてリンクに添って2条の光源を設定する。国道の場合は、リンクを間隔d2(間隔d2<d1)で等間隔に分割した点においてリンクに添って1条の光源を設定する。細街路のリンク上には光源は設定しない。本実施例では、このように道路種別に応じて、光源の有無およびその設定方法を変えているが、道路種別に関わらず一定の方法で光源を設定してもよい。
B. Night scene texture generation processing:
B1. Overall processing:
FIG. 4 is a flowchart of night scene texture generation processing. This is a process executed by the night scene texture generation unit 102 of the data generation apparatus 100, and is a process executed by the CPU of the data generation apparatus 100 in terms of hardware.
The data generation device 100 selects a processing target mesh (step S10). You may make it follow an operator's instruction | indication and you may make it select automatically from an unprocessed mesh sequentially.
Next, the data generation device 100 reads building data and network data in the processing target mesh (step S12). And the gravity center position of a building is set as a light source position (step S14). The light source position means a position where a stamp image representing a point light source is superimposed. The light sources may be set so that a certain number is superimposed on each position, or may be set so that the number of light sources increases as the building becomes higher.
Further, the data generation device 100 sets the light source position on the link of the network data (step S16). In the figure, an example of a method for setting the light source position is shown. In the case of an expressway, two light sources are set along the link at a point where the link of the network data is divided at equal intervals by a predetermined interval d1. In the case of a national highway, one light source is set along the link at a point where the link is divided into equal intervals at intervals d2 (interval d2 <d1). No light source is set on the narrow street link. In the present embodiment, the presence or absence of the light source and the setting method thereof are changed according to the road type as described above, but the light source may be set by a fixed method regardless of the road type.

データ生成装置100は、光源位置をインデックス画像に書き込む(ステップS20)。インデックス画像とは、光源位置を指定する2次元のデータである。本実施例では、スタンプ画像を重畳した合成画像を描くキャンバスと同じ解像度からなる2次元画像をインデックス画像として用いるものとした。インデックス画像の各画素には、スタンプ画像のオン・オフおよびその回数を指定する値が記録されている。かかるインデックス画像を参照すれば、どの画素にスタンプ画像をいくつ配置すれば良いかを特定することが可能となる。この意味で、インデックス画像は、本発明における配置データに相当する。   The data generation device 100 writes the light source position in the index image (step S20). An index image is two-dimensional data that specifies a light source position. In this embodiment, a two-dimensional image having the same resolution as a canvas on which a composite image on which a stamp image is superimposed is drawn is used as an index image. In each pixel of the index image, a value designating on / off of the stamp image and the number of times thereof is recorded. By referring to such an index image, it is possible to specify how many stamp images should be arranged in which pixel. In this sense, the index image corresponds to the arrangement data in the present invention.

データ生成装置100は、生成されたインデックス画像を用いて、スタンプ描画処理を実行する(ステップS22)。この処理は、インデックス画像で指定された位置に従ってスタンプ画像を重畳する処理である。処理の詳細は、後で説明する。こうして生成された画像は、光源が重畳された夜景画像となる。データ生成装置100は、この夜景画像を、夜景テクスチャとして格納する(ステップS24)。
データ生成装置100は、全てのメッシュに対して夜景テクスチャの生成が終了するまで(ステップS26)、以上の処理を繰り返し実行する。
The data generation device 100 executes a stamp drawing process using the generated index image (step S22). This process is a process of superimposing the stamp image according to the position specified by the index image. Details of the processing will be described later. The image generated in this way is a night scene image on which a light source is superimposed. The data generation device 100 stores this night scene image as a night scene texture (step S24).
The data generation device 100 repeatedly executes the above processing until the generation of the night scene texture is completed for all meshes (step S26).

B2.スタンプ描画処理:
図5および図6は、スタンプ描画処理のフローチャートである。夜景テクスチャ生成処理のステップS22に相当する処理である。
データ生成装置100は、処理対象メッシュに対してキャンバスおよびインデックス画像を読み込む(ステップS30)。キャンバスとは、スタンプ画像を重畳し、合成画像を描く画像データまたは画像領域である。画像データとしては、メッシュ内の3次元モデルを真上から投影し、夜景用に明度を低下させた2次元画像を用いることができる。また、画像領域としては、メッシュに相当する広さの2次元の白画像または透明画像とすることができる。キャンバスとインデックス画像とは同一の解像度となっている。
B2. Stamp drawing process:
5 and 6 are flowcharts of the stamp drawing process. This process corresponds to step S22 of the night scene texture generation process.
The data generation device 100 reads a canvas and an index image for the processing target mesh (step S30). The canvas is image data or an image area in which a stamp image is superimposed and a composite image is drawn. As the image data, it is possible to use a two-dimensional image in which a three-dimensional model in a mesh is projected from directly above and the brightness is reduced for night scenes. The image area may be a two-dimensional white image or a transparent image having a size corresponding to a mesh. The canvas and the index image have the same resolution.

データ生成装置100は、キャンバスから処理対象ピクセルを選択する(ステップS32)。処理対象ピクセルの選択方法は、任意に設定可能である。本実施例では、図中に示す矢印a1のように、キャンバスの左上から順に右方向に選択し、矢印a2に示すように、順次、次の行に移り同様に処理対象ピクセルを選択する。
データ生成装置100は、インデックス画像を参照し、処理対象ピクセルに合成されるスタンプ画像を特定する(ステップS34)。
図中にスタンプ画像の特定方法を示した。ここでは、3×3画素のサイズからなるスタンプ画像を合成する場合を例示した。スタンプの合成位置を特定するため、データ生成装置100は、インデックス画像において処理対象ピクセルPPの周辺を検索する。検索範囲は、スタンプ画像の大きさに相当する範囲、即ち処理対象ピクセルPPを中心とする3×3画素の範囲である。
図の例では、インデックス画像中の画素P1、P2、P4にそれぞれ値1、2、4が記録されていることが分かる。画素P1の値1は、画素P1を中心としてスタンプ画像を1回重畳すること、即ち枠M1の範囲にスタンプ画像を重畳することを意味する。同様に、画素P2の値2は枠M2の範囲に2回、画素P4の値4は枠M4の範囲に4回、それぞれスタンプ画像を重畳することを意味している。枠M1、M2、M4にスタンプ画像を重畳することにより、処理対象ピクセルPPにそれぞれスタンプ画像の一部が合成されることになる。
これに対し、インデックス画像中の画素P3、P5にもそれぞれ値1が記録されている。これらの値もそれぞれ、枠M3、M5にスタンプ画像が重畳されることを意味する。しかし、枠M3、M5の範囲にスタンプ画像を重畳しても、処理対象ピクセルPPには影響はない。このように、処理対象ピクセルPPを中心としてスタンプ画像のサイズに応じた範囲でインデックス画像を検索しておけば、処理対象ピクセルPPに合成されるスタンプ画像を特定する処理としては足りる。図の例では、3×3のサイズからなるスタンプ画像を用いる例を示したが、種々のサイズからなる複数種類のスタンプ画像を用いる場合には、その中の最大のサイズのものに基づいて検索の範囲を設定すればよい。
The data generation device 100 selects a processing target pixel from the canvas (step S32). The method for selecting the pixel to be processed can be arbitrarily set. In this embodiment, as shown by an arrow a1 in the drawing, the pixels are selected in the right direction in order from the upper left of the canvas, and as shown by an arrow a2, the process proceeds to the next row and the processing target pixel is selected in the same manner.
The data generation device 100 refers to the index image and identifies a stamp image to be combined with the processing target pixel (step S34).
The stamp image identification method is shown in the figure. Here, a case where a stamp image having a size of 3 × 3 pixels is synthesized is illustrated. In order to specify the combining position of the stamp, the data generation device 100 searches the vicinity of the processing target pixel PP in the index image. The search range is a range corresponding to the size of the stamp image, that is, a 3 × 3 pixel range centered on the processing target pixel PP.
In the example of the figure, it can be seen that the values 1, 2, and 4 are recorded in the pixels P1, P2, and P4 in the index image, respectively. A value of 1 for the pixel P1 means that the stamp image is superimposed once around the pixel P1, that is, the stamp image is superimposed on the range of the frame M1. Similarly, the value 2 of the pixel P2 means that the stamp image is superimposed twice in the range of the frame M2, and the value 4 of the pixel P4 means that the stamp image is superimposed four times in the range of the frame M4. By superimposing the stamp image on the frames M1, M2, and M4, a part of the stamp image is combined with the processing target pixel PP.
On the other hand, the value 1 is also recorded in the pixels P3 and P5 in the index image. These values also mean that the stamp image is superimposed on the frames M3 and M5, respectively. However, even if the stamp image is superimposed on the range of the frames M3 and M5, the processing target pixel PP is not affected. As described above, if the index image is searched in a range corresponding to the size of the stamp image with the processing target pixel PP as the center, the processing for specifying the stamp image combined with the processing target pixel PP is sufficient. In the example shown in the figure, an example of using a stamp image having a size of 3 × 3 is shown. However, when a plurality of types of stamp images having various sizes are used, a search is performed based on the largest one among them. The range can be set.

図6に移り、データ生成装置100は、次に処理対象ピクセルに合成されるスタンプ画像の画素値を算出する(ステップS36)。図中に算出方法を示した。処理対象ピクセルPPに対して、枠M1の位置に1回、枠M2の位置に2回、枠M4の位置に4回、それぞれスタンプ画像が合成されるものとする。スタンプ画像の各画素の画素値が図の下に示すようにt1〜t9で与えられているとすると、枠M1の位置にスタンプ画像を合成するときには、処理対象ピクセルPPには、右下の画素値t9の画素が1回合成されることになる。同様にして、枠M2の合成では左下の画素値t7の画素が2回合成され、枠M4の合成では中央上の画素値t2の画素が4回合成される。これらの画素値を合成するための式は、スタンプ画像の各画素に設定された透過度、即ちアルファ値を考慮した合成式となる。
データ生成装置100は、こうして画素値を算出すると、処理対象ピクセルに対して、算出された合成画素値を合成する(ステップS38)。この処理では、処理対象ピクセルに影響を与えるスタンプ画像の画素値は全て反映されているから、処理対象ピクセルの画素値は他のピクセルに対する処理による影響を受けることなく、一義的に定まることになる。
データ生成装置100は、以上の処理を全ての処理対象ピクセルについて終了するまで繰り返して実行する(ステップS40)。
Moving to FIG. 6, the data generation device 100 calculates the pixel value of the stamp image to be combined with the processing target pixel next (step S <b> 36). The calculation method is shown in the figure. It is assumed that the stamp image is combined with the processing target pixel PP once at the position of the frame M1, twice at the position of the frame M2, and four times at the position of the frame M4. Assuming that the pixel values of the pixels of the stamp image are given by t1 to t9 as shown in the lower part of the figure, when the stamp image is synthesized at the position of the frame M1, the pixel to be processed is the lower right pixel. The pixel having the value t9 is synthesized once. Similarly, in the synthesis of the frame M2, the pixel having the lower left pixel value t7 is synthesized twice, and in the synthesis of the frame M4, the pixel having the upper pixel value t2 is synthesized four times. The formula for synthesizing these pixel values is a synthesis formula that takes into consideration the transparency set for each pixel of the stamp image, that is, the alpha value.
When the data generation device 100 calculates the pixel value in this way, the data generation device 100 combines the calculated combined pixel value with the processing target pixel (step S38). In this process, since all the pixel values of the stamp image that affect the processing target pixel are reflected, the pixel value of the processing target pixel is unambiguously determined without being influenced by the processing on other pixels. .
The data generation device 100 repeats the above processing until it ends for all the processing target pixels (step S40).

B3.効果:
図7は、本実施例における処理方法による効果を示す説明図である。図の上方には、サンプル地図画像およびスタンプ画像を例示した。左側に示す夜景のサンプル地図画像に対して、スタンプ画像を合成する処理を実行する。スタンプ画像の合成は3億回以上となる。
図の下側には、スタンプ描画時間を、従来技術と本実施例の方法とで比較した結果を示した。図示するとおり、実施例の方法によれば、処理時間は30分の1ほどに短縮された。
このように処理時間が短縮された理由は、次の通りである。
図5のステップS34の図中に示したように、処理対象ピクセルPPの周辺にスタンプ画像が重畳される場合、処理対象ピクセルPPは、枠M1、M2、M4のそれぞれに重畳されるスタンプ画像によって影響を受けることになる。従来技術では、枠M1、M2、M4の合成処理を順次、実行するため、処理対象ピクセルPPの画素値が決まるまでの間に、何度も、読み出し、合成、書き込みが繰り返し実行されていた。
これに対し、本発明では、インデックス画像を参照することにより、処理対象ピクセルPPに対して影響を与える全てのスタンプ画像を特定することができ、合成画素値を一義的に定めることができる。従って、キャンバスの各画素の読み出し、書き込みを繰り返す必要がなくなり、合成処理を一度で済ませることができるため、処理の高速化を図ることができるのである。
また、実施例の方法では、合成する過程でインデックス画像を繰り返し参照する必要が生じるが、インデックス画像への書き込みは一切、行われない。即ち、従来技術と異なり、実施例の方法では、スタンプ画像の合成位置を特定するためのデータの読み出しはインデックス画像に対してのみ行い、合成結果の書き込みはキャンバスに対してのみ行うというように、読み出し/書き込みの処理を分離することができる。一般にデータへのアクセスは、読み出しと書き込みとを同時に行うことはできないため、キャンバスに対して双方を分離していない従来技術では処理時間が長くなる傾向にあるが、本実施例のように読み出し/書き込みの処理を分離すれば、インデックス画像の参照と、キャンバスへの書き込みを同時に行うことも可能となる。こうした並列処理効果も奏し、本発明ではさらに処理速度を高速化することができる。
こうした並列化には、GPU(Graphics Processor Unit)が特に適している。従って、本実施例の処理方法は、GPU向けの処理であるとも言える。
B3. effect:
FIG. 7 is an explanatory diagram showing the effect of the processing method in this embodiment. In the upper part of the figure, a sample map image and a stamp image are illustrated. A process of combining the stamp image with the sample map image of the night view shown on the left side is executed. Stamp images can be combined over 300 million times.
The lower part of the figure shows the result of comparing the stamp drawing time between the prior art and the method of this embodiment. As shown in the figure, according to the method of the example, the processing time was reduced to about 1/30.
The reason why the processing time is shortened in this way is as follows.
As shown in the drawing of step S34 in FIG. 5, when the stamp image is superimposed on the periphery of the processing target pixel PP, the processing target pixel PP is determined by the stamp image superimposed on each of the frames M1, M2, and M4. Will be affected. In the prior art, since the synthesis processing of the frames M1, M2, and M4 is sequentially executed, the reading, synthesis, and writing are repeatedly performed until the pixel value of the processing target pixel PP is determined.
On the other hand, in the present invention, by referring to the index image, it is possible to specify all the stamp images that affect the processing target pixel PP, and to uniquely determine the composite pixel value. Therefore, it is not necessary to repeat reading and writing of each pixel on the canvas, and the composition processing can be completed at once, so that the processing speed can be increased.
In the method of the embodiment, it is necessary to repeatedly refer to the index image in the process of synthesis, but writing to the index image is not performed at all. That is, unlike the prior art, in the method of the embodiment, the data for specifying the composite position of the stamp image is read only for the index image, and the composite result is written only for the canvas. The read / write process can be separated. In general, since access to data cannot be performed simultaneously with reading and writing, the processing time tends to be longer in the conventional technology in which both sides are not separated from the canvas. If the writing process is separated, it is possible to refer to the index image and write to the canvas at the same time. Such a parallel processing effect is also achieved, and the processing speed can be further increased in the present invention.
For such parallelization, a GPU (Graphics Processor Unit) is particularly suitable. Therefore, it can be said that the processing method of this embodiment is processing for GPU.

C.地図表示処理:
C1.平行投影データを用いた地図表示:
次に、本実施例で生成された平行投影データを用いた地図表示の方法について説明する。
図8は、地図表示処理のフローチャートである。端末300の表示制御部306が主として実行する処理であり、ハードウェア的には端末300のCPUが実行する処理である。
この処理では、まず端末300は、表示範囲を設定する(ステップS50)。ユーザが指定するものとしてもよいし、GPSで得られる現在位置を中心とする所定範囲を表示範囲と設定してもよい。
また、端末300は夜景モードか否かを判断する(ステップS52)。これもユーザの指定に従うものとしてもよいし、地図を表示する時刻が所定の時間帯の場合には夜景モードに設定する方法等で自動的に設定してもよい。
端末300は、夜景モードの場合には、夜景用の平行投影データを読み込み(ステップS54)、そうでない場合には、昼景用の平行投影データを読み込む(ステップS56)。これらの読み込みは、従前の地図表示処理において既に取得し端末300内の地図情報記憶部305に保持されている地図情報から行われる。端末300は、地図情報記憶部305に保持されているデータでは、地図を表示するのに不足する場合には、サーバ200から不足部分の地図情報を取得する。
C. Map display processing:
C1. Map display using parallel projection data:
Next, a map display method using the parallel projection data generated in the present embodiment will be described.
FIG. 8 is a flowchart of the map display process. This process is mainly executed by the display control unit 306 of the terminal 300, and is a process executed by the CPU of the terminal 300 in terms of hardware.
In this process, first, the terminal 300 sets a display range (step S50). It may be designated by the user, or a predetermined range centered on the current position obtained by GPS may be set as the display range.
Further, the terminal 300 determines whether or not the night view mode is set (step S52). This may be in accordance with the user's specification, or may be automatically set by a method of setting the night view mode when the map display time is in a predetermined time zone.
In the night view mode, the terminal 300 reads the parallel projection data for night scene (step S54), and otherwise reads the parallel projection data for day scene (step S56). These readings are performed from the map information already acquired in the previous map display process and held in the map information storage unit 305 in the terminal 300. If the data held in the map information storage unit 305 is insufficient to display a map, the terminal 300 acquires the map information of the lacking part from the server 200.

こうして地図情報を取得し終えると、端末300は夜景平行投影データまたは昼景平行投影データから、それぞれ表示範囲に対する部分を切り出して表示する(ステップS58)。本実施例では、平行投影データは既に平行投影された後の2次元のポリゴンデータに過ぎないから、取得した平行投影データに従ってポリゴンを描画すれば3次元地図を表示することができる。   When the map information has been acquired in this way, the terminal 300 cuts out and displays the portion corresponding to the display range from the night scene parallel projection data or the day scene parallel projection data (step S58). In the present embodiment, since the parallel projection data is only two-dimensional polygon data that has already been parallel projected, if a polygon is drawn according to the acquired parallel projection data, a three-dimensional map can be displayed.

C2.変形例としての地図表示処理:
次に、変形例として、透視投影による地図表示の方法を示す。変形例では、平行投影データは用いず、データ生成装置100の夜景テクスチャ生成部102で生成される夜景テクスチャを使用する。また、平行投影データ211に代えて、データ生成装置100の3D地図データベース110に格納される3次元モデルを用いる。
図9は、変形例としての地図表示処理のフローチャートである。端末300の表示制御部306が実行する処理である。
端末300は、視点、視線方向、表示範囲を設定する(ステップS70)。ユーザの指定に従ってこれらを設定するものとしてもよいし、現在位置に基づいてこれらを自動的に設定するものとしてもよい。
端末300は、仮想3次元空間に3次元モデルを配置する(ステップS72)。そして、夜景モードが設定されている場合には(ステップS74)、これらの3次元モデルの全体に対して、夜景テクスチャを貼付する(ステップS76)。夜景モードでない場合には(ステップS74)、この処理はスキップされる。
こうして3次元モデルの配置が完了すると、端末300は透視投影を行い(ステップS78)、その投影図に文字を表示して(ステップS80)、地図表示を完了する。
変形例によれば、透視投影によって夜景の地図表示を実現することができる。
C2. Map display processing as a modification:
Next, as a modification, a map display method using perspective projection will be described. In the modified example, the parallel projection data is not used, and the night scene texture generated by the night scene texture generation unit 102 of the data generation apparatus 100 is used. Further, instead of the parallel projection data 211, a 3D model stored in the 3D map database 110 of the data generation device 100 is used.
FIG. 9 is a flowchart of map display processing as a modification. This is a process executed by the display control unit 306 of the terminal 300.
The terminal 300 sets a viewpoint, a line-of-sight direction, and a display range (step S70). These may be set according to the user's specification, or may be automatically set based on the current position.
The terminal 300 arranges the three-dimensional model in the virtual three-dimensional space (Step S72). If the night view mode is set (step S74), the night view texture is pasted on the whole of these three-dimensional models (step S76). If it is not the night view mode (step S74), this process is skipped.
When the arrangement of the three-dimensional model is completed in this way, the terminal 300 performs perspective projection (step S78), displays characters on the projection (step S80), and completes the map display.
According to the modification, it is possible to realize a night view map display by perspective projection.

以上で説明した実施例によれば、光源を表すスタンプ画像の合成の処理時間を短縮することができ、これによって夜景テクスチャを効率的に生成することができる。
また、生成された夜景テクスチャを利用して、リアリティの高い夜景の3次元地図を表示することができる。
According to the embodiment described above, it is possible to shorten the processing time for synthesizing the stamp image representing the light source, thereby efficiently generating the night scene texture.
In addition, it is possible to display a highly realistic night view three-dimensional map using the generated night view texture.

第1実施例では、キャンバスと同じ解像度のインデックス画像を用いてスタンプ画像を描画する処理について説明した。第2実施例では、異なる解像度のインデックス画像を用意し、これを段階的に使用する例を説明する。   In the first embodiment, the process of drawing a stamp image using an index image having the same resolution as the canvas has been described. In the second embodiment, an example in which index images having different resolutions are prepared and used step by step will be described.

図10は、第2実施例におけるスタンプ画像の重畳方法を示す説明図である。第2実施例では、インデックス画像と低解像度インデックス画像の2種類を用いる。インデックス画像の解像度は、図の下側に示すキャンバスと同じ解像度である。低解像度インデックス画像は、インデックス画像の4ピクセルが1ピクセルに対応する解像度である。
インデックス画像は、第1実施例と同様、ピクセルごとにスタンプ画像を重畳すべき位置および回数についての情報を格納している。図の例では、ピクセルIDX11には値1、ピクセルIDX22には値4が記録され、ピクセルIDX12、IDX21には値0が記録されている。低解像度インデックス画像には、画素ごとに、インデックス画像の4ピクセル分の情報が格納されている。図中のピクセルLDX11は、インデックス画像の4つのピクセルLDX11、LDX12、LDX21、LDX22に対応する。従って、低解像度インデックス画像のピクセルLDX11には、これらの4つのピクセルを統合した値、図の例では値5(=1+4)が格納される。
このように生成された低解像度インデックス画像を見れば、これに対応するインデックス画像の4ピクセルのいずれかにスタンプ画像を配置するか否かを判断することができる。例えば、図中のピクセルLDX11は値5であるため、これに対応する4つのピクセルのいずれかは値0でないこと、即ち、いずれかのピクセルにスタンプ画像が配置されることが分かる。仮に、ピクセルLDX11が値0であれば、これに対応する4つのピクセルのいずれも値0であり、いずれのピクセルにもスタンプ画像は配置されないことが分かる。このように、低解像度インデックス画像を見れば、インデックス画像の4ピクセル分をまとめて判断することができることになる。
FIG. 10 is an explanatory diagram showing a stamp image superimposing method in the second embodiment. In the second embodiment, two types of index images and low resolution index images are used. The resolution of the index image is the same as that of the canvas shown on the lower side of the figure. The low resolution index image has a resolution at which 4 pixels of the index image correspond to 1 pixel.
As in the first embodiment, the index image stores information about the position and number of times that the stamp image should be superimposed for each pixel. In the illustrated example, a value 1 is recorded in the pixel IDX11, a value 4 is recorded in the pixel IDX22, and a value 0 is recorded in the pixels IDX12 and IDX21. In the low resolution index image, information for four pixels of the index image is stored for each pixel. A pixel LDX11 in the figure corresponds to the four pixels LDX11, LDX12, LDX21, and LDX22 of the index image. Therefore, the pixel LDX11 of the low resolution index image stores a value obtained by integrating these four pixels, that is, the value 5 (= 1 + 4) in the example of the figure.
By looking at the low-resolution index image generated in this way, it is possible to determine whether or not to place the stamp image in any of the four pixels of the corresponding index image. For example, since the pixel LDX11 in the figure has the value 5, it can be seen that any of the four pixels corresponding thereto is not the value 0, that is, the stamp image is arranged at any pixel. If the pixel LDX11 has a value 0, it can be seen that all four pixels corresponding to the pixel LDX11 have a value 0, and no stamp image is placed in any pixel. In this way, if the low-resolution index image is viewed, it is possible to collectively determine the four pixels of the index image.

低解像度インデックス画像を用いたスタンプ描画処理の方法について説明する。
図11、図12は、第2実施例におけるスタンプ描画処理のフローチャートである。実施例1の夜景テクスチャ生成処理(図4のステップS22)に代わる処理であり、データ生成装置100が実行する処理である。
データ生成装置100は、処理を開始すると、キャンバス、低解像度インデックス画像、およびインデックス画像を読み込む(ステップS130)。
データ生成装置100は、処理対象ピクセルを選択する(ステップS132)。そして、低解像度インデックス画像を参照し、スタンプ画像の合成位置を検索する(ステップS134)。図中に検索方法を示した。スタンプ画像が3×3の大きさであるとすれば、図の上側に示す処理対象ピクセルPPについての検索範囲は、図中の枠内となる。低解像度インデックス画像において、この検索範囲の各画素に対応する範囲は、図中に示す低解像度検索範囲となる。低解像度インデックス画像は、各ピクセルがキャンバスの4ピクセルに相当するため、低解像度検索範囲は、検索範囲よりも広くなる。
A method of stamp drawing processing using a low resolution index image will be described.
11 and 12 are flowcharts of the stamp drawing process in the second embodiment. This process replaces the night scene texture generation process (step S22 in FIG. 4) of the first embodiment, and is a process executed by the data generation apparatus 100.
When starting the processing, the data generation device 100 reads the canvas, the low resolution index image, and the index image (step S130).
The data generation device 100 selects a processing target pixel (step S132). Then, the low resolution index image is referred to search for the combined position of the stamp image (step S134). The search method is shown in the figure. If the stamp image is 3 × 3 in size, the search range for the processing target pixel PP shown in the upper side of the figure is within the frame in the figure. In the low resolution index image, the range corresponding to each pixel in the search range is the low resolution search range shown in the figure. In the low resolution index image, each pixel corresponds to 4 pixels of the canvas, so the low resolution search range is wider than the search range.

図12に移り、データ生成装置100は、低解像度インデックス画像の検索結果に基づき、インデックス画像を参照する(ステップS136)。図中に参照方法を示した。低解像度インデックス画像が値0のときは、インデックス画像は参照不要である。その他の値のときは、インデックス画像の検索範囲内を参照する。
例えば、図中に示す通り、低解像度インデックス画像のピクセルLP1、LP4は値0であるとする。これは、インデックス画像において、ピクセルLP1、LP4に対応する範囲、即ち、ピクセルp1、p2、p4、pp、p8にはスタンプ画像は配置されないことを意味する。従って、インデックス画像において、これらのピクセルは参照するまでなく、値0であると判断できる。一方、図中に示す通り、低解像度インデックス画像のピクセルLP2、LP3はそれぞれ値1、値2であるとする。これは、インデックス画像において、これらのピクセルLP2、LP3に対応するピクセルp3,p5,p6,p7のいずれかにスタンプ画像が配置されることを意味している。従って、データ生成装置100は、これらの画素についてインデックス画像を参照し、スタンプ画像を合成する位置および数を特定する。
Moving to FIG. 12, the data generation device 100 refers to the index image based on the search result of the low resolution index image (step S136). The reference method is shown in the figure. When the low resolution index image is 0, the index image does not need to be referenced. For other values, reference is made to the index image search range.
For example, as shown in the figure, it is assumed that the pixels LP1 and LP4 of the low resolution index image have the value 0. This means that in the index image, stamp images are not arranged in the ranges corresponding to the pixels LP1 and LP4, that is, the pixels p1, p2, p4, pp, and p8. Therefore, in the index image, these pixels need not be referred to and can be determined to have a value of 0. On the other hand, as shown in the figure, it is assumed that the pixels LP2 and LP3 of the low resolution index image have values 1 and 2, respectively. This means that in the index image, a stamp image is arranged in any of the pixels p3, p5, p6, and p7 corresponding to these pixels LP2 and LP3. Therefore, the data generation device 100 refers to the index image for these pixels, and specifies the position and number for combining the stamp images.

上述の態様では、低解像度インデックスに、値1、2など、インデックス画像の対応するピクセルの合計値を格納する例を示した。低解像度インデックスには、かかる態様に代えて、値0または1の2値データを格納するものとしてもよい。即ち、低解像度インデックスには、インデックス画像の対応するピクセルにスタンプ画像が配置されない場合には値0、スタンプ画像が配置される場合にはその数に関わらず値1を格納するのである。低解像度インデックスは、スタンプ画像の位置や数を最終的に決定するために参照されるものではなく、インデックス画像を参照する必要があるか否かを特定するために参照されるものであるから、このように2値の情報で足りるのである。こうすることにより、低解像度インデックスのデータ容量を抑制することができる利点、およびインデックス画像の参照を要するか否かの判断処理を高速化できる利点がある。   In the above-described aspect, the example in which the total value of the corresponding pixels of the index image such as the values 1 and 2 is stored in the low resolution index. The low resolution index may store binary data having a value of 0 or 1 instead of such a mode. That is, the low resolution index stores a value of 0 when no stamp image is arranged at the corresponding pixel of the index image, and a value of 1 when a stamp image is arranged regardless of the number. Since the low-resolution index is not referred to in order to finally determine the position or number of stamp images, it is referred to in order to specify whether or not it is necessary to refer to the index image. Thus, binary information is sufficient. By doing so, there is an advantage that the data capacity of the low resolution index can be suppressed, and an advantage that it is possible to speed up the process of determining whether or not the index image needs to be referred to.

こうして、処理対象ピクセルPPに影響する全てのスタンプ画像の配置が決定されると、データ生成装置100は、実施例1と同様、処理対象ピクセルに合成画素値を合成する(ステップS138)。
データ生成装置100は、全てのピクセルについてスタンプ画像の描画が完了するまで、繰り返し以上の処理を実行する(ステップS140)。
When the arrangement of all the stamp images that affect the processing target pixel PP is determined in this way, the data generation device 100 combines the combined pixel value with the processing target pixel as in the first embodiment (step S138).
The data generation device 100 repeatedly performs the above processing until the drawing of the stamp image is completed for all pixels (step S140).

以上で説明した第2実施例によれば、低解像度インデックス画像とインデックス画像を利用することにより、スタンプ描画の処理速度を更に高速化することができる。低解像度インデックス画像を用いることにより、インデックス画像の全ての画素を参照する必要がなくなり、インデックス画像の読み出し回数を低減できるからである。かかる効果は、低解像度インデックス画像においてピクセルが値0となっているときに特に高い。
第2実施例では、全ての領域で低解像度インデックス画像とインデックス画像とを併用する例を示したが、両者を領域によって使い分けてもよい。また、低解像度インデックス画像は1種類に限らず、複数種類の解像度で用意してもよい。
According to the second embodiment described above, the processing speed of stamp drawing can be further increased by using the low resolution index image and the index image. This is because by using the low resolution index image, it is not necessary to refer to all the pixels of the index image, and the number of times of reading the index image can be reduced. Such an effect is particularly high when the pixel has a value of 0 in the low resolution index image.
In the second embodiment, an example in which the low resolution index image and the index image are used together in all the regions has been described, but both may be used depending on the region. Further, the low resolution index image is not limited to one type, and may be prepared with a plurality of types of resolutions.

第2実施例では、低解像度インデックスを、ピクセルごとに参照し、インデックスの参照の要否を判断する例を示した。この処理の変形例として、低解像度インデックスにおいて、以下の手順で、複数のピクセルをまとめて参照するようにしてもよい。まず、低解像度インデックス内のピクセルの格納値を、行方向(図12におけるLP1、LP2の方向)または列方向(図12におけるLP1、LP3の方向)に合計する。そして、この合計が値0か否かによって、インデックス画像の参照の要否を判断するのである。合計が値0であれば、インデックス画像の参照は不要ということを意味し、そうでない場合は参照が必要ということを意味する。
インデックス画像の参照の要否の判断の前に、低解像度インデックス画像をピクセル単位で参照するか否かの判断を行うようにしてもよい。即ち、合計が値0でない場合には、低解像度インデックスの行または列内の各ピクセルを個別に参照するのである。そして、低解像度インデックスにおいて、値0でないピクセルを発見したら、それに対応するインデックス画像を参照するのである。
上述の態様によれば、低解像度インデックス画像を参照する際の分岐処理の回数を低減することができ、処理の高速化を図ることができる。特に、GPUなど、分岐処理に時間を要するプロセッサを利用する場合に有用な方法である。
もっとも、スタンプ画像の密度が高い領域では、上述の態様では、かえって分岐処理が増大するおそれもある。従って、上述の態様は、スタンプ画像の密度に応じて適用するか否かを切り換えるようにしてもよい。
In the second embodiment, an example in which the low resolution index is referred to for each pixel to determine whether the index needs to be referred to is shown. As a modified example of this processing, a plurality of pixels may be referred to collectively in the following procedure in the low resolution index. First, the stored values of the pixels in the low resolution index are summed in the row direction (the direction of LP1 and LP2 in FIG. 12) or the column direction (the directions of LP1 and LP3 in FIG. 12). Then, whether or not the index image needs to be referred is determined based on whether or not the sum is 0. If the sum is a value of 0, it means that it is not necessary to refer to the index image; otherwise, it means that it is necessary to refer to it.
Before determining whether or not the index image needs to be referenced, it may be determined whether or not to refer to the low resolution index image in units of pixels. That is, when the sum is not 0, each pixel in the low resolution index row or column is individually referenced. If a pixel having a value other than 0 is found in the low resolution index, the corresponding index image is referred to.
According to the above-described aspect, the number of branch processes when referring to a low resolution index image can be reduced, and the processing speed can be increased. In particular, this method is useful when using a processor such as a GPU that requires time for branch processing.
However, in a region where the density of the stamp image is high, there is a possibility that branching processing may increase in the above-described aspect. Therefore, the above-described aspect may be switched as to whether to apply according to the density of the stamp image.

低解像度インデックスのピクセルを合計して判断するという手法は、換言すれば、合計値に相当する擬似的な低解像度インデックスを生成する処理であるということもできる。従って、予め低解像度インデックスの行方向または列方向に合計した第2の低解像度インデックスを用意しておいても、上述の合計値を用いた処理と同様の処理を行うことができる。
また、合計値による判断手法は、低解像度インデックス画像ではなく、インデックス画像に直接適用することも可能である。インデックス画像におけるピクセルの格納値を行方向または列方向に合計し、その行または列の参照要否を判断すればよい。こうすることで低解像度インデックス画像を用いたのと同様の処理を擬似的に実現することができる。
以上の説明において、ピクセルの合計は、必ずしも行方向または列方向に限定されるものでもなく、隣接する4つのピクセル単位で合計を算出するなど、種々の条件で行うことができる。
In other words, the method of determining by summing the pixels of the low resolution index can be said to be a process of generating a pseudo low resolution index corresponding to the total value. Therefore, even if the second low resolution index summed in the row direction or the column direction of the low resolution index is prepared in advance, the same process as the process using the total value can be performed.
Further, the determination method based on the total value can be directly applied to the index image instead of the low resolution index image. The stored values of the pixels in the index image may be summed in the row direction or the column direction, and it may be determined whether or not the row or column needs to be referenced. By doing so, the same processing as that using the low resolution index image can be realized in a pseudo manner.
In the above description, the sum of pixels is not necessarily limited to the row direction or the column direction, and can be performed under various conditions such as calculating the sum in units of four adjacent pixels.

以上、本発明の実施例について説明した。実施例の画像処理装置は、必ずしも上述した実施例の全ての機能を備えている必要はなく、一部のみを実現するようにしてもよい。また、上述した内容に追加の機能を設けてもよい。
本発明は上述の実施例に限定されず、その趣旨を逸脱しない範囲で種々の構成を採ることができることはいうまでもない。例えば、実施例においてハードウェア的に構成されている部分は、ソフトウェア的に構成することもでき、その逆も可能である。
実施例では、夜景地図を実現するための光源のスタンプ画像を合成する例を示したが、本発明の画像処理は、かかる場合のみならず、種々の画像およびスタンプ画像に対して適用可能である。
実施例では、比較的小さいサイズのスタンプ画像を利用する例を示したが、スタンプ画像のサイズは、原画像と同一またはそれ以上であってもよい。
The embodiment of the present invention has been described above. The image processing apparatus according to the embodiment is not necessarily provided with all the functions of the above-described embodiment, and may be realized only partially. Moreover, you may provide an additional function in the content mentioned above.
Needless to say, the present invention is not limited to the above-described embodiments, and various configurations can be adopted without departing from the spirit of the present invention. For example, a part configured in hardware in the embodiment can be configured in software and vice versa.
In the embodiment, an example in which a stamp image of a light source for realizing a night view map is synthesized has been described. However, the image processing of the present invention is applicable not only to this case but also to various images and stamp images. .
In the embodiment, an example in which a stamp image having a relatively small size is used has been described. However, the size of the stamp image may be equal to or larger than that of the original image.

実施例では、キャンバスとインデックス画像が同じサイズの例を示したが、インデックス画像は種々のサイズで用意することができ、例えば、キャンバスよりも大きいサイズとしてもよい。具体的には、インデックス画像のサイズは、概ねスタンプ画像の縦方向、横方向の最大幅のそれぞれ半分を原画像データの周囲に付加したサイズ、即ち、キャンバスの境界上のピクセルにスタンプ画像の境界上のピクセルが重なる配置まで特定可能なサイズとしてもよい。
実施例のようにメッシュ単位で画像データが用意され、これを並べて地図を表示する場合には、メッシュの境界部分における画像の連続性を確保することが重要となることがある。そして、メッシュの外側にスタンプ画像が配置される場合であっても、その位置関係によっては、スタンプ画像の一部がメッシュ内に重なることがある。従って、連続性を確保するためには、このようにメッシュの外側に配置されるスタンプ画像に対しても適切な合成処理を施す必要がある。かかる方法の一つとしては、キャンバス自体をメッシュよりも大きなサイズとしておき、スタンプ画像を合成した後、メッシュに対応する領域を切り出す方法が考えられる。しかし、この方法では、メッシュ周辺部分の無駄な画素についてまで合成処理を施すことになり、効率が悪い。
これに対し、上述のように、インデックス画像をキャンバスよりも大きなサイズとしておけば、キャンバス内の各ピクセルを処理する際に、その外側に配置されるスタンプ画像も考慮して各ピクセルの画素値を一義的に特定することが可能となる。従って、かかるインデックス画像を用意しておけば、キャンバスをメッシュと同サイズとし、無駄な画素に対する処理を回避して、メッシュの境界付近の画素に対しても効率的にスタンプ画像の合成を行うことができる。
In the embodiment, an example in which the canvas and the index image have the same size is shown, but the index image can be prepared in various sizes. For example, the index image may be larger than the canvas. Specifically, the size of the index image is approximately the size obtained by adding half of the maximum width in the vertical and horizontal directions to the periphery of the original image data, that is, the stamp image boundaries on the pixels on the canvas boundary. It is good also as a size which can specify even the arrangement | positioning which the upper pixel overlaps.
When image data is prepared in units of meshes as in the embodiment and the map is displayed side by side, it may be important to ensure the continuity of the image at the boundary portion of the mesh. Even when the stamp image is arranged outside the mesh, a part of the stamp image may overlap the mesh depending on the positional relationship. Therefore, in order to ensure continuity, it is necessary to perform an appropriate combining process on the stamp image arranged outside the mesh in this way. As one of such methods, a method is conceivable in which the canvas itself is set to a size larger than the mesh, a stamp image is synthesized, and then an area corresponding to the mesh is cut out. However, this method is not efficient because the composition processing is performed even for useless pixels around the mesh.
On the other hand, as described above, if the index image is made larger than the canvas, when processing each pixel in the canvas, the pixel value of each pixel is set in consideration of the stamp image arranged outside the canvas. It becomes possible to specify uniquely. Therefore, if such an index image is prepared, the canvas can be made the same size as the mesh, processing for useless pixels can be avoided, and stamp images can be efficiently synthesized even for pixels near the boundary of the mesh. Can do.

本発明は、原画像に複数のスタンプ画像を重畳した合成画像を生成する画像処理に利用可能である。   The present invention can be used for image processing for generating a composite image in which a plurality of stamp images are superimposed on an original image.

100…データ生成装置
101…コマンド入力部
102…夜景テクスチャ生成部
103…平行投影部
104…送受信部
110…3D地図データベース
111…スタンプ画像データベース
112…夜景テクスチャデータベース
113…平行投影データ
200…サーバ
201…送受信部
202…データベース管理部
203…経路探索部
210…地図データベース
211…平行投影データ
212…文字データ
213…ネットワークデータ
300…端末
300d…ディスプレイ
301…送受信部
302…コマンド入力部
303…GPS入力部
304…主制御部
305…地図情報記憶部
306…表示制御部
307…マップマッチング変換部
DESCRIPTION OF SYMBOLS 100 ... Data generation apparatus 101 ... Command input part 102 ... Night scene texture generation part 103 ... Parallel projection part 104 ... Transmission / reception part 110 ... 3D map database 111 ... Stamp image database 112 ... Night view texture database 113 ... Parallel projection data 200 ... Server 201 ... Transmission / reception unit 202 ... Database management unit 203 ... Route search unit 210 ... Map database 211 ... Parallel projection data 212 ... Character data 213 ... Network data 300 ... Terminal 300d ... Display 301 ... Transmission / reception unit 302 ... Command input unit 303 ... GPS input unit 304 ... Main control unit 305 ... Map information storage unit 306 ... Display control unit 307 ... Map matching conversion unit

Claims (7)

複数のピクセルからなる原画像に対して、複数のスタンプ画像を重畳した合成画像を生成する画像処理装置であって、
前記原画像を表す原画像データを記憶する原画像データ記憶部と、
前記スタンプ画像を表すスタンプ画像データを記憶するスタンプ画像データ記憶部と、
前記スタンプ画像が配置されるべき位置を、前記原画像データのピクセルで表した配置データを記憶する配置データ記憶部と、
前記原画像データに、前記スタンプ画像データを重畳する重畳処理部とを備え、
前記重畳処理部は、
前記原画像データから前記重畳処理を施す対象ピクセルを選択し、
前記配置データに基づいて、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その配置を特定し、
前記特定された結果に基づいて、前記スタンプ画像データを参照して、前記対象ピクセルに全ての前記スタンプ画像を重畳した場合の画素値を算出し、
該算出結果を、前記合成画像における前記対象ピクセルの画素値として記憶する画像処理装置。
An image processing device that generates a composite image in which a plurality of stamp images are superimposed on an original image composed of a plurality of pixels,
An original image data storage unit for storing original image data representing the original image;
A stamp image data storage unit for storing stamp image data representing the stamp image;
An arrangement data storage unit for storing arrangement data in which the position where the stamp image is to be arranged is represented by pixels of the original image data;
A superimposition processing unit that superimposes the stamp image data on the original image data,
The superimposition processor
Select a target pixel to be subjected to the superimposition process from the original image data,
Based on the arrangement data, specify all the stamp images to be superimposed on the target pixel, and the arrangement thereof,
Based on the identified result, referring to the stamp image data, calculate a pixel value when all the stamp images are superimposed on the target pixel,
An image processing apparatus that stores the calculation result as a pixel value of the target pixel in the composite image.
請求項1記載の画像処理装置であって、
前記重畳処理部は、前記対象ピクセルを中心として、前記スタンプ画像のサイズに応じた距離だけ離れた範囲内を検出範囲と設定し、
前記配置データから前記検出範囲内の各ピクセルに対応するデータを検索することによって、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その配置を特定する画像処理装置。
The image processing apparatus according to claim 1,
The superimposition processing unit sets a detection range within a range separated by a distance according to the size of the stamp image with the target pixel as a center,
An image processing apparatus that identifies all the stamp images to be superimposed on the target pixel and the arrangement thereof by searching data corresponding to each pixel in the detection range from the arrangement data.
請求項1または2記載の画像処理装置であって、
前記スタンプ画像は、透過部分を有する画像であり、
前記配置データは、さらに、前記スタンプ画像を重畳する回数を表す重畳回数を記憶しており、
前記重畳処理部は、前記重畳回数だけ繰り返し前記スタンプ画像を適用して、前記画素値を算出する画像処理装置。
The image processing apparatus according to claim 1 or 2,
The stamp image is an image having a transparent portion,
The arrangement data further stores the number of times of superimposition representing the number of times of superimposing the stamp image,
The superimposition processing unit is an image processing device that calculates the pixel value by repeatedly applying the stamp image the number of times of superimposition.
請求項1〜3いずれか記載の画像処理装置であって、さらに、
前記配置データ記憶部は、前記配置データとは別に、前記スタンプ画像が配置されるべき位置を、前記原画像データより粗い解像度の粗ピクセルで表した粗配置データを記憶しており、
前記重畳処理部は、
前記粗配置データに基づいて、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その粗ピクセルでの配置を特定し、
前記特定された粗ピクセルでの配置に基づいて、前記配置データを参照することによって、前記原画像のピクセル単位での前記スタンプ画像の配置を特定する画像処理装置。
The image processing apparatus according to claim 1, further comprising:
The arrangement data storage unit stores, apart from the arrangement data, coarse arrangement data in which the position where the stamp image is to be arranged is represented by coarse pixels having a coarser resolution than the original image data.
The superimposition processing unit
Based on the coarse arrangement data, specify all the stamp images to be superimposed on the target pixel and the arrangement of the coarse pixels,
An image processing apparatus that identifies the arrangement of the stamp image in units of pixels of the original image by referring to the arrangement data based on the arrangement of the specified coarse pixels.
請求項3または4記載の画像処理装置であって、
前記原画像データは、地物の3次元モデルを投影して明度を低下させた夜景画像であり、
前記スタンプ画像は、前記地物の明かりを表す光源画像であり、
前記配置データは、前記夜景画像内での前記地物の位置を前記光源画像の配置位置とし、該夜景画像において同一のピクセルとなる地物の数を前記重畳回数として記憶する画像処理装置。
The image processing apparatus according to claim 3 or 4,
The original image data is a night scene image in which brightness is lowered by projecting a three-dimensional model of a feature,
The stamp image is a light source image representing the light of the feature,
The arrangement data is an image processing apparatus that stores the position of the feature in the night view image as the arrangement position of the light source image and stores the number of features that are the same pixel in the night view image as the number of times of superimposition.
複数のピクセルからなる原画像に対して、複数のスタンプ画像を重畳した合成画像を生成する画像処理方法であって、
前記原画像を表す原画像データを記憶する原画像データ記憶部にアクセスするステップと、
前記スタンプ画像を表すスタンプ画像データを記憶するスタンプ画像データ記憶部にアクセスするステップと、
前記スタンプ画像が配置されるべき位置を、前記原画像データのピクセルで表した配置データを記憶する配置データ記憶部にアクセスするステップと、
前記原画像データに、前記スタンプ画像データを重畳する重畳ステップとを備え、
前記重畳ステップは、
前記原画像データから前記重畳処理を施す対象ピクセルを選択し、
前記配置データに基づいて、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その配置を特定し、
前記特定された結果に基づいて、前記スタンプ画像データを参照して、前記対象ピクセルに全ての前記スタンプ画像を重畳した場合の画素値を算出し、
該算出結果を、前記合成画像における前記対象ピクセルの画素値として記憶する画像処理方法。
An image processing method for generating a composite image in which a plurality of stamp images are superimposed on an original image composed of a plurality of pixels,
Accessing an original image data storage unit for storing original image data representing the original image;
Accessing a stamp image data storage unit for storing stamp image data representing the stamp image;
Accessing a placement data storage unit for storing placement data in which the position where the stamp image is to be placed is represented by pixels of the original image data;
A superimposing step of superimposing the stamp image data on the original image data,
The superimposing step includes
Select a target pixel to be subjected to the superimposition process from the original image data,
Based on the arrangement data, specify all the stamp images to be superimposed on the target pixel, and the arrangement thereof,
Based on the identified result, referring to the stamp image data, calculate a pixel value when all the stamp images are superimposed on the target pixel,
An image processing method for storing the calculation result as a pixel value of the target pixel in the composite image.
複数のピクセルからなる原画像に対して、複数のスタンプ画像を重畳した合成画像を生成するためのコンピュータプログラムであって、
前記原画像を表す原画像データを記憶する原画像データ記憶部にアクセスする機能と、
前記スタンプ画像を表すスタンプ画像データを記憶するスタンプ画像データ記憶部にアクセスする機能と、
前記スタンプ画像が配置されるべき位置を、前記原画像データのピクセルで表した配置データを記憶する配置データ記憶部にアクセスする機能と、
前記原画像データに、前記スタンプ画像データを重畳する重畳機能とをコンピュータに実現させ、
前記重畳機能として、
前記原画像データから前記重畳処理を施す対象ピクセルを選択し、
前記配置データに基づいて、前記対象ピクセルに重畳される全ての前記スタンプ画像と、その配置を特定し、
前記特定された結果に基づいて、前記スタンプ画像データを参照して、前記対象ピクセルに全ての前記スタンプ画像を重畳した場合の画素値を算出し、
該算出結果を、前記合成画像における前記対象ピクセルの画素値として記憶する機能をコンピュータに実現させるコンピュータプログラム。
A computer program for generating a composite image in which a plurality of stamp images are superimposed on an original image composed of a plurality of pixels,
A function of accessing an original image data storage unit for storing original image data representing the original image;
A function of accessing a stamp image data storage unit for storing stamp image data representing the stamp image;
A function for accessing an arrangement data storage unit for storing arrangement data in which the position where the stamp image is to be arranged is represented by pixels of the original image data;
A computer realizes a superimposing function for superimposing the stamp image data on the original image data,
As the superimposing function,
Select a target pixel to be subjected to the superimposition process from the original image data,
Based on the arrangement data, specify all the stamp images to be superimposed on the target pixel, and the arrangement thereof,
Based on the identified result, referring to the stamp image data, calculate a pixel value when all the stamp images are superimposed on the target pixel,
A computer program that causes a computer to realize a function of storing the calculation result as a pixel value of the target pixel in the composite image.
JP2014064917A 2014-03-27 2014-03-27 Image processing device Expired - Fee Related JP6110807B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014064917A JP6110807B2 (en) 2014-03-27 2014-03-27 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014064917A JP6110807B2 (en) 2014-03-27 2014-03-27 Image processing device

Publications (2)

Publication Number Publication Date
JP2015188164A true JP2015188164A (en) 2015-10-29
JP6110807B2 JP6110807B2 (en) 2017-04-05

Family

ID=54430202

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014064917A Expired - Fee Related JP6110807B2 (en) 2014-03-27 2014-03-27 Image processing device

Country Status (1)

Country Link
JP (1) JP6110807B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112016004312T5 (en) 2015-09-25 2018-07-05 Denso Corporation RISK INDEX TRANSFORMATION DEVICE
CN112651910A (en) * 2019-10-11 2021-04-13 新疆三维智达网络科技有限公司 Method and system for generating overlapped anti-counterfeiting seal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09311623A (en) * 1996-05-21 1997-12-02 Alpine Electron Inc Image displaying method
JP2000057317A (en) * 1998-08-06 2000-02-25 Victor Co Of Japan Ltd Image synthesizing method and computer readable storage medium recording image synthesizing program
JP2001056676A (en) * 1999-08-20 2001-02-27 Nec Ic Microcomput Syst Ltd Device and method for graphics processing and recording medium
JP2011119832A (en) * 2009-12-01 2011-06-16 Jvc Kenwood Holdings Inc Image display device and image display method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09311623A (en) * 1996-05-21 1997-12-02 Alpine Electron Inc Image displaying method
JP2000057317A (en) * 1998-08-06 2000-02-25 Victor Co Of Japan Ltd Image synthesizing method and computer readable storage medium recording image synthesizing program
JP2001056676A (en) * 1999-08-20 2001-02-27 Nec Ic Microcomput Syst Ltd Device and method for graphics processing and recording medium
JP2011119832A (en) * 2009-12-01 2011-06-16 Jvc Kenwood Holdings Inc Image display device and image display method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112016004312T5 (en) 2015-09-25 2018-07-05 Denso Corporation RISK INDEX TRANSFORMATION DEVICE
CN112651910A (en) * 2019-10-11 2021-04-13 新疆三维智达网络科技有限公司 Method and system for generating overlapped anti-counterfeiting seal
CN112651910B (en) * 2019-10-11 2023-12-26 新疆三维智达网络科技有限公司 Method and system for generating superimposed anti-counterfeiting seal

Also Published As

Publication number Publication date
JP6110807B2 (en) 2017-04-05

Similar Documents

Publication Publication Date Title
KR101799945B1 (en) Three-dimensional map drawing, landscape feature data generating method, three-dimensional map drawing method, and computer-readable recording medium
US7612777B2 (en) Animation generating apparatus, animation generating method, and animation generating program
US20140125655A1 (en) Map viewer and method
US20120133639A1 (en) Strip panorama
JP2004271901A (en) Map display system
US9549169B2 (en) Stereoscopic map display system
JPWO2006092853A1 (en) Map display device and map display method
JP5883818B2 (en) 3D map display system
CN104101348A (en) Navigation system and method for displaying map on navigation system
WO2016117267A1 (en) Three-dimensional map display system
JP6110780B2 (en) Additional information display system
JP5883723B2 (en) 3D image display system
JP2015079354A (en) Three-dimensional map display system using virtual reality
JP2007132972A (en) Information processor, information processing method, and program
US10409842B2 (en) Storage medium, map information processing apparatus, and data generation method
JP6022386B2 (en) 3D map display device, 3D map display method, and computer program
JP2012150823A (en) Three-dimensional map drawing system
WO2015122302A1 (en) Three-dimensional map display system
JP6110807B2 (en) Image processing device
JP2015187795A (en) image display system
JP2003195744A (en) Map display device
JP6091676B2 (en) 3D map display system
JP2007133464A (en) Information processor, information processing method, and program
JP5964611B2 (en) 3D map display system
JP2016126668A (en) Three-dimensional map display system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170201

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170214

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: 20170306

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170310

R150 Certificate of patent or registration of utility model

Ref document number: 6110807

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees