Image processing device, image processing method, and program

The image processing apparatus addresses scanning unevenness by adjusting edge pixel colors based on surrounding brightness, enhancing compression efficiency and image reproducibility by minimizing intermediate colors in scanned documents.

JP7543023B2Active Publication Date: 2024-09-02CANON KK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2020133367
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-08-05
Publication Date
2024-09-02
Estimated Expiration
2040-08-05

AI Technical Summary

Technical Problem

Intermediate colors occur at character edge portions of scanned images due to scanning unevenness, leading to decreased compression efficiency when generating binary images using methods like MMR.

Method used

An image processing apparatus that adjusts the pixel values of edge pixels based on surrounding pixel brightness, changing them to the highest or lowest brightness values depending on threshold conditions, and performs color reduction and compression to improve efficiency.

Benefits of technology

Enhances compression efficiency and maintains image quality by correcting edge pixel colors, reducing intermediate colors, and improving reproducibility of document information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007543023000007
    Figure 0007543023000007
  • Figure 0007543023000013
    Figure 0007543023000013
  • Figure 0007543023000010
    Figure 0007543023000010
Patent Text Reader

Abstract

To improve compression efficiency at the time of performing color reduction processing and compressing image data for each color.SOLUTION: An image processing apparatus according to the present invention includes: reading means configured to read an image on an original document and generate image data; color reduction means configured to perform color reduction processing for quantizing a color in the generated image data; change means configured to change, in a case where brightness of an edge pixel indicating an edge portion in an image based on the image data with the color quantized is equal to or higher than a threshold value, a pixel value of the edge pixel to a pixel value of a color of a pixel having highest brightness among pixels surrounding the edge pixel, and change, in a case where the brightness of the edge pixel is lower than the threshold value, the pixel value of the edge pixel to a pixel value of a color of a pixel having lowest brightness among the pixels surrounding the edge pixel; and compression means configured to compress the image data in which the pixel value of the edge pixel is changed by the change means while dividing the data color by color.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device, an image processing method, and a program. [Background technology]

[0002] In Patent Document 1, a color reduction process is performed on an original image, color information and an index color image are output, and binary images and background color information for each color are generated, and compression process is performed using a method such as MMR. [Prior art documents] [Patent documents]

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

[0004] When scanning an original and generating image data, intermediate colors may occur at character edges of the image data due to scan unevenness, etc. When this image data is subjected to color reduction processing as in Patent Document 1 to generate binary images for each color and compress them using a method such as MMR, a binary image with different colors is generated for the character portion and the character edge portion. In such a case, the compression efficiency decreases when the binary image is compressed using a method such as MMR.

[0005] The present invention has been made in consideration of the above problems, and has an object to improve the compression efficiency when performing color reduction processing and compressing image data for each color. [Means for solving the problem]

[0006] The image processing device of the present invention has a reading means for reading an image of an original and generating image data, a color reduction means for performing a color reduction process to quantize colors of the generated image data, a modification means for changing a pixel value of an edge pixel indicating an edge portion of an image based on the image data whose colors have been quantized to a threshold value or more, to a pixel value of a color of a pixel having the highest brightness among pixels surrounding the edge pixel, and for changing a pixel value of the edge pixel to a pixel value of a color of a pixel having the lowest brightness among pixels surrounding the edge pixel, if the brightness of the edge pixel is lower than the threshold value, and a compression means for dividing the image data whose pixel values ​​of the edge pixels have been changed by the modification means by color and compressing the divided image data. and the modifying means, when the brightness of the edge pixel is equal to or greater than a threshold value, calculates a color difference between the edge pixel and a color of a pixel surrounding the edge pixel that is the brightest, and when the color difference is smaller than a second threshold value, modifies the pixel value of the edge pixel to a pixel value of the color of the pixel surrounding the edge pixel that is the brightest, and when the color difference is equal to or greater than the second threshold value, does not modify the pixel value of the edge pixel. do. Effect of the Invention

[0007] It is possible to improve the compression efficiency when compressing image data for each color by performing a color reduction process. [Brief description of the drawings]

[0008] [Figure 1] Block diagram of the device of this embodiment [Diagram 2] Hardware configuration of the MFP in this embodiment [Diagram 3] FIG. 1 is a diagram for explaining details of a data processing unit in this embodiment. [Figure 4] FIG. 3 is a diagram for explaining the processing of the binary image generating unit 312 in this embodiment. [Diagram 5] 1 is a flowchart showing image processing performed by the data processing unit in this embodiment. [Figure 6] FIG. 11 is a diagram for explaining details of the process performed in step S503 in the first embodiment. [Figure 7] A flow chart for explaining details of the process performed in step S503 in the first embodiment. [Figure 8] FIG. 1 is a diagram showing an example of the configuration of compressed data in this embodiment. [Figure 9] FIG. 11 is a diagram for explaining details of a process performed by an edge pixel color correction unit 304 in the second embodiment. [Figure 10]A flow chart for explaining details of the process performed by the edge pixel color correction unit 304 in the second embodiment. [Figure 11] FIG. 3 is a diagram for explaining the processing of the color information generating unit 307 and the color information sorting unit 309 in this embodiment. [Figure 12] FIG. 13 is an explanatory diagram of image data in the third embodiment. [Figure 13] FIG. 13 is a diagram for explaining details of a data processing unit in the third embodiment. [Figure 14] 11 is a flowchart showing image processing performed by the data processing unit in the third embodiment. [Figure 15] A flowchart for explaining details of the process performed in step S1401 in the third embodiment. [Figure 16] A flowchart for explaining details of the process performed in step S1403 in the third embodiment. [Figure 17] FIG. 11 is an explanatory diagram of representative colors in the third embodiment. [Figure 18] Descriptive diagram of representative colors in Example 4 DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. EXAMPLES

