IMAGE PROCESSING APPARATUS, IMAGE PROCESSING PROGRAM, AND IMAGE PROCESSING METHOD

The image processing device and method optimize compression by evaluating color distribution and area ratios to determine appropriate processing, enhancing data reduction and image quality for diverse image types.

JP7564736B2Active Publication Date: 2024-10-09SHARP KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021034957
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-05
Publication Date
2024-10-09
Estimated Expiration
2041-03-05

AI Technical Summary

Technical Problem

Existing image processing technologies fail to appropriately determine whether to perform index color processing or full color processing on input image data, leading to reduced compression rates and image quality deterioration, especially for images with natural content or color unevenness.

Method used

An image processing device and method that evaluates the color distribution, photographic area ratio, and color uniformity area ratio to determine whether to perform index color processing (with color reduction and reversible compression) or full color processing (without color reduction) based on derived reference values.

Benefits of technology

Enables appropriate determination of compression methods to reduce data amount while maintaining image quality, effectively addressing the limitations of existing technologies by optimizing compression for various image types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007564736000001
    Figure 0007564736000001
  • Figure 0007564736000002
    Figure 0007564736000002
  • Figure 0007564736000003
    Figure 0007564736000003
Patent Text Reader

Abstract

To determine that it is appropriate to perform index color processing in which input image data is subjected to color reduction processing and then compression processing using a lossless compression method, or full-color processing in which input image data is compressed using a lossy compression method without color reduction processing in order to reduce the amount of data while suppressing deterioration in image quality.SOLUTION: A multifunction machine (10) according to the present invention includes a color number conversion determination unit 200. The color number conversion determination unit 200 determines whether it is appropriate to perform indexed color processing or full color processing on the basis of the degree of color distribution, which is the degree of distribution of the pixel values of each pixel data included in input image data Dj, and a ratio of photographic area pixel data constituting a photographic area to the pixel data, and a color uniform area ratio which is the ratio of white background area pixel data that constitutes a white background area to the pixel data.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device, an image processing program, and an image processing method, and in particular to an image processing device, an image processing program, and an image processing method that determine whether it is appropriate to perform color reduction processing on input image data and then perform compression processing using a lossless compression method, or whether it is appropriate to perform compression processing using a lossy compression method on the input image data without performing color reduction processing, with the intention of reducing the amount of data while suppressing deterioration in image quality. [Background technology]

[0002] An example of this type of technology is disclosed in Patent Document 1. According to the technology disclosed in Patent Document 1, color separation is performed on input image data (color image data) by simple clustering. Then, for input image data with a relatively large number of colors after color separation, the input image data is considered to include natural images such as photographs, and compression processing is performed using a method suitable for full-color image data. On the other hand, for input image data with a relatively small number of colors after color separation, most of the colors included in the input image data are considered to be the colors of characters or background (base material), and color reduction processing is performed, followed by compression processing using a method suitable for index color image data after the color reduction processing. In this way, appropriate processing including compression processing is performed based on the number of colors after color separation, so that the amount of data can be reduced while suppressing deterioration of image quality.

[0003] Although not explicitly stated in Patent Document 1, a compression process using a lossy compression method such as JPEG is considered to be suitable for full-color image data. On the other hand, a compression process using a lossless compression method is considered to be suitable for index color image data after color reduction processing, since a lossy compression method cannot be used. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2003-298853 A Summary of the Invention [Problem to be solved by the invention]

[0005] In the technology disclosed in Patent Document 1, for input image data having a relatively small number of colors after color separation, even if the input image data includes a natural image such as a photograph (having a relatively small number of colors), and especially if the size of the natural image such as a photograph is relatively large, a color reduction process is performed and then a compression process using a lossless compression method is performed. However, for such input image data, since there is a discontinuity in color (pixel value) between each pixel constituting a natural image such as a photograph, if a color reduction process is performed and then a compression process using a lossless compression method is performed, the compression rate is reduced and the expected reduction effect in data volume cannot be obtained. Therefore, even if the input image data has a relatively small number of colors after color separation, if the input image data includes a natural image such as a photograph having a relatively large size, it is appropriate to perform a compression process using a lossy compression method such as JPEG without performing a color reduction process, as in the case of processing input image data having a relatively large number of colors after color separation. In addition, even if the input image data having a relatively small number of colors after color separation contains a natural image such as a photograph, if the dimensions of the natural image such as a photograph are relatively small, that is, if the impact of a decrease in the compression rate of the natural image such as a photograph on the overall reduction in data volume is relatively small, it is appropriate to perform a color reduction process and then perform a compression process using a lossless compression method.

[0006] Also, for example, when the input image data is image data (strictly speaking, unprocessed RAW data) read by an image reading device such as an image scanner, and the background area in the input image data is a color background, or when the input image data includes a solid-colored area, color unevenness may occur in the color background or the solid-colored area. In the technology disclosed in Patent Document 1, even if the input image data has such color unevenness, particularly if the color unevenness is present over a relatively large area, if the number of colors after color separation is relatively small, a color reduction process is performed and then a compression process using a lossless compression method is performed. However, for input image data having color unevenness over such a relatively large area, even if the number of colors after color separation is relatively small, it is appropriate to perform a compression process using a lossy compression method such as JPEG without performing a color reduction process, for the same reason as in the case where the input image data includes a natural image such as a relatively large-sized photograph. In addition, even if input image data with a relatively small number of colors after color separation contains color unevenness, if the area with the color unevenness is relatively small, it is appropriate to perform color reduction processing and then compression processing using a lossless compression method.

[0007] In other words, the technology disclosed in Patent Document 1 may not be able to properly determine whether it is more appropriate to perform index color processing, in which input image data is subjected to color reduction processing and then compressed using a lossless compression method, with the aim of reducing the amount of data while suppressing degradation in image quality, or full color processing, in which input image data is compressed using a lossy compression method without being subjected to color reduction processing.

[0008] Therefore, an object of the present invention is to provide a new image processing device, image processing program, and image processing method that can appropriately determine whether index color processing or full color processing is appropriate to perform, with the aim of reducing data volume while suppressing deterioration in image quality. [Means for solving the problem]

[0009] To achieve this object, the present invention includes a first invention relating to an image processing device, a second invention relating to an image processing program, and a third invention relating to an image processing method.

[0010] The first invention relating to the image processing device includes a color distribution degree deriving means, a photographic area ratio deriving means, a color uniformity area ratio deriving means, and a determining means. The color distribution degree deriving means derives (in a sense, evaluates) a color distribution degree which is a distribution degree of pixel values ​​of each pixel data included in the input image data. The photographic area ratio deriving means derives a photographic area ratio which is a ratio of photographic area pixel data constituting a photographic area among all pixel data included in the input image data. The color uniformity area ratio deriving means derives a color uniformity area ratio which is a ratio of color uniformity area pixel data constituting a color uniform area in which pixel values ​​can be considered to be uniform among all pixel data included in the input image data. Then, the determining means determines whether it is appropriate to execute index color processing or full color processing based on the color distribution degree, the photographic area ratio, and the color uniformity area ratio. Here, the index color processing is a process in which a color reduction process is performed on the input image data, and then a compression process using a lossless compression method is performed. Full-color processing is processing in which input image data is compressed using a lossy method without being subjected to color reduction processing.

[0011] The determining means determines that it is appropriate to perform index color processing only when, for example, the color distribution degree is smaller than a first reference value, the photographic area rate is smaller than a second reference value, and the color uniform area rate is larger than a third reference value, and otherwise determines that it is appropriate to perform full color processing.

[0012] The color distribution degree derivation means may include, for example, a judgment color reduction means and a color distribution degree derivation execution means. The judgment color reduction means divides the color space, which is the coordinate space of the input image data, into small spaces of a predetermined number of colors by performing judgment color reduction processing by a median division method (median cut method) on the input image data. Then, the color distribution degree derivation execution means derives the color distribution degree based on the dimensions of the small spaces after division by the judgment color reduction means into the predetermined number of colors.

[0013] Furthermore, the judgment color reduction means may divide the color space into an achromatic color space that can be regarded as an achromatic color space, and a chromatic color space that can be regarded as a chromatic color space, and then divide the color space including the achromatic color space and the chromatic color space into small spaces equal to the aforementioned specified number of colors.

[0014] In addition, the judgment color reduction means may divide the color space into one achromatic color space and two or more predetermined number of chromatic color spaces, and then divide the color space including these achromatic color space and chromatic color space into small spaces equal to the aforementioned predetermined number of colors.

[0015] In addition, the photographic area ratio derivation means may include, for example, an entropy derivation means, a photographic area block determination means, and a photographic area ratio derivation execution means. The entropy derivation means derives, for each block which is a group of pixel data of a predetermined number of units included in the input image data, an entropy which is a feature amount of a histogram of pixel values ​​of pixel data included in the block. The photographic area block determination means determines, for each block, whether or not the block is a photographic area block constituting a photographic area based on the entropy. Then, the photographic area ratio derivation execution means derives, as the photographic area ratio, the ratio of the number of photographic area blocks to the number of all blocks.

[0016] Here, the entropy deriving means may derive the entropy in a state in which character region pixel data constituting a character region is excluded from the pixel data included in each block.

[0017] The color uniformity area ratio deriving means may include a specifying means and a color uniformity area ratio derivation executing means. The specifying means specifies a predetermined number of pixel data items that can be regarded as having uniform pixel values ​​as a color uniformity area ratio. region The color uniformity area ratio deriving execution means determines the color uniformity ratio for the number of all pixel data. region The ratio of the number of pixel data is derived as a color uniform area ratio.

[0018] Alternatively, the specifying means may specify pixel data whose pixel values ​​can be regarded as values ​​representing white color as a color uniformity. region In this case, the color uniformity area ratio deriving execution means may specify the color uniformity area ratio for the number of all pixel data. region The ratio of the number of pixel data is derived as a color uniform area ratio.

[0019] The input image data in the first aspect of the present invention includes image data read by an image reading device that reads an image of a document.

[0020] A second aspect of the present invention, which relates to an image processing program, causes a computer to execute a color distribution degree deriving procedure, a photographic area rate deriving procedure, a color uniform area rate deriving procedure, and a judgment procedure. In the color distribution degree deriving procedure, a color distribution degree, which is a distribution degree of pixel values ​​of each pixel data included in the input image data, is derived. In the photographic area rate deriving procedure, a photographic area rate, which is a ratio of photographic area pixel data constituting a photographic area among all pixel data included in the input image data, is derived. In the color uniform area rate deriving procedure, a color uniform area rate, which is a ratio of color uniform area pixel data constituting a color uniform area in which the pixel values ​​can be considered to be uniform among all pixel data included in the input image data, is derived. Then, in the judgment procedure, whether it is appropriate to execute index color processing or full color processing is judged based on the color distribution degree, the photographic area rate, and the color uniform area rate. Here, the index color processing is a process of performing a lossless compression method compression process after performing a color reduction process on the input image data, as in the first invention. Full-color processing is processing in which input image data is compressed using a lossy method without being subjected to color reduction processing.

[0021] The third invention of the present invention, which relates to an image processing method, includes a color distribution degree deriving step, a photographic area rate deriving step, a color uniform area rate deriving step, and a judgment step. In the color distribution degree deriving step, a color distribution degree, which is a distribution degree of pixel values ​​of each pixel data included in the input image data, is derived. In the photographic area rate deriving step, a photographic area rate, which is a ratio of photographic area pixel data constituting a photographic area among all pixel data included in the input image data, is derived. In the color uniform area rate deriving step, a color uniform area rate, which is a ratio of color uniform area pixel data constituting a color uniform area in which pixel values ​​can be considered to be uniform among all pixel data included in the input image data, is derived. Then, in the judgment step, it is judged whether it is appropriate to execute the first process or the second process based on the color distribution degree, the photographic area rate, and the color uniform area rate. Here, the index color process is a process in which, as in the first and second inventions, a color reduction process is performed on the input image data, and then a compression process is performed by a lossless compression method. Full-color processing is processing in which input image data is compressed using a lossy method without being subjected to color reduction processing. Effect of the Invention

[0022] According to the present invention, it is possible to appropriately determine whether it is more appropriate to perform index color processing, in which input image data is subjected to color reduction processing and then compressed using a lossless compression method, or full color processing, in which input image data is compressed using a lossy compression method without undergoing color reduction processing, with the aim of reducing data volume while suppressing deterioration in image quality. [Brief description of the drawings]

