WikiPatents - Community Patent Review
Create Free Account  |  License or Sell Your Patent  |  WikiPatents Marketplace  |  WikiPatents Blog
Username:  Password:  
    
Advanced Search
Image processing apparatus and method    
United States Patent6285458   
Link to this pagehttp://www.wikipatents.com/6285458.html
Inventor(s)Yada; Shinichi (Ebina, JP)
AbstractAn image process apparatus, for use with image data combining areas of different image characteristics such as text and photos, which achieves a predetermined target compression rate and simultaneously minimizes quality deterioration after decompression, is described. The image analysis circuit analyzes the composition of the entire image data and calculates the optimum compression parameter. The compression process is performed using a selected compression method for each predetermined block. At the time of compression, the value of the parameter is used in order to select an appropriate compression method by switching compression methods among a plurality of compression methods for each block unit. Using optimum compression minimizes the amount of memory required to store the information.



 Title Information Submit all comments and votes
 
Patent Text Patent PDF Print Page Summary File History
Plain text PDF images Print Summary File History
Drawing from US Patent 6285458
Image processing apparatus and method - US Patent 6285458 Drawing
Image processing apparatus and method
Inventor     Yada; Shinichi (Ebina, JP)
Owner/Assignee     Fuji Xerox Co., Ltd. (Tokyo, JP)
Patent assignment
All assignments
Publication Date     September 4, 2001
Application Number     08/903,381
PAIR File History     Application Data   Transaction History
Image File Wrapper   Patent Term   Fees
Litigation
Filing Date     July 30, 1997
US Classification     358/1.15 358/1.13
Int'l Classification     B41B 001/00
Examiner     Popovici; Dov
Assistant Examiner    
Attorney/Law Firm     Oliff & Berridge, PLC.
Address
Parent Case    
Priority Data     Jul 31, 1996[JP]8-202161
USPTO Field of Search     395/114 395/112 395/115 395/116 395/101 358/426 358/261.1 358/261.2 358/261.3 358/261.4 382/239 382/176 382/180 341/51 341/95 341/63 341/107
Patent Tags     image processing
   
Enter a comma (,) or semicolon (;) between multiple tag words/phrases.
Describe this patent:
 Amusing   
 Clever   
 Complex   
 Efficient   
 Historic   
 Important   
 Innovative   
 Interesting   
 Practical   
 Simple   
[no votes]
Patent WIKI

Share information and news about this patent, including information and news about the technology, inventors, company, ligation and licensing.

 References Submit all comments and votes
 
*references marked with an asterisk below are user-added references
 U.S. References
 
Add a new US reference:  
ReferenceRelevancyCommentsReferenceRelevancyComments
5771340
Nakazato
358/1.15
Jun,1998

[0 after 0 votes]
5611024
Campbell
358/1.15
Mar,1997

[0 after 0 votes]
5535311
Zimmerman
358/1.15
Jul,1996

[0 after 0 votes]
5479587
Campbell
358/1.17
Dec,1995

[0 after 0 votes]
 Foreign References
 Other References
 Market Review Submit all comments and votes
   
Market Size
Estimate the gross annual revenues of the relevant market sector:
> $10B
$5B - $10B
$2B - $5B
$500M - $2B
$100M - $500M
$10M - $100M
$1M - $10M
$500K - $1M
$100K - $500K
< $100K
[No votes]
$0
 
$0   $2.5B   $5B   $7.5B   $10B
Market Share
Estimate the percentage of the relevant market sector this invention will capture:
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Reasonable Royalty
What percentage of gross sales should the inventor or assignee be paid?
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Public's "Guesstimation" of Royalty Value
Market SizeN/A[No votes]
xMarket ShareN/A[No votes]
xReasonable RoyaltyN/A[No votes]

N/A

License Availablity
If you are NOT the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
License Availablity
If you ARE the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
Competitive Advantage
Does this invention have a significant competitive advantage over similar technologies?
Yes

No



[No votes]
Most helpful competitive advantage comment
[No comments]

Commercial Alternatives
Are there viable commercial alternatives for this invention?
Yes

No



[No votes]
Most helpful commercial alternative comment
[No comments]

 Technical Review Submit all comments and votes
 Claims Submit all comments and votes
 


What is claimed is:

1. An image processing apparatus, comprising:

an image input apparatus to input image data related to an image composed of image portions having different image characteristics;