[0010] <Overall system configuration> 1 is a schematic diagram showing the system configuration of an MFP in Example 1. In FIG. 1, a multi-function peripheral (MFP) 101 and a computer (hereinafter, PC) 102 are connected via a network 103.

[0011] The user can use the operation unit (203 in FIG. 2) of the MFP 101 described below to set the destination (e.g., PC 102) to which the scanned image is to be sent and various settings related to scanning and sending. As the various settings, the user can specify the resolution, compression ratio, data format (e.g., JPEG, TIFF, PDF, grayscale compression, grayscale compression (with OCR result)), etc. In this embodiment, the case where grayscale compression is specified as the data format will be described. The technical details of grayscale compression will be described later. Then, based on the specified various settings, the software or hardware functions of the MFP 101 are used to generate data and send it to the specified destination. Here, since the image sent to the PC 102 is sent in a file format such as PDF, it can be viewed with a general-purpose viewer possessed by the PC 102.

[0012] <MFP System Configuration> FIG. 2 is a diagram showing the detailed configuration of the MFP 101 according to an embodiment of the present invention.

[0013] The MFP 101 includes a scanner unit 201 which is an image input device, a printer unit 202 which is an image output device, a control unit 204 which is composed of a memory and the like, and an operation unit 203 which is a user interface. The control unit 204 is a controller which is connected to the scanner unit 201, the printer unit 202 and the operation unit 203 and is also connected to the network 103 to input and output image information and device information. The CPU 205 is a processor which controls the entire system. The RAM 206 is a system work memory for the operation of the CPU 205, and is also an image memory for temporarily storing image data. The ROM 210 is a boot ROM in which programs such as a boot program for the system are stored. The storage unit 211 is a hard disk drive which stores system control software and image data. The operation unit I / F 207 is an interface unit with the operation unit (UI) 203, and outputs image data to be displayed on the operation unit 203 to the operation unit 203. Furthermore, an operation unit I / F 207 serves to transmit information input by a user of the MFP 101 via the operation unit 203 to the CPU 205. A network I / F 208 connects the MFP 101 to the network 103, and inputs and outputs information in packet format. The above devices are arranged on a system bus 216. An image bus interface 212 is a bus bridge that connects the system bus 216 and an image bus 217 that transfers image data at high speed, and converts the data structure. The image bus 217 is configured by, for example, a PCI bus or IEEE1394.

[0014] The following devices are arranged on the image bus 217. The RIP (Ruster Image Processor) unit 213 performs so-called rendering processing, which analyzes PDL (Page Description Language) code and develops it into a bitmap image of a specified resolution. The device I / F unit 214 connects the scanner unit 201, which is an image input device, via a signal line 218, and connects the printer unit 202, which is an image output device, via a signal line 219. The data processing unit 215 performs image processing of scan data input from the scanner unit 201 and print image data processing to be output to the printer unit 202, as well as processing such as low-color compression and OCR. This generates compressed data (317), which will be described later. The generated compressed data (317) is transmitted to a specified destination (e.g., PC 102) via the network I / F 208 and the network 103. The data processing unit 215 can also decompress compressed data received via the network I / F 208 and the network 103. The decompressed image is sent to the printer unit 202 via the device I / F 214 and printed out. The data processing unit 215 will be described in detail later.

[0015] <Description of Data Processing Unit> Next, FIG. 3 shows the functional configuration of the image encoding device according to this embodiment, along with data that is processed or has been processed in each unit.

[0016] An edge detection unit 301 performs edge detection for each pixel of the original image. Known techniques such as a Laplacian filter or the Canny method are used for edge detection. As a result of the edge detection process, an edge detection signal 302 corresponding to each pixel of the original image is generated. The edge detection signal 302 is, for example, a binary image of the same size as the original image, and takes the value 0 / 1 corresponding to the edge detection result for each pixel of the original image (0 is non-edge, 1 is edge).

