[go: up one dir, main page]

HK1113450A - Apparatus and method for deciding image color - Google Patents

Apparatus and method for deciding image color Download PDF

Info

Publication number
HK1113450A
HK1113450A HK08109038.7A HK08109038A HK1113450A HK 1113450 A HK1113450 A HK 1113450A HK 08109038 A HK08109038 A HK 08109038A HK 1113450 A HK1113450 A HK 1113450A
Authority
HK
Hong Kong
Prior art keywords
color
image
unit
determination
image data
Prior art date
Application number
HK08109038.7A
Other languages
Chinese (zh)
Inventor
南野胜巳
Original Assignee
村田机械株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 村田机械株式会社 filed Critical 村田机械株式会社
Publication of HK1113450A publication Critical patent/HK1113450A/en

Links

Description

Image color determination device and image color determination method
Technical Field
The present invention relates to an image determination device and an image color determination method for determining the background color of an image to be determined, and more particularly to an improvement for making a color determination well even if an original has a background color.
The present application claims priority from Japanese patent application No. 2006-242189, 2006-9-6, 2006-242193, 2007-7-12, 2007-183147 and 2007-183148, 2007-7-12, and is hereby incorporated herein in its entirety.
Background
Generally, an apparatus having a color printing function has a color mode in which printing is performed on printing paper in color and a black-and-white mode in which printing is performed in black-and-white (achromatic color, expressed only in grayscale), and an image to be printed is printed in any of the processing modes. In general, a user selects a processing mode, but printing in a processing mode unsuitable for an actual image color may occur due to a selection error, such as printing a monochrome image in a color mode. For this reason, a technique of automatically determining whether an image is a color image or a black-and-white image has appeared.
For example, in a conventional color/monochrome determination technique, there is proposed a technique of dividing an image into a plurality of blocks, determining a block color representing a color included in each block, and determining whether the image is a color image or a monochrome image based on a result of counting the number of block colors in the image.
Further, there are also image processing apparatuses and image analysis apparatuses that execute predetermined processing based on the ground color or background color of a document. In this image analysis device, the color of the portion other than the ground color of the document is replaced based on the result of comparing the color of the portion of the ground color of the document with the color of the portion other than the portion.
Further, there is also a technique of detecting a rough position of an original edge from an input image by, for example, Hough transform, estimating a ground color candidate and a background color candidate from a peak value of a histogram for each RGB value of the detected original edge, and obtaining a final original edge from the estimated ground color candidate and background color candidate.
Here, when the document has a color ground color, the document is determined to be "color" in the color monochrome determination. However, even when the document has a color ground color, the document may be determined to be black and white when characters are written in black.
Next, a method of selecting a processing mode and image processing based on the processing mode will be examined when an image read from a document (hereinafter also simply referred to as "document image") is converted from an RGB color space to an Lab (lightness L, chromaticity a, b) color space, and a region having substantially the same chromaticity (chromaticity) as a ground color (chromatic color) and having chromaticity as an achromatic color is determined as an achromatic region.
For example, when each pixel of the document image belongs to a achromatic region and is determined not to belong to a chromatic region in the selection of the processing mode, the monochrome mode is selected as the processing mode of the document image. In addition, when a recording process of recording the document image from which the under color is removed on a recording sheet is performed as the image processing in the monochrome mode, the following problem occurs when the under color removal process is performed. In this under color removal process, not only the pixels corresponding to the under color but also pixels having the same chromaticity (chromaticity) as the under color and having higher lightness than the under color are replaced with white.
That is, pixels having higher lightness than the background color are also replaced with the same color (white) as the background color. As a result, a problem arises in that the original image and the recorded image recorded on the recording paper are different in appearance.
Further, when the under color removal processing is performed on pixels included in a predetermined chromaticity range and brightness range centered on the under color, there is a problem that the appearance (that is, the appearance of the document image and the recorded image) before and after the under color is removed is different regardless of the color mode or the monochrome mode.
Further, there is a demand for determining a document image having the following pixels as a color image and selecting a color mode as a processing mode. The pixel has the same chromaticity as the ground color and has higher lightness than that of the ground color.
Disclosure of Invention
Accordingly, an object of the present invention is to provide an image color determination device and an image color determination method that can perform color determination processing well on an image having a ground color.
In order to solve the above problem, an image color determination device according to the present invention includes a ground color determination unit and an object image determination unit. The under color determination unit determines whether or not the target image has an under color based on image data relating to the target image, and determines the color of the under color when the target image has the under color. And a target image determination unit that performs color determination of the target image based on the image data relating to the target image using a determination result of the background determination unit. According to the present invention, when the object image has a ground color, the color determination can be performed in consideration of the ground color. For example, a black-and-white image with a color background may be determined to be a black-and-white image.
The under color determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane, and determines whether or not an under color is present using the count result. The target image determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane, and performs color determination using the count result. It is preferable that the count of the under color determination unit and the count of the target image determination unit use a common circuit. This simplifies the configuration of the image color determination device.
In the color determination by the target image determination unit, it is preferable that the user can set whether or not to use the determination result by the ground color determination unit. Therefore, the system can meet various user requirements. When the user wants to determine whether the color-backed document is achromatic, that is, when the monochrome document with the color-backed document is monochrome, the user can set the color determination using the result of the color determination. On the other hand, when the color-backed document is to be determined as being colored, that is, when the monochrome document with the color-backed document is to be determined as being colored, the color determination can be set so as not to use the result of the color determination.
In the above-described image determination unit, it is preferable that the image data is subjected to a shift conversion process based on a positional relationship between a coordinate position corresponding to the color of the ground color determined by the ground color determination unit and an origin position in a two-dimensional color plane, and a process of expanding the achromatic region in the shift direction is performed. Thus, the component unit corresponding to the color of the ground color can be determined to belong to the achromatic region by a simple process.
In the above-described image processing apparatus, the ground color determination section may count the number of constituent units of the image data for each color gamut in the two-dimensional color plane, determine the presence or absence of the ground color using the count result, and determine the color of the ground color based on the distribution of the counted constituent units in the color gamut corresponding to the ground color in the two-dimensional color plane. Thus, the color of the ground color can be determined easily and accurately.
In the above-described background color determination unit, it is preferable that the center of gravity position of the counted plurality of constituent units in the color gamut corresponding to the background color is calculated in the two-dimensional color plane, and the color of the background color is determined based on the center of gravity position. This makes it possible to determine the color of the ground color more accurately.
In addition, the target image determination unit preferably averages the image data for each pixel set including a plurality of pixels, and performs color determination of the image data in units of the averaged image data. Thereby, the influence of the false color can be eliminated.
The image color determination method according to the present invention includes a background color determination step and an object image determination step. In the under color determination step, the presence or absence of under color of the target image is determined based on image data relating to the target image, and if the target image has under color, the color of the under color is determined. In the target image determination step, the color of the target image is determined based on the image data relating to the target image using the determination result in the ground color determination step. According to the present invention, in the case where the object image has a ground color, the color determination can be performed in consideration of the ground color. For example, a black-and-white image with a color background color can be determined to be a black-and-white image.
In order to solve the above problem, an image color determination device according to the present invention includes a ground color determination unit and an object image determination unit. The background determination unit determines whether or not the target image has a background based on image data relating to the target image, and determines brightness (brightness) and chromaticity (chromaticity) of the background when the target image has the background. The target image determination unit performs color determination of the target image based on the image data relating to the target image, using the determination result of the ground color determination unit. According to the present invention, color determination is performed in consideration of not only chromaticity (chromaticity) but also brightness (brightness) of the background color. That is, a color having the same chromaticity (chromaticity) as the ground color and having a different brightness (brightness) from the ground color can be distinguished from the ground color and then subjected to color determination.
In the color determination, the target image determination unit determines that the color is achromatic when the chromaticity (chromaticity) and the brightness (brightness) of the image data to be determined correspond to the chromaticity (chromaticity) and the brightness (brightness) of the ground color, and determines that the color is chromatic when the chromaticity (chromaticity) of the ground color corresponds to the brightness (brightness) of the ground color and is different from the brightness (brightness) of the ground color. Thus, for example, a document having characters or the like in a color brighter than the ground color recorded on the paper with the ground color can be determined to be a color.
The under color determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane and determines whether or not the under color is present using the count result, the target image determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane and determines the color using the count result, and a common circuit is used for the count of the under color determination unit and the count of the target image determination unit. Thereby, the structure of the image color determination device becomes simple.
In the color determination by the target image determination unit, the user may set whether or not to use the determination result of the ground color determination unit. Therefore, the system can meet various user requirements. For example, when the user determines that a color ground color is black and white and a color brighter than the ground color is present, the user may set the color determination to be performed using the ground color determination result. On the other hand, when the color background is to be determined as a color, the color determination may be set not to be performed using the background determination result.
The target image determination unit performs a shift conversion process on the image data based on a positional relationship between a coordinate position corresponding to the chromaticity (chromaticity) of the ground color determined by the ground color determination unit and the origin position in the two-dimensional color plane, performs a process of expanding the achromatic region in the shift direction, counts the number of constituent units of the image data for the achromatic region and the chromatic region, and performs color determination using the count result. Thus, the component unit corresponding to the color of the ground color can be determined to belong to the achromatic region by a simple process.
The under color determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane, determines whether or not there is an under color using the count result, and determines the color of the under color based on the distribution of the counted constituent units in the color gamut corresponding to the under color in the two-dimensional color plane. Thus, the color of the ground color can be determined easily and accurately using the two-dimensional color plane.
The target image determination unit averages the image data for each pixel set including a plurality of pixels, and performs color determination of the image data in units of the averaged pixel data. Thereby, the influence of the false color can be eliminated.
The image color determination method according to the present invention includes a background color determination step and an object image determination step. In the background color determination step, the presence or absence of a background color in the target image is determined based on image data relating to the target image, and when the target image has a background color, the brightness (brightness) and chromaticity (chromaticity) of the background color are determined. In the target image determination step, the color of the target image is determined based on the image data relating to the target image using the determination result in the ground color determination step. According to the present invention, color determination can be performed in consideration of not only chromaticity (chromaticity) but also brightness (brightness) of the background color. That is, a color having the same chromaticity (chromaticity) as the ground color and having a different brightness (brightness) from the ground color can be distinguished from the ground color and then subjected to color determination.
Other features, elements, processes, steps, characteristics and advantages of the present invention will become more apparent from the following detailed description of preferred embodiments of the present invention with reference to the attached drawings.
Drawings
Fig. 1 is a diagram showing an example of the configuration of an image color determination device according to embodiment 1 of the present invention.
Fig. 2 is a diagram showing an example of color planes used in the processing of the unit image data determination unit (1 st and 2 nd unit image determination units), the unit image data count unit (1 st and 2 nd unit image data count units), the block determination unit (1 st and 2 nd block determination units), and the block count unit (1 st and 2 nd block count units).
Fig. 3 is a diagram for explaining a method of obtaining a color plane.
Fig. 4 is a flowchart for explaining the procedure of the background color determination.
Fig. 5 is a flowchart for explaining the procedure of color determination.
Fig. 6 is a diagram for explaining the position of the ground color calculated by the ground color setting unit.
Fig. 7 is a diagram for explaining a method of enlarging a achromatic region when affine (affine) conversion is applied to a target image based on the ground color set by the ground color setting unit.
Fig. 8 is a diagram showing another example of the configuration of the image color determination device according to embodiment 1 of the present invention.
Fig. 9 is a diagram showing an example of the configuration of an image color determination device according to embodiment 2 of the present invention.
Fig. 10 is a diagram for explaining the ground color region.
Fig. 11 is a diagram for explaining the ground color region.
Fig. 12 is a diagram showing another example of the configuration of the image color determination device according to embodiment 2 of the present invention.
Detailed Description
[ embodiment 1 ]
Hereinafter, embodiment 1 of the present invention will be described in detail with reference to the drawings. Note that the common configurations in embodiment 1 and embodiment 2 are described in common as appropriate.
<1. Structure of image color judging apparatus >
Fig. 1 is a diagram showing an example of the configuration of an image color determination device 1 according to embodiment 1. Here, the image color determination device 1 is a scanner, a printer, a copier, a facsimile machine, or a multifunction machine combining these functions. The image color determination device 1 can detect, for example, the ground color of the document read by the scanner unit 41.
As shown in fig. 1, the image color determination device 1 mainly includes a scanner unit 41, a recording unit 51, a background color determination unit 70, and a target image determination unit 80. Here, the "ground color" refers to a background color present in the document.
The modem 22 converts digital data into a voice signal for transmission, or converts a voice signal received by the image color determination apparatus 1, which is transmitted from the outside of the image color determination apparatus 1, into digital data. The NCU21 is a device necessary for connecting the image color determination device 1 to a public switched telephone network, and performs transmission/reception or dial-up control. The communication unit 25 is a LAN interface for performing data communication with an information processing apparatus (not shown) or the like connected via a network.
The CODEC31 is used for reversible compression processing of an image transmitted by facsimile communication. The CODEC31 encodes, for example, an image that is read from a document by the scanner unit 41 and binarized by the image processing circuit 61. The encoded image is stored in an image memory 16. The CODEC31 decodes facsimile data (binary data) transmitted from another image color determination device. The decoded binary data is then supplied to the recording unit 51, and recording processing is performed.
When encoding binary data, the CODEC31 adopts any one of mh (modified huffman), mr (modified read), mmr (modified mr), and JBIG (Joint Bi-level Image experts Group) as encoding means. Further, the CODEC31 also encodes multivalued data. The multi-valued data are encoded by, for example, jpeg (joint Photographic Experts group).
The scanner section 41 is a reading section that reads an image from a document. The image data (read image data) read by the scanner unit 41 is compressed by the JPEG system by the CODEC31, for example, and is stored in the image memory 16.
That is, the scanner unit 41 reads an image drawn on the document by a CCD line sensor 41a described later, and generates image data relating to the image. The scanner unit 41 reads an image drawn on a Document by an adf (automatic Document feeder) method or an fbs (flat Bed scanner) method. The ADF method is a method of reading an original document by picking up the original document one by one from an original document stack in which a plurality of original documents are stacked, and the FBS method is a method of reading an original document placed on a contact glass. In the ADF system, there are a system in which a stationary reading optical system reads a moving original (sheet through) system and a system in which a stationary reading optical system reads a stationary original, and when the latter system is adopted, the scanner section 41 repeatedly executes a reading procedure in which the original is made stationary on the contact glass, the stationary original is read by the moving reading optical system, and the read original is discharged.
When the light from the document is introduced into the reading optical system of the CCD line sensor 41a to scan the document, the CCD line sensor 41a repeats reading at a constant cycle, thereby generating image data expressed by an RGB color space, that is, image data having R (red), G (green), and B (blue) color component data. The scanning speed of the reading optical system is set based on the resolution in the sub-scanning direction of the image data generated by the CCD line sensor 41 a. Specifically, the higher the resolution in the sub-scanning direction is, the slower the scanning speed of the reading optical system is, and the lower the resolution in the sub-scanning direction is, the faster the scanning speed of the reading optical system is. The "scanning speed" refers to a relative moving speed between the original and the reading optical system.
The recording portion 51 is an image forming portion for recording a toner image based on the electrostatic latent image on recording paper by an electrophotographic method. For example, the recording unit 51 forms a toner image based on the read image data on a photosensitive drum (not shown), and transfers the toner image onto a recording sheet. In this way, the recording unit 51 functions as a processing unit that performs a recording process on an image to be recorded.
The image processing circuit 61 is a processing unit that performs predetermined image processing on image data. The image processing circuit 61 executes, for example, processing of applying gamma (gamma) correction to image data. The image processing circuit 61 includes a resolution conversion unit 61a, and the resolution conversion unit 61a performs a process of converting the resolution of the image data. In addition, the image processing circuit 61 has a color space conversion section 61b, and the color space conversion section 61b performs a process of converting the color space of the image data from the 1 st color space to the 2 nd color space. For example, the 1 st color space is an RGB color space, and the 2 nd color space is an Lab (lightness L and chroma a, b) color space. These image processing may be realized by software from the MPU11 based on the program 13a stored in the ROM 13.
The display unit 63 is a so-called liquid crystal display, and has a function as a "touch panel" capable of designating a position on a screen by touching the screen with a finger or a dedicated pen. Therefore, the user of the image color determination device 1 (hereinafter simply referred to as "user") can cause the image color determination device 1 to execute a predetermined operation by giving an instruction using the "touch panel" function of the display unit 63 based on the content displayed on the display unit 63. In this way, the display unit 63 also serves as an input unit.
The operation unit 64 is an input unit constituted by a so-called keyboard. The user can cause the image color determination apparatus 1 to execute a predetermined operation by performing an input operation based on the display content of the display unit 63.
The background color determination section 70 determines the background color of the target image based on the image data obtained by reading the document by the scanner section 41 or the image data stored in the image memory 16 (hereinafter also referred to as "image data relating to the target image"). That is, the ground color determination section 70 detects (determines) whether or not there is a ground color in the target image, and detects (determines) the color of the ground color (the coordinate position on the two-dimensional color plane) when the target image is an image having a ground color (a ground-color original).
The target image determination unit 80 performs color determination of the target image based on the image data related to the target image using the determination result of the ground color determination unit 70. The target image determination unit 80 selects a processing mode to be executed by the processing unit such as the recording unit 51 or the image processing circuit 61 based on the result of the color determination. For example, the target image determination unit 80 can select, as the processing mode, a color mode in which color processing is executable and a monochrome mode in which monochrome processing is executable. The detailed configurations of the under color determination section 70 and the target image determination section 80 will be described later.
The under color determination section 70 counts the number of constituent units (unit image data) of the image data for each color gamut in the two-dimensional plane, and determines the presence or absence of an under color using the count result. That is, the base color determination unit 70 counts the number of the constituent units for each color gamut formed on the two-dimensional color plane, and determines whether or not a base color exists depending on whether or not the distribution of the constituent units is biased to a specific color gamut. When the color gamut deviates to a specific color gamut, it is determined that a ground color of a color corresponding to the color gamut exists. If the color gamut is not biased toward a specific color gamut, that is, if a plurality of color gamuts are dispersed to the same degree, it is determined that the ground color is not present. In addition, even when the background color is present in a biased manner toward the achromatic region, it is determined that the background color is not present.
The target image determination unit 80 counts the number of constituent units (unit image data) of the image data for each color gamut in the two-dimensional color plane, and performs color determination using the count result. That is, the target image determination unit 80 counts the number of constituent units for each color gamut formed on the two-dimensional color plane, and determines the color of the target image using the count result. The color gamut is divided into an achromatic region (a region near the origin) and a chromatic region (a region other than the achromatic region), and whether the target image is a color image or a black-and-white image can be determined based on the distribution of the constituent units in the achromatic region and the chromatic region. For example, if there are many constituent units in the achromatic regions and few constituent units in the chromatic regions, it can be determined that the image is a monochrome image. On the other hand, if there are many constituent units in the colored region, it can be determined that the image is a color image.
Although the under color determination unit 70 and the target image determination unit 80 execute different processes in this way, in the present embodiment, the count by the under color determination unit 70 and the count by the target image determination unit 80 are executed using a common circuit, considering that the count process is common for each color gamut. This can simplify the structure of the image color determination device 1.
The ram (random Access memory)12 and the image memory 16 are volatile memories (storage units) that can be read and written. The rom (read Only memory)13 is a memory dedicated for reading. The mpu (micro Processing unit)11 executes control in accordance with a program 13a stored in the ROM 13. The MPU11, ROM13, recording unit 51, and the like are electrically connected by a signal line (bus line) 15. Therefore, the MPU11 can cause the recording unit 51 to execute a recording process and the like at a predetermined timing, for example.
The CODEC31 functioning as a compression/expansion unit acquires image data, generates compressed image data, and stores the compressed image data in the image memory 16.
The processing modes of the image color determination device 1 include the "black-and-white mode" and the "color mode" as described above.
When scanning in the color mode, the color space converter 61b converts the RGB image data inputted from the resolution converter 61a into YCC image data in multiple levels, and the CODEC31 compresses the YCC image data in multiple levels by the JPEG method or the like and stores the compressed YCC image data in the image memory 16.
When copying is performed in the color mode, the color space conversion section 61b converts the multi-level RGB image data input from the resolution conversion section 61a into multi-level Lab image data (image data expressed in the color space L × a × b), and further converts the multi-level Lab image data into multi-level CMYK image data (image data expressed in the color space CMYK). The multi-level CMYK image data is binarized to form two-level CMYK image data, and the recording section 51 acquires the two-level CMYK image data and forms a color image on a recording medium using an image forming engine necessary for the "Y", "M", "C", and "K" image forming engines (four-color image forming engines). Here, "use of" Y "," M "," C "and" K "image forming engines required for image forming engines (four-color image forming engines)" means that the image forming engines required for expressing colors included in an image are operated. For example, if the color classification of the color included in the image is only "Y", the image forming engine "Y" may be operated, and if the color classification of the color included in the image is "R", the image forming engines "Y" and "M" may be operated.
When the document is a gray-scale document (such as a monochrome photograph document), and scanning is performed in the monochrome mode, the color space converter 61b converts the multi-level RGB image data input from the resolution converter 61a into multi-level YCbCr image data, and the CODEC31 compresses the luminance component Y of the multi-level YCbCr image data in the JPEG scheme and stores the compressed luminance component Y in the image memory 16.
Alternatively, when the document is a grayscale document, the color space converter 61b converts the multi-level RGB image data input from the resolution converter 61a into multi-level YCbCr image data when scanning is performed in the monochrome mode. The luminance component Y of the multi-level YCbCr image data is binarized into a bi-level luminance component Y by a texture dithering method or the like, and the bi-level luminance component Y is compressed by a JBIG method or the like by the CODEC31 and stored in the image memory 16.
On the other hand, when the document is a monochrome document (such as a monochrome character document), the color space converter 61b converts the multi-level RGB image data input from the resolution converter 61a into multi-level YCC image data when scanning is performed in the "monochrome mode". The luminance component Y of the multi-level YCC image data is binarized into a bi-level luminance component Y by a simple binarization method or the like, and the bi-level luminance component Y is compressed by a JBIG method or the like by the CODEC31 and stored in the image memory 16.
When the document is a gray-scale document (such as a monochrome photograph document), and the document is copied in the "monochrome mode", the color space converter 61b converts the multi-level RGB image data input from the resolution converter 61a into multi-level YCbCr image data. The luminance component Y of the multi-level YCbCr image data is binarized into a two-level luminance component Y by a tissue dither method, an error diffusion method, or the like, and the recording unit 51 acquires the two-level luminance component Y and forms a black-and-white image on a recording medium using a "K" image forming engine.
On the other hand, when the document is a monochrome document (such as a monochrome character document), the color space converter 61b converts the multi-level RGB image data input from the resolution converter 61a into multi-level YCbCr image data when copying in the "monochrome mode". The luminance component Y of the multi-level YCbCr image data is binarized into a two-level luminance component Y by an error diffusion method, a simple binarization method, or the like, and the recording unit 51 acquires the two-level luminance component Y and forms a black-and-white image on a recording medium using a "K" image forming engine.
In addition, in the case of performing binarization when copying a gray-scale document, it is preferable to place more importance on the reproducibility of the gray-scale level than in the case of copying a monochrome document; in the case of performing binarization when copying a monochrome document, it is preferable to place more importance on the reproducibility of characters than in the case of copying a grayscale document.
<2 > Structure of the under color determination section and the target image determination section >
Here, the configurations of the under color determination section 70 and the target image determination section 80 will be described. As shown in fig. 1, the under color determination function of the under color determination unit 70 is realized by a unit image data determination unit 65a, a unit image data count unit 66a, a block determination unit 67a, a block count unit 68a, and an under color setting unit 71.
As shown in fig. 1, the color determination function of the target image determination unit 80 is realized by the unit image data determination unit 65b, the unit image data count unit 66b, the block determination unit 67b, the block count unit 68b, the target image conversion unit 72, and the mode selection unit 81.
Further, the unit image data determination unit 65b, the unit image data counting unit 66b, the block determination unit 67b, and the block counting unit 68b of the target image determination unit 80 realize the same functions as the unit image data determination unit 65a, the unit image data counting unit 66a, the block determination unit 67a, and the block counting unit 68a of the corresponding under color determination unit 70, respectively.
Here, the unit image data determination units 65(65a, 65b), the unit image data counting units 66(66a, 66b), the block determination units 67(67a, 67b), and the block counting units 68(68a, 68b) of embodiment 1 perform the counting process and the determination process based on the unit image data (constituent units) acquired from the target image, respectively, rather than on the pixel data constituting the target image.
The unit image data is a pixel group obtained by dividing the target image by n (n is a natural number) pixels, the n pixels being adjacent to each other, and the average value of the values of the pixels included in the corresponding pixel group is used as the value of each unit image data.
For example, each unit image data is composed of a pixel group divided into 2 × 2 (i.e., n ═ 4 ") pixels per vertical (sub-scanning direction) and horizontal (main scanning direction), and when the color space of the target image is RGB, values (R, G, B) obtained by averaging R values, G values, and B values of 4 pixels included in the corresponding pixel group are used as the values of each unit image data. As described above, in the present embodiment, the process of generating the unit image data is realized as an averaging process. This averaging process averages a predetermined number of adjacent pixel data, and is executed by the averaging unit 61c of the image processing circuit 61.
In the present embodiment, the processes of the unit image data determination unit 65, the unit image data counting unit 66, the block determination unit 67, and the block counting unit 68 are performed on the image data affine-transformed on the color plane H as a two-dimensional color plane.
Therefore, first, the color plane H will be described, and then the unit image data determination unit 65, the unit image data count unit 66, the block determination unit 67, the block count unit 68, the under color setting unit 71, the target image conversion unit 72, and the mode selection unit 81, which are components of the under color determination unit 70 and the target image determination unit 80, will be described.
<2.1. Structure of color plane >
Fig. 2 is a diagram showing an example of the color plane H. Fig. 3 is a diagram illustrating a method of acquiring the color plane H. The color plane H is obtained by performing affine transformation such as rotation transformation or scaling transformation on a chromaticity diagram of a general Lab color system. Thus, the color plane H is related to hue and chroma, and has the same properties as the Lab chromagram. That is, the respective colors are radially arranged with the origin O as the center. The hue is represented by the direction from the origin O, and the chroma is represented by the distance from the origin O.
As shown in fig. 2, the color plane H is formed by an orthogonal coordinate system based on the horizontal axis a3 and the vertical axis b3, and each point of the color plane H is represented by a coordinate position (a3, b 3). Therefore, the coordinate positions (a3, b3) are used as parameters relating to hue and chroma (hereinafter, also referred to as "color parameters"). Where each unit image data is located on the color plane H is determined by the chromaticity values (a, b) of each unit image data.
Here, it is known that the origin O of the color plane H and its vicinity are substantially achromatic. In the present embodiment, a saturation boundary line D0 indicating a boundary between a chromatic color and an achromatic color is set near the origin O of the color plane H. Thus, the achromatic region mA indicating an achromatic color is located inside the saturation boundary D0. Outside the saturation boundary line D0 is a colored region indicating a color.
In the colored region outside the saturation boundary line D0, 6 hue boundary lines D1 to D6 indicating the boundaries of the hues are set. The color phase boundary lines D1 to D6 are half-straight lines radially extending from the origin side. The colored region is divided into a plurality of (6 in the present embodiment) color ranges mC, mM, mY, mR, mG, and mB by the hue boundary lines D1 to D6 and the saturation boundary line D0.
That is, as shown in fig. 2, a hue boundary line D1 is a boundary between the color gamut mR and the color gamut mY, a hue boundary line D2 is a boundary between the color gamut mY and the color gamut mG, a hue boundary line D3 is a boundary between the color gamut mG and the color gamut mC, a hue boundary line D4 is a boundary between the color gamut mC and the color gamut mB, and a hue boundary line D5 is a boundary between the color gamut mB and the color gamut mM. The hue boundary line D6 is a boundary between the color gamut mM and the color gamut mR.
These color ranges mC, mM, mY, mR, mG, and mB correspond to 6 determination colors C (cyan), M (magenta), Y (yellow), R (red), G (green), and B (blue), respectively.
Further, the under color determination and the color determination of the present embodiment are performed based on the positions of the coordinate positions (a3, b3) of the respective unit image data on the color plane H, and for example, in the case where the coordinate positions (a3, b3) of the unit image data exist in the achromatic region mA, it is determined that the color of the unit image data is achromatic. On the other hand, when the coordinate position (a3, b3) of the unit image data is present in any one of the color gamuts mC, mM, mY, mR, mG, and mB, the color of the unit image data is determined to be a chromatic color C, M, Y, R, G, B having a hue and saturation corresponding to the color gamut.
Here, the color plane H is obtained in the following order. First, hue boundary lines D1 to D6 (see the left side of fig. 3) are set for a color plane H0 of the Lab color system. The color plane H0 corresponds to a chromaticity diagram of a general Lab color system, and has an orthogonal two-dimensional coordinate system with a horizontal axis a and a vertical axis b. The hue boundary lines D1 to D6 may be set based on human senses.
Further, pairs of hue boundary lines substantially symmetrical with respect to the origin O are set so as to form a straight line. But is not limited thereto. However, when the pair of hue boundary lines sandwiching the origin O is a straight line as in the present embodiment, the calculation cost of the determination process can be reduced.
Then, the entire hue is rotationally converted around the origin O so that hue boundary lines D1 and D4 near the vertical axis b of the color plane H0 coincide with the vertical axis b. Thereby, a color plane H1 (see the center of fig. 3) is obtained. The color plane H1 has an orthogonal two-dimensional coordinate system with a2 on the horizontal axis and b2 on the vertical axis.
Then, transformation for enlarging and reducing the entire hue at different magnifications in the vertical axis direction and the horizontal axis direction is performed so that the hue boundary lines D2, D3, D5, D6 are inclined by 45 degrees with respect to the horizontal axis a2 and the vertical axis b2, respectively. Thereby, a color plane H2 (see the right side of fig. 3) is obtained. The color plane H2 has an orthogonal two-dimensional coordinate system with a3 on the horizontal axis and b3 on the vertical axis. Then, a saturation boundary line D0 is further set for the color plane H2, thereby obtaining the color plane H of fig. 2.
Further, the color of the unit image data may be determined by using the value of the unit image data expressed by Lab, and determining at which position of the color plane H0 corresponding to the chromaticity diagram of the Lab color system the coordinate position (a, b) expressed by the chromaticity is present. In this case, it is not necessary to obtain color parameters other than chromaticity.
However, in the color plane H0, the inclination of the hue boundary lines D1 to D6 may be an irrational number, and the color determination of the unit image data may require an irrational number calculation such as an inverse trigonometric function, thereby reducing the determination efficiency. Therefore, in the processing by the unit image data determination unit 65, the unit image data counting unit 66, the patch determination unit 67, and the patch counting unit 68, affine transformation such as at least rotation transformation is performed on the image data on the color plane H0, and a color plane H having a rational number of inclinations of the hue boundary lines D1 to D6 is used.
<2.2. structural elements of the under color determination section and the target image determination section >
Here, the components of the background color determination section 70 and the target image determination section 80 will be described. The unit image data determination unit 65(65a, 65b) performs the determination process on the target image converted from the RGB color space to the Lab color space by the image processing circuit 61. That is, the unit image data determination unit 65 determines which of the color ranges mC, mM, mY, mR, mG, mB and the achromatic area mA corresponding to the specific chromatic color in the color plane H the unit image data acquired based on the target image belongs to.
The unit image data counting unit 66(66a, 66b) divides the target image into a plurality of blocks each composed of, for example, unit image data of 30 vertical lines × 30 horizontal lines (900 lines in total). The unit image data counting unit 66 counts the number of unit image data belonging to each of the plurality of color ranges mC, mM, mY, mR, mG, mB, and the achromatic region mA, based on the determination result of the unit image data determining unit 65, for each block.
For example, the unit image data counting unit 66 counts the number of unit image data belonging to the color gamut mC among the 900 unit image data included in the tile, and stores the count result in the RAM 12. Similarly, the unit image data counting unit 66 counts the number of unit image data belonging to each of the color ranges mM, mY, mR, mG, mB, and the achromatic area mA, and stores the count results in the RAM 12.
The block determination unit 67(67a, 67b) determines the color included in each block based on the count result of the unit image data count unit 66. That is, the patch determination unit 67 compares the count values of the respective color gamuts mC, mM, mY, mR, mG, mB, and the achromatic region mA with the presence check reference value for each patch, and determines the color included in the patch.
For example, when only the count values of the color gamuts mC and mM exceed the reference value for presence check for a certain tile, the tile is determined to contain cyan C and magenta M. In addition, when the count value of only the achromatic region mA exceeds the reference value for presence check for a certain block, it is determined that only an achromatic color exists in the block.
The threshold value (reference value for presence confirmation) used for confirming the presence of the unit image data may be different for each of the color ranges mC, mM, mY, mR, mG, mB, and the achromatic region mA, or may be the same value.
The block count unit 68(68a, 68b) calculates a block count value for each color gamut mC, mM, mY, mR, mG, mB, and achromatic area mA based on the determination result of each block by the block determination unit 67. That is, the block counting unit 68 adds the count values (block count values) of the color gamut and the achromatic region corresponding to the colors determined to be included in each block by the block determining unit 67. For example, when the patch determination unit 67 determines that a certain patch includes only cyan C and magenta M, the patch counting unit 68 adds the count values of the color gamut mC and mM as the counting process for the patch. When the block determination unit 67 determines that a certain block includes only achromatic colors, the block counting unit 68 adds the count value of the achromatic area mA as a count process for the block. Then, the tile counter 68 stores the result (tile count value) obtained by counting for each of the plurality of color gamuts mC, mM, mY, mR, mG, mB, and achromatic area mA in the RAM 12.
When the unit image data determination unit 65a, the unit image data counting unit 66a, the block determination unit 67a, and the block counting unit 68a perform the processing on the target image, the background color setting unit 71 sets the background color of the target image based on the count result of the block counting unit 68 a. For example, when one or two of the block count values counted for each of the plurality of color ranges mC, mM, mY, mR, mG, mB and the achromatic region mA is equal to or larger than the ground color reference value, the ground color setting unit 71 determines that the ground color is present in the color range equal to or larger than the ground color reference value, and selects the corresponding color range.
That is, the base color setting unit 71 determines the presence or absence of a base color based on the block count value of each color gamut and the base color reference value, and determines the color gamut corresponding to the base color when it is determined that the base color is present.
If there is a color gamut in which the block count value exceeds the ground color reference value, the ground color setting unit 71 determines that there is ground color. Then, it is determined that the color gamut is a color gamut corresponding to the ground color. The base color reference value is plural, and it is determined that there is a base color not only when one gamut exceeds the 1 st base color reference value but also when two gamuts exceed the 2 nd base color reference value.
Then, the ground color setting unit 71 sets a ground color based on each unit image data included in the color gamut selected based on the counting result of the block counting unit 68. For example, in setting the ground color, the position of the ground color is calculated based on the position of the center of gravity of a plurality of unit image data included in the selected color gamut. Therefore, detection as a false ground color can also be prevented.
The method of calculating the ground color position is not limited to this. For example, the calculation may be performed based on the maximum value and the minimum value (for example, the average value of the maximum value and the minimum value) of the unit image data included in the selected color gamut.
The object image transformation unit 72 performs affine transformation on the image data (unit image data) in the color plane H based on the ground color set by the ground color setting unit 71. Specifically, the target image conversion unit 72 moves the image data to be determined in parallel so that the ground color position (center of gravity position) calculated by the ground color setting unit 71 is the origin of the color plane H including the plurality of color ranges mC, mM, mY, mR, mG, mB, and the achromatic region mA.
The mode selection unit 81 performs color determination based on image data on which affine transformation is performed with the ground color position as the origin of the color plane H in the color plane H, and performs selection of a processing mode based on the result of the color determination. That is, when the processes of the unit image data determination unit 65b, the unit image data counting unit 66b, the block determination unit 67b, and the block counting unit 68b are performed on the image data after the affine transformation by the target image transformation unit 72, the mode selection unit 81 performs the color determination based on the counting result of the block counting unit 68b, and selects the processing mode based on the color determination result.
For example, when the block count value of the color gamut mC is equal to or greater than a predetermined threshold, the mode selection unit 81 determines that the target image is a color image and selects "color mode" as the processing mode. Similarly, when any one of the block count values of the color ranges mM, mY, mR, mG, and mB is equal to or greater than a predetermined threshold, the mode selection unit 81 determines that the target image is a color image and selects "color mode" as the processing mode.
On the other hand, when all the tile count values of the color gamuts mC, mM, mY, mR, mG, and mB are smaller than the predetermined threshold value, the mode selection unit 81 determines that the target image is a monochrome image, and selects the "monochrome mode".
Then, the processing unit such as the recording unit 51 or the image processing circuit 61 performs a predetermined process on the image data relating to the target image based on the processing mode (color mode or black-and-white mode) selected by the mode selection unit 81.
For example, when the monochrome mode is selected by the mode selection unit 81, the recording unit 51 records the target image converted into monochrome on a recording sheet. When the color mode is selected by the mode selector 81, the CODEC31 JPEG-compresses the target image as color data.
The threshold used for color determination may be different for each color gamut mC, mM, mY, mR, mG, mB and achromatic area mA, or may be the same value.
<3. order of background color judgment and color judgment >
Fig. 4 is a flowchart for explaining the procedure of the background color determination. Fig. 5 is a flowchart for explaining the procedure of color determination. Hereinafter, the order of the ground color determination will be described, and then, the order of the color determination will be described.
<3.1. procedure for determination of background color >
Here, the procedure of determining the background color of the target image will be described. As shown in fig. 4, in step S101, before the determination of the ground color, a pre-determination process is performed on an image (hereinafter, also referred to as "document top image") of a predetermined line (for example, several tens to several hundreds lines) from the document top in the target image.
For example, as the pre-determination processing in step S101, the image processing circuit 61 (image processing circuit 161) executes processing (averaging processing) for generating unit image data from a target image in the RGB color space. The image processing circuit 61 (image processing circuit 161) performs gamma correction processing on the generated unit image data. Further, the image processing circuit 61 (image processing circuit 161) executes a process of converting the color space of the unit image data subjected to the gamma correction process from RGB to Lab (lightness L and chromaticities a, b).
Further, as the unit image data, pixel data not subjected to averaging may be used as it is. However, if the average value of each pixel set is used instead of the pixel data as the unit image data, it is desirable that the false color due to a slight mechanical error of the line sensor or the like in the scanner unit 41 (scanner unit 141) or the false color due to the variable magnification ratio of the copy function can be corrected, and the accuracy of the subsequent determination can be improved.
That is, if the unit data is constituted by the average values Ravg, Gavg, and Bavg of the color component data for each pixel set, the influence of false color due to the fact that R, G, B read lines are provided at line intervals of several μm in the CCD line sensor 41a (CCD line sensor 141a) can be eliminated, and the determination in the unit image data determination section 65(1 st unit image data determination section 165) can be performed with high accuracy.
In addition, the above-described false color often becomes a problem when the magnification change copy is performed. This is because, if the line interval of the R, G, B read lines of the CCD line sensor 41a (CCD line sensor 141a) corresponds to an integral multiple of the read interval in the sub-scanning direction, the false color can be prevented by delaying the read timing of the subsequent read line from the previous read line. However, even if the relationship of "integral multiple" is established when the equal-magnification copy is performed, the relationship of "integral multiple" is not necessarily established when the variable-magnification copy is performed.
For example, the following studies will be made on the case where the resolution in the sub-scanning direction is 600dpi and the line interval corresponds to 4 times the reading interval when performing the equimultiple copy. In this case, when the same-magnification copy is performed, the timing of reading the subsequent read line is delayed by 4 cycles from the timing of reading the previous read line, thereby preventing false color. However, when 70% reduction copying is performed, the resolution in the sub-scanning direction is 420dpi, and the line interval corresponds to 2.8 times the read interval, so even if the read timing of the subsequent read line is delayed by 3 cycles from the previous read line, a read position shift of 0.2 times the read interval occurs between the previous read line and the subsequent read line, resulting in a false color.
In addition, a false color may be caused by a mechanical shift in the formation position of the R, G, B read line of the CCD line sensor 41a (CCD line sensor 141 a).
The size of the pixel set should be determined according to the line interval, the scaling factor, and the like, and the above-mentioned "4 pixels adjacent to each other, 2 pixels in the vertical direction × 2 pixels in the horizontal direction" is merely an example.
For example, in order to eliminate the influence of false color when performing variable magnification copying, it is effective to increase the number of pixels in the sub-scanning direction of the pixel set as the "shift in the reading position" is larger, but since the "shift in the reading position" is determined by the variable magnification ratio, it is preferable to prepare a table describing the relationship between the variable magnification ratio and the number of pixels in the sub-scanning direction of the pixel set in advance in the ROM13(ROM113), and determine the number of pixels in the sub-scanning direction of the pixel set based on the designated variable magnification ratio by referring to the table.
Further, since the averaging unit 61c (averaging unit 161c) averages the image data on which the resolution conversion by the resolution conversion unit 61a (resolution conversion unit 161a) is not performed, there is no particular problem even if the number of pixels in the main scanning direction of the pixel set is constant.
Next, the unit image data determination unit 65a (the 1 st unit image data determination unit 165a) determines, for each of a predetermined number (e.g., 30 × 30 to 900) of the blocks divided by the unit image data counting unit 66a (the 1 st unit image data counting unit 166a), which of the plurality of color ranges mC, mM, mY, mR, mG, mB, and the achromatic area mA the unit image data included in the target block belongs to (S102). Then, the unit image data counting unit 66a (1 st unit image data counting unit 166a) counts the number of unit image data belonging to each of the color ranges mC, mM, mY, mR, mG, mB, and the achromatic area mA based on the determination result of the unit image data determining unit 65a (1 st unit image data determining unit 165a) (S103). The determination processing and the count processing of the unit image data of steps S102 and S103 are performed on all the unit image data within the block of interest (S104).
After the determination process and the count process are performed on all the unit image data in the block of interest, the block determination unit 67a (1 st block determination unit 167a) performs the determination process on the block of interest based on the count result of the unit image data count unit 66a (1 st unit image data count unit 166 a). That is, the block determination unit 67a (block determination unit 167a) executes the determination process of the color included in the target block (S105).
Then, the tile counter 68a (1 st tile counter 168a) adds the tile count values of the necessary color gamuts mC, mM, mY, mR, mG, mB and achromatic area mA based on the determination result of the tile determining unit 67a (1 st tile determining unit 167a) (S106).
The determination processing and the count processing of the patches of steps S105 and S106 are performed for all the patches in the top image of the document (S107).
Then, the under color setting unit 71 (under color setting unit 171) sets under colors based on the block count values of each of the plurality of color ranges mC, mM, mY, mR, mG, mB and achromatic region mA counted by the block counting unit 68a (1 st block counting unit 168a), and calculates the under color positions (S108). That is, the ground color setting unit 71 (ground color setting unit 171) sets a ground color based on the block count value, and calculates the center of gravity position (ground color position) based on the ground color region P1. Then, based on the ground color set in step S108, an affine transformation formula in the color plane H is calculated (S109), and the determination processing of the ground color is ended.
In this way, the determination of the background color and the determination of the color of the target image in the present embodiment can be performed for each block and counted. Therefore, it is possible to prevent detection of an erroneous under color due to accumulation of erroneous colored and achromatic determinations, and to perform color determination of the object image based on the erroneous under color.
In addition, the counter for counting may be a small-scale counter. Further, the ground color may be set based on unit image data included in the selected color gamut. Therefore, detection as an erroneous ground color can be further prevented.
In the present embodiment, the color gamuts mC, mM, mY, mR, mG, and mB are selected based on the count result of the tile counter 68a (1 st tile counter 168a), and the ground color is set based on the selected color gamut. Therefore, detection as an erroneous ground color can be further prevented.
<3.2. order of color judgment >
Here, the color determination of the target image will be described. As shown in fig. 5, in step S201, before color determination, determination preprocessing is performed on image data that has been affine-transformed based on the affine transformation expression calculated in the ground color determination processing.
For example, as the pre-determination processing in step S201, the image processing circuit 61 (the image processing circuit 161) executes processing (averaging processing) for generating unit image data from the target image in the RGB color space, as in step S101 in fig. 4. The image processing circuit 61 (image processing circuit 161) performs gamma correction processing on the generated unit image data. Further, the image processing circuit 61 (image processing circuit 161) performs a process of converting the color space of the unit image data subjected to the gamma correction process from RGB to Lab (lightness L and chromaticities a and b).
In addition, as the unit image data, the pixel data of the target image may be used as it is without performing such averaging processing. However, as described above, it is preferable to use the average value of the values of the respective pixels included in the pixel group as the unit image data, rather than using the pixel data itself as the unit image data.
Then, the unit image data determination unit 65b (the 1 st unit image data determination unit 165b) determines which of the plurality of color ranges mC, mM, mY, mR, mG, mB, and the achromatic area mA the unit image data included in the target block belongs to (S202). Next, the unit image data counting unit 66b (1 st unit image data counting unit 166b) counts the number of unit image data belonging to each of the color ranges mC, mM, mY, mR, mG, mB, and achromatic area mA based on the determination result of the unit image data determining unit 65b (1 st unit image data determining unit 165b) (S203). Then, the determination and count processing of the unit image data of steps S202 and S203 is performed for all the unit image data within the block of interest until the end (S204).
Fig. 6 is a diagram for explaining the position of the ground color calculated by the ground color setting unit 71 (ground color setting unit 171). Fig. 7 is a diagram for explaining a method of enlarging a achromatic region when affine transformation is applied to image data in a color plane H based on the ground color set by the ground color setting unit 71 (ground color setting unit 171).
Here, since the object image converting unit 72 (the object image converting unit 172) performs affine transformation (transformation of the content of moving the ground color position to the origin), the achromatic region is enlarged in the direction corresponding to the movement thereof as shown in fig. 7. That is, the achromatic region is enlarged so that unit image data corresponding to an achromatic color (unit image data existing near the origin before affine transformation) does not exceed the achromatic region. As shown in fig. 6, the achromatic area mA before the enlargement processing has a square shape and a point-symmetric shape with respect to the origin of the plane H, and the length of one side of the achromatic area mA is 2W. In this case, when the position of the ground color (center of gravity position) on the color gamut mG where a3 is equal to- Δ a and b3 is equal to Δ b is moved to the origin of the color plane H by affine transformation, it is necessary to enlarge the area mA to be determined as an achromatic color by Δ a in the positive direction of the a3 axis and by Δ b in the negative direction of the b3 axis in the color gamut mB symmetrical to the color gamut mG with the origin of the color plane H interposed therebetween (see fig. 7). That is, the region to be determined as an achromatic color is expanded toward the gamut side symmetrical to the gamut of the ground color with the origin on the color plane H therebetween based on the position of the ground color set by the ground color setting unit 71 (ground color setting unit 171).
In this way, when the determination process is performed on the image data affine-transformed in the color plane H by the target image transforming unit 72 (target image transforming unit 172), the unit image data determining unit 65(1 st unit image data determining unit 165) enlarges the region to be determined as the achromatic color toward the color gamut symmetrical to the color gamut of the ground color with the origin of the color plane H interposed therebetween. That is, in the determination process after the affine transformation, the achromatic region mA becomes a region including the ground color region and the achromatic region. Then, the unit image data determination unit 65 performs a determination process of each unit image data based on the enlarged achromatic region mA and the plurality of color regions mC, mM, mY, mR, mG, and mB. Thus, for example, a target image read from a document having a background color such as colored paper can be processed to a background color to select a processing mode.
The process of enlarging the achromatic area mA based on the ground color may be performed based on the setting of the user using the display unit 63 (display unit 163) or the operation unit 64 (operation unit 164). For example, when the document with a color background (characters or the like are black characters) is to be determined to be black and white, the user sets ON the process of enlarging the achromatic area mA based ON the background. On the other hand, when the document with the color ground color (characters and the like are black characters) is to be determined as a color, the OFF setting is performed. In this way, the object image determination unit 80 (object image determination unit 180) may determine that the ground color portion of the document is achromatic based on the user's setting using the display unit 63 (display unit 163) or the operation unit 64 (operation unit 164).
Next, after the determination process and the count process are completed for all the unit image data in the target block, the block determination unit 67b (the 1 st block determination unit 167b) determines the color included in the target block based on the count result of the unit image data count unit 66b (the 1 st unit image data count unit 166b) (S205).
Next, the tile counter 68b (1 st tile counter 168b) adds the tile count values of the regions determined to be included in the tile to the plurality of color gamuts mC, mM, mY, mR, mG, mB and achromatic region mA, respectively, based on the determination result of the tile determining unit 67b (1 st tile determining unit 167b) (S206).
The determination processing and the count processing of the blocks of steps S205 and S206 are performed for all the blocks within the target image until the end (S207).
Then, after the mode selection unit 81 (mode selection unit 181) selects the processing mode, the color determination processing is terminated (S208 to S210). That is, when any one of the block count values of the plurality of color ranges mC, mM, mY, mR, mG, and mB is equal to or larger than a predetermined threshold value (S208), the mode selection unit 81 (the mode selection unit 181) selects the color mode as the operation mode of the processing unit (S209). On the other hand, when all the tile count values of the plurality of color gamuts mC, mM, mY, mR, mG, and mB are smaller than the predetermined threshold value (S208), the mode selection unit 81 (the mode selection unit 181) selects the monochrome mode as the operation mode (S210).
<4. modified example >
(1) In the present embodiment, the configuration in which the under color determination section 70 (under color determination section 170) and the target image determination section 80 (target image determination section 180) respectively have the unit image data determination sections 65(65a, 65b) (1 st unit image data determination section 165(165a, 165b)), the unit image data count sections 66(66a, 66b) (1 st unit image data count section 166(166a, 166b)), the patch determination sections 67(67a, 67b) (1 st patch determination section 167(167a, 167b)), and the patch count sections 68(68a, 68b) (patch count sections 168(168a, 168b)) has been described, but the configuration of the image color determination apparatus 1 (image color determination apparatus 101) is not limited thereto.
For example, as shown in fig. 8 and 12, the function of the under color determination unit 70 (under color determination unit 170) and the function of the target image determination unit 80 (target image determination unit 180) may be realized by the common unit image data determination unit 65 (unit image data determination unit 165), unit image data counting unit 66 (unit image data counting unit 166), block determination unit 67 (block determination unit 167), and block counting unit 68 (block counting unit 168).
(2) In the present embodiment, the description has been given of the embodiment in which the under color determination section 70 (under color determination section 170) and the target image determination section 80 (target image determination section 180) are implemented by circuit systems (hardware systems), but the present invention is not limited to this. For example, the functions of the background color determination unit 70 (background color determination unit 170) and the object image determination unit 80 (object image determination unit 180) may be realized by the MPU11(MPU111) based on the program 13a (program 113a) stored in the ROM13(ROM 113).
(3) In the present embodiment, the ground color determination section 70 (ground color determination section 170) performs ground color determination based on the document top image, but is not limited to this. The background color determination may be performed using, for example, a part of image data at the rear end or the front right end of the target image.
In the present embodiment, since the determination of the ground color is performed based on the document top image, the present invention is also applicable to an image color determination device which sequentially processes from the document top image to the document rear image without a storage unit which can simultaneously store image data related to the document image for one page. That is, even if the capacity of the storage unit is equal to or less than one page, the result of the under color determination based on the top image of the document can be reflected in the subsequent color determination processing of the document image data. Further, in the case of having a storage unit that can store document image data of one page at a time, the ground color determination may also be performed based on the document trailing edge or document right edge image, and is not limited to the document top edge image.
(4) In the present embodiment, the region to be determined as achromatic (achromatic region) is enlarged in the direction of moving the image data by affine transformation as shown in fig. 7, but the enlarging method is not limited to this. That is, in the determination of the ground color, after the ground color position on the two-dimensional color plane H is determined, the achromatic region mA may be enlarged in a direction including the ground color position. The direction and size of the enlarged achromatic area mA can be determined according to the positional relationship between the position of the ground color on the color plane H and the origin. In this case, affine transformation for image data for color determination is not required.
(5) In the present embodiment, the embodiment has been described with respect to the mode in which the unit image data determination unit 65 (unit image data determination unit 165) performs the under color determination and the color determination on the target image expressed by Lab. As long as the color system has parameters (brightness, lightness) related to brightness and parameters (color difference, hue, and chroma) related to chroma such as YCrCb, YIQ, and Luv, a color system other than Lab may be used. In the present embodiment, chromaticity (chromaticity) is a concept including color difference (color difference), hue (hue), and chroma (chroma).
[ 2 nd embodiment ]
Hereinafter, embodiment 2 of the present invention will be described in detail with reference to the drawings.
<1. Structure of image color judging apparatus >
Fig. 9 is a diagram showing an example of the configuration of the image color determination device 101 in the present embodiment. Here, the image color determination apparatus 101 is a scanner, a printer, a copier, a facsimile machine, or a multifunction machine combining these functions. The image color determination apparatus 101 can detect, for example, the ground color of the document read by the scanner section 141.
As shown in fig. 9, the image color determination device 101 mainly includes a modem 122, a scanner unit 141, a recording unit 151, a background color determination unit 170, and an object image determination unit 180. Here, the "ground color" refers to a background color present in the document.
The modem 122 converts digital data into a voice signal for transmission, or converts a voice signal transmitted from the outside of the image color determination device 101 and received by the image color determination device 101 into digital data. The NCU121 is a device necessary for connecting the image color determination device 101 to the public switched telephone network, and performs transmission/reception or dialing control. The communication unit 125 is a LAN interface for performing data communication with an information processing apparatus (not shown) or the like connected via a network.
The CODEC131 is used for reversible compression processing of an image transmitted by facsimile communication. The CODEC131 encodes an image which is read from a document by the scanner unit 141 and binarized by the image processing circuit 161, for example. The encoded image is stored in an image memory 116. The CODEC131 decodes facsimile data (binary data) transmitted from another image color determination device. The decoded binary data is then supplied to the recording unit 151, and recording processing is performed.
When encoding binary data, the CODEC131 adopts any one of mh (modified huffman), mr (modified read), mmr (modified mr), and JBIG (Joint Bi-level Image experts Group) for encoding. Further, the CODEC131 also encodes multivalued data. The multilevel data is encoded by, for example, the JPEG system.
The scanner section 141 is a reading section that reads an image from a document. The image data (read image data) read by the scanner unit 141 is compressed by the JPEG method, for example, by the CODEC131, and is stored in the image storage unit 116.
That is, the scanner section 141 reads an image drawn on the document by a CCD line sensor 141a described later, and generates image data relating to the image. The scanner unit 141 reads an image drawn on a Document by an adf (automatic Document feeder) method or an fbs (flat Bed scanner) method. The ADF system reads a document by picking up the document one by one from a document stack in which a plurality of documents are stacked, and the FBS system reads a document placed on a contact glass. In the ADF system, there are a system in which a stationary reading optical system reads a moving original (a paper feeding system) and a system in which a stationary reading optical system reads a stationary original, and when the latter system is adopted, the scanner section 141 repeatedly executes a reading procedure in which an original is stationary on the contact glass, a stationary original is read by the moving reading optical system, and the read original is discharged.
When light from a document is introduced into a reading optical system of the CCD line sensor 141a to scan the document, the CCD line sensor 141a repeats reading at a constant cycle, thereby generating image data expressed by an RGB color space, that is, image data having R (red), G (green), and B (blue) color component data. The scanning speed of the reading optical system is set based on the resolution in the sub-scanning direction of the image data generated by the CCD line sensor 141 a. Specifically, the higher the resolution in the sub-scanning direction is, the slower the scanning speed of the reading optical system is, and the lower the resolution in the sub-scanning direction is, the faster the scanning speed of the reading optical system is. The "scanning speed" is a relative moving speed between the original and the reading optical system.
The recording portion 151 is an image forming portion for recording a toner image based on the electrostatic latent image on recording paper by an electrophotographic method. For example, the recording unit 151 forms a toner image based on the read image data on a photosensitive drum (not shown), and transfers the toner image onto a recording sheet. In this way, the recording unit 151 functions as a processing unit that performs recording processing on a target image.
The image processing circuit 161 is a processing unit that performs predetermined image processing on image data. The image processing circuit 161 performs, for example, processing of applying gamma (gamma) correction to image data. The image processing circuit 161 includes a resolution converter 161a, and the resolution converter 161a performs a process of converting the resolution of the image data. In addition, the image processing circuit 161 has a color space conversion section 161b, and the color space conversion section 161b performs processing of converting the color space of the image data from the 1 st color space to the 2 nd color space. For example, the 1 st color space is an RGB space, and the 2 nd color space is an Lab (lightness L and chroma a, b) color space. These image processing may be realized by software by the MPU111 based on a program 113a stored in the ROM 113.
The display unit 163 is formed of a so-called liquid crystal display, and has a function as a "touch panel" capable of designating a position on a screen by touching the screen with a finger or a dedicated pen. Therefore, the user of the image color determination device 101 (hereinafter simply referred to as "user") can cause the image color determination device 101 to execute a predetermined operation by giving an instruction using the "touch panel" function of the display unit 163 based on the content displayed on the display unit 163. In this way, the display unit 163 also serves as an input unit.
The operation unit 164 is an input unit configured by a so-called keyboard. The user can cause the image color determination apparatus 101 to execute a predetermined operation by performing an input job based on the display content of the display unit 163.
The background determination unit 170 determines the background of the target image based on an image obtained by reading the document by the scanner unit 141 or an image stored in the image memory 116 (hereinafter, also referred to as "image data on the target image"). That is, the ground color determination section 170 detects (determines) whether or not there is a ground color in the target image, and detects (determines) the color of the ground color (the coordinate position on the two-dimensional color plane) when the target image is an image having a ground color (a ground-color original).
The target image determination unit 180 performs color determination of the target image based on the image data related to the target image using the determination result of the ground color determination unit 170. The target image determination unit 180 selects a processing mode to be executed by a processing unit such as the recording unit 151 or the image processing circuit 161 based on the result of the color determination. For example, the target image determination unit 180 can select, as the processing mode, a color mode in which color processing is executable and a monochrome mode in which monochrome processing is executable. That is, the target image determination unit 180 selects the color mode as the processing mode when the target image has the same chromaticity as the ground color set by the ground color determination unit 170 and a color brighter than the ground color is present.
The detailed configurations of the under color determination unit 170 and the target image determination unit 180 will be described later. The under color determination section 170 counts the number of constituent units (unit image data) of the image data for each color gamut in a two-dimensional plane, and determines the presence or absence of an under color using the count result. That is, the base color determination unit 170 counts the number of the constituent units for each color gamut formed on the two-dimensional color plane, and determines whether or not a base color exists depending on whether or not the distribution of the constituent units is biased to a specific color gamut. When the color gamut deviates to a specific color gamut, it is determined that a ground color of a color corresponding to the color gamut exists. If the color gamut is not biased toward a specific color gamut, that is, if a plurality of color gamuts are dispersed to the same degree, it is determined that the ground color is not present. In addition, even when the background color is present in a biased manner toward the achromatic region, it is determined that the background color is not present.
The target image determination unit 180 counts the number of constituent units (unit image data) of the image data for each color gamut in the two-dimensional color plane, and performs color determination using the count result. That is, the target image determination unit 180 counts the number of constituent units for each color gamut formed on the two-dimensional color plane, and determines the color of the target image using the count result. The color gamut is divided into an achromatic region (a region near the origin) and a chromatic region (a region other than the achromatic region), and whether the target image is a color image or a monochrome image can be determined based on the distribution of the constituent units in the achromatic region and the chromatic region. For example, if there are many constituent units in the achromatic regions and few constituent units in the chromatic regions, it can be determined that the image is a monochrome image. On the other hand, if there are many constituent units in the colored region, it can be determined that the image is a color image.
Although the under color determination unit 170 and the target image determination unit 180 execute different processes in this way, in the present embodiment, the count by the under color determination unit 170 and the count by the target image determination unit 180 are executed using a common circuit, considering that the count process is common for each color gamut. This can simplify the configuration of the image color determination device 101.
The ram (random Access memory)112 and the image memory 116 are volatile memories (storage units) that can be read and written. The rom (read Only memory)113 is a read Only memory. An mpu (micro Processing unit)111 executes control in accordance with a program 113a stored in a ROM 113. The MPU111, ROM113, recording unit 151, and the like are electrically connected by a signal line (bus) 115, respectively. Therefore, the MPU111 can cause the recording unit 151 to execute a recording process and the like at a predetermined timing.
The CODEC131 functioning as a compression/expansion unit acquires image data, generates compressed image data, and stores the compressed image data in the image memory 116.
As described above, the image color determination device 101 has the processing modes of the "black-and-white mode" and the "color mode".
When scanning in the color mode, the color space converter 161b converts the multi-level RGB image data input from the resolution converter 161a into multi-level YCC image data, and the CODEC131 compresses the multi-level YCbCr image data in the JPEG scheme or the like and stores the data in the image memory 116.
When copying in the "color mode", the color space conversion unit 161b converts the multi-level RGB image data input from the resolution conversion unit 161a into multi-level Lab image data (image data expressed in the color space L × a × b), and further converts the multi-level Lab image data into multi-level CMYK image data (image data expressed in the color space CMYK). The recording section 151 acquires the two-level CMYK image data and forms a color image on a recording medium using an image forming engine required by the "Y", "M", "C", and "K" image forming engines (four-color image forming engines). Here, "use of" Y "," M "," C "and" K "image forming engines required for image forming engines (four-color image forming engines)" means that the image forming engines required for expressing colors included in an image are operated. For example, if the color classification of the color included in the image is only "Y", the image forming engine "Y" may be operated, and if the color classification of the color included in the image is "R", the image forming engines "Y" and "M" may be operated.
When the document is a gray-scale document (such as a monochrome photograph document), and scanning is performed in the monochrome mode, the color space converter 161b converts the multi-level RGB image data input from the resolution converter 161a into multi-level YCbCr image data, and the CODEC131 compresses the luminance component Y of the multi-level YCbCr image data in the JPEG scheme and stores the compressed luminance component Y in the image memory 116.
Alternatively, when the document is a grayscale document (monochrome photograph document or the like), the color space converter 161b converts the RGB image data of multiple grayscale levels input from the resolution converter 161a into YCbCr image data of multiple levels when scanning is performed in the monochrome mode. The luminance component Y of the multi-level YCbCr image data is binarized into a bi-level luminance component Y by a texture dithering method or the like, and the bi-level luminance component Y is compressed by the JBIG method by the CODEC131 and stored in the image memory 116.
On the other hand, when the document is a monochrome document (e.g., a monochrome character document), the color space converter 161b converts the multi-level RGB image data input from the resolution converter 161a into multi-level YCbCr image data. The luminance component Y of the multi-level YCbCr image data is binarized into a bi-level luminance component Y by a simple binarization method or the like, and the bi-level luminance component Y is compressed by a JBIG method or the like by the CODEC131 and stored in the image memory 116.
When the document is a gray-scale document (such as a monochrome photograph document), and copying is performed in the "monochrome mode", the color space converter 161b converts the multi-level RGB image data input from the resolution converter 161a into multi-level YCC image data. The luminance component Y of the multi-level YCC image data is binarized into two-level luminance components Y by a tissue dither method, an error diffusion method, or the like, and the recording unit 151 acquires the two-level luminance components Y and forms a black-and-white image on a recording medium using a "K" image forming engine.
On the other hand, when the document is a monochrome document (e.g., a monochrome character document), the color space converter 161b converts the multi-level RGB image data input from the resolution converter 161a into multi-level YCbCr image data. The luminance component Y of the multi-level YCbCr image data is binarized into a two-level luminance component Y by an error diffusion method, a simple binarization method, or the like, and the recording unit 151 acquires the two-level luminance component Y and forms a black-and-white image on a recording medium using a "K" image forming engine.
In addition, in the case of performing binarization when copying a gray-scale document, it is preferable to place more importance on the reproducibility of the gray-scale level than in the case of copying a monochrome document; in the case of performing binarization when copying a monochrome document, it is preferable to place more importance on the reproducibility of characters than in the case of copying a grayscale document.
<2 > Structure of the under color determination section and the target image determination section >
Here, the configurations of the under color determination section 170 and the target image determination section 180 will be described. As shown in fig. 9, the background color determination function of the background color determination unit 170 is realized by the 1 st unit image data determination unit 165a, the 1 st unit image data count unit 166a, the 1 st block determination unit 167a, the 1 st block count unit 168a, and the background color setting unit 171.
As shown in fig. 9, the color determination function of the target image determination unit 180 is realized by a 1 st unit image data determination unit 165b, a2 nd unit image data determination unit 182, a 1 st unit image data count unit 166b, a2 nd unit image data count unit 183, a 1 st block determination unit 167b, a2 nd block determination unit 184, a 1 st block count unit 168b, a2 nd block count unit 185, a target image conversion unit 172, and a mode selection unit 181.
The 1 st unit image data determination unit 165b, the 1 st unit image data counting unit 166b, the 1 st block determination unit 167b, and the 1 st block counting unit 168b of the target image determination unit 180 realize the same functions as the 1 st unit image data determination unit 165a, the 1 st unit image data counting unit 166a, the 1 st block determination unit 167a, and the 1 st block counting unit 168a of the corresponding under color determination unit 170, respectively.
Here, the 1 st unit image data determination unit 165(165a, 165b), the 1 st unit image data counting unit 166(166a, 166b), the 1 st block determination unit 167(167a, 167b), the 1 st block counting unit 168(168a, 168b), the 2 nd unit image data determination unit 182, the 2 nd unit image data counting unit 183, the 2 nd block determination unit 184, and the 2 nd block counting unit 185 according to the present embodiment perform the counting process and the determination process based on the unit image data (constituent unit) acquired from the target image, respectively, instead of performing the counting process and the determination process based on the pixel data constituting the target image.
The unit image data is a pixel group obtained by dividing the target image by n (n is a natural number) pixels, the n pixels being adjacent to each other, and the average value of the values of the pixels included in the corresponding pixel group is used as the value of each unit image data.
For example, each unit image data is composed of a pixel group divided by 2 × 2 (i.e., n is "4") pixels in the vertical direction (sub-scanning direction) and in the horizontal direction (main scanning direction), and when the color space of the target image is RGB, a value obtained by averaging R, G, and B values of 4 pixels included in the corresponding pixel group is used as the value (R, G, B) of each unit image data. As described above, in the present embodiment, the process of generating the unit image data is realized as an averaging process of averaging a predetermined number of adjacent pixel data and executed by the averaging unit 161 c.
In the present embodiment, the processes of the 1 st unit image data determination unit 165, the 1 st unit image data counting unit 166, the 1 st block determination unit 167, the 1 st block counting unit 168, the 2 nd unit image data determination unit 182, the 2 nd unit image data counting unit 183, the 2 nd block determination unit 184, and the 2 nd block counting unit 185 are performed on image data affine-transformed on the color plane H which is a two-dimensional color plane.
Therefore, first, the color plane H will be described below, and then the 1 st unit image data determination unit 165, the 2 nd unit image data determination unit 182, the 1 st unit image data count unit 166, the 2 nd unit image data count unit 183, the 1 st block determination unit 167, the 2 nd block determination unit 184, the 1 st block count unit 168, the 2 nd block count unit 185, the ground color setting unit 171, the target image conversion unit 172, and the mode selection unit 181, which are components of the ground color determination unit 170 and the target image determination unit 180, will be described.
<2.1. Structure of color plane >
The structure of the color plane according to embodiment 2 is as shown in fig. 2 and 3 of embodiment 1, and therefore, the description thereof is omitted.
In general, in the color plane H0, the inclination of the hue boundary lines D1 to D6 may be an irrational number, and hence, the determination of the color of the unit image data may require an irrational number calculation such as an inverse trigonometric function, which may reduce the determination efficiency. Therefore, in the processing by the 1 st unit image data determination unit 165, the 2 nd unit image data determination unit 182, the 1 st unit image data count unit 166, the 2 nd unit image data count unit 183, the 1 st block determination unit 167, the 2 nd block determination unit 184, the 1 st block count unit 168, and the 2 nd block count unit 185, affine transformation such as at least rotational transformation is performed on the image data on the color plane H0, and a color plane H having a rational number of inclinations of the hue boundary lines D1 to D6 is used.
<2.2. structural elements of the under color determination section and the target image determination section >
Here, the components of the background color determination section 170 and the target image determination section 180 will be described. The 1 st unit image data determination unit 165(165a, 165b) performs determination processing on image data converted from the RGB color space to the Lab color space by the image processing circuit 161. That is, the 1 st unit image data determination unit 165 determines which of the color ranges mC, mM, mY, mR, mG, mB and the achromatic area mA corresponding to the specific chromatic color in the color plane H the unit image data acquired based on the image data belongs to.
The 1 st unit image data counting unit 166(166a, 166b) divides the image data into a plurality of blocks each composed of, for example, 30 × 30 (900 in total) unit image data in vertical direction. The 1 st unit image data counting unit 166 counts the number of unit image data belonging to each of the plurality of color ranges mC, mM, mY, mR, mG, and mB and the achromatic area mA for each block based on the determination result of the 1 st unit image data determining unit 165.
For example, the 1 st unit image data counting unit 166 counts the number of unit image data belonging to the color gamut mC among the 900 unit image data included in the tile, and stores the count result in the RAM 112. Similarly, the 1 st unit image data counting unit 166 counts the number of unit image data belonging to each of the color ranges mM, mY, mR, mG, mB, and the achromatic area mA, and stores the count results in the RAM 112.
The 1 st block determination unit 167(167a, 167b) determines the color included in each block based on the count result of the 1 st unit image data count unit 166. That is, the block determination unit 167 compares the count value of each of the color ranges mC, mM, mY, mR, mG, mB, and the achromatic region mA with the reference value for presence check for each block, and determines the color included in the block.
For example, when only the count values of the color gamuts mC and mM exceed the reference value for presence check for a certain tile, the tile is determined to contain cyan C and magenta M. In addition, when the count value of only the achromatic region mA exceeds the reference value for presence check for a certain block, it is determined that only an achromatic color exists in the block.
The threshold used for checking the presence of unit image data (threshold for checking the presence) may be different for each of the color ranges mC, mM, mY, mR, mG, mB, and achromatic area mA, or may be the same value.
The 1 st patch counting section 168(168a, 168b) calculates patch count values for each color gamut mC, mM, mY, mR, mG, mB, and achromatic area mA based on the determination result of each patch by the 1 st patch determining section 167. That is, the 1 st tile counter 168 adds up the count values (tile count values) of the color gamut and the achromatic region corresponding to the colors determined to be included in each tile by the 1 st tile determining section 167. For example, when the 1 st patch determining section 167 determines that a certain patch includes only cyan C and magenta M, the 1 st patch counting section 168 adds the count values of the color ranges mC and mM as the counting process for the patch. When the 1 st block determining unit 167 determines that a certain block includes only achromatic colors, the 1 st block counting unit 168 adds the count value of the achromatic area mA as a count process related to the block. Then, the 1 st patch counting unit 168 stores the result (patch count value) obtained by counting for each of the plurality of color gamuts mC, mM, mY, mR, mG, mB, and achromatic area mA in the RAM 112.
When the 1 st unit image data determination unit 165a, the 1 st unit image data counting unit 166a, the 1 st block determination unit 167a, and the 1 st block counting unit 168a perform the processing on the image data, the background color setting unit 171 sets the background color of the image data based on the count result of the block counting unit 168 a.
For example, when one or two of the block count values counted for each of the plurality of color ranges mC, mM, mY, mR, mG, mB and achromatic region mA is equal to or greater than the ground color reference value, the ground color setting unit 171 determines that the ground color is present in the color range equal to or greater than the ground color reference value, and selects the corresponding color range.
That is, the ground color setting unit 171 determines the presence or absence of a ground color based on the block count value of each color gamut (each color gamut in the two-dimensional color plane) and the ground color reference value, and determines the color gamut corresponding to the ground color when it is determined that the ground color is present.
The ground color setting unit 171 determines that there is a ground color if there is a color gamut in which the block count value exceeds the ground color reference value. Then, it is determined that the color gamut is a color gamut corresponding to the ground color. The base color reference value is plural, and it is determined that there is a base color not only when one gamut exceeds the 1 st base color reference value but also when two gamuts exceed the 2 nd base color reference value.
Then, for the color gamut selected based on the count result of the 1 st block count unit 168, the ground color setting unit 171 sets the ground color position based on the barycentric position of the plurality of unit image data included in the selected color gamut. In this case, the under color setting unit 171 calculates a three-dimensional under color region P1 based on the three-dimensional distribution of the plurality of unit image data included in the selected color gamut.
For example, in setting the three-dimensional ground color region P1, first, the maximum value and the minimum value of the L value, the a3 value, and the b3 value are determined for a plurality of unit image data included in the selected color gamut. That is, the lightness range and the chroma range of the ground color are determined based on the three-dimensional distribution of the unit image data in the gamut. Then, the barycentric position is determined as the ground color position based on the unit image data included in the obtained lightness range and chromaticity range, that is, the ground color region P1 (see fig. 6). Therefore, detection as an erroneous ground color can be further prevented.
The method of calculating the ground color position is not limited to this. For example, the calculation may be performed based on the maximum value and the minimum value (for example, the average value of the maximum value and the minimum value) of the unit image data included in the selected color gamut. The maximum value and the minimum value of the L value, the a3 value, and the b3 value obtained when setting the ground color are stored in the RAM 12.
The object image transformation unit 172 performs affine transformation on the image data (unit image data) in the color plane H based on the ground color set by the ground color setting unit 171. Specifically, the target image conversion unit 172 moves the image data to be determined in parallel so that the ground color position (center of gravity position) calculated by the ground color setting unit 171 is the origin of the color plane H including the plurality of color ranges mC, mM, mY, mR, mG, mB, and the achromatic region mA.
The 2 nd unit image data determination unit 182 performs determination processing on the image data subjected to affine transformation by the target image transformation unit 172. That is, the 2 nd unit image data determination unit 182 determines whether or not the unit image data acquired based on the image data after the affine transformation is included in the chromaticity range of the ground color set by the ground color setting unit 171 and whether or not the brightness is equal to or greater than the brightness threshold set by the ground color setting unit 171. The maximum value of the L value obtained by the background color setting unit 171 may be used as the brightness threshold.
The 2 nd unit image data counting unit 183 performs a counting process based on the determination result of the 2 nd unit image data determining unit 182. That is, the 2 nd unit image data counting unit 183 counts the number of unit image data (hereinafter, also referred to as ground-color upper image data) included in the chromaticity range of the ground color set by the ground color setting unit 171 and having a brightness equal to or higher than the brightness threshold set by the ground color setting unit 171.
The 2 nd block determination unit 184 determines whether or not each block includes the upper background image data based on the count result of the 2 nd unit image data count unit 183. For example, when the count result of the 2 nd unit image data counting unit 183 is equal to or greater than a predetermined threshold value, the 2 nd block determination unit 184 determines that the background-upper image data is included in the target block. On the other hand, when the count result of the 2 nd unit image data count unit 183 is smaller than the predetermined threshold, the 2 nd block determination unit 184 determines that the background-color upper image data is not included in the target block.
The 2 nd block counting unit 185 counts the number of blocks determined to contain the image data above the background color based on the determination result of each block obtained by the 2 nd block determining unit 184. Then, the 2 nd block count section 185 stores the count result (block count value) in the RAM 112.
The mode selection unit 181 performs color determination based on image data obtained by performing affine transformation with the ground color position as the origin of the color plane H in the color plane H, and performs selection of a processing mode based on the result of the color determination. That is, when the 1 st unit image data determination unit 165b, the 2 nd unit image data determination unit 182, the 1 st unit image data counting unit 166b, the 2 nd unit image data counting unit 183, the 1 st block determination unit 167b, the 2 nd block determination unit 184, the 1 st block counting unit 168b, and the 2 nd block counting unit 185 perform the processing on the image data subjected to the affine transformation by the target image transformation unit 172, the mode selection unit 181 selects the processing mode based on the count results of the 1 st block counting unit 168b and the 2 nd block counting unit 185.
For example, when the tile count value of the color gamut mC is equal to or greater than a predetermined threshold value, the mode selection unit 181 determines that the target image is a color image and selects "color mode" as the processing mode. Similarly, when any one of the tile count values of the color gamuts mM, mY, mR, mG, and mB is equal to or greater than a predetermined threshold, the mode selection unit 181 determines that the target image is a color image, and selects "color mode" as the processing mode.
When the count result (block count value) of the 2 nd block count unit 185 is equal to or greater than the brightness reference value, the mode selection unit 181 selects the "color mode" as the processing mode. Therefore, it is possible to perform good processing without impairing the appearance of the image data by using a processing unit such as the recording unit 151 or the image processing circuit 161 for a portion included in the color range of the ground color and equal to or more than the brightness threshold value.
On the other hand, when all the tile count values of the color gamuts mC, mM, mY, mR, mG, and mB are smaller than the predetermined threshold value, the mode selection unit 181 determines that the target image is a monochrome image, and selects the "monochrome mode". When the count result of the 2 nd block count unit 185 is smaller than the brightness reference value, the mode selection unit 181 selects the monochrome mode.
Then, the processing unit such as the recording unit 151 or the image processing circuit 161 performs predetermined processing on the image data relating to the target image based on the processing mode (color mode or black-and-white mode) selected by the mode selection unit 181.
For example, when the monochrome mode is selected by the mode selection unit 181, the recording unit 151 records the image data converted into monochrome on a recording sheet. When the color mode is selected by the mode selector 181, the CODEC131 JPEG-compresses the image data as color data.
The threshold used for color determination may be different for each color gamut mC, mM, mY, mR, mG, mB and achromatic area mA, or may be the same value.

Claims (16)

1. An image color determination device that determines a color of a target image, comprising:
a background color determination unit that determines whether or not there is a background color in the target image based on image data relating to the target image, and determines a color of the background color when there is a background color in the target image; and
and a target image determination unit that performs color determination of the target image based on the image data relating to the target image using a determination result of the background determination unit.
2. The image color determination apparatus according to claim 1,
the under color determination section counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane, and determines whether or not an under color is present using the count result;
the target image determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane and performs color determination using the count result,
the count of the under color determination unit and the count of the target image determination unit use a common circuit.
3. The image color determination apparatus according to claim 1,
in the color determination by the target image determination unit, a user can set whether or not to use the determination result of the ground color determination unit.
4. The image color determination apparatus according to claim 1,
the target image determination unit performs a shift conversion process on the image data and a process of expanding the achromatic region in the shift direction thereof, based on a positional relationship between a coordinate position corresponding to the color of the ground color determined by the ground color determination unit and an origin position in a two-dimensional color plane, and then counts the number of constituent units of the image data for the achromatic region and the chromatic region, and performs color determination using the count result.
5. The image color determination apparatus according to claim 1,
the under color determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane, determines whether or not an under color is present using the count result, and determines the color of the under color based on the distribution of the counted constituent units in the color gamut corresponding to the under color in the two-dimensional color plane.
6. The image color determination apparatus according to claim 5,
the under color determination unit calculates the gravity center positions of the counted plurality of constituent units in the color gamut corresponding to the under color in the two-dimensional color plane, and determines the color of the under color based on the gravity center positions.
7. The image color determination apparatus according to claim 1,
the target image determination unit averages image data for each pixel set including a plurality of pixels, and performs color determination of the image data using the averaged image data as a constituent unit.
8. An image color determination method for determining a color of a target image, comprising:
a background color determination step of determining whether or not a background color is present in the target image based on image data relating to the target image, and determining a color of the background color when the background color is present in the target image; and
and an object image determination step of performing color determination of the object image based on the image data relating to the object image using a determination result of the ground color determination step.
9. An image color determination device that determines a color of a target image, comprising:
a background color determination unit that determines whether or not there is a background color in the target image based on image data relating to the target image, and determines brightness and chromaticity of the background color when there is a background color in the target image; and
and a target image determination unit that performs color determination of the target image based on the image data relating to the target image using a determination result of the background determination unit.
10. The image color determination apparatus according to claim 9,
the target image determination unit determines that the color is achromatic when the chromaticity and the brightness of the image data to be determined correspond to the chromaticity and the brightness of the ground color in the color determination; and determining that the color is present when the chromaticity of the background color is equivalent and the brightness of the background color is different.
11. The image color determination apparatus according to claim 9,
the under color determination section counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane, and determines whether or not an under color is present using the count result,
the target image determination unit counts the number of constituent units of the image data for each color gamut in the two-dimensional color plane and performs color determination using the count result,
the count of the under color determination unit and the count of the target image determination unit use a common circuit.
12. The image color determination apparatus according to claim 9,
in the color determination by the target image determination unit, a user can set whether or not to use the determination result of the ground color determination unit.
13. The image color determination apparatus according to claim 9,
the target image determination unit performs a shift conversion process on the image data and a process of expanding the achromatic region in the shift direction thereof, based on a positional relationship between a coordinate position corresponding to the chromaticity of the ground color determined by the ground color determination unit and an origin position in a two-dimensional color plane, and then counts the number of constituent units of the image data for the achromatic region and the chromatic region, and performs color determination using the count result.
14. The image color determination apparatus according to claim 9,
the under color determination unit counts the number of constituent units of the image data for each color gamut in a two-dimensional color plane, determines the presence or absence of an under color using the count result, and determines the brightness and chromaticity of the under color based on the three-dimensional distribution of the counted constituent units in the color gamut corresponding to the under color.
15. The image color determination apparatus according to claim 9,
the target image determination unit averages the image data for each pixel set including a plurality of pixels, and performs color determination of the image data using the averaged pixel data as a constituent unit.
16. An image color determination method for determining a color of a target image, comprising:
a background color determination step of determining whether or not a background color is present in the target image based on image data relating to the target image, and determining brightness and chromaticity of the background color when the background color is present in the target image; and
and an object image determination step of performing color determination of the object image based on the image data relating to the object image using a determination result of the ground color determination step.
HK08109038.7A 2006-09-06 2008-08-14 Apparatus and method for deciding image color HK1113450A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2006-242189 2006-09-06
JP2006-242193 2006-09-06
JP2007-183147 2007-07-12
JP2007-183148 2007-07-12

Publications (1)

Publication Number Publication Date
HK1113450A true HK1113450A (en) 2008-10-03

Family

ID=

Similar Documents

Publication Publication Date Title
CN101141548B (en) Apparatus and method for deciding image color
US7356160B2 (en) Method of and apparatus for image processing
JP4861967B2 (en) Image processing apparatus, image processing method, image processing program, image forming apparatus, and storage medium
US20040156076A1 (en) Method of and apparatus for image processing, and computer product
CN102469230A (en) Image processing device and method, image forming device, and image reading device
US8009902B2 (en) Image processing apparatus and method for detecting a background color based on data chrominance distribution
US20080055677A1 (en) Image Color Determining Device and Image Color Determining Method
JP4438834B2 (en) Image color determination apparatus, image color determination method, and program
US7835045B2 (en) Image processing device and image processing method
EP1898625A2 (en) Apparatus and method for deciding image color
JP2008172677A (en) Image processor and ground color detection method
HK1113450A (en) Apparatus and method for deciding image color
JP4386110B2 (en) Image color determination apparatus, image color determination method, and program
JP2010258706A (en) Image processing apparatus, image forming apparatus, image processing apparatus control method, program, and recording medium
HK1113884A (en) Image color judgment device and image color judgment method
JP2008259016A (en) Image forming apparatus and image forming method
JP2006333200A (en) Color image input / output device
JP4360415B2 (en) Image color determination apparatus, image color determination method, and program
JP2008219465A (en) Image reader
JP2022139131A (en) Image reading device and image reading method
JP2006287707A (en) Image processing device
JP2008066950A (en) Image color deciding device, image color deciding method, and image color deciding program
JP2008066920A (en) Image color deciding device, image color deciding method, and image color deciding program
JP2003244451A (en) Image processing device
HK1113720A (en) Apparatus and method for deciding image color