Image processing apparatus, image processing method, recording apparatus, and program

By setting pixel-specific thresholds for dropout color processing, the method preserves black and gray characters while removing chromatic colors, improving OCR accuracy and reducing unintended text removal.

JP2026009782APending Publication Date: 2026-01-21CANON KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024109921
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2026-01-21

AI Technical Summary

Technical Problem

Conventional dropout color technologies unintentionally remove lightly written gray characters due to brightness thresholds, leading to inaccurate OCR processing.

Method used

A method to determine pixel removal by setting thresholds based on individual pixel values, allowing for appropriate conversion to a predetermined value, thereby preserving black or gray characters while removing chromatic colors.

Benefits of technology

Effectively removes visible chromatic colors, including light hues, while maintaining black and gray characters, enhancing OCR accuracy and reducing unintended removal of text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026009782000001_ABST
    Figure 2026009782000001_ABST
Patent Text Reader

Abstract

To provide an image processing apparatus, an image processing method, a recording apparatus, and a program which prevent a pale gray character or the like from being removed differently from a user's intention.SOLUTION: The method includes reading a scanned image, acquiring a pixel value of each pixel, acquiring a maximum value of RGB pixel values of a pixel of interest, determining which region the pixel is included in based on the acquired maximum value, calculating a difference between the maximum value and a minimum value of the pixel values of the pixel, comparing the calculated differences, calculating and converting an average value from the pixel values of the pixel if the difference is equal to or less than a threshold value as a result of the comparison, and converting the pixel value of the pixel into a white pixel to remove color if the difference is larger than the threshold value.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an image processing apparatus, an image processing method, a recording apparatus, and a program for recording an image on a recording medium. [Background technology]

[0002] A technology called dropout color is known. This technology can remove chromatic colors and background colors and lines from documents such as slips that have a mixed background color, colored lines, and black text, leaving only the text. This technology can improve the accuracy of OCR processing of slips and slips.

[0003] In conventional dropout color technology, ink that cannot be read by a reading device is used as the color to be removed, so that the scanned image contains only black characters written in pencil, etc. In this case, the reading device can distinguish between characters and lines by detecting the difference in light reflectance.

[0004] Patent Document 1 discloses that a dropout function can be achieved without using special ink by having thresholds for brightness and saturation, and invalidating and removing pixel values ​​depending on whether the scanned image data exceeds the thresholds. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Application Publication No. 10-051655 Summary of the Invention [Problem to be solved by the invention]

[0006] As in Patent Document 1, when a brightness threshold is set and brightness above the threshold is removed, for example, lightly written gray characters close to white may exceed the brightness threshold and be removed.

[0007] In response to such a problem, the present invention aims to appropriately determine whether or not to remove a pixel by setting a threshold value according to the pixel value. [Means for solving the problem]

[0008] The present invention is characterized by comprising a determination means for determining whether to convert the value of a pixel of interest in image data to a predetermined value based on the value of the pixel of interest and a threshold value determined according to the pixel of interest, and a conversion means for converting the value of the pixel of interest when the result of the determination is to convert the value of the pixel of interest to the predetermined value. [Effects of the Invention]

[0009] The present invention allows a threshold value to be set according to pixel values, which makes it possible to remove visible chromatic colors, including light chromatic colors, while leaving, for example, black or gray characters close to the gray axis. [Brief explanation of the drawings]

[0010] [Figure 1] 1 is a block diagram showing the configuration of an image processing device (MFP) according to the present invention. [Figure 2] FIG. 2 is a diagram showing threshold values ​​in an RGB color space on a two-dimensional plane according to the present invention. [Figure 3] FIG. 1 is a flowchart showing a process according to the present invention. [Figure 4] FIG. 2 is a diagram showing the data structure and data flow of a scanned image according to the present invention. [Figure 5] FIG. 2 is a diagram showing a UI operation panel according to the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0011] (First embodiment) Preferred embodiments of the present invention will be described below by way of example with reference to the drawings. However, it should be understood that the scope of the present invention also includes appropriate modifications and improvements to the embodiments described below based on the ordinary knowledge of those skilled in the art, provided that the modifications and improvements do not deviate from the spirit of the present invention.

[0012] 1 is a block diagram showing the configuration of an image processing device (MFP) 100 according to this embodiment. A CPU 101 is a system control unit that controls the entire image processing device. A ROM 102 stores a control program for the CPU 101, an operating system (OS) program, and the like. A RAM 103 is composed of an SRAM or the like and stores program control variables, etc.