[0017] A color reduction processing unit 303 performs color reduction processing on the original image based on a predetermined number of colors and an edge detection signal 302. In this embodiment, a color-reduced image 304 is generated using information on the colors of pixels that are determined to be non-edges, that is, pixels whose values ​​in the edge detection signal 302 corresponding to each pixel of the original image are 0. In this embodiment, the predetermined number of colors is stored in the ROM 210, but this is not limited to this. As for the color reduction method, for example, a predetermined number of colors are selected from the colors with high frequency in a histogram of RGB values ​​to determine representative colors after color reduction. After that, the colors of all pixels in the image are reduced to the colors closest to each representative color. Note that this is one method for explaining this embodiment, and the method is not limited to this. This color reduction processing is a process of quantizing colors included in image data.

[0018] An edge pixel color correction unit 305 changes the pixel value (color) of a pixel determined to be an edge by the edge detection unit 301 based on the pixel values ​​(colors) of the surrounding pixels. As a result of the edge pixel color correction process, an edge pixel color corrected image 306 is generated. This enables improved compression efficiency and compression with good reproducibility in a binary image compression unit 314, which will be described later. Details of the edge pixel color correction process will be described later.

[0019] The color information generating unit 307, color information 308, and color information sorting unit 309 will be described with reference to FIG.

[0020] Reference numeral 307 denotes a color information generating unit, which generates color information for each color contained in the edge pixel color corrected image 306 generated by the edge pixel color correcting unit 305. Specifically, it generates color information 308, as shown in Fig. 11(a), which is composed of data indicating the number of pixels having that color, the color value, and a distribution range indicating the range within the entire image in which the pixels having that color exist. Therefore, color information is generated for the number of colors used in the edge pixel color corrected image 306. Note that the distribution range data is data on the coordinates (start coordinate) of the pixel in the upper left corner and the coordinates (end coordinate) of the pixel in the lower right corner for each color in the edge pixel color corrected image 306.

[0021] A color information sorting unit 309 sorts the color information 308 according to the number of pixels for each color, and generates sorted color information 318 as shown in Fig. 11(b). As a result, the color information with the largest number of pixels appears at the top of the sorted color information 318.

[0022] Reference numeral 310 denotes a background color data generator, which generates the color value included in the topmost color information of the sorted color information 318 as background color data 311. In this embodiment, RGB values ​​of 8 bits each are assumed, but the present invention is not limited to this.

[0023] The binary image generating unit 312 will be described with reference to FIG.

[0024] Reference numeral 312 denotes a binary image generating unit, which generates a binary image 313 by dividing the image into colors based on the edge pixel color corrected image 306 and the sorted color information 318. In this embodiment, a binary image is generated for each color excluding the top color of the sorted color information 318 (white in the description of this embodiment). For example, as shown in 401 in FIG. 4, when the color value included in the color information is red, the coordinates of the pixel at the upper left corner of the edge pixel color corrected image 306 that belongs to the color information are set to the upper left vertex of the binary image, and the coordinates of the pixel at the lower right corner are set to the lower right vertex of the binary image to create an image size. Then, a binary image is generated by setting the pixel to 1 if it has the same color as the color, and 0 if not, and adding data indicating the color.

[0025] A binary image compression unit 314 compresses the binary image 313 generated for each color by the binary image generation unit 312, and generates binary image compressed data 315. In this embodiment, the MMR (MODIFIED MODIFIED READ) compression method is used, but this is not limiting. A data integration unit 316 integrates the background color data 311, the binary image compressed data 315, and the sorted color information 318 to generate compressed data.

[0026] <Explanation of the flow chart> The image encoding process performed by the image encoding device in this embodiment having the above configuration will be described with reference to Fig. 5. Fig. 5 is a flowchart of the image encoding process performed by the image encoding device in this embodiment. Note that the description of each step in Fig. 5 describes the processing content of each processing unit based on instructions from the CPU 205.

[0027] When a user specifies few-color compression using the operation unit (203 in FIG. 2) of the MFP (101 in FIG. 1), the operation unit I / F 207 notifies the CPU 205 of the data format specified by the user. Based on the notification information from the operation unit I / F 207, the CPU 205 issues an instruction to the scanner unit 201 to read an original, and also issues an instruction to the data processing unit 215 to start processing the input image data. Upon receiving the instruction to start processing, in step S501 the edge detection unit 301 performs edge detection processing on the input image and generates an edge detection signal 302. As described above, a known technique is used for the detection method.

[0028] Next, in step S502, the color reduction processing unit 303 uses color information of pixels in the input image for which the value of the edge detection signal 302 is 0 (non-edge pixels) to generate a color-reduced image 304. The generation method is the method described above.

[0029] <Description of the proposed technology of the present invention> Next, the edge pixel color correction process performed by the edge pixel color correction unit 305 in step S503 will be described with reference to FIGS.