[0023] [Figure 1] FIG. 1 is a block diagram showing the electrical configuration of a multifunction peripheral according to a first embodiment of the present invention. [Diagram 2] FIG. 2 is a memory map conceptually showing the internal configuration of the RAM of the main storage unit in the first embodiment. [Diagram 3]FIG. 3 is a block diagram showing a detailed configuration of an image processing unit related to the image scanner function in the first embodiment. [Figure 4] FIG. 4 is a block diagram showing a detailed configuration of the color number conversion determination unit in the first embodiment. [Diagram 5] FIG. 5 is a diagram for explaining the procedure of color distribution determination processing by the color distribution determining unit in the first embodiment. [Figure 6] FIG. 6 is another diagram for explaining the procedure of the color distribution determination process by the color distribution determination unit in the first embodiment. [Figure 7] FIG. 7 is yet another diagram for explaining the manner in which the color distribution determination process is performed by the color distribution determination unit in the first embodiment. [Figure 8] FIG. 8 is a flowchart showing a part of the flow of the color distribution determination process by the color distribution determination unit in the first embodiment. [Figure 9] FIG. 9 is a flowchart showing the flow of the remaining part of the color distribution determination process by the color distribution determination unit in the first embodiment. [Figure 10] FIG. 10 is a flowchart showing a part of the flow of the photo determination process by the photo determination unit in the first embodiment. [Figure 11] FIG. 11 is a flowchart showing the flow of the remaining part of the photo determination process by the photo determination unit in the first embodiment. [Figure 12] FIG. 12 is a flowchart showing the flow of the white background determination process by the white background determination unit in the first embodiment. [Figure 13] FIG. 13 is a flowchart showing the flow of the final judgment process by the final judgment unit in the first embodiment. [Figure 14] FIG. 14 is a block diagram showing a detailed configuration of a color number conversion determination unit in the second embodiment of the present invention. [Figure 15] FIG. 15 is a diagram for explaining the procedure of color distribution determination processing by the color distribution determining unit in the second embodiment. [Figure 16] FIG. 16 is a flowchart showing a part of the flow of the color distribution determination process by the color distribution determination unit in the second embodiment. [Figure 17]FIG. 17 is a flowchart showing the flow of the remaining part of the color distribution determination process by the color distribution determination unit in the second embodiment. [Figure 18] FIG. 18 is a block diagram showing a detailed configuration of a color number conversion determination unit in the third embodiment of the present invention. [Figure 19] FIG. 19 is a diagram conceptually showing the configuration of a color uniformity count table in the third embodiment. [Figure 20] FIG. 20 is a flowchart showing the flow of unevenness determination processing by the unevenness determination unit in the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0024] [First Example] A first embodiment of the present invention will be described with reference to a multifunction device 10 shown in FIG.

[0025] The multifunction device 10 according to the first embodiment has multiple functions such as a copy function, a printer function, an image scanner function, a fax function, etc. For this reason, the multifunction device 10 includes an image reading unit 12, an image processing unit 14, an image forming unit 16, a control unit 18, an auxiliary storage unit 20, a communication unit 22, an operation unit 24, etc. These are connected to each other via a common bus 30.

[0026] The image reading unit 12 is an example of an image reading means. That is, the image reading unit 12 performs image reading processing by reading an image of an original (not shown) and outputting two-dimensional read image data corresponding to the image of the original. Such an image reading unit 12 includes an original placement table (not shown) on which an original is placed. In addition, the image reading unit 12 includes an image reading unit including a light source, a plurality of mirrors, lenses, a line sensor, and the like (not shown). Furthermore, the image reading unit 12 includes a drive mechanism (not shown) for moving the image reading unit. In addition, the image reading unit 12 includes an A / D conversion circuit and a shading correction circuit (not shown). The A / D conversion circuit converts an analog image signal output from the line sensor into image data that is a digital image signal. The shading correction circuit performs shading correction processing on the image data converted by the A / D conversion circuit to remove distortion (uneven density) caused by various factors including the illumination system (light source, etc.), optical system (mirrors, lenses, etc.) and imaging system (line sensor, etc.) of the image reading unit. The image data after the shading correction process is output as read image data from the image reading unit 12. Note that the image reading unit 12 may include an automatic document feeder (ADF) (not shown) which is one of optional devices.

[0027] The image processing unit 14 is an example of an image processing means. That is, the image processing unit 14 accepts input of various image data such as the above-mentioned scanned image data, and performs appropriate image processing on the input image data, so to speak, the input image data. This image processing unit 14 will be described in detail later.

[0028] The image forming unit 16 is an example of an image forming means. That is, the image forming unit 16 performs image forming processing, in which an image based on appropriate print data is formed, that is, printed, on paper as a sheet-like image recording medium (not shown). This image forming processing is performed, for example, by a known electrophotographic method. For this reason, the image forming unit 16 includes a photosensitive drum, a charging device, an exposure device, a developing device, a transfer device, a fixing device, a cleaning device, a static elimination device, and the like (not shown). The paper on which an image is formed by the image forming processing by the image forming unit 16, that is, the printed matter, is discharged to a paper discharge tray (not shown). The image forming unit 16 can handle both black and white and color image forming processing. The image forming unit 16 is not limited to the electrophotographic method, and may be, for example, an inkjet method.

[0029] The control unit 18 is an example of a control means that controls the overall operation of the multifunction device 10. The control unit 18 has a computer, such as a CPU 18a, as a control execution means. The control unit 18 also has a main memory unit 18b as a main memory means that can be directly accessed by the CPU 18a. The main memory unit 18b includes, for example, a ROM and a RAM (not shown). The ROM stores a control program for controlling the operation of the CPU 18a, that is, firmware. The RAM, on the other hand, constitutes a working area and a buffer area when the CPU 18a executes processing based on the control program.

[0030] The auxiliary storage unit 20 is an example of an auxiliary storage means, and includes, for example, a hard disk drive (not shown). The auxiliary storage unit 20 stores various data, such as image data after image processing by the image processing unit 14, as necessary.

[0031] The communication unit 22 is an example of a communication means. The communication unit 22 is connected to a communication network (not shown) to perform two-way communication via the communication network. The communication network referred to here includes a LAN, the Internet, a public switched telephone network, and the like. The LAN also includes a wireless LAN, particularly Wi-Fi (registered trademark).

[0032] The operation unit 24 has a touch panel 24a as an example of an operation receiving means and a display 24b as an example of a display means, that is, the display 24b with the touch panel 24a. Although detailed illustration is omitted, the touch panel 24a is a substantially transparent rectangular sheet-like member, and the display 24b has a substantially rectangular display surface. The touch panel 24a is provided so as to overlap the display surface of the display 24b, thereby forming the display 24b with the touch panel 24a. The touch panel 24a is, for example, a capacitive panel, but is not limited to this, and may be other types of panels such as an electromagnetic induction type, a resistive film type, or an infrared type. The display 24b is, for example, a liquid crystal display (LCD), but is not limited to this, and may be other types of displays such as an organic electroluminescence (EL) display. The operation unit 24 also has appropriate hardware switch means such as a push button switch (not shown) in addition to the touch panel 24a. Additionally, the operation unit 24 has appropriate light emitting means such as a light emitting diode (LED) (not shown) in addition to the display 24b.

[0033] 2 shows a memory map 100 conceptually illustrating the internal configuration of the RAM of the main storage unit 18b. As shown in the memory map 100, the RAM has a program storage area 110 and a data storage area 150.

[0034] The above-mentioned control programs are stored in the program storage area 110. Specifically, the control programs include a display control program 112, an operation detection program 114, an image reading control program 116, an image processing control program 118, an image formation control program 120, an auxiliary storage control program 122, a communication control program 124, and the like.

[0035] The display control program 112 is a program for generating display screen data required to display various information, particularly screens, on the display 24b. The operation detection program 114 is a program for detecting an operation state on the touch panel 24a. The image reading control program 116 is a program for controlling the image reading unit 12. The image processing control program 118 is a program for controlling the image processing unit 14. The image forming control program 120 is a program for controlling the image forming unit 16. The auxiliary memory control program 122 is a program for controlling the auxiliary memory unit 20. And the communication control program 124 is a program for controlling the communication unit 22.

[0036] Meanwhile, various types of data are stored in the data storage area 150. The various types of data include display image generation data 152, operation data 154, and the like.

[0037] The display image generation data 152 is data such as polygon data and texture data used for generating display screen data based on the above-mentioned display control program 112. The operation data 154 is data representing an operation state on the touch panel 24a, and more specifically, is time-series data representing a touch position (coordinates) of a user on the touch panel 24a.

[0038] According to the multifunction device 10 of the first embodiment, for example, in the image scanner function, the scanned image data is compressed, and the compressed data, a so-called compressed file, can be output to the outside or stored in the auxiliary storage unit 20. In this case, in order to minimize the deterioration of image quality caused by the compression process and to reduce the capacity of the compressed file as much as possible, it is automatically determined what type of compression process is appropriate.

[0039] Specifically, it is automatically determined whether it is appropriate to perform index color processing, which performs color reduction processing on the scanned image data and then performs compression processing using a lossless compression method, or full color processing, which performs compression processing using a lossy compression method without performing color reduction processing on the scanned image data. Note that as a compression processing using a lossless compression method, for example, compression processing using the Deflate method is adopted. On the other hand, as a compression processing using a lossy method, for example, compression processing using the JPEG method is adopted.

[0040] More specifically, first, a color distribution degree, which is a distribution degree (dispersion degree) of pixel values ​​of each pixel data included in the read image data, is derived. In addition, a photographic area ratio, which is a ratio of photographic area pixel data constituting a photographic area among all pixel data included in the read image data, is derived. Furthermore, a white background area ratio, which is a ratio of white background area pixel data constituting an area in which pixel values ​​can be regarded as a value representing white color, that is, a white background area, among all pixel data included in the read image data, is derived. Then, only when all three conditions are satisfied, namely a first condition that the color distribution degree is smaller than a first reference value, a second condition that the photographic area ratio is smaller than a second reference value, and a third condition that the white background area ratio is larger than a third reference value, it is determined that index color processing is appropriate. On the other hand, when at least one of these three conditions is not satisfied, it is determined that full color processing is appropriate.

[0041] To realize this so-called automatic determination function, a color number conversion determination unit 200 is provided in the image processing unit 14, as shown in Fig. 3. Fig. 3 shows a detailed configuration of the image processing unit 14 related to the image scanner function. In this configuration, read image data (RAW data) output from the image reading unit 12, specifically, full-color (true color) RGB image data of a total of 24 bits in which each of the R, G, and B component values ​​is expressed in 8 bits, is input to the image processing unit 14.

[0042] 3, the image processing unit 14 has an input tone correction unit 202, to which RGB image data is input as input image data Di to the image processing unit 14. The input tone correction unit 202 performs appropriate input tone correction processes such as color balance adjustment, background density adjustment (background removal), and contrast adjustment on the RGB image data as the input image data Di. The image data processed by the input tone correction unit 202 is input to a color correction unit 206 and a region separation processing unit 208.

[0043] The RGB image data as the input image data Di is input to an original type determination unit 204. The original type determination unit 204 performs an original type determination process to determine whether an image based on the input image data Di, that is, an input image, is an image that mainly contains text, photographs, or graphics (figures), or an image that contains a mixture of these. The original type determination unit 204 then outputs an original type signal Sa that indicates the result of the original type determination process. This original type signal Sa is input to a tone reproduction processing unit 218 and a compression processing unit 220, which will be described later.

[0044] The color correction unit 206 performs color correction processing to improve color reproducibility on the image data input from the input gradation correction unit 202. In addition, the color correction unit 206 generates gray (grayscale) data representing the luminance component of the image data based on the image data input from the input gradation correction unit 202. The image data processed by the color correction unit 206, including this gray data, is input to a spatial filter processing unit 210, which will be described later. The image data processed by the color correction unit 206, specifically the image data excluding the gray data, is input to the color number conversion determination unit 200.

[0045] The region separation processing unit 208 performs a region determination process to determine whether each pixel data included in the image data input from the input tone correction unit 202 constitutes a character region, a photograph region, a graphic region, or a background region. The region separation processing unit 208 then outputs a region determination signal Sb representing the result of the region determination process. This region determination signal Sb is input to the spatial filter processing unit 210, which will be described next.

[0046] The spatial filter processing unit 210 performs an appropriate spatial filter process on the image data input from the color correction unit 206 to correct the spatial frequency characteristics of the image data. At this time, the spatial filter processing unit 210 performs a spatial filter process for each area represented by the area determination signal Sb according to the type of the area. For example, an edge enhancement process (sharpness enhancement process) that enhances the high frequency components is performed on the character area. This enhances the edge parts of the characters included in the character area, and reduces the blurring of the characters. As a result, the reproducibility of the characters is improved. In addition, a smoothing process is performed on the graphic area to remove the input halftone dot components. Furthermore, an adaptive blending filter process is performed on the photographic area to appropriately smooth the high frequency components and appropriately emphasize the low frequency components. The background area is also subjected to the same process as the photographic area. The image data after the process by the spatial filter processing unit 210 is input to a resolution conversion processing unit 212 described later.

[0047] As described above, the color number conversion determination unit 200 is provided to realize an automatic determination function. That is, the color number conversion determination unit 200 determines whether it is appropriate to execute index color processing or full color processing. The color number conversion determination unit 200 then outputs a color number conversion determination signal Sc representing the result of its own determination. This color number conversion determination signal Sc is input to a color number conversion processing unit 216 and a file generating unit 222, which will be described later. The color number conversion determination unit 200 will be described in detail later.

[0048] The resolution conversion processing unit 212 performs resolution conversion processing for converting the resolution of the image data input from the spatial filter processing unit 210 in accordance with the contents of the resolution setting operation by the operation unit 24, more precisely, in accordance with an instruction from the CPU 18a. The image data after the resolution conversion processing by the resolution conversion processing unit 212 is input to the output tone correction unit 214.

[0049] The output tone correction unit 214 performs appropriate output tone correction processing, such as gamma correction processing, on the image data input from the resolution conversion processing unit 212. The image data processed by the output tone correction unit 214 is input to a color number conversion processing unit 216.