[0013] The I / F unit 106 is an interface for connecting the image processing device 100 and the information processing device 107. The interface may be a USB, a wired LAN cable, or a wireless connection such as Wi-Fi. The image processing device 100 communicates via the interface and can transmit scanned image data to the information processing device 107, such as a PC or a smartphone.

[0014] The operation panel 108 is composed of various keys, LEDs, an LCD, etc., and is used by the user to perform various input operations and display the operating status of the image processing device. The user can operate the operation panel 108 to execute scan or copy jobs. At this time, the user can also configure job settings by operating the operation panel 108. In this embodiment, the user can also specify from the operation panel 108 whether or not to erase chromatic colors in the job settings for copying or scanning.

[0015] The scanner control unit 110 optically reads an original placed on a platen in the reading unit 111 using a CIS image sensor (contact image sensor, hereinafter referred to as CIS), and converts the original into digital image data through A / D conversion. The memory 112 is a scanned image storage memory that stores the digital image data generated by the scanner control unit 110. The image processing unit 104 corrects the digital image data generated by the scanner control unit 110 based on the characteristics of the CIS, etc., and outputs high-resolution image data. The processing by the image processing unit 104 makes it possible to obtain image data in which variations in the read signal due to the state of the CIS image sensor, the environment in which the device is used, etc., have been corrected.

[0016] The image processing unit 104 also performs JPEG compression and expansion of the scanned image. The image processing unit 104 also generates print image data using the luminance signal (RGB, YCC, etc.) of the image read by the reading unit 111 and the scanner control unit 110 as input. Here, luminance refers to the brightness of the color when it is recorded, displayed, and output. In contrast, lightness is an index that indicates the degree of brightness of the color. For this reason, luminance can also be called lightness.

[0017] The memory 105 is configured with a DRAM or the like and is a memory for storing print image data. A spooler for saving multiple print image data is also secured in the memory 105. The memory 112 is a memory for saving the scanned image that has been read.

[0018] Printer control unit 113 controls recording by recording unit 114, which is configured with an inkjet or the like, and outputs and records print image data generated by image processing unit 104 on a recording medium. The recording medium is transported from paper feed slot 116 by paper feed control unit 115, and print image data is output via recording unit 114. The recorded recording medium is discharged to paper discharge slot 118 by paper discharge control unit 117.

[0019] FIG. 2 is a diagram showing the structure of scanned image data and data flow. The scanner control unit 110 reads an original document using the reading unit 111 and acquires the data. The acquired scanned image is compressed as JPEG data and stored in memory 112 for storing scanned images. For example, JPEG data 201 is image data obtained by scanning one page of an original document and stored as JPEG data. The image processing unit 104 decodes the JPEG data 201 in units of MCU (Minimum Code Unit) and expands it on RAM 103. For example, an 8-pixel by 8-pixel MCU 202a is decoded and stored in memory on RAM 103 as RGB data 202b consisting of multiple RGB components.

[0020] In this embodiment, the image processing unit 104 processes the RGB data 205, including the RGB data 202b, for each pixel to perform color conversion. JPEG data is decoded in order from the MCU in the upper left to the right. Therefore, the image processing unit 104 processes the RGB data every eight lines. After performing color conversion processing, the image processing unit 104 stores the RGB data in the memory 105.

[0021] Color conversion processing involves converting pixel values ​​to a specific color. For example, RGB pixel values ​​are converted to pixel values ​​(255, 255, 255) that indicate white. The printer control unit 113 does not record on pixels that indicate white, i.e., does not apply recording material such as ink, and as a result, the corresponding color can be removed. When recording on a colored recording medium, the color may be converted to match the color of the recording medium, or, if there is a background color, the color may be converted to that color. Alternatively, the color may be removed by converting to a color that is invisible to the user.

[0022] Figure 3 shows an example of the thresholds and brightness values ​​for color conversion processing when viewing the RGB color space on a two-dimensional plane. In this figure, the vertical axis is the R axis 301, which corresponds to the red color of RGB, and the horizontal axis is the G axis 302, which corresponds to the green color. The diagonal axis is the neutral gray axis 303, which ranges from black (0,0,0) to white (255,255,255).

[0023] In the technology disclosed in Patent Document 1, which sets a brightness threshold and removes colors with brightness higher than the threshold, removal processing may occur unintentionally by the user. For example, light text, such as gray text close to white, may be removed beyond the brightness threshold. In contrast, in this embodiment, a threshold is set according to the brightness of each pixel, thereby preventing removal processing unintentionally by the user.