an image data analyzer to analyze the image data in terms of pixel block units to discern the image portions having different image characteristics in the image, and the proportion of such portions with different image characteristics in the image;

an image data compression apparatus having a plurality of different image compression methods; and

a compression mode selector to select, for each pixel block unite an image data compression method from the plurality of different image compression methods based on a determination of the proportional amounts of such image portions having different image characteristics in the image.

2. The image processing apparatus of claim 1, further comprising:

a preset target encoded amount, the target encoded amount resulting from a target compression rate of the image data to be compressed;

a compressed image encoding data output apparatus to output encoded data of the compressed image, the encoded data including a resultant compression rate obtained by the image data compression apparatus;

an encoded amount monitor to monitor the encoded data output by the compressed image encoding data output apparatus; and

an encoded amount comparator to compare the encoded data in the encoded amount monitor with the target encoded amount.

3. The image processing apparatus of claim 2, wherein the compression apparatus is re-selected when the results of a comparison by the encoded amount monitor indicates that the encoded data exceeds the target encoded amount and the results of an analysis by the analyzer.

4. The image processing apparatus of claim 1, wherein said analyzer calculates the proportion of the image portions in the image using the image characteristics of the image portions.

5. The image processing apparatus of claim 1, wherein the image data includes code image data using page descriptive language and wherein the image processing apparatus further comprises:

a rasterizer to interpret the page descriptive language and render the code image data into raster data; and

discernment apparatus for discernment of image attributes of the code image data.

6. The image processing apparatus of claim 1, wherein the image portions include at least one of a background portion, a character or drawing portion, a computer graphics portion, and a scanned image portion.

7. The image processing apparatus of claim 1, wherein the proportion of such image portions is based on image characteristics of at least one of a background image portion, a character or drawing image portion, a computer graphics image portion, and a scanned image portion.

8. The image processing apparatus of claim 1, wherein the proportion of such image portions is determined based on one of the minimum and maximum values of the coordinates for each of the one or more image portions, a count of a number of pixels in each of the one or more image portions, and a count of a number of blocks of a predetermined size in each of the one or more image portions.

9. The image processing apparatus of claim 1, wherein the analyzer determines at least one threshold value from the determined proportion, the selector compares the at least one threshold to a color count of the number of pixel colors in a first image portion, and the selector selects the image data compression method based on the comparison of the at least one threshold to the color count.

10. The image processing apparatus of claim 1, wherein the plurality of different image compression methods includes at least one of a block single-color approximation compression method, a block run-length compression method, a block-internal two-color approximation compression method, an adaptive discrete cosine transform compression method, and a block-internal four-color approximation compression method.

11. The image processing apparatus of claim 1, wherein the selected image data compression method compresses a first image portion into blocks of compressed image data and a tag signal is added to each block, the tag signal identifying the selected image data compression method.

12. An image processing method, comprising:

receiving and converting digital data for an image composed of portions having different image characteristics;

analyzing the digital image data in terms of pixel block units to discern the portions having different image characteristics in the image, and the proportion of such portions of different image characteristic in the image; and

selecting, for each pixel block unit, an image data compression method from a plurality of different image data compression methods based on a determination of the proportional amounts of such portions having different image characteristics in the image.

13. The method of claim 12, further comprising:

determining a target encoded amount resulting from a target compression rate of the image data;

outputting encoded data of an image portion, the encoded data including a resultant compression rate obtained by the selected image data compression method; and

comparing the encoded data with the target encoded amount.

14. The method of claim 13, further comprising selecting a different image data compression method if the results of the comparing step indicate that the encoded data exceeds the target encoded amount.

15. The method of claim 12, wherein the proportion is based on characteristics of at least one of a background image portion, a character or drawing image portion, a computer graphics image portion, and a scanned image portion.

16. The method of claim 15, wherein the proportion is determined based on one of the minimum and maximum values of the coordinates for each of one or more image portions, a count of a number of pixels in each of the one or more image portions, and a count of a number of blocks of a predetermined size in each of the one or more image portions.

17. The method of claim 12, further comprising:

determining at least one threshold value from the determined proportion; and

comparing the at least one threshold value to a color count of the number of pixel colors in an image portion, wherein the selection of a selected image data compression method is based on the comparison of the at least one threshold value to the color count.

18. The method of claim 12, further comprising:

compressing an image portion into blocks of compressed image data using the selected image data compression method; and

adding a tag signal to each block of the compressed image data, the tag signal identifying the selected image data compression method.
 Description Submit all comments and votes
 


BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates to a digital image processing apparatus, and more particularly to compression of the image data.

2. Description of Related Art

In recent years, digital photocopiers which generate a hard copy of a manuscript by reading the manuscript image using an image input apparatus, for example a scanner, digitally processing the input image data, and outputting the digitally processed data to an image output apparatus, for example a printer, have come into widespread use.

In the digital photocopier, it is essential to store a plurality of the image data in the photocopier, have an electronic sorter function which sorts the data (for example, manuscript, files, and edits pages), and to have an electronic RDH function. This is accomplished by equipping the copier with an interval data storage apparatus, for example, random access memory or a hard disk, storing the image data therein and outputting the data as necessary. In order to store a large amount of image data, it is necessary to increase the storage capacity of the storage apparatus, but this results in an increase in the size and cost of the apparatus itself. In order to avoid this, a method of storage that compresses the image data has been proposed. By compressing the image data, it is possible to store a large amount of the image data using smaller-capacity storage apparatus.

Furthermore, the image output apparatus maybe a laser printer. In general, a page descriptive language is used for controlling the method of image output to the printer. A host computer, to which the printer is connected, does not transfer to the printer the output content itself as a bitmap image (raster image) but rather the content of the page descriptive language describing the character and image information of that output content. The printer receives the page descriptive language, internally interprets the language content, render the image data of the page as a bitmap image (raster image), and outputs the image by transferring the image to the paper.

Therefore it is essential to have sufficient printer memory to maintain the bitmap image which renders the image data and a function to interpret the content of the page descriptive language. For example, memory would require 32 megabytes if the output resolution is 400 dpi and the output gradation degree is 256 steps, in the case of a monochrome printer which outputs A3 size paper.

In the case of a color printer, the output of YMCK 4 colors is needed, so the memory capacity becomes four times larger, to 128 megabytes. Obtaining such large memory capacity necessarily increases the size, cost, etc., of the printer itself. To avoid this increase in memory capacity, just like the case of the digital photocopier, the image data can be stored in the compressed format. In doing so, large amounts of image data can be stored using smaller memory capacity.

In the case of compressing the image data and reducing the data capacity, reducing the gradation degree of the image repeatedly and storing the image in a binary state can be considered, however, the quality of the image output which can be eventually obtained deteriorates when the gradation degree is reduced. Thus, in order to store images of high quality, it is better to store the image in a multi-value state rather than in a binary state.

In order to compress this multi-value image data, many methods exist.

With manuscripts output by digital photocopier or printer, it is often the case that text area and photo area co-exist on a single sheet. Additionally, with printer output images, there are many manuscripts that mix both images created by computer, or so-called computer graphics (CG), and photos and other such read-in images scanned from a scanner.

These CG and scanned images each have different image characteristics. For instance, CG image areas include many flat areas in which the pixel values fluctuate either uniformly or not at all. Furthermore, even within the CG image area, the character area in which only the white and black binary exists and the gradation area in which the original element value drastically changes also exists. In contrast, in many instances the scanned images area includes noise picked up during reading by a scanner, causing minute fluctuations in the pixel value.

Additionally, the CG and scanned image boundaries have different image characteristics. For this reason, effectively compressing mixed image data with high quality requires the optimum compression process for each set of image quality characteristics. In order to meet this need for image data mixing small areas having varied image characteristics it is necessary to select the optimum compression process for each area depending on the image characteristics.

An adaptive image compression method has often been proposed. The CG area, often including images requiring a high degree of resolution such as characters, line drawings, and the like, a compression method in which the resolution data does not deteriorate is preferred. For example, reversible compression methods such as MMR, LZW, JBIG and the like and block compression methods such as BTC and the like, in which the gradation data deteriorates but the resolution data does not, are appropriate.

Scanned image areas often include images requiring gradation data more than resolution data, for example photos, natural images, and the like, where a compression method in which the gradation does not deteriorate is preferred. In the case of applying the reversible compression method in which the image does not deteriorate after decompression to the scanned image area, the pixel values severely change in this area and entropy is high, so it is not possible to effectively compress data by the reversible compression method.

Therefore, the non-reversible compression method is applied for the scanned images area. Among the non-reversible compression methods, a method which is able to maintain the gradation data after decompression is used. For instance, there is the Adaptive Discrete Cosine Transform (ADCT) method or the like, typified by the JPEG baseline, which is used as the standard encoding method for color facsimile.

