1. Field of the Invention
The present invention relates to an image processing apparatus and image processing method that receives PDL data, renders that data and forms an image.
2. Description of the Related Art
Generally, the file size of a color image is large, so that technology is needed that reduces the file size of a color image while maintaining the image quality as much as possible. For example, there is image processing technology that is being performed that reduces the file size without much decrease in the image quality of the processed image, and even when there are areas that have special attributes such as text or graphics in the processed image, maintains the visual quality of the image having those special attributes (for example, refer to Japanese Patent Laid-Open No. 2005-204206). In Japanese Patent Laid-Open No. 2005-204206, an inputted multi-valued image and binary image based on that inputted multi-valued image are prepared, and based on the binary image, pixels of areas having specified attributes such as areas of text are identified. Next, depending on whether or not there are specified attribute areas, a binary image is generated that replaces the pixels that do not have specified attributes with white pixels, and an image of the specified attribute sections is generated using a set color, as well as a multi-value image, in which the pixels that have specified attributes are filled in with the background color, is generated, and all of the images are encoded. In Japanese Patent Laid-Open No. 2005-204206 above, even when there are areas that have specified attributes such as text and lines, it is possible to reduce the file size while maintaining the visual quality of an image having specified attribute sections and without much of a decrease in the image quality of the multi-value images that do not have specified attributes.
However, in Japanese Patent Laid-Open No. 2005-204206, a binary image is generated when specified attribute sections such as text areas are detected, so that there is a possibility that the quality of text images will deteriorate. Furthermore, pixels other than those of text areas are converted to white pixels, so that when a multi-value image is compressed there is a possibility that the quality of the multi-value image will deteriorate.
In order to achieve the object above, the image processing apparatus of the present invention comprises: a rendering unit for, when image data that includes two or more objects is inputted, rendering the two or more objects as bitmap data; a generation unit for generating attribute information for the image data based on the rendered bitmap data and attributes of the objects; a storing unit for storing the rendered bitmap data or bitmap data by operating logical rendering for the bitmap data based on the attribute information that was generated by the generation unit in a storage having two or more layers; and a compression unit for, using a different compression method for each of the two layers or more, compressing each of the rendered bitmap data.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
In the following, preferred embodiments of the present invention are explained with reference to the drawings.
Any computer having the basic functions as a personal computer can be used as the host computer (hereafter, referred to as the PC) 130. The PC 130 uses FTP and SMB protocol via a network such as an LAN 140 or WAN, and is capable of transmitting and receiving files and transmitting and receiving e-mail. Furthermore, the PC 130 can instruct the image processing devices 100, 110 via a printer driver to print. The image processing devices 100 and 110 basically have the same construction, and have a scanner unit. In order to simplify the explanation below, the construction of the image processing devices 100, 110 will be explained in detail using the image processing device 110.
The image processing device 110 comprises a scanner unit 113 that functions as an image input device, a printer unit 114 that functions as an image output device, a controller 111 that performs overall control of the image processing device 110, and an operation unit 112 that functions as a user interface (UI).
A RAM 203 is used as a temporary memory area for the main memory or work area of the CPU 201, and is further used as a temporary memory area for image processing. An interface control unit 207 controls the network I/F such as a NIC (Network Interface Card) 208, and transmits and receives various kinds of data such as image data over a network such as an LAN. The interface control unit 207 also controls a modem 209, and transmits and receives data using a telephone line.
An operation I/F 210 receives input such as a user's operation instructions from the operation unit 112 that comprises a touch panel and/or keyboard. Similarly, the operation I/F 210 controls the operation unit 112 that comprises a LCD, CRT and the like, and displays operation screens for the user. A renderer unit 211 generates bitmap data that can be processed by the printer unit 114 based on data received via the interface control unit 207. A compression unit 212 performs compression of the bitmap data. A decompression unit 213 decompresses the data that was compressed by the compression unit 212 and outputs bitmap data.
A scanner image processing unit 214 performs correction, processing and editing of images read by the scanner unit 113 and received via a scanner I/F 215. The scanner image processing unit 214 determines whether the received image data is a color document or black and white document, or whether it is a text document or a photograph document. That judgment result is correlated with the image data, and such correlated information is called attribute data. A printer image formation unit 216 performs image processing for printing by the printer unit, and transmits the result as bitmap data to the printer unit 114 via a printer I/F 217.
Referring to
The renderer unit 211 of the controller 111 renders the display list that was generated in S302, and generates bitmap data that corresponds to the rendered PDL data in preset block units (for example, 64 pixels×64 pixels) (S303). Step S303 will be described in detail later with reference to
The compression unit 212 of the controller 111 executes resolution conversion of the bitmap data generated in S303, and generates bitmap data that is compressed in block units (S304). Step S304 will be described in detail later with reference to
Referring to
In an image generation unit 501, image generation is performed based on the display list that was generated in S302. In this embodiment, the image generation unit 501 comprises a text generator 502, graphics generator 503 and image generator 504. The text generator 502 generates bitmap data of a text object that is included in the display list. The graphics generator 503 generates bitmap data of a graphics object that is included in the display list. The image generator 504 generates bitmap data of an image object that is included in the display list.
An image logic rendering operation unit 505 performs image generation by a logic rendering operation that uses ROP (Raster Operation) code that is included in the display list. Similar to the image logic rendering operation unit 505, an image logic rendering operation unit 506 generates attribute information in pixel units by performing a logic rendering operation on attribute information of each object based on ROP (Raster Operation) code that is included in the display list. One logic rendering operation is a method of overwriting in which attribute information of a lower object is written over by attribute information of an object that is to be located on top.
In an image, a text area is assigned a text attribute, an image (photo) area is assigned an image attribute, and for a graphics area, a bitmap that is assigned a graphics attribute becomes the attribute information. In
A buffer unit 508 comprises a first layer buffer 509, a second layer buffer 510 and attribute information buffer 511. The first layer buffer 509 is a buffer for storing text and graphics bitmap data. The second layer buffer 510 is a buffer for storing image bitmap data. The attribute information buffer 511 is a buffer for storing attribute information.
Referring to
Next, the renderer unit 211 performs a logic rendering operation based on the display list and the data generated in S601 (S602). Here, a logic rendering operation is performed for bitmap data and attribute information. The renderer unit 211 selects a layer for storing the generated bitmap data based on the results of the attribute logic rendering operation unit 506 (S603). The renderer unit 211 stores bitmap data in the layer buffer that was selected in S603 (S604).
Referring to
Next, the layer selection unit 507 determines whether or not there is bitmap data generated by the image generator 504 (S704) in the block that is the object of processing. When the judgment result of S704 is (YES), the layer selection unit 507 stores bitmap image data generated by the image generator 504 in the second layer buffer 510 (S705).
The text generator 502 generates bitmap data 806 by rendering the text objects “A” 803 and 804 in block units. The bitmap data 806 comprises bitmap data 807 and 808 that is rendered from part of the text objects “A” 803 and 804. The image generator 504 generates bitmap data 809 by rendering image object 805 in block units.
The image logic rendering operation unit 505 generates block bitmap data 810 by a logic rendering operation based on bitmap data 806 and 809. The layer selection unit 507 references the attribute information 811, and because a black part of the bitmap data 813 is a part of text attribute and is not a part of image attribute, stores the bitmap data 813 in the first layer buffer 509. Furthermore, because there is image attribute in block 802 as the bitmap data 811, the layer selection unit stores bitmap data 809 in the second layer buffer 510. For the attribute information type 812 in the attribute data 811, black indicates a text attribute, gray indicates an image attribute and white indicates that there is no image.
The lossless image compression unit 902 reads the text and graphics bitmap data from the first layer buffer 509 of the buffer unit 508, and performs lossless compression of that data. The lossy image compression unit 903 reads the image bitmap data from the second layer buffer 510 of the buffer unit 508, and performs lossy compression of that data. The lossless attribute compression unit 904 reads attribute information from the attribute information buffer 511 of the buffer unit 508, and performs lossless compression of that information.
The lossless image decompression unit 1002 decompresses compressed data that is inputted from the decompression control unit 1001, and outputs the result to the combining unit 1005. The lossy image decompression unit 1003 decompressed compressed data that is inputted from decompression control unit 1001, and outputs the result to the combining unit 1005. The lossless attribute decompression unit 1004 decompresses compressed data that is inputted from the decompression control unit 1001, and outputs the result to the combining unit 1005. The combining unit 1005 performs a process of combining the outputted data from the lossless image decompression unit 102, the lossy image decompression unit 1003 and the lossless attribute decompression unit 1004, and generates bitmap data. The combining process will be described in detail later with reference to
The combining unit 1005 generates bitmap data based on the output results from the lossless attribute decompression unit 1004. When the output of the lossless attribute decompression unit 1004 indicates a text or graphics attribute, the combining unit 1005 generates the output data from the lossless image decompression unit 1002 as bitmap data. When the output from the lossless attribute decompression unit 1004 indicates an image attribute, the combining unit 1005 generates the output data from the lossy image decompression unit 1003 as bitmap data. Lossless compression of a part of text and graphics can provides high quality in the part of text and graphics of image.
With the first embodiment described above, even when there is an area having a specified attribute such as text or graphics, it is possible to maintain the visual quality of the image having the specified attribute, as well as reduce the file size without further reducing the image quality of the image.
A second embodiment of the present invention arranges the data stored in the buffer unit 508 before performing the compression process of step S304 in the first embodiment.
The controller 111 determines whether or not of the data generated in step S303 there is an image attribute in the data stored in the attribute information buffer 511 (S1201). When the result of judgment in S1201 is (NO), the controller 111 deletes the bitmap data that is stored in the second layer buffer 510 (S1202).
With this second embodiment described above, in processing in block units, it is possible to reduce the file size without a decrease in image quality.
Aspects of the present invention can also be realized by a computer of a system or apparatus (or devices such as a CPU or MPU) that reads out and executes a program recorded on a memory device to perform the functions of the above-described embodiment(s), and by a method, the steps of which are performed by a computer of a system or apparatus by, for example, reading out and executing a program recorded on a memory device to perform the functions of the above-described embodiment(s). For this purpose, the program is provided to the computer for example via a network or from a recording medium of various types serving as the memory device (e.g., computer-readable medium).
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2010-066345, filed Mar. 23, 2010, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2010-066345 | Mar 2010 | JP | national |