[0024] 3, the areas on either side of the gray axis 303 (areas separated by dashed lines in the figure) are a near-black area 321 that is close to black, a near-white area 323 that is close to white, and an intermediate area 322 that is between white and black. In this embodiment, the near-black area 321 and the intermediate area 322 are separated by an RGB pixel value of 100, and the intermediate area 322 and the near-white area 323 are separated by an RGB pixel value of 150.

[0025] The thresholds that indicate how far a pixel value is from the gray axis 303 and determine whether or not to perform color conversion processing are a black-nearby threshold 311, an intermediate threshold 312, and a white-nearby threshold 313. In this embodiment, the black-nearby threshold 311 is set to 15, the intermediate threshold 312 is set to 10, and the white-nearby threshold 313 is set to 3. By setting the white-nearby threshold 313 to a value smaller than the black-nearby threshold 311, colors near white are more likely to be converted and to disappear. This makes it possible to appropriately remove chromatic colors with a light hue.

[0026] The pixel values ​​between these regions and the threshold values ​​may be configured so that the user can change them from a setting menu (not shown) for the color erasure process on the operation panel 108. For example, if the user wants to erase chromatic colors to a higher level, the user can set the color erasure process to a higher level, and conversely, if the user wants to erase chromatic colors to a lower level, the user can set the color erasure process to a lower level. Predetermined pixel values ​​and threshold values ​​between regions may be set according to the settings selected by the user.

[0027] FIG. 5 shows an example of the copy menu screen displayed on the operation panel 108 when executing a copy on the image processing device 100. For example, if the user wants to specify the number of copies, he or she presses the menu for number of copies 511 to specify the number of copies. This figure shows an example when 1 copy is specified. Similarly, if the user wants to specify the recording side of the copy, he or she presses the single-sided / double-sided menu 512 and selects single-sided or double-sided. Furthermore, if the user wants to specify the recording density, he or she presses the density menu 513 and selects dark or normal.

[0028] 5(a) shows the display when "No" is selected in the color erase menu 514 for setting color conversion settings on the copy menu screen. At this time, two buttons are displayed: a color start button 515 that can be used to start reading in color, and a monochrome start button 516 that can be used to start reading in monochrome. When either "Color start" or "Monochrome start" is selected, an instruction to start reading is issued to the image processing device 100.

[0029] FIG. 5B shows the display when "Yes" is selected in the color erase menu 524, which sets the color conversion setting, on the copy menu screen. At this time, only the monochrome start button 516 is displayed, and the color start button 525 cannot be pressed by the user. For example, the color start button 525 may be hidden or grayed out. That is, when "Yes" is selected in the copy color erase menu 524, the user can only select the monochrome start button 516. When copying with the color erase setting set to "Yes," the chromatic colors of the original document are converted to white, and the copied product becomes a monochrome image. To prevent the user from accidentally pressing the color start button, the image processing device 100 switches the display of the start button according to the color erase setting.

[0030] In this way, the user can press the color start button or monochrome start button as intended to obtain a color image or monochrome image.

[0031] Returning to FIG. 3, points A, B, C, and D are pixel values ​​of the image data plotted on a two-dimensional plane in this figure. Point A is a color close to black with a pixel value (R, G, B) = (20, 32, 21). Point B is a green color close to the G axis 302 with a pixel value (R, G, B) = (10, 120, 16). Point C is a color close to gray with a pixel value (R, G, B) = (120, 122, 120). Point D is a chromatic color close to white with a pixel value (R, G, B) = (224, 230, 224), a color that is visually perceived as light green.

[0032] The image processing unit 104 determines whether each point is within the range of the threshold for each region and decides whether to erase the color. Consider point A, for example. Point A is in the near-black region 321, so it is determined whether it is within the range of the near-black threshold 311. The pixel value of point A is (R, G, B) = (20, 32, 21), so it is within the range of the near-black threshold 311. Therefore, point A is determined to be a color whose color should not be erased, and is not converted to white.

[0033] Point C is another example of a point whose color will remain. Point C is included in the intermediate region 322, so it is determined whether it is within the range of the intermediate threshold 312. The intermediate threshold 312 is a range narrower than the near-black threshold 311. The pixel value of point C is (R, G, B) = (120, 122, 120), which is a color close to gray within the range of the intermediate threshold 312. Therefore, point C is determined to be a color whose color should not be erased, and is not converted to white. An example of image data having a pixel value like point C is characters written in pencil. In this embodiment, data with pixel values ​​near the gray axis retains its color, so image data of all gradations in a grayscale image can be left without being erased.