One object of the invention is to select image compression means resulting in a reduction in required memory in an image processing device.

Another object of the invention is to compare the compressed image data to a target and reselect and recompress the data until the target is satisfied.

Additional objects, advantages and novel features of the invention will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations pointed out in the appended claims.

SUMMARY OF THE INVENTION

The present invention has as its main purpose the reduction of the required memory capacity using an adaptive image compression method in a digital photocopier, printer, or the like. The memory capacity is set at less than the original amount of data of the image to be compressed, so the image compression circuit needs to compress the original image data in order for the image data to fit into the memory. Where the compressed image data exceeds the memory capacity, it is not possible to decompress the image data completely, so it is necessary to set the image compression circuit so as to enable the target encoding amount (target compression rate) to fit into the memory and to compress the data in order to clear that compression rate.

When using fixed-length data compression as a compression method, the rate at which the image data is compressed remains fixed and relatively constant no matter what the input image. If this fixed compression rate clears the target compression rate, the encoding data amount will fit within the reduced memory capacity regardless of the input image. In general, however, with fixed length compression the methods in which the image quality deterioration of the decompression image is not striking contribute only marginally to memory capacity reduction because the compression rate is approximately 1/2 to 1/4.

In contrast, in the case of the variable-length compression method, the compression rate varies depending upon the complexity of the image data to be compressed. Furthermore, the compression rate fluctuates depending also on the parameter settings at time of compression, while at the same time, the image quality of the decompression image fluctuates, depending upon the parameter settings. Generally, in the case of the non-reversible variable compression, when the parameters are set so as to increase the compression rate, the image quality tends to deteriorate. Conversely, when setting the parameters so as to improve the image quality of the decompression image, the compression rate tends to deteriorate.

When using the variable compression method with extremely complex images, the compression rate does not reach the target compression rate, and as a result, it is possible to exceed the target encoding amount. In this situation, it is necessary to degrade the image quality and set the parameters so as to increase the compression rate in order to reach the target compression rate.

When compressing mixed CG and scanned images using the adaptive image compression method, which performs the appropriate compression process for each image area, the compression rate fluctuates sharply. The fluctuation rate depends upon both the proportion of each image area having different image characteristics which is included in the input image, as well as the image composition.

For example, when the entire image consists of complex scanned images, and if the adaptive image compression is performed with the parameters set so as to maintain image quality, then the compression rate of the entire image becomes approximately 1/4-1/6. However, if the entire image is CG, consisting of characters, drawings, and the like, with large areas of flat background, then the compression rate becomes 1/100 or more even though the compression parameters are set at the same settings as for the aforementioned entire scanned images.

Because with conventional adaptive image compression the compression rate fluctuates sharply depending upon the image composition, if the input image needs to be less than the target encoding amount, then the minimum compression rate needs to be set at approximately 1/4-1/6, for example, in the case of wholly scanned images. However, it is impossible to effectively reduce the memory capacity with this amount of compression.

If the parameters are set high in order to increase the compression rate of the scanned images, the encoding amount can be held to the target encoding amount. However, when compressing mixed CG scanned images, there is a concern that there will be an overcompression which compresses the image by a compression rate higher than necessary. This results in greater-than-necessary deterioration in image quality when setting the parameters for images in which the scanned images account for a small proportion of the overall image.

When applying the adaptive image compression method to mixed co-scanned images, there are cases which satisfy the target compression rate for the image as a whole even though the compression rate of the scanned image area is low. Thus, prior to the present invention, controlling the compression rate of mixed images was extremely difficult.

The present invention was invented in order to solve the above types of problems. In addition to minimizing deterioration of the decompression image quality, by selecting the optimum compression process for each area for image data mixing small areas having different image characteristics, the invention also analyzes the image composition of the entire image data and reflect the results of that analysis in the selection of the compression process method of each area, providing an image processing apparatus which is able to attain the target compression rate for the entire image.

The image processing apparatus of the present invention has a selection means which selects from among a plurality of compression means which covers a certain area of the image data input by the input means. The plurality of compression means consists of different compression methods. Additionally, the apparatus has an analysis means which analyzes the image characteristics of the entire image data and a selection means structured so as to select the compression means depending upon the results of the analysis performed by the analysis means.