[0030] First, FIG. 6(a) shows a reduced-color image 304 resulting from processing up to the color reduction processing unit 303. FIG. 6(b) is an enlarged view of the lower right portion of the black character 601 in FIG. 6(a). As in the case of the pixel 602 in FIG. 6(b), the color may be reduced to an intermediate color between the color of the pixel constituting the black character 601 and the color of the background 603 due to uneven reading caused when scanning a paper document when the original image is generated. This reduces the compression efficiency and reproducibility of the document information when the binary image generating unit 312 in FIG. 3 generates a binary image for each color. Therefore, the color of the edge pixel in the reduced-color image 304 is corrected to the color of the character part and the color of the background according to the brightness of the edge pixel, thereby improving the reproducibility of the document information and enabling an improvement in the compression efficiency.

[0031] A flowchart showing details of the process in step S503 above is shown in Fig. 7. Note that the explanation of each step in Fig. 7 explains the process content of each processing unit based on an instruction from the CPU 205.

[0032] First, in step S701, a pixel for which the value of the edge detection signal 302 for the input image is 1 (edge ​​pixel) in step S501 in Fig. 5 is selected as a pixel of interest. In this embodiment, the pixel 604 in Fig. 6(c) is selected as the pixel of interest. The order in which the pixels of interest within an image are selected may be any order, and in this embodiment, the order is the raster scan order of the entire image.

[0033] Next, in step S702, it is determined whether the brightness value of the pixel of interest is equal to or greater than a threshold value. In this embodiment, the determination is made based on the average value of each of the RGB values, but the determination method is not limited to this. For example, the Y component of the YCbCr color space consisting of brightness and color difference may be used, or the L* component of the L*a*b* color space may be used. If it is equal to or greater than the threshold value, the process proceeds to step S703, and if it is equal to or less than the threshold value, the process proceeds to step S704.

[0034] Next, in step S703, 5 vertical x 5 horizontal pixels with the pixel of interest at the center are selected as reference pixels. In the explanation of this embodiment, it is assumed that the reference pixels with the pixel of interest 604 at the center are white, gray, and black pixels, such as 605. Note that the RGB values ​​of white, black, and gray are (255, 255, 255), (0, 0, 0), and (128, 128, 128), respectively.

[0035] Next, in step S704, from among the 24 pixels excluding the pixel of interest, which are the 5×5 pixels selected in step S703, the pixel with the smallest brightness value is selected, and the color of the pixel of interest is corrected to the color of the pixel with the smallest brightness value. Among the reference pixels 605 shown in the explanation of this embodiment, the black pixel 606 is the pixel with the smallest brightness value, and the color of the pixel of interest is corrected to the color of 607 in FIG. 6(c).

[0036] Next, in step S705, similarly to step S703, 5 pixels vertically by 5 pixels horizontally with the pixel of interest at the center are selected as reference pixels.

[0037] Next, in step S706, the pixel with the greatest brightness value is selected from the 24 pixels excluding the pixel of interest among the 5 pixels vertical by 5 pixels horizontal selected in step S705, and the color of the pixel of interest is modified to the color of the pixel with the greatest brightness value.

[0038] Next, in step S707, it is determined whether all edge pixels have been selected. If all edge pixels have been selected and the edge pixel colors have been corrected, the process proceeds to step S504, and if not, the process returns to step S701. This completes the explanation of step S503. As a result of the processing by the edge pixel color correcting unit 305 here, an edge pixel color corrected image 306 is generated.

[0039] 3 generates color information 308 based on the edge pixel color corrected image 306. As described above, the color information 308 is made up of data indicating the colors contained in the edge pixel color corrected image 306, the number of pixels for each reduced color, and data indicating the coordinates of the upper left pixel and the lower right pixel in the edge pixel color corrected image 306.

[0040] Next, in step S505, color information sorting unit 309 sorts color information 308 by the number of pixels for each color, and generates sorted color information 318. As a result of the sorting, the color information of the color with the largest number of pixels becomes the top.

[0041] Next, in step S 506 , the background color data generator 310 outputs the top color value of the sorted color information 318 as background color data 311 .

[0042] Next, in step S507, the binary image generator 312 generates a binary image 313 for each color using the color information 308 other than the most significant one and the edge pixel color corrected image 306. The generation method is the same as that described above.

[0043] Next, in step S508, the binary image compression unit 314 compresses the binary image 313 for each color using a method such as MMR to generate compressed binary image data 315. The compressed binary image data 315 is a data group made up of color information and MMR compressed data.

[0044] Finally, in step S509, the data combining unit 316 combines the background color data 311, the binary image compression data 315, and the sorted color information 318 to generate and output compressed data 317. An example of the configuration of the compressed data 317 is shown in FIG.

[0045] First, the header section contains information such as the size (number of pixels vertically and horizontally) of the entered document image (original image), the color value of the background color, and the resolution. The color with the largest number of pixels is generally selected as the background color, so if the document is printed on red or other colored paper, for example, a reddish value is entered. However, since it is considered that the base is often white, a white determination is made of the background color, and if it is determined to be white, the background color value can be omitted. For example, a white determination is made when each of the RGB values ​​is above a certain value and the difference between the respective values ​​is within a certain value, it is considered to be white.

