1. Field of the Invention
The present invention relates to an image processing device and image processing method for computer graphics.
2. Description of the Related Art
In the field of computer graphics, various representations are performed on the screen. One of these representations is the residual-image effect, whereby part of a past image is allowed to remain behind a moving object. Conventionally, residual image processing was performed by software. Residual image processing is performed by gradually altering the transparency of the moving object that is displayed, in accordance with its movement. A number of polygons equal to (number of polygons of the object)xc3x97(number of residual images) are therefore required in order to represent residual images. In the conventional signal processing device, the residual image portion was calculated in the same way as an ordinary object, and rendering had to be carried out, so the efficiency of processing was poor. Also, if a large number of polygons are employed, the amount of processing involved is large, so the processing took a long time.
Furthermore, while it may be intended to produce the same residual image effect for all polygons, there are also cases in which it is desirable that it should be possible to set a desired residual image effect for each polygon or to effect display with desired polygons emphasised.
The present invention was made in order to solve the above problems. An object of the present invention is to provide an image processing device wherein the efficiency of processing can be raised and a speeding-up of processing can be achieved by giving the residual image function to hardware.
Also, an object of the present invention is to provide an image processing device whereby a desired residual image effect etc. can be attained for desired polygons.
An image processing device according to the present invention comprises a control section that writes generated image data to a first image memory region and a second image memory region, and further comprises a blend circuit that reads image data from said first image memory region and whereby a residual image effect is generated by attenuating the read image data and writing it together with newly generated image data in said second image memory region.
An image processing device according to the present invention comprises: a frame buffer that stores image data; a frame buffer interface that receives pixel data from a preceding-stage circuit and that writes the data to said frame buffer and that reads data from said frame buffer; a blend rate register that stores a blend rate when mixing pixel data from said preceding-stage circuit with pixel data of said frame buffer; and a first blend circuit that mixes pixel data from the preceding-stage circuit in accordance with the blend rate of said blend rate register with pixel data from said frame buffer interface and returns the result to the preceding-stage circuit.
An image processing device according to the present invention comprises: a frame buffer that stores, in pixel units, image data, blend rate and slope data, which is a parameter for attenuating blend rate; a frame buffer interface that receives, in pixel units, image data from a preceding-stage circuit, blend rate and slope data, and that writes the data to said frame buffer and that reads the data from said frame buffer; a blend circuit that mixes pixel data from a preceding-stage circuit in accordance with the blend rate of said frame buffer with pixel data from said frame buffer interface; a subtraction circuit that subtracts a value corresponding to slope from the blend rate; a comparison circuit that compares the blend rate of said frame buffer with a blend rate from said subtraction circuit; and a selection circuit that selects one or other of the blend rate and slope of said frame buffer and the blend rate and slope from the preceding-stage circuit in accordance with the output of said comparison circuit and outputs the result to the preceding-stage circuit.
An image processing device according to the present invention comprises: a frame buffer that stores image data; a blend rate register that stores a blend rate when pixel data from a preceding-stage circuit and pixel data from said frame buffer are mixed; a blend circuit that mixes pixel data from the preceding-stage circuit with pixel data from said frame buffer in accordance with the blend rate of said blend rate register and that returns the result to the preceding-stage circuit; and a selector that receives a flag from the preceding-stage circuit and that selects one of the image data from the preceding-stage circuit or image data output from said blend circuit and that writes the selected image data to said frame buffer.
An image processing device according to the present invention comprises: a control section that writes generated image data to a first image memory region and a second image memory region, further comprising: means for writing in the other image memory one of mixed image data obtained by attenuating image data read from one of said first image memory region and second image memory region and mixing it with newly generated image data, and said newly generated image data.
An image processing method for applying a residual image effect to an entire screen according to the present invention comprises: setting the density of the residual image, indicating what percentage of the image data of the previous occasion is to be displayed as residual image, and the separation of residual images, which determines whether the image data to be left as residual image is to be constituted by the data of the previous occasion or the data of the occasion previous to the previous occasion; blending current pixel colour and buffer pixel colour in accordance with the set residual image density and writing the result to a frame buffer; determining in respect of all pixels in a region whether processing has been completed or not, and, if processing of all the pixels has not been completed, repeating said writing step; and determining whether processing of all the regions has been completed, and, if processing in respect of all the regions has not been completed, repeating said writing step.
An image processing method for applying a residual image effect in polygon units according to the invention comprises: setting the density of a residual image, indicating what percentage of the image data of the previous occasion is to be displayed as residual image and the separation of residual images, that determines whether the image data that is to be left behind as residual image is that of the data of the previous occasion or of the data of the occasion previous to the previous occasion; sorting the polygons contained in the image; blending the current pixel colour and buffer pixel colour in accordance with the set density of the residual image and writing the result to the frame buffer; comparing the density of the image of the current pixel with that when the slope data, which is a parameter indicating the degree of attenuation from the density of the image, is subtracted, and writing the larger image density and slope data in the residual image buffer; determining whether or not processing has been performed in respect of all the pixels in the region and, if processing has not been completed in respect of all pixels, repeating said writing step; and determining whether processing has been completed in respect of all regions, and, if processing has not been completed in respect of all regions, repeating said writing step.