Thus, image data from the input means is obtained and is analyzed by the analysis means to determine what areas having which kinds of image characteristics exist therein--in other words, the image composition of the entire image data is analyzed and the compression parameters set for each of a plurality of compression methods. During compression, the optimum compression method is selected from among the plurality of the compression methods as per the analysis results per area, and it is possible to achieve the target compression rate for the entire image data because the compression parameter value is used as an entire image data.

In another embodiment, the image processing apparatus is constructed so as to enable the analysis means to calculate the proportion of areas having different image characteristics included in the image data. Thus, by setting the compression parameter to reflect the area ratio (which is easily grasped by sight) it is possible to minimize the image deterioration of the decompression image while achieving the target compression rate.

A further embodiment of the image processing apparatus maintains the amount of the encoding data as a target encoding amount which shows the compression rate of the entire image targeted, and outputs the compression rate as encoded data by the compression means which was selected by the selection means. The image processing apparatus can monitor the encoding amount of this encoding data by the encoding amount monitoring means, and can compare the encoding amount with the target encoding amount by the encoding amount comparison means.

In this manner, it is possible to achieve the target compression rate by managing both the compression rate of the targeted image data and the compression rate achieved by the compression means selected by using the compression rate as the encoding data amount, and thus being able to understand the status at any time.

In addition, the image processing apparatus is constructed so as to change the analysis result and redo the selection of the compression means whenever the encoding amount obtained from the encoding amount monitoring means exceeds the target encoding amount, as compared by the encoding amount comparison means. Thus, when the target encoding amount is exceeded during compression by management of the encoding amount the compression parameters are changed to reflect the image characteristics and the compression method is reselected. Thus, it is possible to achieve the target compression rate because of this feedback function.

In another embodiment, the image processing apparatus has an input means which inputs the coded image data into page description language (PDL), a rasterizing means for the rasterization of PDL image data, a plurality of compression means consisting of different compression methods, a compression means which covers a certain area of the raster data, and a selection means which selects from the plurality of compression means. Moreover, the image processing apparatus has a discernment means which discerns the image attributes of the entire coded image data, and the selection means is constructed so as to select the compression means according to the discernment result.

When used for printers and the like, the image data described by the page description language is received by the printer, and this described code is interpreted and rendered into the raster image; and simultaneously, the image composition and characteristics of the entire image are discerned from the described code. Based upon this discernment result, compression is performed by selecting for each area, from among the plurality of compression methods, that compression means which should cover the raster image data and the results stored in the code memory.

Additionally, the image processing apparatus is constructed so as to obtain by the discernment means the area proportion of the area which is included in the code image data having different image attributes. Therefore, compression parameters reflecting area ratios easily grasped by sight are set and it is possible to minimize the image quality deterioration of the decompression while achieving the target compression rate.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram depicting the encoding circuit of the invention.

FIG. 2 is a block diagram depicting the compression mode switching circuit of the invention.

FIG. 3 is a block diagram depicting the decoding circuit of the invention.

FIG. 4 is a diagram depicting one example of the encoding data format of the preferred embodiment.

FIG. 5 is a block diagram depicting the encoding circuit of the second embodiment.

FIG. 6 is a general diagram depicting the band raster of the second embodiment.

FIG. 7 is a flow chart depicting the encoding process of the second embodiment.

FIG. 8 is a block diagram depicting the encoding circuit of the third embodiment.

FIG. 9 is a block diagram depicting the compression mode switching circuit of the third embodiment.

FIG. 10 is a block diagram depicting the ADCT compression circuit of the third embodiment.

FIG. 11 is a diagram depicting one example of the quantization table of the third embodiment.

FIG. 12 is a block diagram depicting the decomposition circuit of the third embodiment.

FIG. 13 is a block diagram depicting the ADCT decomposition circuit of the third embodiment.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The following explains in detail the image processing apparatus of the embodiments of the present invention by referring to the drawings. In the following explanation, a monochrome image data consisting of an image of 8 bits/pixel is used as the original image data, However, the present invention is not limited to this. The full color image of 24 bits/pixel of RGB, LTaTbT, YCrCb, XYZ, Luv and the like, or the full color image total of 32 bit/pixel of YMCK for each 8 bits/pixel are also applicable. The bit number for per pixel can be either 8 or 16 bits; either is possible.

Figure one is a block figure which shows an example of the composition of the encoded circuit of the image processing apparatus of the first embodiment. A picture block size of 4.times.4 is used for this explanation even though this embodiment is not limited to this. The image data, which is input from the image input apparatus 1 acting as the input means, is sent to the image analysis buffer 3 of the image analysis circuit 2 acting as a temporary analysis means. The image composition analysis circuit 4 analyzes the construction included within the image by referring to the data of the image analysis buffer 3.