[0046] The header section is followed by the compressed data for each color. As mentioned above, the compressed data consists of color information and MMR compressed data. If the number of colors remaining after excluding the background color is N, then there will be data of the same structure for that number of colors. Of course, if the input image is a monochrome original such as a blank piece of paper, no data for this part will be created. If it is a black and white original, the amount of color compressed data will be 1, which is roughly equivalent to a binary image. If only a portion of the original contains black pixels, the MMR compressed data will only compress that part, so the data size will be smaller than if the entire black and white original were to be MMR compressed.

[0047] The method for decoding this compressed data 317 back to the original image is to draw the entire document area in the background color stored in the header shown in Fig. 8, and then expand the MMR compressed data included in the compressed data in the order in which it was stored.Then, using this image as a mask, overwrite the original image according to the stored position and color.

[0048] As described above, the image coding apparatus and image coding method according to the present embodiment can efficiently compress most color document images by having a binary image for each color. EXAMPLES

[0049] Next, another configuration of the edge pixel color correcting unit (305) in FIG. 3 will be described with reference to FIG. 9 and FIG.

[0050] At the end of processing in the color reduction processing unit 303 in Fig. 3, an isolated point with a different color from the surroundings, such as 902 in Fig. 9(b), occurs at the character edge of red character 901 in an image as shown in Fig. 9(a), due to unevenness in reading the paper document, etc. When such a pixel is present, if the color of the edge pixel shown in Fig. 9(b) is corrected in step S704 in Fig. 7, a pixel with low brightness is selected from the reference pixels and corrected to that color, so that the color is corrected to that of isolated point 902 as shown in Fig. 9(c), resulting in a loss of information from the original paper document. Also, in step S706 in Fig. 7, a similar phenomenon occurs if the brightness of the background color is low and the brightness of the isolated point is high.

[0051] The configuration of the edge pixel color correction unit 305 for solving the above problem will be described with reference to Fig. 10. Note that the description of each step in Fig. 10 describes the processing content of each processing unit based on the instruction of the CPU 205.

[0052] Steps S1001 to S1003 are the same as steps S701 to S703 in Fig. 7. In the description of this embodiment, it is assumed that pixel 903 in Fig. 9(d) is selected as the pixel of interest, and that reference pixels include white, black, and red pixels, such as pixel 904. Note that the RGB values ​​of white, black, and red are (255, 255, 255), (0, 0, 0), and (255, 0, 0), respectively.

[0053] In step S1004, the color with the lowest brightness is selected from the 24 pixels referenced in step S1003. In the explanation of this embodiment, it is assumed that the isolated point 902 is selected.

[0054] In step S1005, the color difference between the color selected in step S1004 and the edge pixel of interest is calculated, and it is determined whether it is equal to or greater than a threshold. The color difference is calculated as the sum of the differences in each component of the RGB values ​​of the pixel of interest and the color selected in step S1004. However, this is just one example, and the calculation method is not limited to this. For example, the difference between the values ​​of the Cb and Cr components in the YCbCr color space may be used.

[0055] If the color difference is equal to or greater than the threshold, the process proceeds to step S1011; if it is equal to or less than the threshold, the process proceeds to step S1006.

[0056] In step S1006, the edge pixel of interest is modified to the color selected in step S1004.

[0057] In step S1007, the same process as in step S705 is performed.

[0058] In step S1008, the color with the greatest brightness among the 24 pixels referenced in step S1007 is selected.

[0059] In step S1009, the color difference is calculated in the same manner as in step S1005.

[0060] If the color difference is equal to or greater than the threshold, the process proceeds to step S1011; if it is equal to or less than the threshold, the process proceeds to step S1010.

[0061] In step S1010, the pixel of interest is modified to the color selected in step S1008.

[0062] In step S1011, the same process as in step S707 is performed. This concludes the explanation of FIG.

[0063] As a result of the above processing, it is possible to minimize degradation of image quality caused by scan irregularities such as the isolated point 902 shown in Fig. 9(d), thereby making it possible to prevent loss of character information and photographic information. EXAMPLES

[0064] In the first and second embodiments, the color-reduction processing unit 303 in Fig. 3 generates the color-reduced image 304 using color information of pixels that are determined to be non-edges, that is, pixels whose values ​​in the edge detection signal 302 are 0. However, when color reduction is performed using color information of pixels that are determined to be non-edges, there are cases where the colors of small point characters or thin lines that are made up of only edge pixels cannot be captured.

[0065] For example, a case where the color of small point characters cannot be obtained will be described with reference to FIG.

[0066] FIG. 12(a) is a diagram showing an example of an original image in the third embodiment, which is an image including a black character "H", a small-point red character "E", and a gray graphic.

[0067] Fig. 12(b) shows an edge detection signal obtained from the edge detection unit 301 by inputting the original image of Fig. 12(a). As shown in Fig. 12(b), the "black" marks are edge pixels, and the small red letter "E" is composed only of edge pixels. For this reason, if color reduction is performed using color information of pixels determined to be non-edge, a problem occurs in which the red color cannot be obtained.