[0034] On the other hand, points B and D are determined to be points from which color should be erased in this process. The pixel value of point B is (R, G, B) = (10, 120, 16), which is a hue perceived as green. Because this pixel value is outside the range of the intermediate threshold 312, it is determined to be a pixel value from which color should be erased. As a result, the color is erased by the color conversion process. Furthermore, the pixel value of point D is (R, G, B) = (224, 234, 224), which is a color perceived as light green. In this case, because it is outside the range of the near-white threshold 313, it is determined to be a pixel value from which color should be erased. As a result, the color is erased by the color conversion process. In this way, it is possible to erase chromatic colors near white as well.

[0035] 4 is a flowchart showing image processing according to this embodiment. The program of this flowchart is stored in ROM 102, read by CPU 101, and executed by image processing unit 104. This flowchart shows a flow in which image data, which is a scanned image obtained by reading an original document, is decoded from JPEG, and then image processing unit 104 performs color conversion processing on RGB pixel values ​​for each pixel.

[0036] In step S401, CPU 101 issues a command to scanner control unit 110 to read an original. Scanner control unit 110 stores the read scanned image data in memory 112. In step S402, image processing unit 104 acquires the pixel value of each pixel from memory 112. In step S403, image processing unit 104 acquires the maximum value of the RGB pixel values ​​of the pixel of interest. For example, when the pixel value of the pixel of interest is point A in FIG. 3, the pixel value is (R, G, B) = (20, 32, 21), so G = 32 is the maximum value.

[0037] In steps S404 and S407, the image processing unit 104 determines which area the pixel is included in based on the acquired maximum value. Point A has a maximum value of 100 or less, so it is included in the near-black area 321. In step S405, the image processing unit 104 calculates the difference between the maximum and minimum pixel values ​​of the pixel. At point A, the maximum value is G=32 and the minimum value is R=20, so the difference is 12. In step S406, the image processing unit 104 compares the difference 12 calculated in step S405 with the threshold value 15, which is the near-black threshold 311. If the comparison shows that the difference is less than or equal to the threshold, in step S412, the image processing unit 104 calculates an average value from the pixel values ​​of the pixel and performs conversion.

[0038] On the other hand, if the difference is greater than the threshold, in step S413, the pixel value of the pixel is converted to a white pixel (R, G, B) = (255, 255, 255) to remove the color. The converted color is not limited to a white pixel (R, G, B) = (255, 255, 255) and may be a color that is invisible in the printed image. For example, the pixel may be converted to a pixel value that indicates a color that is virtually visible as white, such as a white pixel (R, G, B) = (254, 254, 254). Even if a color close to white is printed on the printing medium, if the user's visibility is low, it is equivalent to the color being erased. Alternatively, the color may be converted to the same color as the background color of the printing medium, as long as it is invisible to the user. Alternatively, the printer control unit 113 may predetermine colors that will not be printed and convert the color to that color. For example, if a white pixel (R, G, B) = (255, 255, 255) is predetermined as a color that will not be printed, the printer control unit 113 will not generate data to apply ink, and the color of that pixel will be removed. The colors that are predetermined not to be printed may be colors within a certain range from the white pixel (R, G, B) = (255, 255, 255). For example, if the certain range is defined as a pixel value of 5, colors within a range of a color difference of 5 away from the white pixel (R, G, B) = (255, 255, 255) in the RGB color space will be removed.

[0039] For point A, the difference between the maximum and minimum values ​​is equal to or less than the threshold, so in step S412, the RGB values ​​are converted to average values ​​(gray conversion). The processing for one pixel is from step S402 to step S414, and when processing is complete, the process returns from step S414 to step S402 to process the next pixel. Steps S405, S408, and S410 are the same processing. Furthermore, steps S406, S409, and S411 are the same comparison processing, except that the thresholds used for comparison are different.

[0040] Here, in steps S405, S408, and S410, the difference calculated by the image processing unit 104 may be the difference between the average pixel value and the pixel value of each RGB pixel. For example, at point A in Fig. 3, the average value is "24", and the difference "8" between the average value "24" and G=32 is calculated.

[0041] In this embodiment, an example of processing brightness values ​​has been shown, but it is also possible to process not only brightness values ​​but also saturation values. However, if a saturation threshold is set, it is necessary to calculate brightness and saturation for each pixel value of the scanned image, and the processing time may increase if the number of pixels to be processed increases. Processing only brightness values ​​allows for faster processing.

[0042] In addition, in this embodiment, pixel values ​​in the RGB color space are used, and the maximum value of the RGB values ​​is obtained as the luminance, but this is not limited to this. For example, the HSL color space, the Lab color space, or the CMYK color space that indicates the color gamut of printing using ink or toner may also be used. In this case, the method of calculating the luminance may be changed depending on the color space. For example, in the HSL color space, it is preferable to use the L value as the luminance. Furthermore, a known conversion formula may be used as a method of calculating the luminance value from the RGB value. A configuration may also be used in which the threshold value is determined using RGB pixel values ​​without going through the process of obtaining the luminance value. For example, a configuration may also be used in which the threshold value is determined using any of the RGB values.