The optimum compression parameter calculation circuit 5 refers to the analysis result of the image composition analysis circuit 4 and determines the threshold value which is used to determine the logic and therefore which compression method is selected per block. This optimum compression parameter calculation circuit 5 sets the threshold parameters so as to keep the compression rate of the entire image below the target compression rate.

For example, if the image is complex and there is a possibility of being unable to achieve the compression rate which the image processing apparatus targets, the apparatus sets the threshold value which most often determines the compression mode which is able to achieve the higher compression rate. In the case of a simple image, the apparatus sets the threshold value which determines a compression mode in which there is a low compression rate but a better image quality. As a result, it is possible to bring the compression rate of the entire image closely to the compression rate that the apparatus targets.

After the above image analysis process is completed, the image compression process begins. In the raster block conversion circuit 6, the input image is broken into 4.times.4 pixel block units and sent to the compression mode switching circuit 7. The compression mode switching circuit 7 selects which compression method is applicable among the plurality of the compression methods, based upon the threshold value information obtained from the optimum compression parameter calculation circuit 5. In this embodiment, the compression mode switching circuit 7 is a selectable compression method with four compression modes: block single-color approximation compression mode, block run-length compression mode, block-internal two-color approximation compression mode, and block-internal four-color approximation compression mode.

The encoding data composition circuit 8 treats per-block encoding data as a single unit and adds in front of that data a tag signal which shows the selected compression circuit. In addition, it aligns the encoding data which is output from the four compression circuits in one bit stream and outputs it as encoding data.

The following explains each construction element of this embodiment in detail.

The image input apparatus 1 is the interface which receives a raster image. Just like a scanner, the image input apparatus 1 is considered to read the manuscript and convert the image into digital data; and like an external interface, the image input apparatus 1 receives the image from the outside network directly as digital data, or the circuit which receives the raster data from a decomposer which outputs the raster image data in the case of a post script printer.

The raster block conversion circuit 6 is the circuit which outputs the 4.times.4 pixel as one unit as one block.

The image analysis circuit 2 consists of the image analysis buffer 3, the image composition analysis circuit 4, and the optimum compression parameter calculation circuit 5, and analyzes the image data received from the image input apparatus 1. The image analysis circuit 2 receives one page of image data from the image input apparatus 1 and then stores it in the image analysis buffer 3.

By referring to the data in the image analysis buffer 3, the image composition analysis circuit 4 analyzes the composition which is included within the image. In other words, different areas included within the image having different image characteristics--for example, characters/drawings, CG, and scanned images areas--are discerned, the coordinates which the area covers, the largest gradation number within the area, and its degree of complexity are determined and the area proportion per area is calculated.

In this embodiment, the image composition analysis circuit 4 calculates each area proportion of (1) background area, (2) character/drawing area, (3) CG area, and (4) scanned images area, and outputs that area proportion to the optimum compression parameter calculation circuit 5. By referring to the results from the image composition analysis circuit 4, the optimum compression parameter calculation circuit 5 determines the threshold value which is used in the logic which determines which compression method is selected per block.

The minimum and maximum values of the coordinates of each area can be used to calculate this area proportion for each area. In addition, a counter to count the number of pixels included in each area can be installed and the count value of this counter can be taken as the area. It is also appropriate to install the counter, which breaks the input image into blocks of a predetermined size and counts the number of blocks included in each area, and the count of this new counter can be taken as the area.

The compression mode switching circuit 7, which acts as a selection means, selects which compression method is suitable for each block among the plurality of compression methods, based upon the threshold value information obtained from the optimum compression parameter calculation circuit 5. The details of the compression mode switching circuit 7 are shown in FIG. 2. The compression mode switching circuit 7 is able to select among these four modes: block-internal single-color approximation compression mode, block run-length compression mode, block-internal two-color approximation compression mode, and block-internal four-color approximation compression mode.

The following is a detailed explanation of each compression method.

First, the block-internal single-color approximation compression mode is the compression method which approximately expresses the entire block in one color. It calculates the average of the pixel values within the entire block, and expresses the entire block as an average value. In the case of the 8 bit/pixel 4.times.4 pixel block, the original data amount can be expressed below as:

8 bit/pixel.times.(4.times.4)=128 bit/block