[0068] In the third embodiment, a method is described in which representative colors are extracted from the color information of pixels determined to be non-edges and the color information of pixels determined to be edges, thereby enabling efficient compression while maintaining the colors of small point characters, thin lines, etc. in their appropriate colors.

[0069] Incidentally, the same processes as those in the first embodiment are given the same reference numerals and the description thereof will be omitted.

[0070] <Description of Data Processing Unit> Next, FIG. 13 shows the functional configuration of the image encoding device according to the third embodiment, as well as data that is processed or has been processed in each unit.

[0071] Here, the processing units 301, 302, and 307 to 318 are the same as those in the first embodiment, and therefore the description thereof will be omitted. The original image will be described with reference to FIG.

[0072] First, a representative color extracting unit 1301 for edge pixels and non-edge pixels receives the original image and the edge detection signal 302 as input, and extracts a representative color E from the histogram for edge pixels and a representative color NE from the histogram for non-edge pixels.

[0073] Reference numeral 1302 denotes the representative color E of edge pixels and the representative color NE of non-edge pixels, which will be explained using FIG. 17. When the original image is as shown in FIG. 12(a), the representative color E from edge pixels is shown in FIG. 17(a), and the representative color NE from non-edge pixels is shown in FIG. 17(b). Here, the representative colors E1 to 3 in FIG. 17(a) are made up of color values ​​and pixel numbers as shown in FIG. 17(c). The representative colors NE1 to 3 in FIG. 17(b) are made up of color values ​​and pixel numbers as shown in FIG. 17(d).

[0074] Reference numeral 1303 denotes a background pixel detection unit, which determines the pixel consisting of the representative color having the greatest number of pixels among the representative colors 1302 of edge pixels and non-edge pixels as a background pixel, and outputs a background pixel signal 1304. In the case of the original image shown in Fig. 12(a), the representative color having the greatest number of pixels is white, which is the representative color NE1 shown in Fig. 17(d). Therefore, white pixels are determined to be background pixels.

[0075] The background pixel signal 1304 is shown in Fig. 12(c). The background pixel signal 1304 is a binary image of the same size as the original image, and takes the value 0 / 1 corresponding to the background pixel detection result of each pixel in the original image (0 is a non-background pixel, 1 is a background pixel).

[0076] Reference numeral 1305 denotes a color reduction processing unit, which receives the edge detection signal 302, the representative colors 1302 of edge pixels and non-edge pixels, and a background pixel signal 1304, and generates a color-reduced image.

[0077] Here, the details of the color reduction process in the third embodiment will be described with reference to FIGS.

[0078] Fig. 12(d) is an explanatory diagram of a signal obtained by combining the edge detection signal 302 when the original image is that of Fig. 12(a) and the background pixel signal 1304. As shown in Fig. 12(d), by referring to the edge detection signal 302 and the background pixel signal 1304, it can be seen that each pixel is either an edge pixel, a non-background pixel, or a background pixel.

[0079] Next, the color reduction process will be described for both the case where the pixel of interest is a non-edge pixel and the case where the pixel of interest is an edge pixel.

[0080] In the third embodiment, the reference region is described as being 5 pixels vertically by 5 pixels horizontally with the pixel of interest at the center, but this is not limited thereto, and the reference region may be 7×7 or 9×9 pixels.

[0081] First, the case where the pixel of interest is a non-edge pixel is shown in Fig. 12(e). Fig. 12(e) is an enlarged view of the non-edge portion of the letter "H". In this case, color reduction processing is performed using the representative color NE that is closest to the color of the pixel of interest. If the original image is Fig. 12(a), color reduction processing is performed using the representative color NE2, that is, black.

[0082] Next, Fig. 12(f) shows a case where the pixel of interest is an edge pixel and there are non-background pixels around it. Fig. 12(e) is an enlarged view of the edge part of the letter "H". In this case, color reduction processing is performed using the same color as the surrounding non-background pixels. When the original image is Fig. 12(a), the surrounding non-background pixels have the representative color NE2, so color reduction processing is performed using this same color. As a result, as in the first embodiment, the edge part of the character and the non-edge part of the character can be made the same color, making it possible to compress efficiently.

[0083] Next, Fig. 12(g) shows the case where the pixel of interest is an edge pixel and there are no non-background pixels around it. Fig. 12(g) is an enlarged view of the edge part of the small point character "E". In this case, color reduction processing is performed using the representative color E that is closest to the color of the pixel of interest. If the original image is Fig. 12(a), color reduction processing is performed using representative color E1, that is, red.

[0084] The result of performing the above color reduction process is shown in Figure 12(h). Because the edge and non-edge parts of the characters can be reduced to the same color, compression efficiency is good and the color of small point characters can be properly extracted. Also, the color of thin lines that are composed only of edge pixels, like small point characters, can be properly extracted.