[0050] The color number conversion processing unit 216 performs color reduction processing on the image data input from the output tone correction unit 214 as necessary, specifically when the color number conversion determination signal Sc input from the color number conversion determination unit 200 indicates that it is appropriate to perform index color processing. This color reduction processing is performed, for example, by a known median division method. Through this color reduction processing, the image data is converted into index color image data with, for example, 20 colors. The index color image data after this color reduction processing (after color number conversion processing) is input to the compression processing unit 220. Note that the number of reduced colors, 20 colors, is the upper limit of the number of colors that is expected to be able to sufficiently reduce the capacity of the compressed file compared to full color processing while suppressing deterioration of image quality, assuming that index color processing is performed, and is a so-called empirical value derived from various experiments. However, depending on the situation, the number of reduced colors may be other than this, for example, the number of reduced colors may be 32 colors.

[0051] On the other hand, when the color number conversion determination signal Sc input from the color number conversion determination unit 200 indicates that full color processing is appropriate, the color number conversion processing unit 216 does not perform color reduction processing on the image data input from the output gradation correction unit 214, and outputs the image data as is (through). In this case as well, the image data output from the color number conversion processing unit 216, that is, the so-called full color image data that has not been subjected to color reduction processing by the color number conversion processing unit 216, is input to the compression processing unit 220. The gray data of the image data output from the color number conversion processing unit 216 is also input to the tone reproduction processing unit 218.

[0052] The tone reproduction processing unit 218 performs tone reproduction processing (halftone generation processing) by binarizing the gray data input from the color number conversion processing unit 216 and generating K (key plate) data. At this time, the tone reproduction processing unit 218 performs tone reproduction processing according to the document type represented by the document type signal Sa. The K data generated by the tone reproduction processing of the tone reproduction processing unit 218 is input to the compression processing unit 220.

[0053] The compression processing unit 220 performs an appropriate compression process on the image data input from the color number conversion processing unit 216. For example, when the image data input from the color number conversion processing unit 216 is index color image data, the compression processing unit 220 performs a compression process by the Deflate method on the index color image data. On the other hand, when the image data input from the color number conversion processing unit 216 is full color image data, the compression processing unit 220 performs a compression process by the JPEG method on the full color image data. In addition, in the compression process by the JPEG method, the compression processing unit 220 performs the compression process by referring to the document type represented by the document type signal Sa. The image data Da compressed by the compression processing unit 220 is input to the file generation unit 222.

[0054] Although not directly related to the present invention, for example, if the input image data Di is from a monochrome original, the compression processing unit 220 performs compression processing on the gray data using the JPEG method. Whether the input image data Di is from a monochrome original is determined by an ACS (Auto Color Selection) processing unit (not shown). Even if the input image data Di is from a color original, if monochrome output is set (by operating the operation unit 24), the compression processing unit 220 performs compression processing on the gray data using the JPEG method, as in the case of a monochrome original. Furthermore, if binarized output, which is a type of monochrome output, is set, the compression processing unit 220 performs compression processing on the K data using the MMR method.

[0055] The file generating unit 222 formats the image data Da input from the compression processing unit 220 into a file of a predetermined format, for example, a PDF format file. That is, if the image data Da is data compressed by the Deflate method, a PDF file is generated that includes the image data Da compressed by the Deflate method. If the image data Da is data compressed by the JPEG method, a PDF file is generated that includes the image data Da compressed by the JPEG method. Furthermore, if the image data Da is data compressed by the MMR method, a PDF file is generated that includes the image data Da compressed by the MMR method. The PDF file generated by the file generating unit 222, in other words, a compressed file, is output as the output data Do of the image processing unit 14.

[0056] The compressed file (output data Do) output from the image processing unit 14 is output, for example, to the outside of the multifunction device 10, or is stored (saved) in the auxiliary storage unit 20. In particular, the compressed file output to the outside of the multifunction device 10 is transmitted to an external device, for example, a personal computer or server (not shown), or is stored in an external storage medium, such as a USB memory (not shown).

[0057] As described above, the color number conversion determination unit 200 is provided to realize an automatic determination function, that is, to determine whether index color processing or full color processing is appropriate to be executed. The detailed configuration of this color number conversion determination unit 200 is shown in FIG.

[0058] As shown in FIG. 4, the color number conversion judgment unit 200 has a color conversion unit 250, to which image data corrected by the color correction unit 206 is input, that is, RGB image data is input as input image data Dj to the color number conversion judgment unit 200. The color conversion unit 250 converts the RGB image data as the input image data Dj into image data Dj' in the LC1C2 format. Here, the image data in the LC1C2 format is image data consisting of a luminance L and two elements C1 and C2 related to colors other than the luminance L, for example, image data in the CIELAB (hereinafter simply referred to as "LAB") format, which is one of the uniform color spaces. The image data Dj' converted by the color conversion unit 250 is input to a color distribution judgment unit 252, a photo judgment unit 254, and a white background judgment unit 256.

[0059] The color distribution determination unit 252 is, so to speak, a first determination means that determines whether the above-mentioned first condition is satisfied. That is, the color distribution determination unit 252 derives a color distribution degree, which is a distribution degree of pixel values ​​of each pixel data included in the image data Dj', and determines whether the first condition, that the color distribution degree is smaller than a first reference value, is satisfied. In this case, the color distribution determination unit 252 performs a color reduction process for determination as described later. Then, the color distribution determination unit 252 outputs a first determination signal Se that indicates the result of its own determination. This first determination signal Se is input to a final determination unit 258, which will be described later.

[0060] The photo determination unit 254 is, so to speak, a second determination means for determining whether the above-mentioned second condition is satisfied. That is, the photo determination unit 254 derives a photo area ratio, which is the ratio of photo area pixel data constituting the photo area among all pixel data included in the image data Dj', and determines whether the second condition, that the photo area ratio is smaller than a second reference value, is satisfied. In this case, particularly to detect the photo area, the photo determination unit 254 utilizes the technology disclosed in Japanese Patent No. 4527127, as described later. Then, the photo determination unit 254 outputs a second determination signal Sf representing the determination result by itself. This second determination signal Sf is also input to the final determination unit 258, described later.

[0061] The white background determination unit 256 is, so to speak, a third determination means that determines whether the above-mentioned third condition is satisfied. That is, the white background determination unit 256 derives a white background area ratio, which is the ratio of white background area pixel data that constitutes a white background area to all pixel data included in the image data Dj', and determines whether the third condition, that is, the white background area ratio is greater than a third reference value, is satisfied. Then, the white background determination unit 256 outputs a third determination signal Sg that indicates the result of its own determination. This third determination signal Sg is also input to the final determination unit 258.

[0062] The final judgment unit 258 is a final judgment means for making a final judgment as to whether index color processing or full color processing is appropriate to be performed based on the first judgment signal Se, the second judgment signal Sf, and the third judgment signal Sg, that is, based on whether the first condition, the second condition, and the third condition are satisfied. For example, the final judgment unit 258 judges that index color processing is appropriate only when all of the first condition, the second condition, and the third condition are satisfied. In other cases, that is, when at least one of the first condition, the second condition, and the third condition is not satisfied, the final judgment unit 258 judges that full color processing is appropriate. Then, the final judgment unit 258 outputs a color number conversion judgment signal Sc representing its own final judgment result as the judgment result of the entire color number conversion judgment unit 200. This color number conversion judgment signal Sc is input to the compression processing unit 220 and the file generation unit 222 as described above.

[0063] The color distribution determination unit 252 will be described in more detail. The color distribution determination unit 252 performs color reduction processing for determination as described above, and also performs color reduction processing by the median division method for determination. In this case, as shown in FIG. 5, the color distribution determination unit 252 divides the LC1C2 color space 300, which is the coordinate space of the image data Dj' input to the color distribution determination unit 252, into one achromatic color space 310 and multiple, for example, eight, chromatic color spaces 320, 320, .... Note that FIG. 5 shows the LC1C2 color space 300 as viewed from the direction along the L axis, that is, the LC1C2 color space 300 in a state in which the C1-C2 plane is along the paper surface of FIG. 5. The L value in this LC1C2 color space 300 is, for example, "0" to "100". And, each of the C1 value and the C2 value is, for example, "-128" to "128".

[0064] Specifically, color distribution determination unit 252 defines cylindrical inner portion 310 of LC1C2 color space 300 with radius TH1 centered on the L axis as an achromatic space that can be considered as an achromatic space. The radius TH1 here is a value that is sufficiently smaller than the maximum values ​​(=128) of the C1 and C2 values ​​(strictly speaking, absolute values ​​|C1| and |C2|), and is, for example, "6," but is not limited to this.

[0065] Additionally, the color distribution determination unit 252 defines a portion 330 of the LC1C2 color space 300 other than the achromatic color space 310 as a chromatic color space that can be considered as a chromatic color space. Furthermore, the color distribution determination unit 252 defines eight subdivided fan-shaped chromatic color spaces 320, 320, ... by equally dividing the chromatic color space 330 into eight planes 340, 340, ... that extend radially from the L axis and are perpendicular to the C1-C2 plane. Two of the eight planes 340, 340, ... are provided so as to include the C1 axis. Furthermore, the other two of the eight planes 340, 340, ... are provided so as to include the C2 axis.

[0066] Then, the color distribution determination unit 252 assigns the pixel values ​​of each pixel data included in the image data Dj' to the LC1C2 color space 300. Then, as shown by the dashed line, the one-dot chain line, or the two-dot chain line in Fig. 6, the color distribution determination unit 252 imagines a small rectangular parallelepiped (cube) space 350 including the pixel values ​​of all the pixel data assigned to each of the achromatic color space 310 and each of the chromatic color spaces 320, 320, ..., that is, imagines a total of nine small spaces 350, 350, .... Note that Fig. 6 shows an example in which the dimensions of each small space 350 are maximum, but the dimensions of each small space 350 change depending on the distribution state of the pixel values ​​of each pixel data included in the image data Dj'.

[0067] Each small space 350 will be described from another perspective. First, in each of the achromatic color space 310 and each of the chromatic color spaces 320, 320, ..., the maximum and minimum values ​​of the L, C1, and C2 component values ​​of the pixel data of all the pixel data assigned to each of the achromatic color spaces are obtained. Then, a first plane including the maximum value of the L value and perpendicular to the L axis, and a second plane including the minimum value of the L value and perpendicular to the L axis are imagined. In addition, a third plane including the maximum value of the C1 value and perpendicular to the C1 axis, and a fourth plane including the minimum value of the C1 value and perpendicular to the C1 axis are imagined. Furthermore, a fifth plane including the maximum value of the C2 value and perpendicular to the C2 axis, and a sixth plane including the minimum value of the C2 axis and perpendicular to the C2 axis are imagined. A rectangular parallelepiped space surrounded by the first plane, the second plane, the third plane, the fourth plane, the fifth plane, and the sixth plane is assumed to be a small space 350.

[0068] Then, the color distribution determination unit 252 performs color reduction processing in a manner similar to the known median division method. That is, the color distribution determination unit 252 calculates the maximum and minimum component values ​​of L, C1, and C2 for each of the small spaces 350, 350, .... Then, the color distribution determination unit 252 identifies the small space 350 in which the mutual difference (=maximum value-minimum value) between the maximum and minimum values ​​of the component values ​​is maximum, regardless of which of the component values ​​of L, C1, and C2. Furthermore, the color distribution determination unit 252 divides the identified small space 350 in half, and more specifically, divides it so that the mutual difference between the maximum and minimum values ​​of the component values ​​of L, C1, and C2 in which the mutual difference is maximum is halved.

[0069] The division method of the small space 350 will be described from another perspective. As shown in FIG. 7A, the small space 350 is imagined as a rectangular parallelepiped space having a side along the L axis, a side along the C1 axis, and a side along the C2 axis. The small space 350 having the longest side is specified, regardless of whether it is the side along the L axis, the side along the C1 axis, or the side along the C2 axis. Then, as shown by the dashed line 306 in FIG. 7B, the small space 350 is divided so that the length of the longest side of the small space 350 having the longest side is halved. Note that FIG. 7B shows an example in which the side along the C2 axis is the longest and the small space 350 is divided in half so that the length of the side along the C2 axis is halved.

[0070] In this manner, the color distribution determination unit 252 divides the small space 350 with the longest side each time until the total number of small spaces 350 reaches the predetermined number N. The predetermined number N here is the same as the number of colors reduced in the so-called compression color reduction process by the color number conversion processing unit 216 described above (FIG. 3), that is, "20." Then, when the total number of small spaces 350 reaches the predetermined number N, the color distribution determination unit 252 identifies the small space 350 with the longest side among these N small spaces 350, 350, .... Then, the color distribution determination unit 252 compares the length of the longest side of the identified small space 350 with a predetermined threshold value TH2.

[0071] For example, suppose that the length of the longest side of the identified small space 350 is shorter than a predetermined threshold value TH2. In this case, the color distribution determination unit 252 determines that even if the aforementioned color number conversion processing unit 216 performs a color reduction process for compression, and even if index color processing including the color reduction process is performed, the image quality (color tone) will not deteriorate significantly, in other words, the deterioration of the image quality is within an acceptable range. Based on this, the color distribution determination unit 252 determines that the first condition is satisfied.

[0072] On the other hand, suppose that the length of the longest side of the identified small space 350 is equal to or greater than a predetermined threshold value TH2. In this case, the color distribution determination unit 252 determines that there is a possibility that image quality will be significantly degraded if the color number conversion processing unit 216 performs color reduction processing for compression. In other words, the color distribution determination unit 252 determines that it is not appropriate for the color number conversion processing unit 216 to perform color reduction processing for compression, and further that it is not appropriate to perform index color processing including the color reduction processing. Based on this, the color distribution determination unit 252 determines that the first condition is not satisfied.