The encoded data amount of the single-color approximation compression mode within the block is only the 8 bit which shows the average value, so the compression rate can be expressed as:

8/128=1/16

This compression mode applies to solid areas where a relatively high-resolution expression is not needed, such as areas of uniform pixel values like image backgrounds, etc., average uniform colors of thick lines and CG graphics and the like.

The block run-length compression mode is the mode which approximately expresses both the number of identical blocks that continue (run-length), and the entire block, as one color. For such blocks, after performing the block-internal single-color approximation process, the number of blocks through which identical blocks continue is counted, encoded, and output as continuous numbers and run length.

The encoded data amount of the block run-length compression mode combines the 8 bit which shows the average value in the block and the 8 bit which shows the run length, for 8+8=16 bit. The compression rate of this mode fluctuates depending on the value which the run-length can take. As the run-length becomes larger, the compression rate increases, and as the run-length becomes smaller, the compression rate declines.

In case of the minimum value 2 of the run length, the compression rate is:

16/(128+128)=1/8

Thus, the compression rate of this block run-length compression mode becomes 1/8 or more. This compression mode is applied to those areas which do not need comparatively high-resolution expression, in which the uniformed pixel value continues over a wide range such as the background area of the image and the like.

The block-internal two-color approximation compression mode is the compression method which approximately expresses the entire block with two colors. The number of colors within the block is counted and when the number of colors is less than two, the two colors becomes the representative colors of the block. When the number of colors within the block is three, the block is expressed by approximating the pixel value within the block as two colors.

The method which approximately expresses using two colors for the pixel value within the block is able to be adapted to existing limited color techniques, such as the median cut method. The encoding data amount of the block-internal two-color approximation compression mode consists of the central value of the block .times.2 and the pixel flag which shows which central value each pixel becomes.

The two central values is shown by each 8 bit and the pixel flag per pixel can be indicated by 1 bit per pixel. In the case of the 4.times.4 block, the data amount of the pixel flag is:

4.times.4.times.1 bit=16 bit.

Furthermore, the data amount of the central value is

8+8=16 bit

Therefore, the encoding data amount of the block-internal two-color approximation compression mode is:

16+16=32 bit. Thus, the compression rate of this mode is 32/128=1/4.

This compression mode is applied to areas which require picture quality of comparatively high resolution and which include the pixel value of two colors within the block. It is applied, for example, to areas which include the edges of characters/drawings and the like and areas which include the dither matrix of the dither, etc., and CG gradations.

The block-internal four-color approximation compression mode is the compression method which approximates the entire block using four colors. The number of colors within such block is counted and the four colors become the central value of the block where the number of colors is four or less. Where there are five or more colors the pixel value of the block is approximated and expressed using four colors. The method which approximates and expresses the pixel value within the block using four colors can be adapted to the established limited color techniques just like the block-internal two-color approximation compression mode.

The encoding data amount of the four-color approximation mode within the block consists of the central value .times.4 and the pixel flag which shows which central value out of four will apply to each pixel. The four central values are shown by each 8 bit and it is possible that the pixel flag per pixel is shown by 2 bit. In the case of the 4.times.4 block, the data amount of the pixel flag is:

4.times.4.times.2 bit=32 bit.

Moreover, the data value of the central value is

8.times.4=32 bit. Therefore, the encoding data amount of the block-internal two-color approximation compression mode is

32+32=64 bit.

Thus, the compression rate of this mode is

64/128=1/2.

This compression mode applies to areas which need picture quality of comparatively high resolution, which include many colors within the block. For instance, it applies to areas which include scanned images and complicated CG.

The encoding data composition circuit 8 (FIG. 1) takes the encoding data per block as one unit and adds the tag signal which shows the compression circuit which was selected before the encoding.

The addition of a tag signal per block is because the encoding data length comprising one block differs with each compression mode. The bit number of the tag signal, even at minimum, needs enough bits to show independently the compression circuit. In this embodiment, because four circuits are used for the compression circuit, it is good to have two bits or more for the tag signal. The first embodiment uses 2 bits as the tag signal. FIG. 4 shows the format of the encoding data in each compression mode.

The compression mode switching circuit 7 receives the block image consisting of the 4.times.4 pixel from the raster block conversion circuit 6 and calculates how many kinds of pixel values within the block are available, that is, the number of colors within the block, using the block-internal color-count circuit 21 (FIG. 2). The block-internal color-count circuit 21 sends this color-count to comparator (1) 22.