[0085] <Explanation of the flow chart> The image encoding process performed by the image encoding device in the third embodiment having the above configuration will be described with reference to Fig. 14. Fig. 14 is a flowchart of the image encoding process performed by the image encoding device in this embodiment. Note that the description of each step in Fig. 14 describes the processing content of each processing unit based on an instruction from the CPU 205.

[0086] Here, step S501 and steps S505 to S509 are the same processes as in the first embodiment, so the description thereof will be omitted.

[0087] When a user specifies few-color compression using the operation unit (203 in FIG. 2) of the MFP (101 in FIG. 1), the operation unit I / F 207 notifies the CPU 205 of the data format specified by the user. Based on the notification information from the operation unit I / F 207, the CPU 205 issues an instruction to the scanner unit 201 to read an original, and also issues an instruction to the data processing unit 215 to start processing the input image data. Upon receiving the instruction to start processing, in step S501 the edge detection unit 301 performs edge detection processing on the input image and generates an edge detection signal 302. As described above, a known technique is used for the detection method.

[0088] Next, in step S1401, the representative color extractor 1301 receives the original image and the edge detection signal 302, and extracts a representative color E from the histogram of edge pixels and a representative color NE from the histogram of non-edge pixels.

[0089] As described above, when the original image is as shown in FIG. 12(a), the representative colors E and NE are as shown in FIG. 17(c) and FIG. 17(d).

[0090] Next, the representative color extraction of edge pixels and non-edge pixels performed by the representative color extraction unit 1301 in step S1401 will be described with reference to the flowchart of Fig. 15. Note that the description of each step in Fig. 15 describes the processing content of each processing unit based on instructions from the CPU 205.

[0091] First, in step S1501, a pixel of interest is selected from an input image. In this embodiment, the pixel is selected in the raster scan order of the entire image, as in the first embodiment.

[0092] Next, in step S1502, the edge detection signal 302 corresponding to the pixel selected in step S1501 is referenced to determine whether the pixel of interest is an edge pixel. If it is an edge pixel, a histogram is created from the edge pixels in step S1504. If it is not an edge pixel, a histogram is created from non-edge pixels in step S1503.

[0093] Next, in step S1505, it is determined whether or not processing has been completed for all pixels. If not, the process proceeds to step S1501; if completed, the process proceeds to step S1506.

[0094] Next, in step S1506, representative colors are extracted based on the histogram from the edge pixels created in step S1504 and the histogram from the non-edge pixels created in step S1503. As a result, representative colors E and NE are obtained.

[0095] As described above, in step S1401, representative colors of edge pixels and non-edge pixels are extracted.

[0096] Next, in step S 1402 , the background pixel detection unit 1303 determines the pixel consisting of the representative color having the largest number of pixels among the representative colors 1302 of edge pixels and non-edge pixels as a background pixel, and outputs a background pixel signal 1304 .

[0097] Next, in step S1403, the color reduction processor 1305 inputs the edge detection signal 302, the representative colors 1302 of the edge pixels and non-edge pixels, and the background pixel signal 1304, and generates a color-reduced image.

[0098] The color reduction process performed by the color reduction processing unit 1305 in step S1403 will now be described with reference to the flowchart in Fig. 16. Note that the description of each step in Fig. 16 describes the processing content of each processing unit based on instructions from the CPU 205.

[0099] First, in step S1601, a pixel of interest is selected from an input image. In this embodiment, the pixel is selected in the raster scan order of the entire image, as in the first embodiment.

[0100] Next, in step S1602, the edge detection signal 302 corresponding to the pixel selected in step S1601 is referenced to determine whether the pixel of interest is an edge pixel.

[0101] If the pixel is not an edge pixel, that is, if the pixel is a non-edge pixel, then in step S1604, color reduction processing is performed using the representative color NE that is closest to the color of the pixel of interest.

[0102] If it is an edge pixel, in step S1603 it is determined whether or not there is a non-background pixel within the 24 pixels surrounding the pixel of interest, which is 5 pixels vertically and 5 pixels horizontally, with the pixel of interest at its center.

[0103] If there is a non-background pixel among the 24 surrounding pixels, in step S1605 color reduction processing is performed using the same color as the surrounding non-background pixels.

[0104] If there are no non-background pixels among the 24 surrounding pixels, in step S1606, color reduction processing is performed using representative color E that is closest to the color of the pixel of interest.

[0105] Next, in step S1607, it is determined whether or not processing has been completed for all pixels. If not, the process proceeds to step S1601; if completed, the process proceeds to step S1404.

[0106] As described above, in step S1403, the color reduction process is performed.

[0107] Next, in step S 1404 , the color information generation unit 307 generates color information 308 based on the color-reduced image 1306 .

[0108] The subsequent steps S505 to S509 are the same as those in the first embodiment, and therefore the description thereof will be omitted.

[0109] As described above, by extracting the representative colors of pixels determined to be non-edges and the representative colors of pixels determined to be edges, it is possible to efficiently compress small point characters, thin lines, etc. while maintaining their appropriate colors. EXAMPLES