[0073] That is, the color distribution determination unit 252 estimates the color distribution degree of the image data Dj' based on the length of the longest side of the small space 350 having the longest side, and indirectly derives the color distribution degree, so to speak. In addition, the color distribution determination unit 252 treats the predetermined threshold value TH2 as a first reference value. Then, the color distribution determination unit 252 determines whether the first condition is satisfied based on whether the length of the longest side of the small space 350 having the longest side is shorter than the predetermined threshold value TH2. The predetermined threshold value TH2 is appropriately determined based on experience such as experiments.

[0074] As described above, the color distribution determining section 252 outputs the first determination signal Se representing the result of its own determination. The first determination signal Se is then input to the final determining section 258.

[0075] The flow of a series of processes performed by the color distribution determining unit 252, that is, the color distribution determining process, is illustrated in FIGS.

[0076] According to this color distribution determination process, first, in step S1, the color distribution determination unit 252 focuses on the first (leading) pixel data included in the image data Dj', that is, identifies the first pixel of interest in the image based on the image data Dj'. Then, the color distribution determination unit 252 proceeds to step S3.

[0077] In step S3, the color distribution determination unit 252 determines whether the absolute values ​​|C1| and |C2| of the C1 and C2 values ​​of the pixel of interest (pixel data) are both equal to or less than the radius TH1 of the achromatic space 310, that is, whether the pixel value of the pixel of interest belongs to the achromatic space 310. If the absolute values ​​|C1| and |C2| of the C1 and C2 values ​​of the pixel of interest are both equal to or less than the radius TH1 of the achromatic space 310 (S3: YES), the color distribution determination unit 252 advances the process to step S5. On the other hand, if either of the absolute values ​​|C1| and |C2| of the C1 and C2 values ​​of the pixel of interest is greater than the radius TH1 of the achromatic space 310 (S3: NO), the color distribution determination unit 252 advances the process to step S7, which will be described later.

[0078] In step S5, the color distribution determining unit 252 classifies the pixel of interest into the achromatic space 310, and more precisely, assigns it to a coordinate position in the achromatic space 310. Then, the color distribution determining unit 252 advances the process to step S9.

[0079] On the other hand, when the color distribution determination unit 252 advances the process from step S3 to step S7, in step S7, it classifies the pixel of interest into a corresponding space among the eight chromatic color spaces 320, 320, ..., and strictly speaking assigns the pixel of interest to a coordinate position in the corresponding chromatic color space 320. Then, the color distribution determination unit 252 advances the process to step S9.

[0080] In step S9, the color distribution determination unit 252 determines whether classification into the achromatic color space 310 and each of the chromatic color spaces 320, 320, ... has been completed for all pixels included in the image data Dj'. If classification for all pixels has been completed (S9: YES), the color distribution determination unit 252 advances the process to step S13, which will be described later. On the other hand, if classification for all pixels has not been completed (S9: NO), the color distribution determination unit 252 advances the process to step S11.

[0081] In step S11, the color distribution determining section 252 identifies the next pixel of interest contained in the image data Dj'. Then, the color distribution determining section 252 returns the process to step S3.

[0082] On the other hand, when the process proceeds from step S9 to step S13, the color distribution determination unit 252 calculates in step S13 the maximum and minimum values ​​of the component values ​​of L, C1, and C2 in each small space 350. Then, the color distribution determination unit 252 proceeds to step S15.

[0083] In step S15, the color distribution determination unit 252 identifies the small space 350 in which the mutual difference between the maximum and minimum values ​​of the component values ​​(=maximum value-minimum value) is the largest, regardless of which of the component values ​​L, C1, and C2. In other words, the color distribution determination unit 252 identifies the small space 350 with the longest side. Then, the color distribution determination unit 252 proceeds to step S17.

[0084] In step S17, the color distribution determination unit 252 divides the small space 350 identified in step S15 in half, more specifically, so that the mutual difference between the maximum and minimum component values ​​of L, C1, and C2, which is the largest, is halved. In other words, the color distribution determination unit 252 divides the small space 350 so that the length of the longest side of the small space 350 having the longest side is halved. Then, the color distribution determination unit 252 proceeds to the process of step S19.

[0085] In step S19, the color distribution determination unit 252 determines whether or not the total number of small spaces 350 has reached the aforementioned predetermined number N. For example, if the total number of small spaces 350 has not reached the predetermined number N (S19: NO), the color distribution determination unit 252 returns the process to step S13. On the other hand, if the total number of small spaces 350 has reached the aforementioned predetermined number N (S19: YES), the color distribution determination unit 252 advances the process to step S21.

[0086] In step S21, similarly to step S15 described above, the color distribution determination unit 252 identifies the small space 350 in which the mutual difference between the maximum and minimum values ​​of the component values ​​(=maximum value-minimum value) is the largest, regardless of which of the component values ​​L, C1, and C2 the component values ​​are, that is, identifies the small space 350 with the longest side. Then, the color distribution determination unit 252 proceeds to the process of step S23.

[0087] In step S23, the color distribution determination unit 252 determines whether the mutual difference (=maximum value-minimum value) in the small space 350 identified in step S21 is smaller than a predetermined threshold value TH2, that is, whether the length of the longest side of the small space 350 is shorter than the predetermined threshold value TH2. For example, if the mutual difference (=maximum value-minimum value) is smaller than the predetermined threshold value TH2, that is, if the length of the longest side of the small space 350 having the longest side is shorter than the predetermined threshold value TH2 (S23: YES), the color distribution determination unit 252 advances the process to step S25. On the other hand, if the mutual difference (=maximum value-minimum value) is equal to or greater than the predetermined threshold value TH2, that is, if the length of the longest side of the small space 350 having the longest side is equal to or greater than the predetermined threshold value TH2 (S23: NO), the color distribution determination unit 252 advances the process to step S27, which will be described later.

[0088] In step S25, the color distribution determining section 252 determines that the first condition is satisfied, and the color distribution determining section 252 advances the process to step S29.

[0089] On the other hand, if the process proceeds from step S23 to step S27, the color distribution determining section 252 determines that the first condition is not satisfied in step S27, and then the color distribution determining section 252 proceeds to step S29.

[0090] In step S29, the color distribution determining section 252 outputs a first determination signal Se representing the result of the determination in step S25 or step S27, whereby the color distribution determining section 252 ends the series of color distribution determination processes.

[0091] Next, the photo determination unit 254 will be described in detail. As described above, the photo determination unit 254 derives a photo area ratio, which is the ratio of photo area pixel data constituting a photo area to all pixel data included in the image data Dj', and determines whether or not the second condition is satisfied, that is, the photo area ratio is smaller than a second reference value. In this case, the photo determination unit 254 uses the technology disclosed in Japanese Patent No. 4527127 to detect the photo area in particular.

[0092] Specifically, the photo determination unit 254 divides all pixel data included in the image data Dj' into a plurality of blocks. The block here refers to a group of pixel data of a predetermined number of units, m×n (m and n are both integers of 2 or more), that is, a pixel group consisting of the m×n pixels. Here, m×n is, for example, 11×11 (i.e., m=11 and n=11).

[0093] Then, for each block, the photo determination unit 254 detects the character portion contained in that block, that is, detects the character region pixel data constituting the character region. This detection of the character region pixel data is performed by a known character detection process including, for example, appropriate edge detection and smoothing processes.

[0094] Furthermore, the photo determination unit 254 calculates the histogram entropy E for each block after removing the character portion detected by the character detection process. The histogram entropy E is an index that quantifies the feature amount of the histogram of the pixel values ​​of each pixel in the block (excluding the character portion), and represents the degree (probability) that the block can be considered to constitute a photographic area. This histogram entropy E is calculated by the following formula 1. In this formula 1, i is the number of the bin in the histogram. And, h(i) is the frequency for the i-th bin. And, p(i) is the normalized frequency.

[0095] 《Formula 1》 E=-Σp(i)log2{p(i)} where p(i)={h(i)} / {Σh(i)} i=0~L-1

[0096] According to the histogram entropy E calculated by this formula 1, the larger the absolute value |E| of the histogram entropy E, the higher the degree to which the corresponding block can be regarded as constituting a photographic region. Using this, the photograph determination unit 254 determines whether each block is a photographic region block constituting a photographic region, that is, detects a photographic region in an image based on image data Dj'. For example, the photograph determination unit 254 compares the absolute value |E| of the histogram entropy E with a predetermined threshold TH4, and determines that the block related to the histogram entropy E is a photographic region block when the absolute value |E| is greater than the predetermined threshold TH4. On the other hand, when the absolute value |E| of the histogram entropy E is equal to or smaller than the predetermined threshold TH4, the photograph determination unit 254 determines that the block related to the histogram entropy E is not a photographic region block. The predetermined threshold TH4 is appropriately determined based on experience such as experiments.

[0097] In this manner, the photo determination unit 254 determines whether or not each block is a photographic area block. Then, the photo determination unit 254 derives the ratio of the number of photographic area blocks to the number of all blocks as the photographic area rate.

[0098] Furthermore, the photo determination unit 254 compares the photo area ratio with a predetermined threshold value TH5. For example, it is assumed here that the photo area ratio is smaller than the predetermined threshold value TH5. In this case, the photo determination unit 254 recognizes that the dimensions of the photo area in the image based on the image data Dj' are relatively small. Then, the photo determination unit 254 judges that even if index color processing is performed on such image data Dj' (strictly speaking, the input image data Di), the effect on the compression rate of the entire image due to the reduction in the compression rate in the photo area is relatively small, in other words, the desired (high) compression rate can be obtained for the entire image. Based on this, the photo determination unit 254 judges that the second condition is satisfied.

[0099] On the other hand, suppose the photographic area ratio is equal to or greater than a predetermined threshold value TH5. In this case, the photographic determination unit 254 recognizes that the image based on the image data Dj' contains a photographic area with a relatively large size. The photographic determination unit 254 then determines that if index color processing is performed on such image data Dj' (strictly speaking, the input image data Di), the compression ratio in the photographic area will drop significantly, and the compression ratio of the entire image will also drop significantly, and thus the desired compression ratio will not be obtained for the entire image. Based on this, the photographic determination unit 254 determines that the second condition is not satisfied.

[0100] That is, the photo determination unit 254 treats the predetermined threshold value TH5 as the second reference value. Then, the photo determination unit 254 determines whether the second condition is satisfied based on whether the photo area rate is smaller than the predetermined threshold value TH5. The predetermined threshold value TH5 is appropriately determined based on experience such as experiments, and is, for example, 20%.

[0101] As described above, the photo determination unit 254 outputs the second determination signal Sf representing the result of its own determination. The second determination signal Sf is then input to the final determination unit 258.

[0102] The flow of the series of processes performed by the photo determination unit 254, that is, the photo determination process, is illustrated in FIGS.

[0103] According to this photo determination process, the photo determination unit 254 first focuses on the first (leading) block of the above-mentioned multiple blocks in step S101, that is, identifies the first block of interest. Then, the photo determination unit 254 proceeds to step S103.

[0104] In step S103, the photo determination unit 254 identifies the first (leading) pixel of interest in the block of interest. Then, the photo determination unit 254 advances the process to step S105.

[0105] In step S105, the photo determination unit 254 performs edge detection processing and smoothing processing on the pixel of interest, more precisely on the small block including the pixel of interest. The small block referred to here is a pixel group consisting of fewer pixels than the above-mentioned block, specifically a pixel group consisting of m'×n' (m' is an integer of 2 or more and smaller than m, and n' is an integer of 2 or more and smaller than n) pixels, for example, a pixel group consisting of 3×3 (i.e., m'=3 and n'=3) pixels. Note that m'×n' may be, for example, 5×5 (i.e., m'=5 and n'=5). Then, the photo determination unit 254 advances the process to step S107.

[0106] In step S107, the photo determination unit 254 compares the edge strength of the small block including the pixel of interest with a predetermined threshold TH3. For example, if the edge strength of the small block including the pixel of interest is smaller than the predetermined threshold TH3 (S107: YES), the photo determination unit 254 determines that the pixel of interest is not a pixel that constitutes a character portion, that is, is not a pixel based on character region pixel data, and proceeds to step S109. On the other hand, if the edge strength of the small block including the pixel of interest is equal to or greater than the predetermined threshold TH3 (S107: NO), the photo determination unit 254 determines that the pixel of interest is a pixel that constitutes a character portion, that is, is a pixel based on character region pixel data, and proceeds to step S111, which will be described later. The predetermined threshold TH3 is appropriately determined based on experience such as experiments.

[0107] In step S109, the photo determination unit 254 counts the luminance value (L value) of the pixel of interest as an element of the histogram. Then, the photo determination unit 254 advances the process to step S111.

[0108] In step S111, the photo determination unit 254 determines whether the character detection process including steps S105 and S107 has been completed for all pixels in the block of interest. For example, if the character detection process has been completed for all pixels in the block of interest (S111: YES), the photo determination unit 254 advances the process to step S115, which will be described later. On the other hand, if the character detection process has not been completed for all pixels in the block of interest (S111: NO), the photo determination unit 254 advances the process to step S113.

[0109] In step S113, the photo determination unit 254 identifies the next pixel of interest in the block of interest. Then, the photo determination unit 254 returns the process to step S105.