Comparator (1) 22 compares the value calculated by the optimum compression parameter calculation circuit 5, which is the threshold value 1, with the color-count. As a result, if the number of colors is more than the threshold, then the process continues on to processing by comparator (2) 23, and if the number of colors is less than the threshold, then the process continues on to processing by comparator (3) 24.

Comparator (2) 23, just like comparator (1) 22, compares threshold value 2 which is calculated by the optimum compression parameter calculation circuit 5 with the number of colors. As a result, if the number of colors is more than the threshold value 2, then the block-internal four-color approximation mode is chosen as the compression mode for this block. If the number of colors is less than the threshold value 2, then the block internal two-color approximation mode is chosen as the compression mode.

Comparator (3) 24, just like comparator (1) 22 and comparator (2) 23, compares the optimum compression parameter calculation circuit 5 with the colors. As a result, if the number of colors is more than the threshold value 3, then the single-color approximation compression mode within the block is chosen as the compression mode. If the number of colors is less than the threshold value 3, then the block run-length compression mode is chosen as the compression mode. Selection circuit 25 refers to those determinations and switches the input block image to the appropriate compression circuit.

FIG. 3 is a block figure which shows an example composition of the encoded circuit of the image processing apparatus of this embodiment. The encoded data which is output from the encoding data composition circuit 8 is sent to the tag signal separation circuit 9 and a predetermined number of bits of the tag signal is first separated from the peak data and isolated as the tag signal.

Depending upon the content of this tag signal, it is possible to determine which compression mode compresses the succeeding encoding data line. Because the code length of one block differs depending upon the compression mode selected, a one-block selection of the encoding data is read out from the succeeding data depending upon this compression mode.

For example, from the encoding data 8 bit is read out in the block-internal single-color approximation compression mode, 16 bit in the block run-length compression mode, 32 bit in the block-internal two-color approximation compression mode, and 64 bit in the block-internal four-color approximation compression mode. The read-out encoding data is sent to the input switching circuit 10.

Depending upon the tag signal, the input switching circuit 10 selects the decompression circuit appropriate to the encoding data from the plurality of decompression circuits 11 and sends the encoding data to the decompression circuit. Depending upon the compression circuit, the decompression circuit 11 has four decompression circuits: the block single-color approximation decompression circuit, block run-length decompression circuit, block-internal two-color approximation decompression circuit, and block-internal four-color approximation decompression circuit.

The block-internal single-color approximation decompression circuit receives 8 bits of the encoding data, takes this to be the average value within the block, paints the entire block with this average value, and outputs the result.

The block run-length decompression circuit receives 16 bits of encoding data and takes the first eight bits as the average value within the block and interprets the last eight bits as the run-length. This decompression circuit outputs continuously only the run-length number of blocks in which the entire block has been painted with this average value.

The block-internal two-color approximation decompression circuit receives 32 bits of the data and considers the first 8 bits to be the first block central value and the second 8 bits as the second block central value. It then disassembles the remaining 16 bits one by one and matches each to one block consisting of the 4.times.4 pixel=16 pixels to create a flag showing the central value corresponding to the position of each pixel. The flag per pixel is checked and if the flag is "0" the first central value for the pixel of the position is applied. If the flag is "1" the second central value is applied. This operation is carried out in one-block segments for one block and outputs one block of image data.

The block-internal four-color approximation decompression circuit receives 64 bits of data and disassembles the lead bits into four segments of 8 bits each, or 32 bits in total into four central values. The remaining 32 bits are broken up into two-bit segments matching each 4.times.4 pixel with two bits and creates a flag which shows the central value corresponding to the position of each pixel.

The flag is checked at each pixel and if the flag is "00" the first central value is applied to the pixel in that position. If the flag is "01", the second central value is applied. If the flag is "11" and "12", then the third and fourth central values are applied, respectively. This operation is carried out in one-block segments and outputs one block of image data.

As described above, there is virtually no numeric value arithmetic process in any decompression circuit, rather a simple logical operation is used. Compared with the compression circuit, the decompression circuit has a fairly simple construction. This makes image decompression with high speed possible. This is because decompression from the encoding data to the image data needs to be synchronized with the image output apparatus such as the printer and the like, and it is possible to output the image with high speed by simplifying the decompression circuit and gaining decompression speed.

The decompressed single-block section of the image data goes through the output switching circuit 12 which moves