[0110] In the third embodiment, the representative colors of pixels determined to be non-edge and the representative colors of pixels determined to be edges are extracted, but if the representative colors are similar (the luminance difference and color difference are within a predetermined range), the compression efficiency can be further improved by grouping them into the same color.

[0111] For example, when the representative colors E and NE are as shown in Fig. 17(c) and Fig. 17(d) as described above in the third embodiment, the gray of the representative color E2 and the gray of the representative color NE3 may be determined to be similar colors and may be grouped together as the same color. For example, the result of grouping into the representative color NE3 with the largest number of pixels is shown in Fig. 18.

[0112] Since the representative color E2 shown in FIG. 18(a) and the representative color NE3 shown in FIG. 18(b) are the same color, they can be efficiently compressed when generating binary images for each color in the binary image generating unit 312 in FIG.

[0113] <Other embodiments> The present invention can be realized by supplying a program that realizes one or more functions of the above-mentioned embodiments to a system or device via a network or a storage medium. Then, one or more processors in the computer of the system or device can read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.

Claims

1. A reading means for reading an image of an original and generating image data; a color reduction unit that performs a color reduction process to quantize the colors of the generated image data; a modification means for modifying a pixel value of an edge pixel indicating an edge portion of an image based on the image data whose colors have been quantized to a threshold value or more in a case where the brightness of the edge pixel is equal to or higher than a threshold value, and for modifying a pixel value of the edge pixel to a pixel value of a color having the highest brightness among pixels surrounding the edge pixel in a case where the brightness of the edge pixel is lower than the threshold value, and a compression unit that divides the image data in which the pixel values ​​of the edge pixels have been changed by the change unit by color and compresses the divided image data, The image processing device is characterized in that the modification means calculates a color difference between the color of the edge pixel and the color of the brightest pixel surrounding the edge pixel when the brightness of the edge pixel is equal to or greater than a threshold value, and changes the pixel value of the edge pixel to the pixel value of the color of the brightest pixel surrounding the edge pixel when the color difference is smaller than a second threshold value, and does not change the pixel value of the edge pixel when the color difference is equal to or greater than the second threshold value.

2. 2. The image processing apparatus according to claim 1, further comprising a transmission unit for transmitting the image data compressed by said compression unit.

3. 3. The image processing device according to claim 1, wherein the modification means calculates a color difference between the edge pixel and the color of the least bright pixel surrounding the edge pixel when the brightness of the edge pixel is lower than a threshold value, and changes the pixel value of the edge pixel to the pixel value of the least bright pixel surrounding the edge pixel when the color difference is smaller than the second threshold value, and does not modify the pixel value of the edge pixel when the color difference is equal to or greater than the second threshold value.

4. 4. The image processing apparatus according to claim 1, wherein the compression means compresses the image data in a Modified Modified Read (MMR) format.

5. 5. The image processing device according to claim 1, wherein the modification means modifies the pixel value of an edge pixel indicating an edge portion of an image based on the color-quantized image data to a pixel value of the color of the brightest pixel among 5 x 5 pixels centered on the edge pixel, excluding the edge pixel, when the brightness of the edge pixel is equal to or higher than a threshold value, and modifies the pixel value of the edge pixel to a pixel value of the color of the least bright pixel among 5 x 5 pixels centered on the edge pixel, excluding the edge pixel, when the brightness of the edge pixel is lower than the threshold value.

6. A reading step of reading an image of a document and generating image data; a color reduction step of performing a color reduction process for quantizing colors of the generated image data; a modifying step of modifying the pixel value of an edge pixel indicating an edge portion of an image based on the image data whose colors have been quantized to a threshold value or more, to a pixel value of the edge pixel having a color that is the brightest among pixels surrounding the edge pixel, and modifying the pixel value of the edge pixel to a pixel value of the color of the least bright pixel among pixels surrounding the edge pixel, to a pixel value of the color of the least bright pixel among pixels surrounding the edge pixel, when the brightness of the edge pixel is lower than the threshold value; a compression step of compressing the image data in which the pixel values ​​of the edge pixels have been changed by the change step, by dividing the image data by color; The modification step calculates a color difference between the edge pixel and the color of the brightest pixel surrounding the edge pixel when the brightness of the edge pixel is equal to or greater than a threshold value, and changes the pixel value of the edge pixel to the pixel value of the brightest pixel surrounding the edge pixel when the color difference is smaller than a second threshold value, and leaves the pixel value of the edge pixel unchanged when the color difference is equal to or greater than the second threshold value.

7. 6. A program for causing a computer to execute each of the means of the image processing apparatus according to claim 1.

Citation Information

Patent Citations

  • Line art image processing method and recording medium

    JP2001186336A

  • Image encoder and image encoding method

    JP2003309727A

  • Apparatus and method for image processing, recording media, and program

    JP2004199622A

  • Image processing apparatus, image processing method, image processing program, and storage medium

    JP2005303506A

  • Image processing apparatus, program and method

    JP2014072556A