[0110] On the other hand, when the process proceeds from step S111 to step S115, the photo determination unit 254 calculates the histogram entropy E of the block of interest in step S115. As described above, the histogram entropy E is calculated by the above-mentioned formula 1. The photo determination unit 254 proceeds to step S117.

[0111] In step S117, the photo determination unit 254 compares the absolute value |E| of the histogram entropy E with a predetermined threshold TH3. For example, if the absolute value |E| of the histogram entropy E is greater than the predetermined threshold TH3 (S117: YES), the photo determination unit 254 advances the process to step S119. On the other hand, if the absolute value |E| of the histogram entropy E is equal to or smaller than the predetermined threshold TH3 (S117: NO), the photo determination unit 254 advances the process to step S121, which will be described later.

[0112] In step S119, the photo determination unit 254 counts the target block as a photographic region block. Then, the photo determination unit 254 advances the process to step S121.

[0113] In step S121, the photo determination unit 254 determines whether the process for determining whether all blocks are photographic area blocks, that is, at least the processes from step S105 to step S117, has been completed. For example, if the process for determining whether all blocks are photographic area blocks has been completed (S121: YES), the photo determination unit 254 advances the process to step S125, which will be described later. On the other hand, if the process for determining whether all blocks are photographic area blocks has not been completed (S121: NO), the photo determination unit 254 advances the process to step S123.

[0114] In step S123, the photo determination unit 254 identifies the next block of interest. Then, the photo determination unit 254 returns the process to step S103.

[0115] On the other hand, when the process proceeds from step S121 to step S125, the photo determination unit 254 calculates the photograph area ratio in step S125. That is, the photo determination unit 254 derives the ratio of the number of photograph area blocks to the number of all blocks as the photograph area ratio. Then, the photo determination unit 254 proceeds to step S127.

[0116] In step S127, the photo determination unit 254 compares the photo area rate derived in step S125 with a predetermined threshold TH5. For example, if the photo derivation rate is smaller than the predetermined threshold TH5 (S127: YES), the photo determination unit 254 advances the process to step S129. On the other hand, if the photo derivation rate is equal to or greater than the predetermined threshold TH5 (S127: NO), the photo determination unit 254 advances the process to step S131.

[0117] In step S129, the photo determination unit 254 determines that the second condition is satisfied. Then, the photo determination unit 254 advances the process to step S133.

[0118] In contrast, when the process proceeds from step S127 to step S131, the photo determination unit 254 determines that the second condition is not satisfied in step S131. Then, the photo determination unit 254 proceeds to step S133.

[0119] In step S133, the photo determination unit 254 outputs a second determination signal Sf representing the determination result in step S129 or step S131. With this, the photo determination unit 254 ends a series of photo determination processes.

[0120] Next, a detailed description will be given of the white background determination unit 256. As described above, the white background determination unit 256 derives a white background area ratio, which is the ratio of white background area pixel data that constitutes a white background area to all pixel data included in the image data Dj', and determines whether or not a third condition is satisfied, that is, the white background area ratio is greater than a third reference value.

[0121] Specifically, for each pixel data included in the image data Dj', the white background determination unit 256 performs a smoothing process on a white background determination block, which is strictly a group of m"×n" (m" and n" are both integers equal to or greater than 2) pixel data including the pixel data. Note that m"×n" is, for example, 3×3 (i.e., m"=3 and n"=3) or 5×5 (i.e., m"=5 and n"=5).

[0122] Then, the white background determination unit 256 determines whether or not the pixel value of the pixel data (target pixel) after the smoothing process belongs to the above-mentioned achromatic color space 310. This determination is made based on whether or not the absolute values ​​|C1| and |C2| of the C1 and C2 values ​​of the pixel data are both equal to or less than the radius TH1 of the achromatic color space 310, similarly to the color distribution determination unit 252. Furthermore, for pixel data whose pixel value is determined to belong to the achromatic color space 310, the white background determination unit 256 compares the luminance value (L value) of the pixel data with a predetermined threshold value TH6. Here, for example, if the luminance value of the pixel data is equal to or greater than the predetermined threshold value TH6, the white background determination unit 256 regards the pixel data as white background region pixel data. On the other hand, if the luminance value of the pixel data is smaller than the predetermined threshold value TH6, the white background determination unit 256 regards the pixel data as not being white background region pixel data. The predetermined threshold value TH6 is appropriately determined based on experience such as experiments, and is, for example, 95% of the maximum brightness value (=100), that is, 95.

[0123] In this manner, the white background determination unit 256 determines whether or not all pixel data included in the image data Dj' is white background area pixel data. The white background determination unit 256 then derives the ratio of the number of white background area pixel data to the number of all pixel data included in the image data Dj' as the white background area rate.

[0124] Furthermore, the white background determination unit 256 compares the white background area ratio with a different predetermined threshold value TH7 from the above. For example, it is assumed here that the white background area ratio is greater than the predetermined threshold value TH7. In this case, the white background determination unit 256 recognizes that the ratio of the white background area in the image data Dj' is relatively large, in other words, that the area in which the pixel values ​​can be considered to be uniform is relatively large. The white background determination unit 256 then determines that a high compression rate can be obtained for such image data Dj' (strictly speaking, the input image data Di) by performing index color processing. Based on this, the white background determination unit 256 determines that the third condition is satisfied.

[0125] On the other hand, suppose the white background area ratio is equal to or less than a predetermined threshold value TH7. In this case, the white background determination unit 256 recognizes that the ratio of the white background area in the image data Dj' is relatively small, in other words, the area in which the pixel values ​​can be considered to be uniform is relatively small. The white background determination unit 256 then determines that a high compression rate cannot be obtained for such image data Dj' (strictly speaking, the input image data Di) when index color processing is performed. Based on this, the white background determination unit 256 determines that the third condition is not satisfied.

[0126] That is, the white background determination unit 256 treats the predetermined threshold value TH7 as a third reference value. The white background determination unit 256 then determines whether the third condition is satisfied based on whether the white background area rate is greater than the predetermined threshold value TH7. The predetermined threshold value TH7 is also appropriately determined based on experience such as experiments, and is, for example, 60%.

[0127] As described above, the white background determination section 256 outputs the third determination signal Sg representing the result of its own determination. The third determination signal Sg is then input to the final determination section 258.

[0128] The flow of a series of processes performed by the white background determining unit 256, that is, the white background determining process, is illustrated in FIG.

[0129] According to this white background determination process, first, in step S201, the white background determination unit 256 focuses on the first (leading) pixel data included in the image data Dj', that is, identifies the first pixel of interest in the image based on the image data Dj'. Then, the white background determination unit 256 proceeds to step S203.

[0130] In step S203, the white background determination unit 256 performs a smoothing process on the pixel of interest, more specifically, on the above-mentioned white background determination block including the pixel of interest.Then, the white background determination unit 256 advances the process to step S204.

[0131] In step S204, the white background determination unit 256 determines whether the absolute values ​​|C1| and |C2| of the C1 value and C2 value of the pixel of interest (pixel data) are both equal to or less than the radius TH1 of the achromatic space 310, that is, whether the pixel value of the pixel of interest belongs to the achromatic space 310. If the absolute values ​​|C1| and |C2| of the C1 value and C2 value of the pixel of interest are both equal to or less than the radius TH1 of the achromatic space 310 (S204: YES), the white background determination unit 256 advances the process to step S205. On the other hand, if either of the absolute values ​​|C1| and |C2| of the C1 value and C2 value of the pixel of interest is greater than the radius TH1 of the achromatic space 310 (S204: NO), the white background determination unit 256 advances the process to step S209, which will be described later.

[0132] In step S205, the white background determination unit 256 compares the luminance value (L value) of the pixel of interest with a predetermined threshold value TH6. For example, if the luminance value of the pixel of interest is equal to or greater than the predetermined threshold value TH6 (S205: YES), the white background determination unit 256 advances the process to step S207. On the other hand, if the luminance value of the pixel of interest is smaller than the predetermined threshold value TH6 (S205: NO), the white background determination unit 256 advances the process to step S209, which will be described later.

[0133] In step S207, the white background determination unit 256 counts the pixel of interest as a white background region pixel that is a component of the white background region, that is, counts the pixel data corresponding to the pixel of interest as white background region pixel data. Then, the white background determination unit 256 proceeds to step S209.

[0134] In step S209, the white background determination unit 256 determines whether the process for determining whether all pixels are white background area pixels, that is, at least the processes from step S203 to step S205, has been completed. For example, if the process for determining whether all pixels are white background area pixels has been completed (S209: YES), the white background determination unit 256 advances the process to step S213, which will be described later. On the other hand, if the process for determining whether all pixels are white background area pixels has not been completed (S209: NO), the white background determination unit 256 advances the process to step S211.

[0135] In step S211, the white background determination unit 256 identifies the next pixel of interest included in the image data Dj'. Then, the white background determination unit 256 returns the process to step S203.

[0136] On the other hand, when the process proceeds from step S209 to step S213, the white background determination unit 256 calculates the white background area rate in step S213. That is, the white background determination unit 256 derives the ratio of the number of white background area pixel data to the number of all pixel data included in the image data Dj' as the white background area rate. Then, the white background determination unit 256 proceeds to step S215.

[0137] In step S215, the white background determination unit 256 compares the white background area rate derived in step S213 with a predetermined threshold TH7. For example, if the white background area rate is greater than the predetermined threshold TH7 (S215: YES), the white background determination unit 256 advances the process to step S217. On the other hand, if the white background area rate is equal to or less than the predetermined threshold TH7 (S215: NO), the white background determination unit 256 advances the process to step S219.

[0138] In step S217, the white background determination unit 256 determines that the third condition is satisfied, and the white background determination unit 256 advances the process to step S217.

[0139] On the other hand, if the process proceeds from step S215 to step S219, the white background determination unit 256 determines that the third condition is not satisfied in step S219. Then, the white background determination unit 256 proceeds to step S221.

[0140] In step S221, the white background determining unit 256 outputs a third determination signal Sg representing the result of the determination in step S217 or step S219. With this, the white background determining unit 256 ends a series of white background determination processes.

[0141] Next, the final judgment section 258 will be described in detail. As described above, the final judgment section 258 makes a final judgment as to whether it is appropriate to execute index color processing or full color processing based on the first judgment signal Se, the second judgment signal Sf, and the third judgment signal Sg, that is, based on whether the first condition, the second condition, and the third condition are satisfied. The final judgment section 258 then outputs its own final judgment result as the judgment result of the entire color number conversion judgment section 200, as a color number conversion judgment signal Sc representing the judgment result.

[0142] The flow of the series of processes performed by the final decision unit 258, that is, the final decision process, is illustrated in FIG.

[0143] According to this final judgment process, first, in step S301, final judgment unit 258 judges whether or not the first judgment signal Se, that is, the judgment result by color distribution judgment unit 252, indicates that a first condition is satisfied. If the first condition is satisfied (S301: YES), final judgment unit 258 advances the process to step S303. On the other hand, if the first condition is not satisfied (S301: NO), final judgment unit 258 advances the process to step S309, which will be described later.

[0144] In step S303, the final determination unit 258 determines whether the second determination signal Sf, that is, the determination result by the photo determination unit 254, indicates that the second condition is satisfied. If the second condition is satisfied (S303: YES), the final determination unit 258 advances the process to step S305. On the other hand, if the second condition is not satisfied (S303: NO), the final determination unit 258 advances the process to step S309, which will be described later.

[0145] In step S305, final judgment unit 258 judges whether or not third judgment signal Sg, that is, the judgment result by white background judgment unit 256, indicates that the third condition is satisfied. If the third condition is satisfied (S305: YES), final judgment unit 258 advances the process to step S307. On the other hand, if the third condition is not satisfied (S305: NO), final judgment unit 258 advances the process to step S309, which will be described later.

[0146] That is, only when all of the first condition, the second condition, and the third condition are satisfied, final determination unit 258 advances the process to step S307. Otherwise, that is, when at least one of the first condition, the second condition, and the third condition is not satisfied, final determination unit 258 advances the process to step S309.

[0147] In step S309, the final decision unit 258 makes a final decision that it is appropriate to perform index color processing, and the final decision unit 258 then advances the process to step S311.

[0148] On the other hand, in step S309, the final decision unit 258 makes a final decision that full-color processing is appropriate, and the final decision unit 258 advances the process to step S311.

[0149] In step S311, the final determination unit 258 outputs a color number conversion determination signal Sc that represents the final determination result in step S307 or step S309, that is, the determination result of the entire color number conversion determination unit 200. With this, the final determination unit 258 ends the series of final determination processes.

[0150] The image processing unit 14 including such a color number conversion determination unit 200 is configured, for example, by an ASIC. Without being limited to this, or in addition to an ASIC, the image processing unit 14 may be configured by an element dedicated to image processing, such as a DSP. In particular, in order to speed up the processing by the color number conversion determination unit 200, the resolution of the input image data Dj to the color number conversion determination unit 200 may be appropriately reduced, and the processing by the color number conversion determination unit 200 may be performed in a simplified manner, so to speak.

