Image processing device, control method and program
By introducing functions to determine whether characters are flattened and determine the proportion of the photo area in the image processing device, and converting image data based on these results, the problem of inappropriate grayscale ranges in the prior art is solved, and higher quality image processing is achieved.
Patent Information
- Application Number
- JP2020200583
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-02
- Publication Date
- 2025-04-10
- Estimated Expiration
- 2040-12-02
AI Technical Summary
When processing image data, the prior art fails to effectively consider whether characters will be flattened during the binarization process and the characteristics of the overall image data, resulting in inappropriate grayscale levels of the output image.
An image processing device is designed, including an image reading part, a unit for determining whether characters are flattened, a unit for determining the proportion of photo areas in the image, and a control unit for converting image data based on these judgment results to ensure that the output image is at an appropriate grayscale range.
Through the processing of this device, the image can be effectively output at an appropriate grayscale range, avoiding the problem of characters being flattened, and improving the overall quality of the image processing.
Smart Images

Figure 0007659981000001 
Figure 0007659981000002 
Figure 0007659981000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image processing device and the like. [Background technology]
[0002] In recent years, with the spread of digital multifunction peripherals (MFPs) and the Internet, it has become commonplace to read images on paper with a scanner, convert them into image data in electronic data format, and then transmit the image data in electronic data format by attaching it to an e-mail or other means.
[0003] Also, a technique for performing appropriate processing on the scanned image data has been proposed. For example, a technique has been proposed in which an input image is separated into four image regions, namely, a character region, a halftone region, a line region, and an image region, according to the type of image, and ACS (Auto Color Selection) processing is performed for each separated image region, and the ACS result of the entire input image (document) is determined based on the result of the ACS processing for each image region (see, for example, Patent Document 1).
[0004] In addition, a technology has been proposed in which image data generated by reading an image from a document is compressed into a compression format for binary images if the document is a text document, and compressed into a compression format for multi-level images if the document is not a text document (see, for example, Patent Document 2). [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2011-142409 A [Patent Document 2] JP 2009-100285 A Summary of the Invention [Problem to be solved by the invention]
[0006] However, Patent Document 1 and Patent Document 2 only describe determining the method of processing image data using only a single determination result, such as whether or not the document is a text document. Therefore, no consideration is given to outputting image data by executing appropriate processing according to, for example, a determination result, such as whether or not character blurring will occur, and a determination result based on the characteristics of the entire image data.
[0007] In view of the above-mentioned problems, an object of the present disclosure is to provide an image processing device capable of outputting an input image with an appropriate number of gradations. [Means for solving the problem]
[0008] In order to solve the above-mentioned problems, the first embodiment of the present disclosure includes: an image reading unit that reads an image; a first determination unit that determines whether or not character blurring will occur when the image is binarized; A second determination unit that determines a proportion of the image that includes a photographic area; A control unit for converting the image data into monochrome N-level image data based on the determination results of the first determination unit and the second determination unit; The image processing device includes:
[0009] A second embodiment of the present disclosure is an image reading step of reading an image; a first determination step of determining whether or not character blurring will occur when the image is binarized; a second determination step of determining a proportion of the image that includes a photographic area; a control step of converting the image data into monochrome N-level image data based on the determination results of the first determination step and the second determination step; The control method includes:
[0010] A third embodiment of the present disclosure comprises: On the computer, An image reading function that reads images; A first determination function that determines whether or not character blurring will occur when the image is binarized; A second determination function for determining a proportion of the image that includes a photographic area; a control function for converting the image data into monochrome N-level image data based on the determination results of the first determination function and the second determination function; It is a program characterized by realizing the above. Effect of the Invention
[0011] According to the present disclosure, it is possible to output an input image with an appropriate number of gradations. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a diagram for explaining the functional configuration of the image forming apparatus according to the first embodiment. [Diagram 2] FIG. 2 is a diagram for explaining an overview of processing in the first embodiment. [Diagram 3] FIG. 4 is a diagram illustrating an operation example in the first embodiment. [Figure 4] FIG. 4 is a diagram illustrating an operation example in the first embodiment. [Diagram 5] FIG. 4 is a diagram illustrating an operation example in the first embodiment. [Figure 6] FIG. 4 is a diagram illustrating an operation example in the first embodiment. [Figure 7] FIG. 2 is a flow chart showing a process flow in the first embodiment. [Figure 8] FIG. 4 is a flowchart showing the flow of a false contour evaluation process in the first embodiment. [Figure 9] FIG. 11 is a diagram for explaining an outline of a process in a second embodiment. [Figure 10] FIG. 11 is a flowchart showing a process flow in the second embodiment. [Figure 11] FIG. 13 is a diagram for explaining an outline of a process in a third embodiment. [Figure 12] FIG. 13 is a flowchart showing a process flow in a third embodiment. [Figure 13] FIG. 13 is a diagram for explaining an outline of a process in a fourth embodiment. [Figure 14] FIG. 13 is a flowchart showing a process flow in a fourth embodiment. [Figure 15] FIG. 13 is a diagram for explaining an outline of a process in the fifth embodiment. [Figure 16] FIG. 13 is a flowchart showing a process flow in the fifth embodiment. [Figure 17] FIG. 13 is a flowchart showing a process flow in the sixth embodiment. [Figure 18] FIG. 23 is a diagram illustrating an operation example in the sixth embodiment. [Figure 19] FIG. 23 is a diagram illustrating an operation example in the seventh embodiment. [Figure 20] FIG. 23 is a diagram illustrating an operation example in the seventh embodiment. [Figure 21] FIG. 23 is a diagram illustrating an operation example in the eighth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, an embodiment for carrying out the present disclosure will be described with reference to the drawings. Note that the following embodiment is an example for explaining the present disclosure, and the technical scope of the invention described in the claims is not limited to the following description.
[0014] [1. First embodiment] [1.1 Functional configuration] 1 is a block diagram showing the functional configuration of an image forming apparatus 1 according to a first embodiment. The image forming apparatus 1 is a digital multifunction machine having a copy function, a print function, a scanner function, etc. The image forming apparatus 1 is configured with an image reading device 10, an image processing device 20, an image printing device 30, an image transmitting / receiving device 40, an operation panel 50, and a control unit 60.
[0015] The image reading device 10 is a device that optically reads an image from a document. The image reading device 10 is, for example, a color scanner having a CCD (Charge Coupled Device). The image reading device 10 reads a reflected light image from the document as an analog signal of RGB (R: red, G: green, B: blue) using the CCD, and inputs the analog signal to the image processing device 20.
[0016] The image processing device 20 is a device that receives an analog signal read by the image reading device 10, generates image data based on the received analog signal, and performs various processes on the generated image data before outputting the result.
[0017] In this embodiment, the image processing device 20 performs an auto color selection (ACS) judgment to judge the presence or absence of color from image data based on an analog signal input from the image reading device 10. Furthermore, when the image processing device 20 judges by the ACS judgment that the image data is image data of a monochrome image composed only of achromatic colors, it converts the image data into image data of a grayscale image. Furthermore, the image processing device 20 converts the image data of the grayscale image into image data expressing an image with a predetermined number of gradations and outputs the image data.
[0018] Here, image data of a grayscale image refers to image data in which the sample value (pixel value) of each pixel in the image data does not contain any information other than luminance (brightness). The pixel value is assumed to take any integer value between 0 and the maximum value that a pixel value can take (hereinafter referred to as the maximum pixel value). The maximum pixel value is determined based on the quantization level of the pixel value for each pixel (the size of the data expressing the pixel value). For example, when a pixel value is expressed with an 8-bit information amount, the maximum pixel value is 255. In this case, a pixel with a pixel value of 0 is a black pixel with the lowest brightness (a pixel with no light at all), and a pixel with a pixel value of 255 is a white pixel with the highest brightness (a pixel that outputs the maximum amount of light).
[0019] In this embodiment, the number of gradations refers to the number of types of pixel values used in the image data output by the image processing device 20. In this embodiment, images are classified as follows based on the number of gradations. (1) Black and white binary image (two tones of monochrome) It refers to an image with two gradations, where the pixel value is either 0 or the maximum pixel value. In this embodiment, converting image data into image data of a black and white binary image (two levels of monochrome) is called black and white binarization processing. Black and white binarization processing refers to processing in which a predetermined pixel value (brightness) is fixed as a threshold, and for each pixel, if the pixel value is less than the threshold, the pixel is changed to a black pixel, and if the pixel value is equal to or greater than the threshold, the pixel is changed to a white pixel. (2) Grayscale image This refers to an image with a number of gradations greater than 2 and a maximum pixel value + 1. For example, if the maximum pixel value is 255, the pixel value will be any integer between 0 and 255, so the number of gradations will be 256. (3) Grayscale image It refers to an image with a number of gradations greater than 2 and equal to or less than the maximum pixel value. For example, if the maximum pixel value is 255, it refers to an image with a number of gradations of 4, 8, or 16. In other words, a black and white multi-value image is an image with a limited level of quantization. In this embodiment, converting image data into image data of a black and white multi-value image is called black and white multi-value processing. In black and white multi-value processing, for example, if the number of gradations is 4, the pixels included in the image data will be any one of four types of pixels: black pixels (pixel value 0), dark gray pixels (pixel value 96), light gray pixels (pixel value 160), and white pixels (pixel value 255).
[0020] As described above, in this embodiment, the number of gradations of the black-and-white binary image is 2. In this embodiment, the number of gradations of the grayscale image is 2 to the power of k, where k is the number of quantization bits when expressing the pixel value of a pixel. For example, when the number of quantization bits for expressing the pixel value of each pixel of a grayscale image is 8 bits, the number of gradations of the grayscale image is 256 (2 to the 8th power). The number of gradations of the black-and-white multi-value image is a value between the number of gradations of the black-and-white binary image and the number of gradations of the grayscale image. That is, when the number of gradations of the grayscale image is N, the number of gradations of the black-and-white multi-value image is M (where 2 < M < N). For example, when the pixel value of each pixel of a grayscale image is represented by 8-bit information, the pixel value of each pixel of the black-and-white multi-value image is a gradation number that can be represented by 2 bits or more and 7 bits or less. For example, when the pixel value of each pixel is represented by 2-bit information, the number of gradations of the black-and-white multi-value image is 4. When the pixel value of each pixel is represented by 3-bit information, the number of gradations of the black-and-white multi-value image is 8. When the pixel value of each pixel is represented by 7-bit information, the number of gradations of the black-and-white multi-value image is 128.
[0021] The image processing apparatus 20 includes an image input unit 202, a storage unit 204, a region determination processing unit 206, an image processing unit 208, a character blur determination unit 212, an intermediate pixel determination unit 214, a photo region size determination unit 216, a pseudo-contour determination unit 218, a gradation reproduction processing unit 220, and an image output unit 222.
[0022] The image input unit 202 receives the RGB analog signal input from the image reading device 10 and converts the RGB analog signal into an RGB digital signal (i.e., an RGB signal). Thereby, the image input unit 202 generates image data composed of RGB signals.
[0023] In addition, the image input unit 202 performs ACS determination on the image data. As a result of the ACS determination, if the image data is image data of a monochrome image, the image data is converted into image data of a grayscale image (gray image).
[0024] The storage unit 204 is a functional unit that stores various data such as image data and various programs, and is configured by a storage device such as a solid state drive (SSD) that is a semiconductor memory or a hard disk drive (HDD), for example.
[0025] The area determination processing unit 206 determines areas including document components such as characters, figures, photographs, tables, and others from an image based on image data, and separates each of the components into areas. For example, when detecting an area including a photograph (photo area), the area determination processing unit 206 determines whether each pixel in the image data is a pixel that constitutes a photograph, and determines an area constituted by pixels that constitute a photograph as a photograph area.
[0026] As a method for determining whether a pixel constitutes a photographic area or not, the following method can be used. (1) The area determination processing unit 206 calculates the difference in pixel value between a pixel of interest and its surrounding pixels, tallies the magnitude, and determines the characteristics of each pixel (characteristics of the difference in pixel value with surrounding pixels) while changing the pixel of interest. At this time, the area determination processing unit 206 determines whether or not a pixel constitutes a photographic area based on the continuity of the pixel characteristics (for example, a characteristic that the average value of the pixel value differences is within a predetermined threshold value), and determines an area including pixels that constitute the photographic area as a photographic area.
[0027] (2) The area determination processing unit 206 divides an image based on the image data into pixel blocks (e.g., 8 pixels vertically by 8 pixels horizontally) within a predetermined range. Next, for each pixel block, the area determination processing unit 206 calculates the average value of pixel values of pixels within the range of the pixel block. Next, the area determination processing unit 206 calculates and tallies the difference between the calculated average value and the pixel values of pixels within the range of the pixel block. The area determination processing unit 206 uses the tallied value as an evaluation value (feature amount) to determine for each pixel block whether or not it is a pixel block that exhibits the characteristics of a photograph. The area determination processing unit 206 determines an area constituted by pixel blocks that exhibit the characteristics of a photograph as a photographic area.
[0028] In addition, methods for detecting other areas (text areas, figure areas, table areas, etc.) can be, as in the above-mentioned method for detecting photographic areas, a method of comparing the pixel of interest with surrounding pixels, or a method based on the characteristics of each pixel block.
[0029] As an alternative method, the area determination processing unit 206 may determine whether each pixel of the image data is included in a character area, a halftone area, a background area, or a photograph area (photographic paper area), and, based on the determination, separate the image data according to the characteristics of the pixels included therein.
[0030] The algorithm for separating the pixels can use an existing region separation method, such as the method described in Japanese Patent Application Laid-Open No. 2002-232708, which will be described below. (1) Calculate the minimum and maximum density values in a pixel block of n×m (for example, 7 pixels×15 pixels) including the pixel of interest. Note that the density values may be the values of MIN(R1,G1,B1) for density value signals (R1,G1,B1) in the respective color signals of RGB (R: red, G: green, B: blue) in the image data, or may be luminance values calculated based on the density value signals. (2) The calculated minimum and maximum density values are used to calculate the maximum density difference. (3) A total density busyness (for example, the sum of values calculated in the main scanning direction and the sub-scanning direction) which is the sum of absolute values of density differences between pixels adjacent to the pixel of interest is calculated. (4) The calculated maximum density difference is compared with a maximum density difference threshold, and the calculated total density busyness is compared with a total density busyness threshold. (5) When the maximum density difference<the maximum density difference threshold and the total density busyness<the total density busyness threshold, the pixel of interest is determined to belong to the background / photographic paper region. (6) If the above conditions are not satisfied, the pixel of interest is determined to belong to a character / halftone dot area. (7) For pixels determined to belong to the background / photographic paper region, if the pixel of interest satisfies the maximum density difference < background / photographic paper determination threshold, it is determined to be a background candidate pixel; if this condition is not satisfied, it is determined to be a photographic paper pixel. (8) For pixels determined to belong to a character or halftone dot area, if the pixel of interest satisfies the condition of total density busyness < (maximum density difference multiplied by character / halftone dot determination threshold), it is determined to be a character pixel; if this condition is not satisfied, it is determined to be a halftone dot pixel.
[0031] In this way, the region determination processing unit 206 separates the image data into a plurality of types of regions. In this case, when determining one region, the region determination processing unit 206 exclusively uses the determination results of the other regions, thereby improving the detection accuracy of the one region.
[0032] The image processing unit 208 performs general image processing on the image data, such as filtering for edge detection on the image data, sharpening, and tone conversion.
[0033] The character blurring determination unit 212 determines whether or not character blurring occurs when image data is converted into a black and white binary image. Character blurring refers to a situation in which the pixels of characters and the pixels of the background become the same color when the number of gradations used in image data is reduced (for example, when a grayscale image is converted into a black and white binary image), making it difficult for a user to see the characters.
[0034] The blurred character determination unit 212 determines whether or not blurred characters will occur by, for example, the following process. First, the blurred character determination unit 212 detects edges from the image data of the grayscale image. For example, the blurred character determination unit 212 detects edges by generating an edge image by applying an edge detection operator to the grayscale image. Note that, as the edge detection operator, for example, an operator in the horizontal direction (x) and vertical direction (y) called Prewitt or Sobel can be used. In the same manner, the blurred character determination unit 212 detects edges from an image (black and white binary image) obtained by performing black and white binarization processing on the grayscale image.
[0035] Next, the blurred character determination unit 212 refers to the edge image generated from the grayscale image and the edge image generated from the black and white binary image to determine the difference between pixel values existing at the same position for each pixel. Furthermore, the blurred character determination unit 212 divides the image data into blocks of a predetermined size. Then, the blurred character determination unit 212 calculates histogram statistics for each block based on the difference between pixel values for each pixel included in the block.
[0036] A block is one area when the entire gray image is divided into areas including a plurality of pixels, and is, for example, a rectangular area of a predetermined size. A block may be a circular area or a diamond-shaped area, and one pixel may belong to a plurality of pixel blocks. A statistical value is a value that represents the degree of variation in a histogram (difference value of pixel values), and is, for example, the entropy value, variance value, standard deviation value, average value, etc. of a histogram.
[0037] Next, the blurred character determination unit 212 extracts blocks whose statistical values satisfy a predetermined condition and contain characters. For example, the blurred character determination unit 212 extracts blocks that contain an area determined to be a character area by the area determination processing unit 206 and have an entropy value greater than a predetermined value. Then, the blurred character determination unit 212 determines a group of adjacent consecutive blocks among the extracted blocks as an area where blurred character will occur.
[0038] Furthermore, the blurred character determination unit 212 determines that blurred characters will occur when the image data is converted into a black and white binary image if the size or number of areas where blurred characters will occur is equal to or greater than a predetermined threshold value.
[0039] In addition, as a method for determining whether or not character blurring occurs, in addition to the above-mentioned method, a known method can be used. For example, a method based on JP 2020-010163 A may be used.
[0040] The intermediate pixel determination unit 214 determines whether or not a predetermined number of intermediate pixels are present in the image data. An intermediate pixel is a pixel whose pixel value is any pixel value included in a predetermined range between 0 and the maximum pixel value. As shown in FIG. 2, the intermediate pixel determination unit 214 includes a cumulative frequency distribution counting unit 2142 and an intermediate pixel evaluation unit 2144.
[0041] The cumulative frequency distribution counting unit 2142 calculates a cumulative histogram (accumulated value of frequency) of pixels whose pixel values are included between a predetermined first pixel value and a predetermined second pixel value from the image data of the grayscale image.
[0042] The intermediate pixel evaluation unit 2144 determines whether the number of pixels (number of pixels for determination) used to determine whether a predetermined number of intermediate pixels is included in the cumulative histogram is included in any integrated value of the frequency between a predetermined first pixel value and a predetermined second pixel value. When the number of pixels for determination is included in any integrated value of the frequency between the first pixel value and the second pixel value, the intermediate pixel evaluation unit 2144 determines that the image data includes many intermediate pixels. In other words, when the number of intermediate pixels included in the image data is equal to or greater than the number of pixels for determination, the intermediate pixel evaluation unit 2144 determines that the image data includes many intermediate pixels. Here, by setting the first pixel value and the second pixel value to pixel values with low luminance, it is possible to determine whether the image data includes many pixels with low luminance (dark gray pixels).
[0043] Generally, when there are many dark gray pixels, the image data contains a photographic image, and it is considered that there is a high possibility that the photographic image will become black-crushed when the image data is subjected to a black-and-white binarization process. Black-crushed refers to a state in which pixels composed of pixel values equal to or less than a threshold value of the black-and-white binarization process are continuously spread out, resulting in an area of continuous black pixels being generated by the black-and-white binarization process. When black-crushed occurs, the user cannot distinguish the image that was represented in the image data before the black-and-white binarization process was performed.
[0044] The number of pixels for determination is determined based on, for example, a predetermined ratio of the number of pixels to the total number of pixels. The predetermined ratio is, for example, a value such as 10%, 25%, or 50%. The number of pixels for determination may be a fixed value (for example, 2 million pixels). The predetermined ratio or fixed value may be determined in advance, or may be set by the user.
[0045] A specific example will be described with reference to Figures 3 and 4. Figure 3 shows a grayscale image of input image data (Figure 3(a)) and an image after black and white binarization processing is performed on the grayscale image (Figure 3(b)). Figure 4 shows a cumulative histogram of pixel values in the image data of the grayscale image shown in Figure 3(a).
[0046] Here, the image data is assumed to be image data of a grayscale image that represents an A4-sized document at a resolution of 300 dpi. In this case, the number of pixels contained in the image data is approximately 8.3 million. Also, the maximum pixel value of the image data is assumed to be 255, the first pixel value is assumed to be 35, and the second pixel value is assumed to be 120. In this case, the intermediate pixel is a dark gray pixel. Also, the number of pixels for judgment is assumed to be 2 million (approximately 25% of the total number of pixels).
[0047] In this case, the cumulative frequency distribution counting unit 2142 performs the following process by referring to the pixel values of the pixels included in the image data. (1) Ignore pixel values that are less than the first pixel value or greater than the second pixel value. If the pixel value of the referenced pixel is less than the first pixel value of 35 or exceeds the second pixel value of 120, the cumulative frequency distribution counting unit 2142 ignores the pixel value of the pixel. (2) When a pixel value is included in the range from the first pixel value to the second pixel value, count each pixel value. The cumulative frequency distribution counting unit 2142 adds 1 to the bin of the pixel value when the pixel value of the referenced pixel is equal to or greater than the first pixel value of 35 and equal to or less than the second pixel value of 120. This allows the number of pixels having each pixel value to be counted. (3) Generate a cumulative histogram The cumulative frequency distribution counting unit 2142 generates a cumulative histogram for each pixel value, starting from the smallest pixel value, based on the number counted in (2).
[0048] Through such processing, the cumulative frequency distribution counting unit 2142 generates a cumulative histogram as shown in Fig. 4. In Fig. 4, the value of 2 million, which is the number of pixels for determination, is present in a bin with a pixel count of 120, between the first pixel value of 35 and the second pixel value of 120. Therefore, the intermediate pixel determination unit 214 determines that the grayscale image contains many intermediate pixels. In general, when black and white binarization processing is performed on a grayscale image that contains many dark gray pixels, there is a high possibility that black crush will occur.
[0049] The photographic area size determination section 216 determines whether or not there is a predetermined number of photographic areas in the grayscale image. The photographic area size determination section 216 includes a photographic area detection section 2162 and a photographic area ratio evaluation section 2164, as shown in FIG.
[0050] The photographic area detection unit 2162 executes a photographic area detection process to detect a photographic area from image data. The photographic area detection unit 2162 judges only a photographic area, unlike the area determination processing unit 206. Here, the photographic area detection unit 2162 detects a photographic area by, for example, the following process.
[0051] First, the photographic area detection unit 2162 detects pixels that constitute characters from the image data and masks the pixels, thereby excluding the character area from the image data to be processed.
[0052] Next, the photographic area detection unit 2162 detects one or more halftone areas and applies a smoothing process to the areas. Next, for each halftone area, the photographic area detection unit 2162 creates a histogram (masked histogram) of pixel values of pixels included in the halftone area. Then, the photographic area detection unit 2162 determines an area in which the entropy value of the histogram is equal to or greater than a predetermined value as an area including photographic pixels. In this way, the photographic area detection unit 2162 detects an area constituted by photographic pixels as a photographic area.
[0053] The photographic area ratio evaluation section 2164 calculates the proportion (ratio) of the photographic area in the image data by dividing the number of pixels included in the photographic area detected by the photographic area detection section 2162 by the total number of pixels in the image data as the photographic area ratio. The photographic area ratio evaluation section 2164 also determines whether the photographic area ratio is equal to or greater than a predetermined ratio.
[0054] A specific example will be described with reference to FIG. 5. FIG. 5(a) and FIG. 5(d) are diagrams showing input image data. FIG. 5(b) and FIG. 5(e) are diagrams showing entropy (histogram entropy) based on a histogram limited to a halftone region for FIG. 5(a) and FIG. 5(d). FIG. 5(b) and FIG. 5(e) show that the darker the portion, the lower the entropy, and the whiter the portion, the higher the entropy. FIG. 5(c) and FIG. 5(f) are diagrams showing the detection result of a photographic region detected based on the histogram entropy shown in FIG. 5(b) and FIG. 5(e). The white portions show the regions detected as photographic regions.
[0055] The photographic area ratio of the photographic area shown in Fig. 5(c) is approximately 39%. The photographic area ratio of the photographic area shown in Fig. 5(f) is approximately 56%. Here, if the predetermined ratio is 50%, the photographic area ratio evaluation unit 2164 evaluates the photographic area included in the image data shown in Fig. 5(a) as small, and evaluates the photographic area included in the image data shown in Fig. 5(a) as large.
[0056] Note that photographic area ratio evaluation section 2164 may calculate the photographic area ratio based on the photographic area determined by area determination processing section 206, instead of calculating the photographic area ratio based on the photographic area detected by photographic area detection section 2162. In this case, photographic area size determination section 216 does not need to include photographic area detection section 2162, and the circuit scale of image forming apparatus 1 can be reduced.
[0057] On the other hand, in the process executed by photographic area ratio evaluation section 2164, if the information on the photographic area determined by area determination processing section 206 cannot be used due to hardware or software constraints, etc., photographic area detection section 2162 is required to determine the photographic area again. In this case, photographic area detection section 2162 may detect the photographic area using the above-mentioned method, may detect the photographic area by executing a process similar to the process executed by area determination processing section 206, or may use a method based on JP-A-2007-234007, for example.
[0058] When the photograph area detection unit 2162 executes a process similar to that executed in the area determination processing unit 206, the photograph areas detected in the respective functional units may be the same or different. Specifically, if the photograph area detection unit 2162 and the area determination processing unit 206 use the same method of acquiring feature amounts and the same processing procedure for detecting photograph features from image data, the same determination result is obtained. On the other hand, if the method of acquiring feature amounts and the processing procedure are different, the determination result is different. To simplify the configuration, it is sufficient to standardize the method of acquiring feature amounts and the processing procedure in the photograph area detection unit 2162 and the area determination processing unit 206.
[0059] As such, there are various possible methods for determining and acquiring the photographic area, and the designer of the image forming device 1 can select the most appropriate method taking into consideration the required accuracy of detecting the photographic area, the circuit size, the amount of processing and processing power, memory usage, etc.
[0060] The false contour determination unit 218 determines whether or not a false contour occurs when a black and white multi-value process is performed on a grayscale image. A false contour is a contour-like line (edge) that occurs when a part with a gradual gradation change is converted to black and white multi-value. A false contour does not occur in an image that is sufficiently quantized, such as a grayscale image, but may occur in an image with a limited level of quantization, such as a black and white multi-value image.
[0061] A specific example will be described with reference to Fig. 6. Fig. 6(a) is a diagram showing input image data. In particular, Fig. 6(a) shows image data of a grayscale image when a book is read in an open state (during book scanning). Fig. 6(b) shows image data when black and white multi-value processing is performed on the image shown in Fig. 6(a).
[0062] Here, when a shadow occurs in the center of the book, if black and white multi-value processing is performed, a false contour occurs in the center of the book, as shown in area E100 in Fig. 6(b). In this case, by converting the grayscale image into a black and white multi-value image, the user will visually recognize a step-like change in brightness.
[0063] 2, the false contour determination unit 218 includes a false contour detection unit 2182 and a false contour evaluation unit 2184. The false contour detection unit 2182 detects pixels (edges) that are deemed to constitute a false contour. The false contour evaluation unit 2184 determines whether or not a false contour will occur when a black and white multi-value process is performed on an input grayscale image, based on the detection result of the false contour detection unit 2182. The process performed by the false contour determination unit 218 will be described later.
[0064] The tone reproduction processing unit 220 performs tone reproduction processing (halftone generation processing) by executing black and white binarization processing or black and white multi-value processing on the image data of the grayscale image. As shown in FIG. 2, the tone reproduction processing unit 220 includes a tone reproduction processing selection unit 2202, a black and white multi-value processing unit 2204, and a black and white binarization processing unit 2206.
[0065] The tone reproduction processing selection unit 2202 selects which tone reproduction processing, black and white binarization processing or black and white multi-value processing, to execute on the grayscale image data. Specifically, the tone reproduction processing selection unit 2202 selects (determines) the tone reproduction processing based on signals indicating the determination results (determination signals) output from the intermediate pixel evaluation unit 2144, the photographic area ratio evaluation unit 2164, and the false contour evaluation unit 2184.
[0066] For example, when the tone reproduction processing selection unit 2202 selects to perform black and white binarization processing on a grayscale image, it outputs a signal (black and white binarization signal) indicating that black and white binarization processing is to be performed on the input grayscale image to the black and white binarization processing unit 2206. On the other hand, when the tone reproduction processing selection unit 2202 selects to perform black and white multi-value processing on image data, it outputs a signal (black and white multi-value signal) indicating that black and white multi-value processing is to be performed on the input grayscale image to the black and white multi-value processing unit 2204.
[0067] When the tone reproduction process selection unit 2202 selects (determines) that neither black and white binarization processing nor black and white multi-value processing is to be performed on the grayscale image, the grayscale image is not output as a black and white multi-value signal or a black and white binarization signal. In this case, the grayscale image input to the image output unit 222 is output from the image output unit 222 as is.
[0068] The black and white multi-value processor 2204 executes black and white multi-value processing on the image data. For example, the black and white multi-value processor 2204 refers to the pixel value of each pixel of the image data, and converts it to a predetermined pixel value based on a predetermined rule. For example, the predetermined rule may be that the pixel values of pixels with pixel values of 0 to 63 are converted to 0, the pixel values of pixels with pixel values of 64 to 127 are converted to 96, the pixel values of pixels with pixel values of 128 to 191 are converted to 160, and the pixel values of pixels with pixel values of 192 to 255 are converted to 255.
[0069] The black and white binarization processor 2206 executes black and white binarization processing on the image data. For example, when the pixel values are 0 to 255 and 127 is used as the threshold, the black and white binarization processor 2206 converts pixels included in the image data with pixel values of 0 to 127 (less than or equal to the threshold) into pixels with a pixel value of 0 (black pixels), and converts pixels included in the image data with pixel values of 128 to 255 into pixels with a pixel value of 255 (white pixels).
[0070] The rules for pixel value conversion in the black and white multilevel conversion process and the thresholds in the black and white binarization process may be determined in advance or selected by the user. Also, the black and white multilevel conversion processor 2204 and the black and white binarization processor 2206 may be automatically determined based on the input image data and the specifications and capabilities of the image processing device 20.
[0071] The image output unit 222 outputs the image data to the image printing device 30 or the image transmitting / receiving device 40. In this embodiment, when the image data input by the image input unit 202 is image data of a monochrome image, the image output unit 222 outputs any one of image data of a grayscale image, image data of a black and white binary image, and image data of a black and white multi-value image.
[0072] Specifically, the image output unit 222 receives input of a grayscale image from the image input unit 202. In addition, the image output unit 222 receives input of a black and white binary image output from the black and white binarization processing unit 2206 and a black and white multilevel image output from the black and white multilevel processing unit 2204.
[0073] When a black and white multi-value image is input, the image output unit 222 outputs image data of the black and white multi-value image. When a black and white binary image is input, the image output unit 222 outputs image data of the black and white binary image. When neither a black and white multi-value image nor a black and white binary image is input, the image output unit 222 outputs image data of a grayscale image.
[0074] The intermediate pixel determination unit 214, photographic area size determination unit 216, and pseudo contour determination unit 218 included in the image processing device 20 determine whether or not a grayscale image has characteristics that will cause specified defects other than blurred characters when the image is output with the number of gradations reduced.
[0075] The intermediate pixel determination unit 214 is a functional unit for determining whether or not the grayscale image has a characteristic that causes a defect called black crush when the grayscale image is converted into a black and white binary image. When the intermediate pixel determination unit 214 determines that the image data contains a predetermined number of intermediate pixels or more, the control unit 60 determines that the image has a characteristic that causes black crush, and controls to output the grayscale image.
[0076] The photographic area size determination unit 216 is a functional unit for determining whether or not the grayscale image has a characteristic that causes a defect that the file size increases when the grayscale image is converted into a black-and-white multi-value image. Here, when outputting image data including a photographic area of a certain size, a reverse phenomenon may occur in which the file size of a black-and-white multi-value (posterized) TIFF (Tagged Image File Format) file is larger than the file size of a grayscale image in the Joint Photographic Experts Group (JPEG) format. This is because the TIFF format requires fewer bits to express pixel values than the JPEG format, but there are many parts where pixel values are discontinuous, especially in photographic areas, and the amount of data tends to increase when deflate compression is performed. Therefore, when image data including a photographic area of a certain size is output in the TIFF format, the file size becomes larger than when it is output in the JPEG format, which is a lossy compression. Therefore, the control unit 60 controls to output a grayscale image, assuming that image data determined by the photographic area size determination unit 216 to include a photographic area at a predetermined ratio or more has a characteristic that the file size increases due to black-and-white multi-value processing.
[0077] The false contour determination unit 218 is a functional unit for determining whether or not the grayscale image has a characteristic that causes a defect called a false contour when the grayscale image is converted into a black-and-white multi-value image. When the false contour determination unit 218 determines that the grayscale image has a characteristic that causes a false contour, the control unit 60 controls to output the grayscale image.
[0078] The image printing device 30 is an output device (printing device) that forms and outputs a color image on a recording sheet (such as recording paper) by a method such as thermal transfer, electrophotography, or inkjet based on the image data output by the image processing device 20. The image printing device 30 functions as the image forming means in this disclosure.
[0079] The image transmitting / receiving device 40 is a device that communicates with other devices. The image transmitting / receiving device 40 is composed of devices capable of communication, such as a network card and a modem. The image transmitting / receiving device 40 can be connected to a communication network, such as a public line network, a LAN (Local Area Network), or the Internet (not shown). The image transmitting / receiving device 40 transmits image data output by the image processing device 20 to an external device via the communication network by a communication method such as facsimile or e-mail.
[0080] The image transmitting / receiving device 40 may receive image data from another device by a communication method such as facsimile, and input the received image data to the image processing device 20. In this case, the image processing device 20 performs processing such as rotation processing and resolution conversion processing on the received image data. Furthermore, the image processing device 20 outputs the image data that has been subjected to the predetermined processing to the image printing device 30 or the image transmitting / receiving device 40.
[0081] The operation panel 50 is a device that functions as an interface between the user and the image forming apparatus 1. The operation panel 50 is made up of an operation unit 52 for accepting operations from the user, and a display unit 54 for displaying various information.
[0082] The operation unit 52 is configured with, for example, a physical button or an input device that detects a touch input. The method for detecting the touch input may be any common detection method, such as a resistive film method, an infrared method, an electromagnetic induction method, or a capacitive method.
[0083] The display unit 54 is configured by a display device such as an LCD (Liquid crystal display), an organic EL (electro-luminescence) panel, or a micro LED (Light Emitting Diode) display.
[0084] The control unit 60 is a functional unit for controlling the entire image forming apparatus 1. The control unit 60 realizes various functions by reading and executing various programs stored in the storage unit 204 described later, and is configured with one or more arithmetic devices (e.g., CPUs (Central Processing Units)).
[0085] In addition, the control unit 60 is connected to the image reading device 10, the image processing device 20, the image printing device 30, the image transmitting / receiving device 40, and the operation panel 50, and controls these devices to execute various processes executed in the image forming apparatus 1.
[0086] [1.2 Processing flow] [1.2.1 Processing Overview] Next, the flow of processing executed by the image processing device 20 in this embodiment will be described with reference to the drawings. First, an overview of the flow of processing in this embodiment will be described with reference to FIG.
[0087] First, the image input unit 202 generates image data and performs ACS determination. When the image data is monochrome image data, the image input unit 202 inputs a grayscale image to the intermediate pixel determination unit 214, the photographic area size determination unit 216, the false contour determination unit 218, the image output unit 222, the black and white multilevel processing unit 2204, and the black and white binarization processing unit 2206.
[0088] The false contour determination unit 218 inputs a determination signal A indicating whether or not a false contour will occur when the input grayscale image is converted into a black and white multi-value image to the tone reproduction processing selection unit 2202. The photographic area size determination unit 216 inputs a determination signal B indicating whether or not the photographic area ratio is equal to or greater than a predetermined ratio to the tone reproduction processing selection unit 2202. The intermediate pixel determination unit 214 inputs a determination signal C indicating whether or not the number of intermediate pixels included in the image data is equal to or greater than the determination pixel number to the tone reproduction processing selection unit 2202.
[0089] The tone reproduction process selection unit 2202 selects a tone reproduction process based on the input determination signal, and outputs a black and white binary signal or a black and white multi-value signal. The black and white binarization processing unit 2206 performs black and white binarization processing on the grayscale image based on the black and white binary signal input from the tone reproduction process selection unit 2202, and outputs the processed image data (black and white binary image) to the image output unit 222. The black and white multi-value processing unit 2204 performs black and white multi-value processing on the grayscale image based on the black and white multi-value signal input from the tone reproduction process selection unit 2202, and outputs the processed image data (black and white multi-value image) to the image output unit 222.
[0090] The image output unit 222 outputs image data based on image data input from other functional units. Specifically, when image data of a black and white multi-value image or a black and white binary image is input, the image output unit 222 outputs the input image data. On the other hand, when image data of a black and white multi-value image or a black and white binary image is not input, the image output unit 222 outputs image data of a grayscale image.
[0091] [1.2.2 Main processing] Next, referring to FIG. 7, a description will be given of the flow of processing (main processing) executed by control unit 60 when it is determined that image data of a monochrome image has been input in image input unit 202 and image data of a grayscale image is output from image input unit 202.
[0092] First, the control unit 60 determines whether or not blurred characters will occur when a grayscale image is converted into a black and white binary image via the blurred character determination unit 212 (step S102).
[0093] When it is determined that the image will not be blurred when converted into a black and white binary image, the control unit 60 determines whether there are many intermediate pixels via the intermediate pixel determination unit 214 (step S102; No→step S104). When there are few intermediate pixels, the control unit 60 executes black and white binarization processing on the image data (step S104; No→step S118).
[0094] Specifically, the control unit 60 inputs a determination signal C indicating that there are few intermediate pixels to the tone reproduction processing selection unit 2202. The tone reproduction processing selection processing unit 2022 selects to execute black and white binarization processing based on the input determination signal C, and outputs a black and white binarization signal to the black and white binarization processing unit 2206. The black and white binarization processing unit 2206 executes black and white binarization processing on the grayscale image based on the black and white binarization signal. As a result, image data of the black and white binary image is input to the image output unit 222. The image output unit 222 outputs image data of the black and white binary image. As a result, the image processing device 20 outputs image data of an image obtained by executing black and white binarization processing on the grayscale image.
[0095] On the other hand, if it is determined in step S102 that character blurring will occur when converted into a black and white binary image (step S102; Yes), or if it is determined in step S104 that there are many intermediate pixels (step S104; Yes), the control unit 60 executes a photographic area detection process for the grayscale image via the photographic area detection unit 2162 (step S106). Next, the control unit 60 determines via the photographic area ratio evaluation unit 2164 whether or not the photographic area ratio based on the photographic area detected in step S106 is equal to or greater than a threshold value Th, which is a predetermined ratio (step S108).
[0096] Here, if it is determined in step S108 that the image data contains a certain amount of photographic area (the photographic area ratio is equal to or greater than the threshold value Th), the image data is converted into a unique JPEG file without checking whether or not a false contour has occurred. In this way, the image data can be output at high speed without the need for special determination. Also, if the photographic area contained in the image data is small and no false contour has occurred, it is possible to output a black and white multi-value image. This enables the control unit 60 to output the image data using the processing method that is optimal in terms of both file size and image quality.
[0097] Therefore, in step S108, if the photographic area ratio is equal to or greater than the threshold value Th, the control unit 60 executes grayscaling processing on the image data (step S108; Yes→step S114).
[0098] Specifically, the control unit 60 inputs a determination signal B indicating that the photographic area ratio is equal to or greater than a predetermined ratio to the tone reproduction processing selection unit 2202. The tone reproduction processing selection processing unit 2022 selects not to execute either the black and white binarization processing or the black and white multi-value processing based on the input determination signal B. As a result, only grayscale image data is input to the image output unit 222. The image output unit 222 outputs image data of the grayscale image. As a result, the image processing device 20 outputs the image data of the grayscale image.
[0099] On the other hand, in step S108, if the photographic area ratio is less than the threshold value Th, the control unit 60 executes a false contour evaluation process via the false contour determination unit 218 (step S108; No→step S110). The false contour evaluation process will be described with reference to FIG.
[0100] First, the false contour detection unit 2182 generates a comparison image (step S152). The comparison image is an image to be compared with the grayscale image in order to determine whether a false contour occurs, and specifically, is an image (black and white multi-value image) obtained by performing black and white multi-value processing on the grayscale image.
[0101] Next, the false contour detection unit 2182 generates a difference image based on the difference between the grayscale image and the comparison image generated in step S152 (step S154). For example, the false contour detection unit 2182 calculates, for each pixel in the grayscale image, the difference between the pixel value of that pixel and the pixel value of a pixel at a corresponding position in the comparison image. Then, the false contour detection unit 2182 generates an image (difference image) with the difference as the pixel value.
[0102] In the difference image, for example, the pixel values of pixels in the original grayscale image where characters were displayed are small. This is because the pixels that make up characters have clear edges and are unlikely to have a gradual change in gradation, so the pixel difference value between a pixel in the grayscale image and a pixel in the comparison image does not become large.
[0103] On the other hand, in an area where a gradual change in gradation occurs, consecutive pixels in the comparison image are converted to one of the predetermined types of pixel values. Therefore, the difference value between the pixel in the grayscale image and the pixel in the comparison image becomes large. Here, pixels included in an area where a gradual change in gradation occurs continuously and that are converted to a different type of pixel value in the comparison image appear as a line (edge) in the difference image.
[0104] Next, the false contour detection unit 2182 optimizes the difference image generated in step S154 (step S156). For example, the false contour detection unit 2182 can perform an expansion / contraction process on the difference image to connect multiple lines that appear in the difference image and are disconnected in places into a single line. The false contour detection unit 2182 may also reduce noise that appears in the difference image or sharpen the difference image. In this manner, in this embodiment, the process of correcting the difference image into an image suitable for detecting a false contour is called optimization.
[0105] Next, the false contour detection unit 2182 performs labeling on the line segments that connect pixels with large pixel values in the difference image (step S158). Labeling refers to a process of extracting line segments that are used to determine the presence or absence of a false contour.
[0106] For example, the line segments that are included in the character area of the difference image and have a predetermined length or more are labeled based on the area determination result by the area determination processing unit 206. This enables the false contour detection unit 2182 to ignore short line segments and line segments that appear in the photograph area of the difference image.
[0107] Furthermore, the false contour detection unit 2182 calculates the position and length of each labeled line segment, and associates the line segment with information on the position and length of the line segment.
[0108] In this manner, the false contour detection unit 2182 detects (extracts) the labeled line segments as false contour candidates (step S160).
[0109] Next, the false contour evaluation unit 2184 determines whether or not a false contour will occur when black and white multi-value processing is performed on the grayscale image, based on the false contour candidates detected by the false contour detection unit 2182 (step S162).
[0110] For example, the false contour detection unit 2182 determines that a false contour occurs when a predetermined condition is satisfied based on the length, number, direction, etc. of the line segments detected as false contour candidates. The predetermined condition is, for example, when a predetermined number (e.g., three or more) of line segments are included among the line segments detected as false contour candidates, which are in a predetermined direction (e.g., the vertical direction of the image data) and have a predetermined length (e.g., 50% or more of the height of the image data). The predetermined condition may be, for example, determined in advance or may be set by the user. The direction of the line segments may be determined based on the aspect ratio of a rectangle having a diagonal line segment connecting the start position and end position of the line segments.
[0111] Returning to FIG. 7, if a false contour occurs, that is, if it is determined in step S162 that a false contour occurs, the control unit 60 executes grayscale processing (step S112; Yes -> step S114). Specifically, the control unit 60 inputs a determination signal A indicating that a false contour will occur to the gradation reproduction processing selection unit 2202. Based on the input determination signal A, the gradation reproduction processing selection unit 2202 selects not to execute either the black and white binarization processing or the black and white multivalue processing. As a result, only grayscale image data is input to the image output unit 222. The image output unit 222 outputs image data of the grayscale image. As a result, the image processing device 20 outputs the image data of the grayscale image.
[0112] On the other hand, if a false contour does not occur, that is, if it is determined in step S162 that a false contour does not occur, the control unit 60 executes black and white multi-value processing (step S112; No -> step S116). Specifically, the control unit 60 inputs a determination signal A indicating that a false contour will occur to the gradation reproduction processing selection unit 2202. The gradation reproduction processing selection unit 2202 selects to execute black and white multi-value processing based on the input determination signal A. The black and white multi-value processing unit 2204 executes black and white multi-value processing on the grayscale image based on the black and white multi-value signal. As a result, image data of the black and white multi-value image is input to the image output unit 222. The image output unit 222 outputs image data of the black and white multi-value image. As a result, the image processing device 20 outputs the black and white multi-value image data.
[0113] In addition, even if it is not described above, the order of steps may be changed or some steps may be omitted within a range that is consistent. For example, in the above-mentioned process flow, it has been described that image data is output by a corresponding processing method every time a judgment result is output from each judgment unit of the blurred character judgment unit 212, the intermediate pixel judgment unit 214, the photographic area size judgment unit 216, and the false contour judgment unit 218. However, for example, the control unit 60 may obtain the judgment result of the blurred character judgment unit 212 and the judgment results (judgment signal A, judgment signal B, judgment signal C) of the intermediate pixel judgment unit 214, the photographic area size judgment unit 216, and the false contour judgment unit 218, and select a processing method for the image data based on a combination of the judgment results.
[0114] According to this embodiment, the image processing device can avoid the occurrence of crushed characters when performing black and white binarization processing on image data, and can also prevent degradation of image quality due to crushed black in photographic areas.
[0115] The image processing device can also switch between black and white multi-value processing and grayscale processing depending on the ratio of the photographic area included in the image data. Consider a case where an image reading device reads and outputs multiple sheets of a document in a photographic emphasis (image quality priority) mode, which is a mode in which black and white binarization processing is not performed to prioritize gradation reproducibility and black and white multi-value images or grayscale images are output. In this case, a reverse phenomenon may occur in which the file size of a grayscale image is increased when the image is converted into a black and white multi-value image in order to reduce the file size of the grayscale image. It is possible to deal with this phenomenon by a simple method of switching between black and white multi-value processing and grayscale processing based on the ratio of the photographic area included in the image data. This makes it possible to output image data by a processing method that minimizes the file size when outputting image data in the photographic emphasis mode.
[0116] Furthermore, according to this embodiment, the image processing device can prevent the user from viewing false contours when the user desires to output image data of a black and white multi-value image in order to reduce the file size of the output image data. That is, the image processing device of this embodiment does not forcibly convert image data that would generate false contours due to black and white multi-value conversion, but switches to grayscale processing. This allows the user to avoid the phenomenon of viewing false contours that occur in the shadow area that appears in the center of a book scan, or feeling that they are an eyesore.
[0117] [2. Second embodiment] Next, a second embodiment will be described. The second embodiment is different from the first embodiment in that the number of gradations of the image data to be output is determined depending on the ratio of the photographic area and the presence or absence of a pseudo contour. In the second embodiment, FIG. 2 of the first embodiment is replaced with FIG. 9, and FIG. 7 of the first embodiment is replaced with FIG. 10, and the same functional units and processes are given the same reference numerals and the description will be omitted.
[0118] The image processing device 20 in this embodiment may have a configuration in which the blurred character determination unit 212 and the intermediate pixel determination unit 214 are omitted from the functional configuration shown in FIG. 1 in the first embodiment.
[0119] An overview of the processing flow of this embodiment will be described with reference to Fig. 9. In this embodiment, image data generated by the image input unit 202 is input to a photographic area size determination unit 216, a false contour determination unit 218, an image output unit 222, a black and white multilevel conversion unit 2204, and a black and white binarization unit 2206.
[0120] The false contour determination unit 218 inputs a determination signal A, which indicates whether or not a false contour will occur when the input grayscale image is converted into a black-and-white multi-value image, to the tone reproduction processing selection unit 2202. The photographic area size determination unit 216 inputs a determination signal B, which indicates whether or not the photographic area ratio is equal to or greater than a predetermined ratio, to the tone reproduction processing selection unit 2202. The tone reproduction processing selection unit 2202 selects a tone reproduction processing based on the input determination signal. Based on the selected tone reproduction processing, the black-and-white multi-value processing unit 2204 or the black-and-white binarization processing unit 2206 executes black-and-white multi-value processing or black-and-white binarization processing on the input grayscale image, and outputs the processed image data to the image output unit 222. The image output unit 222 outputs image data based on image data input from other functional units.
[0121] Referring to FIG. 10, the flow of processing (main processing) executed by control unit 60 when it is determined that image data of a monochrome image has been input in image input unit 202 and image data of a grayscale image is output from image input unit 202 will be described.
[0122] First, the control unit 60 determines whether or not blurred characters will occur when the grayscale image is converted into a black and white binary image via the blurred character determination unit 212 (step S102). If blurred characters will not occur in the black and white binary image, the control unit 60 executes black and white binarization processing on the image data (step S102; No→step S118).
[0123] On the other hand, if blurred characters occur in the black and white binary image, the control unit 60 executes a photographic area detection process on the grayscale image via the photographic area detection unit 2162 (step S102; Yes->step S106). Furthermore, the control unit 60 determines via the photographic area ratio evaluation unit 2164 whether the photographic area ratio of the photographic area detected in step S106 is equal to or greater than a predetermined threshold value Th (step S108).
[0124] In step S108, if the photographic area ratio is equal to or greater than the threshold value Th, the control unit 60 executes grayscaling processing on the image data (step S108; Yes→step S114).
[0125] In step S108, when the photographic area ratio is less than the threshold value Th, the control unit 60 executes a false contour evaluation process via the false contour determination unit 218 (step S108; No→step S110).
[0126] If a false contour occurs, the control unit 60 executes grayscale processing (step S112; Yes→step S114). On the other hand, if a false contour does not occur, the control unit 60 executes black and white multi-value processing (step S112; No→step S116).
[0127] According to this embodiment, the image processing device can prevent the user from seeing false contours when the user desires to output image data of a black and white multi-value image in order to reduce the file size of the output image data.
[0128] [3. Third embodiment] Next, a third embodiment will be described. The third embodiment is different from the first embodiment in that the number of gradations of image data to be output is determined based on the presence or absence of blurred characters and the number of intermediate pixels. In the third embodiment, FIG. 2 of the first embodiment is replaced with FIG. 11, and FIG. 7 of the first embodiment is replaced with FIG. 12, and the same functional units and processes are given the same reference numerals and their explanations are omitted.
[0129] The image processing device 20 in this embodiment may have a configuration in which the photographic area size determination unit 216 and the false contour determination unit 218 are omitted from the functional configuration shown in FIG. 1 in the first embodiment.
[0130] An overview of the processing flow of this embodiment will be described with reference to Fig. 11. In this embodiment, image data generated by the image input unit 202 is input to an intermediate pixel determination unit 214, an image output unit 222, and a black and white binarization processing unit 2206.
[0131] The intermediate pixel determination unit 214 determines whether the number of intermediate pixels contained in the input grayscale image is large or not, and inputs a determination signal indicating the determination result to the tone reproduction processing selection unit 2202. When a determination signal indicating that there are few intermediate pixels is input, the tone reproduction processing selection unit 2202 outputs a black and white binarization signal to the black and white binarization processing unit 2206. Based on the black and white binarization signal input from the tone reproduction processing selection unit 2202, the black and white binarization processing unit 2206 outputs image data of a black and white binary image to the image output unit 222. The image output unit 222 outputs image data based on image data input from other functional units.
[0132] Referring to FIG. 12, the flow of processing (main processing) executed by control unit 60 when it is determined that image data of a monochrome image has been input in image input unit 202 and image data of a grayscale image is output from image input unit 202 will be described.
[0133] First, the control unit 60 determines whether or not blurred characters will occur when the grayscale image is converted into a black and white binary image by black and white binarization processing via the blurred character determination unit 212 (step S102). If blurred characters will occur in the black and white binary image, the control unit 60 executes grayscaling processing on the image data (step S102; Yes→step S114).
[0134] On the other hand, if no character blurring occurs in the black and white binary image, the control unit 60 determines whether there are many intermediate pixels via the intermediate pixel determination unit 214 (step S102; No → step S104). If there are many intermediate pixels, the control unit 60 executes grayscale processing on the image data (step S104; Yes → step S114). On the other hand, if there are few intermediate pixels, the control unit 60 executes black and white binarization processing on the image data (step S104; No → step S118).
[0135] According to this embodiment, when image data includes an area containing many intermediate pixels (e.g., a dark photographic area), it is possible to avoid the phenomenon in which the area containing many intermediate pixels becomes blacked out and image quality deteriorates when the image data is converted into a black and white binary image.
[0136] [4. Fourth embodiment] Next, a fourth embodiment will be described. The fourth embodiment is different from the first embodiment in that the number of gradations of image data to be output is determined based on the ratio of the photographic area. In the fourth embodiment, FIG. 2 of the first embodiment is replaced with FIG. 13, and FIG. 7 of the first embodiment is replaced with FIG. 14, and the same functional units and processes are given the same reference numerals and the description will be omitted.
[0137] The image processing device 20 in this embodiment may have a configuration in which the blurred character determination unit 212, the intermediate pixel determination unit 214, and the false contour determination unit 218 are omitted from the functional configuration shown in FIG.
[0138] An overview of the processing flow of this embodiment will be described with reference to Fig. 13. In this embodiment, image data generated by the image input unit 202 is input to the photographic area size determination unit 216, the image output unit 222, and the black and white multi-value processing unit 2204.
[0139] The photographic area size determination unit 216 outputs a determination signal indicating whether or not the photographic area ratio of the input grayscale image is equal to or greater than a predetermined ratio to the tone reproduction processing selection unit 2202. When a determination signal indicating that the photographic area ratio is less than a predetermined ratio is input, the black and white multi-value processing unit 2204 outputs a black and white multi-value signal to the black and white multi-value processing unit 2204. The black and white multi-value processing unit 2204 outputs image data of the black and white multi-value image to the image output unit 222 based on the black and white multi-value signal input from the tone reproduction processing selection unit 2202. The image output unit 222 outputs image data based on image data input from other functional units.
[0140] Referring to FIG. 14, the flow of processing (main processing) executed by control unit 60 when it is determined that image data of a monochrome image has been input in image input unit 202 and image data of a grayscale image is output from image input unit 202 will be described.
[0141] First, the control unit 60 executes a photographic area detection process for the grayscale image via the photographic area detection unit 2162 (step S106). Furthermore, the control unit 60 determines via the photographic area ratio evaluation unit 2164 whether or not the photographic area ratio of the photographic area detected in step S106 is equal to or greater than a predetermined threshold value Th (step S108).
[0142] In step S108, if the photographic area ratio is equal to or greater than the threshold Th, the control unit 60 executes grayscale processing on the image data (step S108; Yes→step S114). On the other hand, in step S108, if the photographic area ratio is less than the threshold Th, the control unit 60 executes black and white multivalue processing (step S108; No→step S116).
[0143] According to this embodiment, the phenomenon in which the black and white multi-value processing intended to reduce the file size of a grayscale image actually results in an increase in file size can be avoided by performing appropriate processing based on the ratio of the photographic area contained in the image data.
[0144] [5. Fifth Embodiment] Next, a fifth embodiment will be described. The fifth embodiment differs from the first embodiment in that it determines whether or not a pseudo contour occurs when black and white multi-value processing is performed on a grayscale image, and determines the number of gradations of the image data to be output based on the determination. In the fifth embodiment, FIG. 2 of the first embodiment is replaced with FIG. 15, and FIG. 7 of the first embodiment is replaced with FIG. 16, and the same functional units and processes are given the same reference numerals and description will be omitted.
[0145] The image processing device 20 in this embodiment may have a configuration in which the blurred character determination unit 212, the intermediate pixel determination unit 214, and the photographic area size determination unit 216 are omitted from the functional configuration shown in FIG.
[0146] An overview of the processing flow of this embodiment will be described with reference to Fig. 15. In this embodiment, image data generated by the image input unit 202 is input to a false contour determination unit 218, an image output unit 222, and a black and white multi-value processing unit 2204.
[0147] The false contour determination unit 218 outputs a determination signal indicating whether or not a false contour will occur when a grayscale image is converted into a black and white multi-value image to the tone reproduction processing selection unit 2202. When a determination signal indicating that a false contour will not occur is input, the black and white multi-value processing unit 2204 outputs a black and white multi-value signal to the black and white multi-value processing unit 2204. Based on the black and white multi-value signal input from the tone reproduction processing selection unit 2202, the black and white multi-value processing unit 2204 outputs image data of the black and white multi-value image to the image output unit 222. The image output unit 222 outputs image data based on image data input from other functional units.
[0148] Referring to FIG. 16, the flow of processing (main processing) executed by control unit 60 when it is determined that image data of a monochrome image has been input in image input unit 202 and image data of a grayscale image is output from image input unit 202 will be described.
[0149] First, the control unit 60 executes a pseudo contour evaluation process via the pseudo contour determination unit 218 (step S110). If a pseudo contour occurs, the control unit 60 executes a grayscale process (step S112; Yes→step S114). On the other hand, if a pseudo contour does not occur, the control unit 60 executes a black and white multivalue process (step S112; No→step S116).
[0150] According to this embodiment, the image processing device can prevent the user from seeing false contours when the user desires to output image data of a black and white multi-value image in order to reduce the file size of the output image data.
[0151] [6. Sixth Embodiment] Next, a sixth embodiment will be described. The sixth embodiment is an embodiment in which, in the fourth and fifth embodiments, if black and white binarization processing is performed on input image data and no blurring of characters occurs, black and white binarization processing is performed.
[0152] Fig. 17 is a flow diagram showing the flow of processing (main processing) executed by the control unit 60 when this embodiment is applied to the fourth embodiment. As shown in Fig. 17, first, the control unit 60 determines whether or not blurred characters will occur when a grayscale image is converted into a black and white binary image via the blurred character determination unit 212 (step S102). If blurred characters will not occur in the black and white binary image, the control unit 60 executes black and white binarization processing on the image data (step S102; No -> step S118).
[0153] In step S102, if character blurring occurs, the control unit 60 may execute the processes from step S106 to step S116, which are the processes shown in FIG. 14 of the fourth embodiment.
[0154] The control unit 60 may execute the following processing as processing for image data based on the determination of the presence or absence of blurred characters and the determination of the ratio of the photographic area. (1) If there is no blurring of characters and the photographic area is less than the threshold value Th (including the case where there is no photographic area), a black and white binarization process is performed on the image data. (2) If blurred characters occur and the photographic area is less than the threshold value Th (including the case where there is no photographic area), an error diffusion process is executed on the image data. (3) If blurred characters occur and the photographic area is equal to or greater than the threshold value Th, error diffusion processing or black and white multi-value processing is executed on the image data.
[0155] Fig. 18 is a diagram showing an example of the operation of this embodiment. Fig. 18(a) shows image data input by the image input unit 202. Fig. 18(b) shows image data when black and white multi-value processing is performed on the image data. Fig. 18(c) shows image data when black and white binarization processing is performed on the image data.
[0156] As shown in FIG. 18(b), when black and white multi-value processing is performed on image data, black crush does not occur in pixels included in the photographic area, and characters are not crushed. On the other hand, as shown in FIG. 18(c), when black and white binarization processing is performed on image data, black crush occurs in some areas of the photographic area, but most characters are not crushed. When black and white binarization processing is performed on image data, the number of gradations included in the image data is smaller than when black and white multi-value processing is performed on the image data, so the file size is generally smaller. Therefore, the processing on the image data to be output may be switched according to a setting indicating whether to prioritize image quality or file size. The setting indicating whether to prioritize image quality or file size may be switched by the user, for example.
[0157] Note that even when this embodiment is applied to the fifth embodiment, the control unit 60 only needs to execute the black-and-white binarization process if no blurred characters occur when a grayscale image is converted into a black-and-white binary image. On the other hand, if blurred characters occur when a grayscale image is converted into a black-and-white binary image, the control unit 60 only needs to execute the processes from step S110 to step S116 shown in FIG. 16 for the fourth embodiment.
[0158] According to this embodiment, by combining the judgment of blurred text and the judgment of the ratio of the photographic area, it is possible to output optimal image data without blurred text while minimizing the image file size. Also, by executing the process shown in this embodiment when multiple documents are read, the image processing device can convert each image data of the document into optimal scan data and then execute a predetermined process or output the optimal scan data.
[0159] [7. Seventh embodiment] Next, a seventh embodiment will be described. The seventh embodiment is an embodiment that provides a function for manually adjusting the judgment criteria (judgment value) and switching the contents of the processing for the judgments and processing executed in the main processing shown in the first to sixth embodiments.
[0160] For example, before executing the main process, the control unit 60 displays a setting screen W700 as shown in Fig. 19 on the display unit 54. The setting screen W700 displays a list E700 for selecting a criterion for judgment, and also displays an OK button B700 for applying the selected criterion and a cancel button B702 for canceling the selection.
[0161] List E700 displays selectable items such as giving priority to reducing the size of the image data to be output, giving priority to the image quality based on the image data to be output, and making a balanced judgment of both image size and image quality. For example, as shown in Fig. 19, list E700 displays five levels, with the middle level being a level for making a balanced judgment of both image size and image quality. The user selects a desired level from list E700.
[0162] Incidentally, the control unit 60 selects a level (level 3 in the example of FIG. 19) for making an unbiased judgment of image size and image quality as an initial setting. Note that the judgment value (for example, a threshold value used for judgment) for making an unbiased judgment of image size and image quality is set to an appropriate value by the designer of the image processing device 20, etc.
[0163] FIG. 20 is a table showing the judgment criteria and judgment values (parameter sets) used by the control unit 60 corresponding to the selected level, and the contents of the processing to be executed.
[0164] 20(a), the control unit 60 may switch the judgment value (parameter set) indicating the criterion used for judgment in response to the selected level. For example, the control unit 60 uses parameter set A when level 1 (size priority) is selected, and uses parameter set E when level 5 (image quality priority) is selected.
[0165] When file size is to be prioritized, the control unit 60 switches the parameters of each judgment process so as to make it easier to select a process that will result in a smaller file size, such as black and white multi-value conversion or black and white binarization. On the other hand, when image quality is to be prioritized, the control unit 60 switches the parameters of each judgment process so as to make it easier to select a process that will prevent image quality degradation, such as grayscaling or black and white multi-value conversion.
[0166] For example, the parameter set may include a photographic area size threshold (THps) value indicating a specific value of the threshold Th used by the photographic area size determination unit, as shown in Fig. 20(b). In this case, parameter set A includes THps1 as the photographic area size threshold, and similarly, parameter set B includes THps2, parameter set C includes THps3, parameter set D includes THps4, and parameter set E includes THps5.
[0167] Here, the photographic area size threshold is THps1>THps2>THps3>THps4>THps5. As a result, when THps5 is selected as the photographic area size threshold, grayscale processing is performed preferentially even if the photographic area included in the image data is small, and image data with a higher image quality is output. On the other hand, when THps1 is selected as the photographic area size threshold, black and white multivalue processing is performed preferentially unless the photographic area included in the image data is relatively large, and image data with a smaller file size is output preferentially.
[0168] 20(c), the method of binarization processing may be switched depending on the level. For example, when parameter sets A, B, and C are used, the control unit 60 executes black and white multi-value processing in step S116 of the main processing. On the other hand, when parameter sets D and E are used, the control unit 60 executes error diffusion processing instead of black and white multi-value processing in step S116 of the main processing.
[0169] The user can adjust the level based on the image output from the image forming apparatus 1. For example, if the file size of the image data output in the initial settings is larger than expected and it becomes difficult to attach it to an e-mail, the user selects a setting that prioritizes processing to reduce the file size. Specifically, the user selects a standard such as level 2 (somewhat prioritizes image size) or level 1 (prioritizes image size) to further reduce the size.
[0170] On the other hand, if the image quality of the image data output with the default settings is degraded more than expected and there is a possibility that it may affect the impression of the recipient, the user selects a setting that prioritizes processing that can further suppress image quality degradation.Specifically, the user selects a standard such as level 4 (a little priority on image quality) or level 5 (priority on image quality) to further suppress image quality degradation.
[0171] According to this embodiment, the image forming apparatus can provide an environment in which the judgment criteria, etc., can be adjusted so that the judgment result in the main process becomes the judgment result that outputs image data desired by the user. This allows the user to switch to a process that outputs image data based on a tone reproduction process or number of tones that can obtain a desired file size or image quality when image data based on a tone reproduction process or number of tones that is not intended is output.
[0172] [8. Eighth embodiment] Next, an eighth embodiment will be described. The eighth embodiment is an embodiment that provides a function for displaying image data output in the main processing described in the first to seventh embodiments on a preview screen and allowing the user to determine the tone reproduction method and number of gradations of the image to be output.
[0173] In this embodiment, when a mode for automatically selecting a tone reproduction method when outputting image data (black and white automatic mode) is selected, the control unit 60 displays a preview screen before outputting the image data. The tone reproduction method refers to the number of tones (e.g., grayscale, black and white multi-value, black and white binary) when outputting image data, the tone reproduction process to be executed (e.g., error diffusion), or a combination thereof.
[0174] For example, in an image forming apparatus 1 having a mode in which all scanned images can be buffered before outputting the image data, such as for a preview during scanning, the control unit 60 displays a display screen W800 shown in Fig. 21(a) on the display unit 54 before outputting the image data. The display screen W800 displays a preview image E800 of the output data and a name E802 of the tone reproduction method for each scanned image. The preview image E800 and the name E802 of the tone reproduction method are switched when a button B800 or a button B802 for switching to a preview image of a scanned image of the previous or next page is selected, or when a gesture operation such as a swipe is performed.
[0175] When the preview image E800 is selected by the user, the control unit 60 displays a display screen W810 for selecting a tone reproduction method for the image data corresponding to the selected preview image on the display unit 54. Fig. 21(b) is an example of the display screen W810.
[0176] Display screen W810 includes a preview image E810 of image data when output using the currently selected tone reproduction method, and buttons B810, B812, and B814 for selecting the tone reproduction method. Of buttons B810, B812, and B814, the button corresponding to the currently selected tone reproduction method (button B810 in FIG. 21(b)) is highlighted. If the user wishes to change the tone reproduction method, the user can switch the tone reproduction method by selecting the button corresponding to the desired tone reproduction method and then selecting the OK button B816.
[0177] When the control unit 60 has determined the tone reproduction method for each piece of image data to be output, the control unit 60 outputs the image data in accordance with the selected tone reproduction method.
[0178] According to this embodiment, the user can switch to a desired tone reproduction method and output image data.
[0179] [9. Modifications] The present disclosure is not limited to the above-described embodiments, and various modifications are possible. In other words, the technical scope of the present disclosure also includes embodiments obtained by combining technical means that are appropriately modified within the scope of the gist of the present disclosure.
[0180] Although the above-described embodiments are described separately for convenience of explanation, they may be combined and executed within a technically feasible range.
[0181] In addition, the programs that run on each device in the embodiments are programs that control the CPU and the like (programs that make a computer function) so as to realize the functions of the above-mentioned embodiments. Information handled by these devices is temporarily stored in a temporary storage device (e.g., RAM) during processing, and is then stored in various storage devices such as ROMs (Read Only Memories) and HDDs, and is read, modified, and written by the CPU as necessary.
[0182] Here, the recording medium for storing the program may be any of semiconductor media (e.g., ROM, non-volatile memory card, etc.), optical recording media / magneto-optical recording media (e.g., DVD (Digital Versatile Disc), MO (Magneto Optical Disc), MD (Mini Disc), CD (Compact Disc), BD (Blu-ray (registered trademark) Disk), etc.), magnetic recording media (e.g., magnetic tape, flexible disk, etc.), etc. Furthermore, not only are the functions of the above-mentioned embodiments realized by executing the loaded program, but the functions of the present disclosure may also be realized by processing in cooperation with an operating system or other application programs, etc., based on instructions from the program.
[0183] In addition, when distributing the program on the market, the program can be stored in a portable recording medium and distributed, or transferred to a server computer connected via a network such as the Internet. In this case, the storage device of the server computer is of course included in the present disclosure. [Explanation of symbols]
[0184] 1. Image forming device 10 Image reader 20 Image processing device 202 Image input unit 204 Storage section 206 Area determination processing unit 208 Image Processing Unit 212 Character collapse judgment unit 214 Intermediate pixel determination unit 216 Photo area size determination unit 218 False contour judgment unit 220 Tone Reproduction Processing Section 222 Image output unit 30 Image printing device 40 Image transmission and reception device 50 Operation Panel 52 Operation section 54 Display section 60 Control section
Claims
1. an image reading unit that reads an image; a first determination unit that determines whether or not character blurring will occur when the image is binarized; A second determination unit that determines a ratio of a photographic area included in the image; a third determination unit that determines an area in the image where a gradual change in gradation occurs continuously as a pseudo contour; a control unit that converts the image into image data of any one of a grayscale image having N gradations, a black-and-white multi-value image having M gradations (2<M<N), or a black-and-white binary image having 2 gradations, based on the judgment results of the first judgment unit, the second judgment unit, and the third judgment unit; Equipped with The control unit may include, If the false contour exists, converting the image into image data of a grayscale image; If the pseudo contour does not exist, the image is converted into the image data of the monochrome multi-value image.
13. An image processing device comprising:
2. The control unit generates a difference image from the image, The third determination unit detects line segments from the difference image, and determines that the image contains the pseudo contour when the number and length of the line segments exceed a predetermined value.
2. The image processing device according to claim 1,
3. 3 . The image processing apparatus according to claim 1 , wherein the control unit converts the image data into image data of a black and white binary image when the first determination unit determines that no blurring of characters will occur.
4. The control unit is configured to determine whether the proportion of a photograph area included in the image determined by the second determination unit is If the difference is equal to or greater than the threshold, converting the image into image data of a grayscale image; If the difference is less than the threshold, the image is converted into the image data of the black and white multi-value image.
4. The image processing device according to claim 1, wherein the image processing device further comprises:
5. The image processing device according to claim 4 , wherein the control unit switches the threshold value in response to a user operation.
6. The image processing device according to any one of claims 3 to 5, characterized in that the control unit converts the image into image data of the grayscale image or image data of the black and white multi-value image only when the first determination unit determines that character crushing will occur.
7. When the image having N gradations is quantized, each pixel can be expressed by 8 bits, 7. The image processing apparatus according to claim 1, wherein each pixel of the image having M gradations can be expressed by 2 bits or more and 7 bits or less when the image is quantized.
8. an image reading step of reading an image; a first determination step of determining whether or not character blurring will occur when the image is binarized; a second determination step of determining a proportion of the image that includes a photographic area; a third determination step of determining, as a pseudo contour, an area in which a gradual change in gradation occurs continuously in the image; a control step of converting the image into image data of any one of a grayscale image having N gradations, a black-and-white multi-value image having M gradations (2<M<N), or a black-and-white binary image having 2 gradations, based on the results of the judgments made in the first judgment step, the second judgment step, and the third judgment step; Including, The control step includes: If the false contour exists, converting the image into image data of a grayscale image; If the pseudo contour does not exist, the image is converted into image data of a monochrome multi-value image. A control method comprising:
9. On the computer, An image reading function that reads images; a first determination function for determining whether or not character blurring will occur when the image is binarized; A second determination function for determining a proportion of the image including a photographic area; a third determination function for determining an area in the image where a gradual change in gradation occurs continuously as a pseudo contour; a control function for converting the image into image data of any one of a grayscale image having N gradations, a black-and-white multi-value image having M gradations (2<M<N), or a black-and-white binary image having 2 gradations, based on the judgment results of the first judgment function, the second judgment function, and the third judgment function; Including, The control function may include: If the false contour exists, converting the image into image data of a grayscale image; If the pseudo contour does not exist, the image is converted into image data of a monochrome multi-value image. A program for realizing the above.
Citation Information
Patent Citations
Image forming apparatus, and image forming method and program
JP2007266921A
Image reading apparatus, and image forming apparatus
JP2009100285A
Image processing apparatus and method
JP2011142409A
Image processor and program
JP2014238787A
Image processing apparatus, control method for image processing and program
JP2018139457A