[0043] In addition, although the present embodiment has been described as having three levels of thresholds depending on the luminance, it is also possible to have more thresholds.It is also possible to have a form in which predetermined thresholds depending on the luminance are provided in a table.

[0044] As described above, it is possible to remove visible chromatic colors, including light chromatic colors, while leaving black and gray characters close to the gray axis. Also, by processing only brightness values, it is possible to reduce the processing speed for scanned images. [Explanation of symbols]

[0045] 101 CPU 102 ROM 103 RAM 104 Image processing section 105 memory

Claims

1. a determining means for determining whether or not to convert the value of a pixel of interest in image data to a predetermined value based on the value of the pixel of interest and a threshold value determined according to the pixel of interest; a conversion means for converting the value of the pixel of interest when the result of the determination indicates that the value of the pixel of interest should be converted to the predetermined value; An image processing device comprising:

2. the determining means obtains the luminance of each pixel based on the value of each pixel of the image data; 2. The image processing apparatus according to claim 1, wherein the threshold value is determined based on the luminance of the pixel of interest.

3. 3. The image processing device according to claim 2, wherein the threshold is set to a first threshold when the luminance of the target pixel is a first value, and is set to a second threshold smaller than the first threshold when the luminance of the target pixel is a second value larger than the first value.

4. The value of each pixel of the image data is made up of multiple components.

3. The image processing device according to claim 2, wherein the determining means performs the determination by comparing a difference between a maximum value and a minimum value of a plurality of components of the target pixel with a threshold determined according to the luminance of the target pixel.

5. The value of each pixel of the image data is made up of multiple components.

3. The image processing apparatus according to claim 2, wherein the determining means acquires the maximum value of a plurality of components of the target pixel as the luminance of the target pixel.

6. 2. The image processing apparatus according to claim 1, wherein the value of each pixel of the image data is made up of a plurality of RGB components.

7. 2. The image processing apparatus according to claim 1, wherein the predetermined value corresponds to the color of the recording medium.

8. 2. The image processing device according to claim 1, wherein the predetermined value is a value indicating white or a value indicating a color with low visibility.

9. 7. The image processing apparatus according to claim 6, wherein the predetermined values ​​are (R, G, B) = (255, 255, 255) or a value substantially close thereto.

10. 4. The image processing apparatus according to claim 3, wherein the threshold value is set to a third threshold value smaller than the second threshold value when the luminance of the target pixel is a third value larger than the second value.

11. 2. The image processing apparatus according to claim 1, wherein said conversion means outputs the value of said target pixel as is when the result of said determination is that the value of said target pixel should not be converted to said predetermined value.

12. 2. The image processing apparatus according to claim 1, wherein the image data is image data obtained by scanning an original.

13. 2. The image processing apparatus according to claim 1, further comprising an input unit for receiving an input as to whether or not the conversion by the conversion unit is to be performed.

14. a step of determining whether or not to convert the value of a pixel of interest in image data to a predetermined value based on the value of the pixel of interest and a threshold value determined according to the pixel of interest; converting the value of the pixel of interest to the predetermined value when the result of the determination is that the value of the pixel of interest is converted to the predetermined value; An image processing method comprising:

15. The brightness of each pixel is obtained based on the value of each pixel of the image data; 15. The image processing method according to claim 14, wherein the threshold value is determined based on the luminance of the pixel of interest.

16. 16. The image processing method according to claim 15, wherein the threshold is set to a first threshold when the luminance of the target pixel is a first value, and is set to a second threshold smaller than the first threshold when the luminance of the target pixel is a second value larger than the first value.

17. The value of each pixel of the image data is made up of multiple components.

16. The image processing method according to claim 15, wherein the determination is made by comparing the difference between the maximum and minimum values ​​of the plurality of components of the target pixel with a threshold determined according to the luminance of the target pixel.

18. The value of each pixel of the image data is made up of multiple components.

16. The image processing method according to claim 15, wherein a maximum value among a plurality of components of the target pixel is acquired as the luminance of the target pixel.

19. 15. The image processing method according to claim 14, wherein the value of each pixel of the image data is made up of a plurality of RGB components.

20. A program for executing each step of the image processing method according to claim 14.

Citation Information

Patent Citations

  • Image processor and optical character reader

    JP1998051655A