[0151] As described above, according to the first embodiment, and in particular the automatic discrimination function of the color number conversion judgment unit 200, it is judged whether it is appropriate to execute index color processing or full color processing based on the color distribution degree, which is the distribution degree of pixel values ​​of each pixel data included in the input image data Di (strictly speaking, image data Dj'), the photographic area rate, which is the rate of photographic area pixel data that constitutes the photographic area among the pixel data, and the white background area rate, which is the rate of white background area pixel data that constitutes the white background area among the pixel data. This realizes an appropriate judgment.

[0152] The color distribution determination unit 252, which is responsible for deriving the color distribution degree, performs color reduction processing for determination as described above, and in this process, divides the LC1C2 color space 300, which is the coordinate space of the image data Dj', into one achromatic color space 310 and eight chromatic color spaces 320, 320, ..., but is not limited to this. For example, the color distribution determination unit 252 may perform color reduction processing by the median division method without dividing the LC1C2 color space 300, similar to the manner of color reduction processing by a general median division method. However, by dividing the LC1C2 color space 300 into one achromatic color space 310 and eight chromatic color spaces 320, 320, ... as described above and then performing color reduction processing by the median division method, it is possible to obtain appropriate index colors (representative colors), and ultimately to derive an appropriate color distribution degree.

[0153] Here, the chromatic color space 330 is equally divided into eight parts to define the eight chromatic color spaces 320, 320, ..., but this is not limiting. That is, the chromatic color space 330 may be divided unequally instead of equally, and therefore the number of divisions, division positions, division intervals, etc. of the chromatic color space 330 may be determined arbitrarily, and furthermore, the chromatic color space 330 does not have to be divided (subdivided).

[0154] Furthermore, in the color reduction process for compression by the color number conversion processing unit 216, similar to the color reduction process for determination by the color distribution determination unit 252, the color reduction process for compression may be performed after dividing into one achromatic color space and one or more chromatic color spaces. This allows the color reduction process for compression by the color number conversion processing unit 216 to find appropriate index colors, thereby suppressing deterioration of image quality.

[0155] The color distribution determination unit 252 in the first embodiment, particularly the color distribution determination unit 252 that executes steps S1 to S21 in the color distribution determination process (see Figs. 8 and 9), is an example of a color distribution degree derivation means according to the present invention. In particular, the color distribution determination unit 252 that executes steps S1 to S19 in the color distribution determination process is an example of a determination-use color reduction means according to the present invention. Strictly speaking, the color distribution determination unit 252 that executes step S21 in the color distribution determination process derives the above-mentioned mutual difference (=maximum value-minimum value) in step S21, in other words, derives the length of the longest side of the small space 350 with the longest side, and is an example of a color distribution degree derivation execution means according to the present invention.

[0156] Moreover, the photo determination unit 254 in the first embodiment, particularly the photo determination unit 254 that executes steps S101 to S125 in the photo determination process (see FIG. 10 and FIG. 11), is an example of a photographic area rate derivation means according to the present invention. In particular, the photo determination unit 254 that executes steps S101 to S115 in the photo determination process is an example of an entropy derivation means according to the present invention. And the photo determination unit 254 that executes steps S117 to S119 in the photo determination process is an example of a photographic area block determination means according to the present invention. Furthermore, the photo determination unit 254 that executes step S125 in the photo determination process is an example of a photographic area rate derivation means according to the present invention.

[0157] In addition, the white background determination unit 256 in this first embodiment, particularly the white background determination unit 256 that executes steps S201 to S213 in the white background determination process (see FIG. 12), is an example of a color uniform area rate derivation means according to the present invention. In particular, the white background determination unit 256 that executes steps S201 to S211 in the white background determination process is an example of a specification means according to the present invention. And the white background determination unit 256 that executes step S213 in the white background determination process is an example of a color uniform area rate derivation execution means according to the present invention.

[0158] Furthermore, the final judgment unit 258 in the first embodiment is an example of the judgment means according to the present invention. Strictly speaking, the color distribution judgment unit 252 that executes steps S23 to S29 in the color distribution judgment process, the photo judgment unit 254 that executes steps S127 to S133 in the photo judgment process, and the white background judgment unit 256 that executes steps S215 to S221 in the white background judgment process also constitute examples of the judgment means according to the present invention.

[0159] [Second Example] Next, a second embodiment of the present invention will be described.

[0160] In the second embodiment, the color number conversion determination unit 200 is configured as shown in FIG. 14. That is, in the second embodiment, the color conversion unit 250 as in the first embodiment is not provided. In the second embodiment, RGB image data as input image data Dj to the color number conversion determination unit 200 is directly input to each of the color distribution determination unit 252, the photo determination unit 254, and the white background determination unit 256. Other parts in the second embodiment are similar to those in the first embodiment. Therefore, the same reference numerals as those in the first embodiment are used for parts in the second embodiment that are similar to those in the first embodiment, and detailed explanations will be omitted.

[0161] In the second embodiment, the color distribution determination unit 252 performs a color reduction process for determination, as in the first embodiment. In this case, as shown in FIG. 15, the color distribution determination unit 252 divides an RGB color space 400, which is a coordinate space of image data Dj input to the color distribution determination unit 252, into one achromatic color space 410 and a plurality of, for example, eight, chromatic color spaces 420, 420, .... Note that FIG. 5 shows the RGB color space 400 in three-dimensional orthogonal coordinates. In this RGB color space 400, the origin corresponds to black (K: key plate). The vertex opposite the origin corresponds to white (W). The vertex opposite the origin (K) on the RG plane corresponds to yellow (Y). Furthermore, the vertex opposite the origin (K) on the GB plane corresponds to cyan (C). In addition, the vertex opposite the origin (K) on the BR plane corresponds to magenta (M). As mentioned above, each of the R, G, and B component values ​​is 8 bits, that is, from "0" to "255."

[0162] With respect to such an RGB color space 400, the color distribution determining unit 252 defines a portion where the relative difference |RG| between the R value and the G value, the relative difference |GB| between the G value and the B value, and the relative difference |BR| between the B value and the R value are all equal to or less than a predetermined threshold value TH8 as an achromatic color space 410. That is, the color distribution determining unit 252 defines a straight line connecting the vertex corresponding to black and the vertex corresponding to white, and the portion surrounding the straight line, as the achromatic color space 410. The predetermined threshold value TH8 referred to here is a value sufficiently smaller than the maximum value (=255) of each of the R, G, and B component values, for example, "6", but is not limited to this.

[0163] Additionally, the color distribution determination unit 252 defines a portion 430 of the RGB color space 400 other than the achromatic color space 410 as a chromatic color space. Furthermore, the color distribution determination unit 252 defines eight subdivided cubic chromatic color spaces 420, 420, ... by equally dividing the chromatic color space 430 into three planes 440, 450, and 460. The plane 440 is parallel to the RG plane and is arranged so as to include the median value of the B value. The plane 450 is parallel to the GB plane and is arranged so as to include the median value of the R value. The plane 460 is parallel to the BR plane and is arranged so as to include the median value of the G value.

[0164] Then, the color distribution determination unit 252 assigns the pixel values ​​of each pixel data included in the image data Dj to the RGB color space 400. Then, although not shown in the figure, in each of the achromatic color space 410 and each of the chromatic color spaces 420, 420, ..., the color distribution determination unit 252 imagines a small rectangular parallelepiped space with the smallest volume within a range that includes the pixel values ​​of all the pixel data assigned to each of the achromatic color spaces 410 and each of the chromatic color spaces 420, 420, ..., in other words, it imagines all the small spaces.

[0165] After this, the color distribution determination unit 252 performs the color reduction process in the same manner as in the first embodiment. That is, the color distribution determination unit 252 calculates the maximum and minimum values ​​of the R, G, and B component values ​​for each small space. Then, the color distribution determination unit 252 identifies the small space in which the mutual difference between the maximum and minimum values ​​of the component values ​​is the largest, regardless of which of the R, G, and B component values ​​the color distribution determination unit 252 is. In other words, the color distribution determination unit 252 identifies the small space with the longest side. Furthermore, the color distribution determination unit 252 divides the identified small space in half, more specifically, so that the mutual difference between the maximum and minimum values ​​of the R, G, and B component values ​​is the largest is halved. In other words, the color distribution determination unit 252 divides the small space in such a way that the length of the longest side of the small space with the longest side is halved.

[0166] In this manner, the color distribution determination unit 252 divides the small space with the longest side each time until the total number of small spaces reaches the aforementioned predetermined number N (for example, N=20). Then, when the total number of small spaces reaches the predetermined number N, the color distribution determination unit 252 identifies the small space with the longest side among these N small spaces. Then, the color distribution determination unit 252 compares the length of the longest side of the identified small space with a predetermined threshold value TH9.

[0167] For example, suppose that the length of the longest side of the identified small space is shorter than a predetermined threshold value TH9. In this case, the color distribution determination unit 252 determines that even if the color reduction process for compression is performed by the color number conversion processing unit 216 described above (FIG. 3), and even if index color processing including the color reduction process is performed, the image quality (color tone) will not deteriorate significantly, in other words, the deterioration of the image quality is within an acceptable range. Based on this, the color distribution determination unit 252 determines that the first condition is satisfied.

[0168] On the other hand, suppose that the length of the longest side of the identified small space is equal to or greater than a predetermined threshold value TH9. In this case, the color distribution determination unit 252 determines that there is a possibility that image quality will be significantly degraded if the color number conversion processing unit 216 performs color reduction processing for compression. In other words, the color distribution determination unit 252 determines that it is not appropriate for the color number conversion processing unit 216 to perform color reduction processing for compression, and further that it is not appropriate to perform index color processing including the color reduction processing. Based on this, the color distribution determination unit 252 determines that the first condition is not satisfied.

[0169] That is, the color distribution determination unit 252 estimates the color distribution degree of the image data Dj based on the length of the longest side of the small space having the longest side, and in other words, indirectly derives the color distribution degree. In addition, the color distribution determination unit 252 treats the predetermined threshold value TH9 as a first reference value. Then, the color distribution determination unit 252 determines whether the first condition is satisfied based on whether the length of the longest side of the small space having the longest side is shorter than the predetermined threshold value TH9. Note that the predetermined threshold value TH9 is appropriately determined based on experience such as experiments.

[0170] The color distribution determining section 252 then outputs a first determination signal Se representing the result of its own determination. This first determination signal Se is input to the final determining section 258.

[0171] The series of processes performed by the color distribution determining unit 252 in the second embodiment, that is, the flow of the color distribution determination process, is illustrated in FIGS.

[0172] According to this color distribution determination process, first, in step S401, the color distribution determination unit 252 focuses on the first (leading) pixel data included in the image data Dj, that is, identifies the first pixel of interest in the image based on the image data Dj. Then, the color distribution determination unit 252 proceeds to step S403.

[0173] In step S403, the color distribution determination unit 252 determines whether the relative difference |RG| between the R value and the G value, the relative difference |GB| between the G value and the B value, and the relative difference |BR| between the B value and the R value of the pixel of interest (pixel data) are all equal to or less than a predetermined threshold value TH8. For example, if the relative differences |RG|, |GB|, and |BR| of the pixel of interest are all equal to or less than the predetermined threshold value TH8 (S403: YES), the color distribution determination unit 252 advances the process to step S405. On the other hand, if any of the relative differences |RG|, |GB|, and |BR| of the pixel of interest is greater than the predetermined threshold value TH8 (S403: NO), the color distribution determination unit 252 advances the process to step S407, which will be described later.

[0174] In step S405, the color distribution determining unit 252 classifies the pixel of interest into the achromatic space 410, and more precisely, assigns it to a coordinate position in the achromatic space 410. Then, the color distribution determining unit 252 advances the process to step S409.

[0175] On the other hand, when the color distribution determination unit 252 advances the process from step S403 to step S407, in step S407, it classifies the pixel of interest into a corresponding space among the eight chromatic color spaces 420, 420, ..., and, strictly speaking, assigns the pixel of interest to a coordinate position in the corresponding chromatic color space 420. Then, the color distribution determination unit 252 advances the process to step S409.

[0176] In step S409, the color distribution determination unit 252 determines whether classification into the achromatic color space 410 and each of the chromatic color spaces 420, 420, ... has been completed for all pixels included in the image data Dj. If classification has been completed for all pixels (S409: YES), the color distribution determination unit 252 advances the process to step S413, which will be described later. On the other hand, if classification has not been completed for all pixels (S409: NO), the color distribution determination unit 252 advances the process to step S411.

[0177] In step S411, the color distribution determining unit 252 identifies the next pixel of interest included in the image data Dj. Then, the color distribution determining unit 252 returns the process to step S403.

[0178] On the other hand, if the process proceeds from step S409 to step S413, the color distribution determination unit 252 calculates the maximum and minimum values ​​of the R, G, and B component values ​​in each small space in step S413. Then, the color distribution determination unit 252 proceeds to step S415.

[0179] In step S415, the color distribution determination unit 252 identifies a small space in which the mutual difference between the maximum and minimum values ​​of the component values ​​(=maximum value-minimum value) is the largest, regardless of whether the component value is R, G, or B. In other words, the color distribution determination unit 252 identifies a small space with the longest side. Then, the color distribution determination unit 252 proceeds to step S417.

[0180] In step S417, the color distribution determination unit 252 divides the small space identified in step S415 in half, more specifically, so that the mutual difference between the maximum and minimum values ​​of the R, G, and B component values ​​that is the largest is halved. In other words, the color distribution determination unit 252 divides the small space so that the length of the longest side of the small space with the longest side is halved. Then, the color distribution determination unit 252 proceeds to the process of step S419.

[0181] In step S419, the color distribution determination unit 252 determines whether or not the total number of small spaces has reached the aforementioned predetermined number N. For example, if the total number of small spaces has not reached the predetermined number N (S419: NO), the color distribution determination unit 252 returns the process to step S413. On the other hand, if the total number of small spaces has reached the aforementioned predetermined number N (S419: YES), the color distribution determination unit 252 advances the process to step S421.

[0182] In step S421, similarly to step S415 described above, the color distribution determination unit 252 identifies the small space in which the mutual difference between the maximum and minimum values ​​of the component values ​​(=maximum value-minimum value) is the largest, that is, identifies the small space with the longest side, regardless of whether the component value is R, G, or B. Then, the color distribution determination unit 252 proceeds to the process of step S423.

[0183] In step S423, the color distribution determination unit 252 determines whether the mutual difference (=maximum-minimum) in the small space identified in step S421 is smaller than a predetermined threshold TH9, that is, whether the length of the longest side of the small space is shorter than the predetermined threshold TH9. For example, if the mutual difference (=maximum-minimum) is smaller than a predetermined threshold TH4, that is, if the length of the longest side of the small space with the longest side is shorter than the predetermined threshold TH4 (S423: YES), the color distribution determination unit 252 advances the process to step S425. On the other hand, if the mutual difference (=maximum-minimum) is equal to or greater than the predetermined threshold TH9, that is, if the length of the longest side of the small space with the longest side is equal to or greater than the predetermined threshold TH9 (S43: NO), the color distribution determination unit 252 advances the process to step S427, which will be described later.

[0184] In step S425, the color distribution determining section 252 determines that the first condition is satisfied, and the color distribution determining section 252 advances the process to step S429.

[0185] On the other hand, if the process proceeds from step S423 to step S427, the color distribution determining section 252 determines that the first condition is not satisfied in step S427, and then the color distribution determining section 252 proceeds to step S429.

[0186] In step S429, the color distribution determining section 252 outputs a first determination signal Se representing the result of the determination in step S425 or step S427, whereby the color distribution determining section 252 ends the series of color distribution determination processes.

[0187] The photo determination unit 254 performs the photo determination process in the same manner as in the first embodiment (see Figs. 10 and 11). However, in this second embodiment, the photo determination process may be performed after a luminance value (L value) is calculated from each of the R, G, and B component values, or, for example, a G value may be applied instead of the luminance value.

[0188] Also, the white background determination unit 256 performs the white background determination process in the same manner as in the first embodiment (see FIG. 12). However, in this second embodiment, it is determined whether the pixel value of the pixel data belongs to the achromatic space 410 or not based on whether the relative differences |RG|, |GB|, and |BR| of the pixel data (target pixel) after the smoothing process are all equal to or less than the above-mentioned threshold value TH8. Then, for the pixel data whose pixel value is determined to belong to the achromatic space 410, its luminance value is compared with a predetermined threshold value TH1, and it is determined whether the pixel data is a white background region pixel data or not. In this case, the luminance value may be calculated from the R, G, and B component values ​​of the pixel value of the image data, or, for example, the G value may be applied instead of the luminance value.

[0189] Thus, according to the second embodiment, and particularly according to the color distribution determination unit 252, a color reduction process for determination is performed in the RGB color space 400, and a color distribution determination process including the color reduction process for determination is performed. As with the first embodiment, according to the second embodiment, it is possible to appropriately determine whether it is appropriate to perform index color processing or full color processing.

[0190] In particular, in the second embodiment, the color conversion unit 250 as in the first embodiment is not provided, that is, color conversion processing for converting RGB image data as input image data Dj into image data Dj' in LC1C2 format is not performed, so that the processing of the color number conversion determination unit 200 as a whole can be simplified. In short, the second embodiment is more advantageous than the first embodiment in terms of processing performance. Note that in terms of determination accuracy, the first embodiment is more advantageous than the second embodiment.

[0191] Also in the second embodiment, the color distribution determination unit 252, which is responsible for deriving the color distribution degree, performs the color reduction process for the determination as described above, and in this process, divides the RGB color space 400, which is the coordinate space of the image data Dj, into one achromatic color space 410 and eight chromatic color spaces 420, 420, ..., but is not limited to this. For example, the color distribution determination unit 252 may perform the color reduction process by the median division method without dividing the RGB color space 400, similar to the manner of the color reduction process by the general median division method. However, by dividing the RGB color space 400 into one achromatic color space 410 and eight chromatic color spaces 420, 420, ... as described above and then performing the color reduction process by the median division method, it is possible to obtain an appropriate index color (representative color), and thus to derive an appropriate color distribution degree.

[0192] Although the eight chromatic color spaces 420, 420, ... are defined by equally dividing the chromatic color space 430 into eight, this is not limiting. In other words, the chromatic color space 430 may be divided unequally instead of equally, and therefore the number of divisions and division positions of the chromatic color space 430 may be determined arbitrarily, and furthermore, the chromatic color space 430 does not have to be divided (subdivided).

[0193] Also in the second embodiment, the color reduction process for compression by the color number conversion processing unit 216 may be performed after dividing into one achromatic color space and one or more chromatic color spaces, similar to the color reduction process for determination by the color distribution determination unit 252. This makes it possible to obtain more appropriate index colors for the color reduction process for compression by the color number conversion processing unit 216, and ultimately makes it possible to further suppress deterioration of image quality.

[0194] The color distribution determination unit 252 in the second embodiment, particularly the color distribution determination unit 252 that executes steps S401 to S421 in the color distribution determination process (see Figs. 16 and 17), is also an example of the color distribution degree derivation means according to the present invention. In particular, the color distribution determination unit 252 that executes steps S401 to S419 in the color distribution determination process is an example of the determination-use color reduction means according to the present invention. Strictly speaking, the color distribution determination unit 252 that executes step S421 in the color distribution determination process derives the above-mentioned mutual difference (=maximum value-minimum value) in step S421, in other words, derives the length of the longest side of the small space with the longest side. The color distribution determination unit 252 is an example of the color distribution degree derivation execution means according to the present invention. In addition, the color distribution determination unit 252 that executes steps S423 to S429 in the color distribution determination process also constitutes an example of the determination means according to the present invention.

[0195] [Third Example] Next, a third embodiment of the present invention will be described.

[0196] In the third embodiment, the color number conversion determination unit 200 is configured as shown in Fig. 18. That is, in the third embodiment, for example, a color uniformity determination unit 260 is provided instead of the white background determination unit 256 in the first embodiment. Other parts in the third embodiment are similar to those in the first embodiment. Therefore, parts in the third embodiment that are similar to those in the first embodiment are given the same reference numerals as those in the first embodiment, and detailed descriptions thereof will be omitted.

[0197] The color uniformity determination unit 260 in the third embodiment derives a color uniformity region rate, which is the ratio of color uniformity region pixel data constituting a region in which pixel values ​​can be considered to be uniform, that is, a color uniform region, among all pixel data included in the input image data Di to the image processing unit 14. The color uniformity region referred to here includes a white background region. The color uniformity region also includes a color background region and a solidly painted region. Then, the color uniformity determination unit 260 determines that the third condition is satisfied when the color uniformity region rate is greater than a predetermined threshold value TH11. That is, the color uniformity determination unit 260 handles the predetermined threshold value TH11 as a third reference value. Then, the color uniformity determination unit 260 determines whether the third condition is satisfied based on whether the color uniformity region rate is greater than the predetermined threshold value TH11. The predetermined threshold value TH11 is appropriately determined based on experience such as experiments, and is, for example, 60%.

[0198] Specifically, for each pixel data included in the image data Dj', the color uniformity determination unit 260 performs a smoothing process on a color uniformity determination block, which is a group of p×q (p and q are both integers equal to or greater than 2) pieces of pixel data that include the pixel data as pixel data of interest, strictly speaking. Note that p×p is, for example, 3×3 (i.e., p=3 and q=3) or 5×5 (i.e., p=5 and q=5).

[0199] Then, for each color uniformity judgment block, the color uniformity judgment unit 260 extracts the maximum and minimum values ​​of the L, C1, and C2 component values ​​of the pixel data after the smoothing process, and calculates the mutual difference between the maximum and minimum values ​​(=maximum value-minimum value). Furthermore, the color uniformity judgment unit 260 compares the mutual differences between L, C1, and C2 with a predetermined threshold value TH10.

[0200] Here, for example, if the mutual differences between L, C1, and C2 are all equal to or less than a predetermined threshold value TH10, the color uniformity judgment unit 260 judges that the pixel values ​​of all pixel data in the color uniformity judgment block are uniform. Then, the color uniformity judgment unit 260 treats the pixel data of interest in the color uniformity judgment block as a candidate for color uniformity region pixel data. Then, the color uniformity judgment unit 260 calculates the average value in the color uniformity judgment block for each component value of L, C1, and C2. In addition, the color uniformity judgment unit 260 quantizes the average value for each component value of L, C1, and C2, and more specifically, shifts the number of bits (8 bits) of the average value to the right by a predetermined bit, for example, 3 bits, that is, discards the lowest 3 bits. By quantizing in this way, the subsequent processing is simplified. Then, the color uniformity judgment unit 260 counts the pixel data of interest as a candidate for color uniform region pixel data having the quantized component values ​​(quantized values) of L, C1, and C2. This count value (frequency) is stored in a color uniformity count table 500 provided in the color uniformity determining section 260, as shown in FIG.

[0201] According to the color uniformity count table 500 shown in Fig. 19, the number of color uniform region pixel data candidates having the quantized values ​​of L, C1, and C2 of "31", "16", and "16", respectively, is "300,000". And the number of color uniform region pixel data candidates having the quantized values ​​of L, C1, and C2 of "31", "16", and "25", respectively, is "50,000". The contents of the color uniformity count table 500 shown in Fig. 19 are merely an example.

[0202] On the other hand, if at least one of the mutual differences between L, C1, and C2 is greater than a predetermined threshold value TH10, the color uniformity judgment unit 260 judges that the pixel values ​​of all pixel data in the color uniformity judgment block are not uniform. For example, even if the color uniformity judgment block constitutes a color base region or a solid painted region, if there is color unevenness, it is determined that the pixel values ​​of all pixel data in the color uniformity judgment block are not uniform. In this case, the color uniformity judgment unit 260 does not count the target pixel data as a color uniform region pixel data candidate.

[0203] In this manner, the color uniformity determination unit 260 determines whether all pixel data included in the image data Dj' are color uniform region pixel data candidates, and if they are color uniform region pixel data candidates, stores the count value in the color uniformity count table 500. The color uniformity determination unit 260 regards color uniform region pixel data candidates whose count value in the color uniformity count table 500 is equal to or greater than a predetermined threshold value TH12 as color uniform region pixel data, not as the candidate. The predetermined threshold value TH12 is appropriately set according to the size of the image data Dj' (input image data Di, to be precise). For example, in the color uniformity count table 500 shown in FIG. 19, if the aforementioned predetermined threshold value TH12 is "10000", color uniform region pixel data candidates having quantized values ​​of L, C1, and C2 of "31", "16", and "16", respectively, that is, "300000" color uniform region pixel data candidates, are regarded as color uniform region pixel data. In addition, the color uniform region pixel data candidates with quantized values ​​of L, C1, and C2 of "31," "16," and "25," respectively, that is, the number of color uniform region pixel data candidates "50,000," are also regarded as color uniform region pixel data.

[0204] Furthermore, the color uniformity determination unit 260 derives the ratio of the number of color uniform region pixel data (count value) to the number of all pixel data included in the image data Dj' as a color uniform region rate. For example, in the color uniformity count table 500 shown in Fig. 19, if the predetermined threshold value TH12 is "10000" as described above, the total number of color uniform region pixel data is "350000 (=300000+50000)".

[0205] Then, the color uniformity determination unit 260 compares the color uniformity region rate with a predetermined threshold value TH11. For example, it is assumed here that the color uniformity region rate is greater than the predetermined threshold value TH11. In this case, the color uniformity determination unit 260 recognizes that the ratio of color uniform regions in the image data Dj' is relatively large. The color uniformity determination unit 260 then determines that a high compression rate can be obtained for such image data Dj' (strictly speaking, the input image data Di) by performing index color processing. Based on this, the color uniformity determination unit 260 determines that the third condition is satisfied.

[0206] On the other hand, suppose that the color uniformity region rate is equal to or less than a predetermined threshold value TH11. In this case, the color uniformity determination unit 260 recognizes that the rate of color uniform regions in the image data Dj' is relatively small, in other words, the region in which the pixel values ​​can be considered to be uniform is relatively small. The color uniformity determination unit 260 then determines that a high compression rate cannot be obtained for such image data Dj' (strictly speaking, input image data Di) when index color processing is performed. Based on this, the color uniformity determination unit 260 determines that the third condition is not satisfied.

[0207] The color uniformity determination section 260 outputs a third determination signal Sg indicating the result of its own determination. The third determination signal Sg is then input to the final determination section 258.

[0208] The flow of the series of processes performed by the color uniformity determination unit 260, that is, the color uniformity determination process, is illustrated in FIG.

[0209] According to this color uniformity determination process, first, in step S501, the color uniformity determination unit 260 focuses on the first (leading) pixel data included in the image data Dj', that is, identifies the first pixel of interest in the image based on the image data Dj'. Then, the color uniformity determination unit 260 proceeds to step S503.

[0210] In step S503, the color uniformity determination unit 260 performs a smoothing process on the pixel of interest, more specifically, on the color uniformity determination block including the pixel of interest, and then the color uniformity determination unit 260 advances the process to step S505.

[0211] In step S505, the color uniformity judgment unit 260 extracts the maximum and minimum values ​​of the component values ​​L, C1, and C2 of the pixel data after the smoothing process in the color uniformity judgment block, and calculates the mutual difference (=maximum value-minimum value) of the maximum and minimum values. Then, the color uniformity judgment unit 260 compares the mutual differences of L, C1, and C2 with a predetermined threshold value TH10. For example, if the mutual differences of L, C1, and C2 are all equal to or less than the predetermined threshold value TH10 (S505: YES), the color uniformity judgment unit 260 advances the process to step S507. On the other hand, if at least one of the mutual differences of L, C1, and C2 is greater than the predetermined threshold value TH10 (S505: NO), the color uniformity judgment unit 260 advances the process to step S513, which will be described later.

[0212] In step S507, the color uniformity determination unit 260 calculates the average value in the color uniformity determination block for each of the component values ​​L, C1, and C2 after the smoothing process.Then, the color uniformity determination unit 260 advances the process to step S509.

[0213] In step S509, the color uniformity determination unit 260 quantizes the average value for each of the L, C1, and C2 component values, that is, discards the lowest 3 bits as described above.Then, the color uniformity determination unit 260 advances the process to step S511.

[0214] In step S511, the color uniformity determination unit 260 counts the target pixel data as a color uniform region pixel data candidate, that is, stores the count value in the corresponding location in the color uniformity count table 500 (see FIG. 19). Then, the color uniformity determination unit 260 advances the process to step S513.

[0215] In step S513, the color uniformity determination unit 260 determines whether the process for determining whether all pixel data included in the image data Dj' are candidates for color uniform region pixel data, that is, at least the processes from step S503 to step S505, has been completed. For example, if the process for determining whether all pixel data are candidates for color uniform region pixel data has been completed (S513: YES), the color uniformity determination unit 260 proceeds to step S517, which will be described later. On the other hand, if the process for determining whether all pixel data are candidates for color uniform region pixel data has not been completed (S513: NO), the color uniformity determination unit 260 proceeds to step S515.

[0216] In step S515, the color uniformity determination section 260 identifies the next pixel of interest contained in the image data Dj', and then returns the process to step S503.

[0217] On the other hand, when the process proceeds from step S513 to step S517, the color uniformity determination unit 260 calculates the color uniformity region ratio in step S517. That is, the color uniformity determination unit 260 regards a color uniformity region pixel data candidate whose count value in the color uniformity count table 500 is equal to or greater than the predetermined threshold value TH12 as color uniform region pixel data, rather than the candidate. The color uniformity determination unit 260 then derives the ratio of the number of color uniform region pixel data (count value) to the number of all pixel data included in the image data Dj' as the color uniformity region ratio. Then, the color uniformity determination unit 260 proceeds to step S519.

[0218] In step S519, the color uniformity determination unit 260 compares the color uniformity region ratio derived in step S517 with a predetermined threshold TH11. For example, if the color uniformity region ratio is greater than the predetermined threshold TH11 (S519: YES), the color uniformity determination unit 260 advances the process to step S521. On the other hand, if the color uniformity region ratio is equal to or less than the predetermined threshold TH11 (S519: NO), the color uniformity determination unit 260 advances the process to step S523.

[0219] In step S521, the color uniformity determination unit 260 determines that the third condition is satisfied, and proceeds to step S5257.

[0220] On the other hand, if the process proceeds from step S519 to step S523, the color uniformity determination unit 260 determines in step S523 that the third condition is not satisfied, and proceeds to step S525.

[0221] In step S525, the color uniformity determination section 260 outputs a third determination signal Sg indicative of the result of the determination in step S521 or step S523, whereby the color uniformity determination section 260 ends the series of color uniformity determination processes.

[0222] Thus, according to the third embodiment, and particularly according to the color uniformity determination unit 260, the ratio of color uniform areas, including not only white background areas but also color background areas and solid-color areas, in an image based on the input image data Di is used as a criterion for determining whether the third condition is satisfied, and is also used as one of the criteria for determining whether index color processing or full color processing is appropriate to be performed. As with the first embodiment, according to the third embodiment, it is possible to appropriately determine whether index color processing or full color processing is appropriate to be performed.

[0223] In the third embodiment, a color uniformity determination unit 260 is provided instead of the white background determination unit 256 in the first embodiment, but the color uniformity determination unit 260 may be provided instead of the white background determination unit 256 in the second embodiment. In this case, the color uniformity determination process is performed on the image data Di in the RGB format, not on the image data Dj' in the LC1C2 format.

[0224] The color uniformity determination unit 260 in the third embodiment, and in particular the color uniformity determination unit 260 that executes steps S501 to S517 in the color uniformity determination process (see FIG. 20), are also an example of a color uniformity area rate derivation means according to the present invention. In particular, the color uniformity determination unit 260 that executes steps S501 to S515 in the color uniformity determination process is an example of a specification means according to the present invention. And the color uniformity determination unit 260 that executes step S517 in the color uniformity determination process is an example of a color uniformity area rate derivation execution means according to the present invention. Furthermore, the color uniformity determination unit 260 that executes steps S519 to S525 in the color uniformity determination process also constitutes an example of a determination means according to the present invention.

[0225] [Other application examples] The above-mentioned embodiments are specific examples of the present invention, and do not limit the technical scope of the present invention. The present invention can be applied to aspects other than these embodiments.

[0226] For example, the color distribution determination process by the color distribution determination unit 252, the photo determination process by the photo determination unit 254, the white background determination process by the white background determination unit 256, and the color uniformity determination process by the color uniformity determination unit 260 may be performed in a manner other than those described in each embodiment.

[0227] In addition, although the compression process using the lossless compression method is described as being, for example, the Deflate method, a compression process using a method other than the Deflate method may be used. As for the compression process using the lossy compression method, the compression process using, for example, the JPEG method is described as being used, but a compression process using a method other than the JPEG method may be used.

[0228] Additionally, the image data Da compressed by the compression processing unit 220 of the image processing unit 14 is shaped into a PDF file regardless of the compression method, but is not limited to this. For example, the image data Da may be shaped into a TIFF file instead of a PDF file. Alternatively, the image data Da compressed by the Deflate method may be shaped into a PNG file. And the image data Da compressed by the JPEG method may be shaped into a JPEG file.

[0229] Furthermore, although image data in the LAB format has been exemplified as image data in the LC1C2 format, this is not limiting. For example, the present invention can also be applied to cases where image data in a format other than the LAB format, such as the XYZ format, the CIELUV format, or the CIELCH format, is used.

[0230] For example, in the first embodiment, the color distribution determination section 252, the photo determination section 254, and the white background determination section 256 in the color number conversion determination section 200 are configured to be provided in parallel as shown in Fig. 4, but these may be configured to be provided in series. In other words, the color distribution determination process by the color distribution determination section 252, the photo determination process by the photo determination section 254, and the white background determination process by the white background determination section 256 may be configured to be performed sequentially. This also applies to the second embodiment (see Fig. 14) and the third embodiment (see Fig. 18).

[0231] In addition, in each embodiment, the present invention is applied to the multifunction machine 10, but the present invention is not limited to this. For example, the present invention can be applied to an image reading device dedicated to an image scanner. In an extreme case, the present invention can be applied to an image processing device that only has an automatic discrimination function.

[0232] Furthermore, the present invention is not limited to being provided in the form of an apparatus, that is, an image processing apparatus, but can also be provided in the form of a program, that is, an image processing program, and in the form of a method, that is, an image processing method.

[0233] The present invention can also be provided in the form of a computer-readable recording medium on which an image processing program is recorded. In this case, the image processing program recorded on the recording medium is read by a computer and executed by the computer to realize an image forming apparatus similar to the present invention. The recording medium referred to here includes semiconductor media such as USB memory and SD memory card, and disk media such as CD and DVD. Also, instead of portable media, built-in (internal) media such as ROM and hard disk drive that are built into an image forming apparatus (computer system) can also be applied as the recording medium referred to here. [Explanation of symbols]

[0234] 10…Multifunction device 12 … Image reading section 14 ... Image processing section 18 ... Control section 18a...CPU 18b... Main memory section

Claims

1. a color distribution degree deriving means for deriving a color distribution degree which is a distribution degree of pixel values ​​of each pixel data included in the input image data; a photographic area ratio deriving means for deriving a photographic area ratio, which is a ratio of photographic area pixel data constituting a photographic area to the pixel data; a color uniformity region ratio deriving means for deriving a color uniformity region ratio, which is a ratio of color uniformity region pixel data constituting a color uniform region in which the pixel values ​​can be regarded as uniform among the pixel data; and An image processing device comprising a determination means for determining, based on the degree of color distribution, the photographic area rate, and the color uniform area rate, whether it is appropriate to perform index color processing, which performs color reduction processing on the input image data and then compresses it using a lossless compression method, or full color processing, which performs compression processing using a lossy method on the input image data without performing the color reduction processing.

2. 2. The image processing device according to claim 1, wherein the determination means determines that it is appropriate to perform the index color processing only when the color distribution degree is smaller than a first reference value, the photographic area rate is smaller than a second reference value, and the color uniform area rate is greater than a third reference value.

3. The color distribution degree deriving means a determination color reduction means for dividing a color space, which is a coordinate space of the input image data, into a predetermined number of small spaces by performing a determination color reduction process using a median division method on the input image data; and 3. The image processing device according to claim 1, further comprising: a color distribution degree derivation execution means for deriving the color distribution degree based on dimensions of the small spaces after being divided into the predetermined number of colors by the judgment use color reduction means.

4. 4. The image processing device according to claim 3, wherein the determination color reduction means divides the color space into an achromatic color space that can be regarded as an achromatic color space and a chromatic color space that can be regarded as a chromatic color space, and then divides the color space including the achromatic color space and the chromatic color space into small spaces equal to the predetermined number of colors.

5. 5. The image processing device according to claim 4, wherein the determination color reduction means divides the color space into one achromatic color space and a predetermined number (two or more) of the chromatic color spaces, and then divides the color space including the achromatic color space and the chromatic color space into small spaces equal to the predetermined number of colors.

6. The photographic area ratio deriving means includes: an entropy derivation means for deriving, for each block which is a group of the pixel data of a predetermined number of units, entropy which is a feature amount of a histogram of pixel values ​​of the pixel data included in the block; a photographic area block determining means for determining, for each of the blocks, whether or not the block is a photographic area block constituting the photographic area based on the entropy; and 6. The image processing apparatus according to claim 1, further comprising: a photographic area ratio derivation execution means for deriving a ratio of the number of said photographic area blocks to the number of all said blocks as said photographic area ratio.

7. 7. The image processing apparatus according to claim 6, wherein the entropy deriving means derives the entropy after excluding character region pixel data constituting a character region from the pixel data included in the block.

8. The color uniformity area ratio deriving means a specifying means for specifying a predetermined number or more of the pixel data that can be regarded as having a uniform pixel value as the color uniform region pixel data; and 8. The image processing apparatus according to claim 1, further comprising: a color uniformity region ratio derivation execution means for deriving a ratio of the number of the color uniformity region pixel data to the number of all the pixel data as the color uniformity region ratio.

9. The color uniformity area ratio deriving means a specifying means for specifying the pixel data whose pixel value can be regarded as a value representing white as the color uniform region pixel data; and 8. The image processing apparatus according to claim 1, further comprising: a color uniformity region ratio derivation execution means for deriving a ratio of the number of the color uniformity region pixel data to the number of all the pixel data as the color uniformity region ratio.

10. 10. The image processing apparatus according to claim 1, wherein the input image data includes image data read by an image reading device that reads an image of an original.

11. a color distribution degree deriving step of deriving a color distribution degree which is a distribution degree of pixel values ​​of each pixel data included in the input image data; a photographic area ratio deriving step of deriving a photographic area ratio, which is a ratio of photographic area pixel data constituting a photographic area to the pixel data; a color uniformity region ratio deriving step of deriving a color uniformity region ratio, which is a ratio of color uniformity region pixel data constituting a color uniform region in which the pixel value can be regarded as uniform among the pixel data; and An image processing program that causes a computer to execute a determination procedure for determining whether it is appropriate to perform index color processing, which performs color reduction processing on the input image data and then compresses the input image data using a lossless compression method, or full color processing, which performs compression processing on the input image data using a lossy method without performing the color reduction processing, based on the color distribution degree, the photographic area rate, and the color uniform area rate.

12. a color distribution degree deriving step of deriving a color distribution degree which is a distribution degree of pixel values ​​of each pixel data included in the input image data; a photographic area ratio deriving step of deriving a photographic area ratio, which is a ratio of photographic area pixel data constituting a photographic area to the pixel data; a color uniformity region ratio deriving step of deriving a color uniformity region ratio, which is a ratio of color uniformity region pixel data constituting a color uniform region in which the pixel value can be regarded as uniform among the pixel data; and An image processing method including a determination step of determining whether it is appropriate to perform index color processing, which performs color reduction processing on the input image data and then performs compression processing using a lossless compression method, or full color processing, which performs compression processing using a lossy method on the input image data without performing the color reduction processing, based on the color distribution degree, the photographic area rate, and the color uniform area rate.

Citation Information

Patent Citations

  • Network scanner device

    JP2000059558A

  • Image processor

    JP2003298853A

  • Wireless image transmission / reception system, wireless image transmission apparatus, and wireless image reception apparatus

    JP2004193818A

  • Formation of printing data suitable for image form

    JP2005335073A

  • Image compressing method, image compressing device, image forming apparatus, computer program and recording medium

    JP2010035040A