Image composition device, electronic equipment, image composition method, control program and readable recording medium
Abstract
Problem to be solved.To obtain an image compositing apparatus capable of high-speed processing without recalculating an alpha value at the time of compositing a foreground image and a background image. An image compositing device 10 mixes color information for each dot of an input foreground image and also mixes alpha information to generate an anti-aliasing image with reduced aliasing. The processing circuit 11, the foreground color buffer 12 that stores the color information of the foreground image with reduced aliasing, the foreground alpha buffer 13 that stores the alpha information of the foreground image with reduced aliasing, and the color information of the background image. It is provided with a background color buffer 14 for storing the image, and an image composition circuit 15 for synthesizing the color information of the foreground image with reduced aliasing and the color information of the background image using the alpha information of the foreground image with reduced aliasing. .. [Selection diagram] Fig. 1
Term
Term ended
Projected expiry passed 1 October 2024, 2 years ago.
- Priority and filed
- Published
- Projected expiry
- Today
20 claims: 7 independent, 13 dependent
- 1背景画像中に前景画像を合成する画像合成装置において、 該前景画像の各画素に対して、該前景画像のカラー情報の混合を行うと共に、該前景画像と該背景画像の重み付けを表すアルファ情報の混合を行って、エリアシングを減じた前景画像を生成するアンチエリアシング処理を行うアンチエリアシング処理回路と、 該エリアシングを減じた前景画像のカラー情報を格納する前景用カラー情報記憶手段と、 該エリアシングを減じた前景画像のアルファ情報を格納する前景用アルファ情報記憶手段と、 該背景画像のカラー情報を格納する背景用カラー情報記憶手段と、 該エリアシングを減じた前景画像のアルファ情報を用いて、該エリアシングを減じた前景画像のカラー情報と該背景画像のカラー情報とを合成する画像合成処理を行う画像合成回路とを備えた画像合成装置。
- 2背景画像中に前景画像を合成する画像合成装置において、 該前景画像の各画素に対して、該前景画像のカラー情報の混合を行うと共に該前景画像と該背景画像の重み付けを表すアルファ情報の混合を行って、エリアシングを減じた前景画像を生成するアンチエリアシング処理を行うアンチエリアシング処理手段と、 該エリアシングを減じた前景画像のアルファ情報を用いて該背景画像のカラー情報と該エリアシングを減じた前景画像のカラー情報とを合成する画像合成処理を行う画像合成処理手段とを有する画像合成装置。
- 3前記前景画像として、入力画像の各画素に対してカラー情報およびアルファ情報を有する前景画像データが入力され、前記背景画像として、該入力画像の各画素に対してカラー情報を有する背景画像データが入力される請求項1または2に記載の画像合成装置。
- 4前記アンチエリアシング処理は、出力される前景画像のサイズを横X画素(Xは自然数)で縦Y画素(Yは自然数)とすると、横X×M画素(Mは自然数)で縦Y×N画素(Nは自然数)サイズの前記前景画像データを入力として、M×Nスーパーサンプリング法により行う請求項3に記載の画像合成装置。
- 5前記前景画像データは、各画素d(i,j)(i=0~X×M-1、j=0~Y×N-1;X,Y,M,Nは自然数)に対して、カラー情報c(i,j)およびアルファ情報a(i,j)を有する請求項3または4に記載の画像合成装置。
- 6前記アルファ情報は、不透明を”100”とし、透明を”0”とする請求項1~5のいずれかに記載の画像合成装置。
- 7前記アルファ情報は、ある画像の一部を切り取って前景画像とする場合に、マスク情報を用いて、マスクされるドットを”0”、マスクされないドットを”100”に変換した値とする請求項1~5のいずれかに記載の画像合成装置。
- 8前記アルファ情報は、3次元物体を3次元画像処理回路からレンダリング出力する場合に、フレームバッファのアルファ値を全て”0”に初期化する請求項1~5のいずれかに記載の画像合成装置。
- 9前記アルファ情報は、前記3次元物体を前記フレームバッファに描画する場合に、その描画される画素の前記アルファ値を”100”とするか、または物体の不透明度を表す数値”1”~”99”とする請求項8に記載の画像合成装置。
- 10前記アンチエリアシング処理として、出力画像データの着目画素をD(p,q)(p=0~X-1、q=0~Y-1)として、着目画素のカラー情報をC(p,q)、アルファ情報をA(p,q)とすると、 C(p,q)=Σc’(i,j)/M×N ・・・(式1) A(p,q)=Σa(i,j)/M×N ・・・(式2) 但し、i=p×M~p×M+M-1、j=q×N~q×N+N-1、 c’(i,j)はa(i,j)=0のときに0、それ以外のときにc(i,j)として、該(式1)および(式2)によりカラー情報の混合およびアルファ情報の混合を行う請求項4または5に記載の画像合成装置。
- 11前記画像合成処理として、出力画像データの着目ドットRD(r,s)(r=0~X-1、s=0~Y-1)として、着目画素のカラー情報RC(r,s)を、 RC(p,q)={FC(r,s)×FA(r,s)+BC(r,s) ×(100-FA(r,s))}/100 ・・・(式3) 但し、FC(r,s)は前景画像のカラー情報、FA(r,s)は前景画像のアルファ情報、BC(r,s)は背景画像のカラー情報として該(式3)により算出する請求項1または2に記載の画像合成装置。
- 12前記前景用カラー情報記憶手段、前記前景用アルファ情報記憶手段および前記背景用カラー情報記憶手段はそれぞれ、所定画像サイズの全画素分の情報を保持可能なメモリ容量を有する請求項1に記載の画像合成装置。
- 13前記アンチエリアシング処理および画像合成処理は所定画像サイズ毎に処理を行う請求項1、2および12のいずれかに記載の画像合成装置。
- 14前記前景用カラー情報記憶手段、前記前景用アルファ情報記憶手段および前記背景用カラー情報記憶手段はそれぞれ、所定画像サイズの1ライン分の情報を保持可能なメモリ容量を有する請求項1に記載の画像合成装置。
- 15前記アンチエリアシング処理および画像合成処理は所定画像サイズの1ライン毎に処理を行う請求項1、2および14のいずれかに記載の画像合成装置。
- 16前記所定画像サイズは1画面である請求項12~15のいずれかに記載の画像合成装置。
- 17請求項1~16のいずれかに記載の画像合成装置を搭載して表示画面上で背景画像中に前景画像を表示可能とする電子機器。
- 18請求項2~16のいずれかに記載の画像合成装置を用いて、エリアシングを減じた前景画像を背景画像中に合成する画像合成方法であって、 該前景画像のアンチエリアシング処理時に、該前景画像の各画素に対して該前景画像のカラー情報の混合を行うと共に、該前景画像のアルファ情報の混合を行うアンチエリアシング処理ステップと、 該混合を行ったアルファ情報を用いて該背景画像と該前景画像とを合成する画像合成処理ステップとを有する画像合成方法。
- 19請求項18に記載の画像合成方法の各処理ステップをコンピュータに実行させるための制御プログラム。
- 20請求項19に記載の制御プログラムが記録されたコンピュータ読み出し可能な可読記録媒体。
Independent claims20
61 paragraphs, as filed
The present invention relates to an image synthesizer that synthesizes a foreground image such as an antialiasing-processed three-dimensional object image using a two-dimensional image such as a natural image as a background image, and an electronic device such as a portable game machine equipped with the image synthesizer. The present invention relates to an image composition method using this, a control program for causing a computer to execute the image composition method, and a computer-readable readable recording medium on which the image composition method is recorded.
Conventionally, in a digital image, when synthesizing a foreground image such as a three-dimensional object image using a two-dimensional image such as a natural image as a background image, the image synthesizing process is performed as follows, for example.
First, a background image such as a landscape and a foreground image such as an automobile image are prepared, and mask processing is performed to separate a predetermined region in the foreground image. In this mask processing, for example, only the automobile portion is cut out.
Next, in order to superimpose the cut-out area in the foreground image on the background image, the foreground image and the background image are specified after the overlapping position is specified, the enlargement / reduction ratio is specified, and the color tone of the cut-out area is adjusted. And are synthesized.
In this image composition process, color information is mixed (or dots) for each pixel (or dot) of the foreground image in order to reduce the area where the outline of the foreground image is displayed in a stepped manner or flicker lines are generated. Anti-aliasing processing that performs averaging) is performed.
For example, in the anti-aliasing process by the M × N supersampling method, the foreground image data of the size of the horizontal X × M dots and the vertical Y × N dots is generated with respect to the size of the output foreground image of horizontal X dots × vertical Y dots. Entered. The color information of the M × N input image data is averaged (mixed) for each dot of the output image data and output. The M × N supersampling method uses a wider range of data to make the contours of the foreground image more correct and clean.
Further, an alpha compositing process is performed to improve the discontinuity and unnaturalness near the boundary between the background image and the foreground image.
In this alpha composition process, for example, the inner pixel of the mask is set to "1" and the outer pixel is set to "0", and an alpha value indicating the weighting of the foreground image and the background image is set. Using this alpha value, the color of the background image is set. The information and the color information of the foreground image are mixed (weighted average).
Conventionally, when synthesizing a 3D object image with a 2D image such as a natural image, how is the composition ratio of the contour part of the 3D object which is the foreground image and the 2D image which is the background image? The issue is whether to set it.
As a means for solving this problem, for example, Patent Document 1 discloses a method of calculating an alpha value based on a mask shape near the contour of a foreground image and synthesizing a foreground image and a background image using the alpha value. There is.<patcit num="1"><text>Japanese Unexamined Patent Publication No. 4-340671</text></patcit>
<p> However, in the configuration of Patent Document 1, since it is necessary to recalculate the alpha value for each dot of the foreground image before image composition, there is a problem that the time required for image composition increases.</p><p> Moreover, since dot information around the contour part is also required to calculate this alpha value, even when applied to a drawing system in which processing is performed on a line-by-line basis, the information several lines before is retained. There was a problem that it needed to be kept.</p><p> The present invention solves the above-mentioned conventional problems, can speed up processing without recalculating the alpha value when synthesizing the foreground image and the background image, and also for a drawing system that performs processing in line units. An image synthesizer that can be applied as it is, an electronic device equipped with the image synthesizer, an image synthesis method using the image synthesizer, a control program for causing a computer to execute the image synthesizer, and a computer-readable readable recording medium that records the image synthesizer. The purpose is to provide.</p>
<p> The image synthesizer of the present invention is an image synthesizer that synthesizes a foreground image into a background image, and mixes the color information of the foreground image with each pixel of the foreground image, and mixes the color information of the foreground image with the background. Stores an anti-aliasing processing circuit that performs anti-aliasing processing that generates a foreground image with reduced aliasing by mixing alpha information representing image weighting, and color information of the foreground image with the reduced aliasing. The foreground color information storage means, the foreground alpha information storage means for storing the alpha information of the foreground image with the aliasing reduced, the background color information storage means for storing the color information of the background image, and the aliasing. It is provided with an image compositing circuit that performs an image compositing process that synthesizes the color information of the foreground image with the aliasing reduced and the color information of the background image using the alpha information of the foreground image with the number reduced. Achieves the above purpose.</p><p> The image synthesizer of the present invention is an image synthesizer that synthesizes a foreground image into a background image, and mixes the color information of the foreground image with each pixel of the foreground image, and mixes the foreground image and the background image. The anti-aliasing processing means for performing anti-aliasing processing that generates a foreground image with reduced aliasing by mixing alpha information representing the weighting of the above, and the alpha information of the foreground image with the reduced aliasing are used. It has an image composition processing means for performing an image composition process for synthesizing the color information of the background image and the color information of the foreground image with the aliasing reduced, thereby achieving the above object.</p><p> Further, preferably, as a foreground image in the image synthesizer of the present invention, foreground image data having color information and alpha information for each pixel of the input image is input, and as the background image, each pixel of the input image is input. On the other hand, it has color information.</p><p> Further, preferably, in the anti-aliasing process in the image synthesizer of the present invention, assuming that the size of the output foreground image is horizontal X pixels (X is a natural number) and vertical Y pixels (Y is a natural number), horizontal X × M The foreground image data having a pixel (M is a natural number) and a vertical Y × N pixel (N is a natural number) size is input and performed by the M × N supersampling method.</p><p> Further, preferably, the foreground image data in the image synthesizer of the present invention includes each pixel d (i, j) (i = 0 to X × M-1, j = 0 to Y × N-1; X, Y, M and N have color information c (i, j) and alpha information a (i, j) for natural numbers).</p><p> Further, preferably, the alpha information in the image synthesizer of the present invention has opacity as "100" and transparency as "0".</p><p> Further, preferably, the alpha information in the image synthesizer of the present invention uses the mask information to set the masked dots to "0" and the unmasked dots when a part of an image is cut out to be a foreground image. The value converted to "100".</p><p> Further, preferably, the alpha information in the image synthesizer of the present invention initializes all the alpha values of the frame buffer to "0" when the three-dimensional object is rendered and output from the three-dimensional image processing circuit.</p><p> Further, preferably, in the alpha information in the image synthesizer of the present invention, when the three-dimensional object is drawn in the frame buffer, the alpha value of the drawn pixels is set to "100", or the alpha value of the object is set to "100". The numerical values "1" to "99" indicating the opacity are used.</p><p> Further, preferably, as the anti-aliasing process in the image synthesizer of the present invention, the pixel of interest of the output image data is set to D (p, q) (p = 0 to X-1, q = 0 to Y-1). Assuming that the color information of the pixel of interest is C (p, q) and the alpha information is A (p, q), C (p, q) = Σc'(i, j) / M × N (Equation 1) A (p, q) = Σa (i, j) / M × N (Equation 2) However, i = p × M ~ p × M + M-1, j = q × N ~ q × N + N-1, c'(i, j) is 0 when a (i, j) = 0, and c (i, j) at other times. Mix information and mix alpha information.</p><p> Further, preferably, as the image compositing process in the image compositing apparatus of the present invention, the focused dot RD (r, s) (r = 0 to X-1, s = 0 to Y-1) of the output image data is set as the focused pixel. Color information RC (r, s) of RC (p, q) = {FC (r, s) × FA (r, s) + BC (r, s) × (100-FA (r, s)) } / 100 (Equation 3) However, FC (r, s) is the color information of the foreground image, FA (r, s) is the alpha information of the foreground image, and BC (r, s) is the color information of the background image. Is calculated by the above (Equation 3).</p><p> Further, preferably, the foreground color information storage means, the foreground alpha information storage means, and the background color information storage means in the image synthesizer of the present invention can each hold information for all pixels of a predetermined image size. Has memory capacity.</p><p> Further, preferably, the anti-aliasing process and the image composition process in the image synthesizer of the present invention are performed for each predetermined image size.</p><p> Further, preferably, the foreground color information storage means, the foreground alpha information storage means, and the background color information storage means in the image synthesizer of the present invention can each hold information for one line of a predetermined image size. Has memory capacity.</p><p> Further, preferably, the anti-aliasing process and the image composition process in the image synthesizer of the present invention are performed for each line of a predetermined image size.</p><p> Further, preferably, the predetermined image size in the image synthesizer of the present invention is one screen.</p><p> The electronic device of the present invention is equipped with the above-mentioned image synthesizer according to any one of claims 1 to 16 so that a foreground image can be displayed in a background image on a display screen. Is achieved.</p><p> The image synthesizing method of the present invention is an image synthesizing method for synthesizing a foreground image with reduced aliasing into a background image by using the above-mentioned image synthesizing apparatus according to any one of claims 2 to 16. During the anti-aliasing process of the image, the color information of the foreground image is mixed for each pixel of the foreground image, and the alpha information of the foreground image is mixed with the anti-aliasing process step. It has an image composition processing step of synthesizing the background image and the foreground image using the alpha information, thereby achieving the above object.</p><p> The control program of the present invention is for causing a computer to execute each processing step of the image composition method according to claim 18, thereby achieving the above object.</p><p> The readable recording medium of the present invention is a computer-readable medium in which the control program according to claim 19 is recorded, whereby the above object is achieved. However, the above-mentioned purpose is achieved by that.</p><p> With the above configuration, the operation of the present invention will be described below.</p><p> In the present invention, the color information of the background image, the color information of the foreground image, and the alpha information are input, and the color information of the foreground image and the alpha information are mixed at the same time during the antialiasing process of the foreground image. The resulting color and alpha information is stored. Next, the color information of the background image and the color information of the foreground image subjected to the anti-aliasing processing at the time of the image composition processing are combined using the alpha information of the foreground image calculated at the time of the anti-aliasing processing.</p><p> Since the alpha value is also calculated during the anti-aliasing process, the alpha value is recalculated at the time of image composition as in the conventional technique described in Patent Document 1 without requiring a separate time for the calculation of the alpha value. Image composition processing can be performed at high speed without the need for it.</p><p> Further, information for one line of a predetermined image size (for example, one screen) is held in the foreground color buffer, the foreground alpha buffer, and the background color buffer, and the antialiasing processing circuit and the image composition circuit are used to obtain the predetermined image size. By processing each line, the amount of circuit and memory required is very small, and for example, it is installed in a portable electronic device such as a handheld game machine, and the foreground image is displayed in the background image on the display screen. It can be displayed.</p>
<p> As described above, according to the present invention, the color information of the foreground image and the alpha information are mixed at the same time during the anti-aliasing process of the foreground image, and the anti-aliasing processed alpha is performed during the image composition process. Since the color information of the background image and the color information of the anti-aliasing processed foreground image are combined using the information, the image composition is performed as in the conventional technique without requiring a separate time for calculating the alpha value. Therefore, image composition can be performed at high speed without recalculating the alpha value.</p><p> In addition, by providing a storage means such as a buffer that holds information for one line and performing processing for each line, the required circuits, processing, and amount of memory can be reduced, the device can be miniaturized, and it can be carried. An image synthesizer suitable for mounting on an electronic device can be realized.</p>
Hereinafter, embodiments 1 and 2 of the image synthesizer of the present invention will be described with reference to the drawings. (Embodiment 1) In the first embodiment, a case where the image synthesizer of the present invention is configured by hardware will be described.
FIG. 1 is a block diagram showing a configuration example of the image synthesizer according to the first embodiment of the present invention.
As shown in FIG. 1, the image synthesizer 10 of the first embodiment has an anti-aliasing processing circuit 11 into which foreground image data is input and a foreground color information for storing color information from the anti-aliasing processing circuit 11. Foreground color buffer 12 as a storage means, foreground alpha information storing alpha information from the anti-aliasing processing circuit 11, foreground alpha buffer 13 as a storage means, and background color information for which background image data is input. A background color buffer 14 as a storage means, an image composition circuit 15 for inputting each stored data from the foreground color buffer 12, the foreground alpha buffer 13 and the background color buffer 14 and outputting the composite image data. have.
In the anti-aliasing processing circuit 11, foreground image data having color information of each pixel (or each dot) and alpha information indicating weighting with the background image is input as digital data, and is input as anti-aliasing processing. Color information and alpha information are mixed for each dot of the foreground image data.
The circuit that mixes the color information and the alpha information realizes high-speed arithmetic processing by using various logic circuits such as a divider and an adder in terms of hardware. In addition, there is an advantage that the arithmetic circuit that mixes color information and the arithmetic circuit that mixes alpha information can be configured with the same circuit and can be shared. However, in order to emphasize the processing speed, each of them is used here. Arithmetic circuits are provided in parallel to process color information mixing and alpha information mixing at the same time. In this way, since the alpha information mixing process is performed during the color information mixing process, the alpha value is recalculated when the foreground image and the background image are combined as in the conventional case, without requiring a separate time for the alpha information mixing process. The processing can be speeded up soon.
The foreground color buffer 12 stores the color information of the anti-aliasing processing result obtained by reducing the aliasing by the anti-aliasing processing circuit 11.
The foreground color buffer 13 stores alpha information of the anti-aliasing processing result by the anti-aliasing processing circuit 11.
Background image data having color information is input as digital data in the background color buffer 14, and the color information is stored.
In the image composition circuit 15, the color information of the background image data stored in the background color buffer 14 and the color information of the foreground image data stored in the foreground color buffer 12 are stored in the foreground alpha buffer 3. It is synthesized using the alpha information of the foreground image data, and the composite result is output as the composite image data.
With the above configuration, the image composition method using the image composition apparatus 10 of the present embodiment will be described below.
First, the operation of the anti-aliasing processing circuit 11 will be described.
FIG. 2 is a flowchart showing an outline of an example of anti-aliasing processing executed by the anti-aliasing processing circuit 11 of FIG. In the following, each step in FIG. 2 will be described in order.
As shown in FIG. 2, first, in step S1, foreground image data is input to the anti-aliasing processing circuit 11.
In the first embodiment, the M × N supersampling method will be described as an example of the anti-aliasing method. In the M × N supersampling method, assuming that the size of the image to be output is horizontal X dots and vertical Y dots, image data having a horizontal X × M dots and a vertical Y × N dots is input.
Further, in the first embodiment, it is assumed that foreground image data having alpha information is input in advance. This alpha information is set, for example, as "100" for opacity and "0" for transparency. In addition, when a part of a certain image is cut out to be a foreground image, a value obtained by converting the masked dot to "0" and the unmasked dot to "100" using the image cutout information generally called mask information. Is entered as alpha information. Further, when the 3D object is rendered and output from the 3D image processing circuit, all the alpha values of the frame buffer are initialized to "0" in advance. This is because if data remains in the framebuffer, the remaining data will be adversely affected. When drawing this 3D object in the frame buffer, the alpha value of the drawn dots is set to "100", or the alpha information is updated as the numerical values "1" to "99" indicating the opacity of the object. And the alpha information of the foreground image is obtained.
As described above, in step S1, at least the color information c (i) is provided for each dot d (i, j) (i = 0 to X × M-1, j = 0 to Y × N-1) of the input image. Foreground image data having, j) and alpha information a (i, j) is input to the anti-aliasing processing circuit 11.
Next, in step S2, it is determined whether or not the calculation of all dots is completed. If all the dots have been calculated, the anti-aliasing process is completed, and if there are pixels (or dots) for which the calculation has not been completed, the process proceeds to step S3.
Further, in step S3, the anti-aliasing process is executed for a certain dot whose calculation has not been completed.
Here, the focus dot of the output image data is D (p, q) (p = 0 to X-1, q = 0 to Y-1), the color information of the focus dot is C (p, q), and the alpha information. Let A (p, q) be, then C (p, q) = Σc'(i, j) / M × N (Equation 1) A (p, q) = Σa (i, j) / M × N (Equation 2) (However, i = p × M ~ p × M + M-1, j = q × N ~ q × N + N-1, c'(i, j) is a ( The calculation is performed as 0 when i, j) = 0, and c (i, j) at other times), and the color information and the alpha information are mixed.
Further, in step S4, the color information C (p, q) is stored in the corresponding memory area FMC (p, q) of the foreground color buffer 12, and the alpha information A (p, q) is stored in the foreground alpha buffer 13. It is stored in the corresponding memory area FMA (p, q). Again, the process returns to step S2 to determine whether all the dots have been calculated.
As is clear from the above (Equation 2), in the first embodiment, the anti-aliasing process including the alpha information is performed, and the alpha information is stored in the foreground alpha buffer 13 so that the image is synthesized again at the time of image composition. There is no need to calculate alpha information.
Next, the operation of the image synthesis circuit 15 will be described.
FIG. 3 is a flowchart showing an outline of an example of image composition processing executed by the image composition circuit 15 of FIG. In the following, each step in FIG. 3 will be described in order.
As shown in FIG. 3, first, in step S11, it is determined whether or not the processing is completed for all the pixels (or dots). If the processing for all the dots is completed, the image composition processing is completed, and if there are still unprocessed dots, the process proceeds to step S12.
Next, in step S12, the color information RC (r) of the dot of interest is set as the dot of interest RD (r, s) (r = 0 to X-1, s = 0 to Y-1), which is a dot that has not been processed yet. , S) is calculated by the following (Equation 3).
RC (p, q) = {FC (r, s) × FA (r, s) + BC (r, s) × (100-FA (r, s))} / 100 (Equation 3) However , FC (r, s) is the color information of the foreground image stored in the foreground color buffer 12, and FA (r, s) is the alpha information of the foreground image stored in the foreground alpha buffer 13, BC (r, s). ) Indicates the color information of the background image stored in the background color buffer 14.
As is clear from the above (Equation 3), in the present embodiment, the color information of the foreground image and the color information of the background image are mixed by the value of the alpha information of the foreground image, so that the outline portion of the foreground image is unnatural. It is possible to satisfactorily combine the foreground image and the background image without producing a different hue.
In the present embodiment, it is assumed that the foreground color buffer 12, the foreground alpha buffer 13, and the background color buffer 14 have a memory capacity capable of holding information for dots of the image size to be combined. Although processing is performed for each image by the aliasing processing circuit 11 and the image composition circuit 15, information for one line of the image can be retained as the foreground color buffer 12, the foreground alpha buffer 13, and the background color buffer 14. An anti-aliasing processing circuit 11 and an image synthesizing circuit 15 may be used to perform processing for each line of an image using a memory having a large amount of memory.
In this case, first, the anti-aliasing processing circuit 11 performs anti-aliasing processing for one line of the image, and stores the anti-aliasing processed data in the foreground color buffer 12 and the foreground alpha buffer 13. At the same time, the background image data of the line corresponding to the foreground image is stored in the background color buffer 14 for one line. Next, the image composition circuit 15 performs image composition processing for one line.
By sequentially executing the anti-aliasing process and the image composition process for the number of lines of the image in this way, the image composition apparatus 10 of the present invention is mounted on a portable electronic device having large restrictions on the circuit scale and the memory capacity. It becomes possible. (Embodiment 2) In the first embodiment, the case where the image synthesizer of the present invention is configured by hardware has been described, but in the second embodiment, the case where the image synthesizer of the present invention is configured by software will be described.
FIG. 4 is a block diagram showing a configuration example in the case of processing by a computer as the image synthesizer of the second embodiment.
As shown in FIG. 4, the image compositing device 20 of the second embodiment has a control means 21 composed of a CPU (central processing unit) and a processing procedure (processing procedure) for executing the image compositing method of the second embodiment by a computer. It has a ROM 22 as a readable recording medium in which a control program in which the contents of FIGS. 2 and 3) are described and its data, and a RAM 23 used by the control means 21 as a work memory.
Based on the control program of the present invention and its data, the control means 21 mixes the color information of the foreground image with respect to each pixel (or each dot) of the foreground image during the anti-aliasing process of the foreground image, and at the same time, The background image and the foreground image are combined using the anti-aliasing processing means 21A that executes the anti-aliasing processing step (see FIG. 2) that mixes the alpha information of the foreground image and the alpha information obtained by mixing the alpha information. It has an image compositing processing means 21B that executes an image compositing processing step (see FIG. 3).
The readable recording medium is a small portable storage device such as various IC memories, optical disks (for example, CD) and magnetic recording medium (for example, FD), and the control program of the present invention and its data are computer-readable recording media. Then, the control program read from the recording medium and its data are stored in the RAM 23 from the ROM 22 and executed by the control means 21.
In the anti-aliasing processing step, assuming that the size of the output foreground image is horizontal X pixels and vertical Y pixels, the data of the foreground image having a horizontal X × M pixel and a vertical Y × N pixel size is input as M ×. N Super sampling method is used.
The foreground image data is at least color for each pixel d (i, j) (i = 0 ~ X × M-1, j = 0 ~ Y × N-1; X, Y, M, N are natural numbers). It has information c (i, j) and alpha information a (i, j).
In the anti-aliasing processing step, the pixel of interest in the output image data is D (p, q) (p = 0 to X-1, q = 0 to Y-1), and the color information of the pixel of interest is C (p, q). ), If the alpha information is A (p, q), then C (p, q) = Σc'(i, j) / M × N (Equation 1) A (p, q) = Σa (i, j) / M × N (Equation 2) However, i = p × M ~ p × M + M-1, j = q × N ~ q × N + N-1, c'(i, j) Is 0 when a (i, j) = 0, and c (i, j) at other times, and the color information and the alpha information are mixed according to the above (Equation 1) and (Equation 2).
The circuit that mixes the color information and the alpha information is executed by the control means 21 based on a program in software. Further, the arithmetic processing for mixing the color information and the arithmetic processing for mixing the alpha information are simultaneously processed in parallel. In this way, since the alpha information mixing process is performed during the color information mixing process, the alpha value is recalculated when the foreground image and the background image are combined as in the conventional case, without requiring a separate time for the alpha information mixing process. The processing can be speeded up soon.
Further, in the image composition processing step, the color information RC (r, s) of the dot of interest is set as the dot of interest RD (r, s) (r = 0 to X-1, s = 0 to Y-1) of the output image data. Is calculated by the following (Equation 3).
RC (p, q) = {FC (r, s) × FA (r, s) + BC (r, s) × (100-FA (r, s))} / 100 (Equation 3) However , FC (r, s) is the color information of the foreground image, FA (r, s) is the alpha information of the foreground image, and BC (r, s) is the color information of the background image.
Based on the above, according to the first and second embodiments, the image synthesizers 10 and 20 mix color information and alpha information for each dot of the input foreground image to perform aliasing. Image composition that combines the color information of the foreground image with reduced area and the color information of the background image using the anti-aliasing process that generates the foreground image with less area and the alpha information of the foreground image with less area. Perform processing. As a result, high-speed processing can be performed without recalculating the alpha value when synthesizing the foreground image and the background image.
Although all the dots are used in the flowcharts of FIGS. 2 and 3, color information may be mixed, alpha information may be mixed, and image composition may be performed by detecting only the dots in the outline portion of the foreground image.
In the first embodiment, the M × N supersampling method has been described as an example of the anti-aliasing method, but it goes without saying that other anti-aliasing methods may be used.
As described above, the present invention has been illustrated using the preferred embodiments 1 and 2 of the present invention, but the present invention should not be construed as being limited to the embodiments 1 and 2. It is understood that the invention should be construed only by the claims. It is understood that those skilled in the art can implement an equivalent range based on the description of the present invention and common general technical knowledge from the description of the specific preferred embodiments 1 and 2 of the present invention. The patents, patent applications and documents cited herein are to be incorporated by reference in their content as they are specifically described herein. Understood.
The present invention is an image synthesizer that synthesizes a foreground image such as an antialiasing-processed three-dimensional object image using a two-dimensional image such as a natural image as a background image, and an electronic device such as a portable game machine equipped with the image synthesizer. In the field of an image compositing method using this image compositing device, a control program for causing a computer to execute the image, and a computer-readable readable recording medium on which the image is recorded, a two-dimensional image such as a natural image is used as a background image. , When synthesizing a foreground image such as an anti-aliasing-processed three-dimensional object image, the color information of the foreground image and the alpha information are mixed during the anti-aliasing process of the foreground image, and the alpha information is mixed during the image composition process. Since the color information of the background image and the color information of the anti-aliasing processed foreground image are combined using the alpha information, the alpha value is not recalculated for image composition as in the prior art, and the speed is high. It is possible to obtain a good composite image without unnatural hues at the boundary portion of the foreground image by performing image composition. In addition, by providing a storage means such as a buffer that holds information for one line and performing processing for each line, the required circuits, processing, and amount of memory can be reduced, the device can be miniaturized, and a portable game machine can be used. It is possible to realize an image synthesizer suitable for mounting on a portable electronic device such as.
<figref num="1">It is a block diagram which shows the structural example of the image synthesis apparatus which is Embodiment 1 of this invention.</figref><figref num="2">It is a flowchart for demonstrating the example of the anti-aliasing processing executed by the anti-aliasing processing circuit of FIG.</figref><figref num="3">It is a flowchart for demonstrating the example of the image composition processing executed by the image composition circuit of FIG.</figref><figref num="4">It is a block diagram which shows the configuration example at the time of processing by a computer as the image synthesis apparatus of Embodiment 2.</figref>
Code description
10,20 Image processing unit 11 Anti-aliasing processing circuit 12 Foreground color buffer (foreground color information storage means) 13 Foreground alpha buffer (foreground alpha information storage means) 14 Background color buffer (background color information storage means) ) 15 Image synthesis circuit 21 Control means (CPU) 21A Anti-aliasing processing means 21B Image synthesis processing means 22 ROM (storage means) 23 RAM (storage means)
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| KR20110052207A | Cited by | Republic of Korea | Search report |
| US8633941B2 | Cited by | United States of America | Applicant |
| CN114731383A | Cited by | China | Search report |
| WO2021106136A1 | Cited by | World Intellectual Property Organization (WIPO) | International search |
| JP2017142663A | Cited by | Japan | Search report |
| JPWO2021106136A1 | Cited by | Japan | Search report |
6 members in 3 offices
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 2004290805 | Japan | A | |
| JP20040290805 | – | – | – |
Members6
| Document | Office | Kind | |
|---|---|---|---|
| US2006072041A1 | United States of America | A1 | |
| JP2006106989AThis record | Japan | A | |
| TW200632779A | Taiwan Province of China | A | |
| TWI287757B | Taiwan Province of China | B | |
| US7499108B2 | United States of America | B2 | |
| JP4240395B2 | Japan | B2 |
15 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Notification of resignation of power of attorneyJAPANESE INTERMEDIATE CODE: R3D04RD04 | RD04 | |
| Written notification of registration of transferJAPANESE INTERMEDIATE CODE: R350R350 | R350 | |
| Written request for registration of restoreJAPANESE INTERMEDIATE CODE: R316G99SG99 | SG99 | |
| Written request for registration of restoreJAPANESE INTERMEDIATE CODE: R316G99SG99 | SG99 | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Renewal fee payment (event date is renewal date of database)FPAY | FPAY | |
| Certificate of patent or registration of utility modelJAPANESE INTERMEDIATE CODE: R150R150 | R150 | |
| Certificate of patent or registration of utility modelJAPANESE INTERMEDIATE CODE: R150R150 | R150 | |
| First payment of annual fees (during grant procedure)JAPANESE INTERMEDIATE CODE: A61A61 | A61 | |
| Written decision to grant a patent or to grant a registration (utility model)JAPANESE INTERMEDIATE CODE: A01A01 | A01 | |
| Written decision to grant a patent or to grant a registration (utility model)JAPANESE INTERMEDIATE CODE: A01A01 | A01 | |
| Decision of grant or rejection writtenTRDD | TRDD | |
| Written amendmentJAPANESE INTERMEDIATE CODE: A523A521 | A521 | |
| Notification of reasons for refusalJAPANESE INTERMEDIATE CODE: A131A131 | A131 |
Numbers
- Publication
- 2006106989
- Publication, DOCDB
- 2006106989
- Publication, EPODOC
- JP2006106989
- Application
- 290805
- Application, DOCDB
- 2004290805
- Application, EPODOC
- JP20040290805
Titles2
- Japanese
- 画像合成装置、電子機器、画像合成方法、制御プログラムおよび可読記録媒体
- English
- Image compositing equipment, electronic devices, image compositing methods, control programs and readable recording media
Classification
- CPC, 1
- H04N9/75
- IPC, 5
- G06T3 00
- G06T5 20
- G06T15 00
- H04N1 387
- H04N5 272