Image processing device, image processing method, and program
The image processing apparatus adjusts color space to make background regions achromatic, addressing color distortion issues in existing technologies by maintaining the original hue and saturation of non-background areas during background color removal.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- SHARP KK
- Filing Date
- 2024-11-20
- Publication Date
- 2026-06-01
AI Technical Summary
Existing image processing technologies risk distorting the color of patterned areas when removing background colors, especially when the background saturation is close to the saturation of the patterned areas.
An image processing apparatus and method that adjusts the color space of image data to make the background region achromatic and then removes the background color, using gamma processing to maintain the original hue and saturation of non-background areas.
Effectively removes background color while preserving the hue, brightness, and saturation of non-background areas, resulting in a high-quality image with minimal color distortion.
Smart Images

Figure 2026089153000001_ABST
Abstract
Description
[Technical Field]
[0001] This disclosure relates to an image processing apparatus, an image processing method, and a program. [Background technology]
[0002] Patent Document 1 discloses a technique in which, if the saturation of the color in the background area is above a predetermined threshold, the color in the background area is not removed, and if the saturation of the color in the background area is below a predetermined threshold, the color in the background area is removed. [Prior art documents] [Patent Documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2009-005068 [Overview of the project] [Problems that the invention aims to solve]
[0004] In the technology disclosed in Patent Document 1, when removing the color from the background area, there is a risk that the color of the patterned area, which is close to the saturation of the background, may be distorted. Therefore, one aspect of this disclosure aims to provide an image processing apparatus, an image processing method, and a program that can provide a good image in which the color from the background area has been removed. [Means for solving the problem]
[0005] An image processing apparatus according to one embodiment of the present disclosure includes an image acquisition unit that acquires image data obtained by reading an image reading device, and a control unit that, when the color of the background region included in the image data is chromatic, performs an adjustment of the color space of the image data so that the color of the background region becomes achromatic, and performs the removal of the color of the background region included in the adjusted image data.
[0006] An image processing method according to one embodiment of the present disclosure includes the steps of: acquiring image data obtained by reading with an image reading device; adjusting the color space of the image data so that the color of the background region included in the image data becomes achromatic if the background region is chromatic; and removing the color of the background region included in the adjusted image data.
[0007] A program according to one embodiment of the present disclosure causes a computer to perform the following functions: acquire image data obtained by reading an image reading device; adjust the color space of the image data so that the color of the background region included in the image data becomes achromatic if the background region is chromatic; and remove the color of the background region included in the adjusted image data. [Brief explanation of the drawing]
[0008] [Figure 1] This is a block diagram showing an example of the configuration of an image processing device. [Figure 2] This is a block diagram showing an example of the functional configuration of the control unit. [Figure 3A] This is a diagram illustrating the first comparative example of this embodiment. [Figure 3B] This is a diagram illustrating the first comparative example of this embodiment. [Figure 3C] This is a diagram illustrating the first comparative example of this embodiment. [Figure 4] This is a flowchart illustrating an example of the operation of the image processing apparatus according to the first embodiment. [Figure 5] Figure 4 shows a flowchart illustrating an example of the operation of the image processing apparatus according to the first embodiment. [Figure 6] Figure 4 shows a flowchart illustrating an example of the operation of the image processing apparatus according to the first embodiment. [Figure 7A] This graph shows an example of the adjustment characteristics of color space adjustment using gamma processing. [Figure 7B] This graph shows an example of the adjustment characteristics of color space adjustment using gamma processing. [Figure 7C] It is a graph showing an example of adjustment characteristics by γ processing in color space adjustment. [Figure 8] It is a graph showing an example of correction values in color removal of the base area. [Figure 9] It is a diagram for explaining an image formed by the image processing apparatus according to the first embodiment.
Embodiment for Carrying Out the Invention
[0009] (First Embodiment) Referring to FIGS. 1 to 9, the first embodiment will be described. Regarding the drawings, the same or similar elements are denoted by the same reference numerals, and duplicate explanations are omitted.
[0010] FIG. 1 is a block diagram showing an example of the configuration of an image processing apparatus 100. The image processing apparatus 100 includes a storage unit 101, an operation unit 102, a display unit 103, an image acquisition unit 104, and a control unit 105.
[0011] The storage unit 101 is a recording medium capable of recording various data, programs, etc. The storage unit 101 is constituted by, for example, one or more HDDs (Hard Disk Drives), one or more SSDs (Solid State Drives), one or more semiconductor memories, etc.
[0012] The operation unit 102 receives operations by the user. For example, the operation unit 102 receives an operation for selecting a function mounted on the image processing apparatus 100. The operation unit 102 is constituted by a touch panel or the like.
[0013] The display unit 103 displays information presented to the user. For example, the display unit 103 is constituted by a liquid crystal panel, an organic EL (Electro-Luminescence) panel, etc.
[0014] The image acquisition unit 104 acquires image data. Specifically, the image acquisition unit 104 acquires image data that represents the image data obtained by reading the image reading device.
[0015] The control unit 105 controls the entire image processing device 100. The control unit 105 realizes various functions by reading and executing various programs stored in the memory unit 101. The control unit 105 may be realized by one or more control devices / arithmetic units (CPU (Central Processing Unit), SoC (System on a Chip)), one or more RAMs (Random Access Memory), one or more ROMs (Random Access Memory), various interface circuits, etc. Furthermore, some or all of the processing units included in the control unit 105 may be composed of electronic circuits.
[0016] If the background region in the image data is chromatic, the control unit 105 adjusts the color space of the image data to make the background region achromatic, and then removes the color of the background region in the adjusted image data.
[0017] Figure 2 is a block diagram showing an example of the functional configuration of the control unit 105. The control unit 105 comprises a background color identification unit 201, a background color adjustment unit 202, and a background color removal unit 203. The control unit 105 realizes the background color identification unit 201, the background color adjustment unit 202, and the background color removal unit 203 by executing processing according to the program and data stored in the storage unit 101. In the following description, for each pixel included in the image data, the pixel value of color component R, the pixel value of color component G, and the pixel value of color component B will be denoted as Rin, Gin, and Bin.
[0018] The background color identification unit 201 identifies the color of the background region of the image data and calculates the representative pixel value of the background region. Specifically, the background color identification unit 201 identifies the pixel values of multiple pixels included in the background region of the image data. The background color identification unit 201 then calculates a representative value of the pixel values of the multiple pixels included in the background region as the representative pixel value. In the following explanation, the representative pixel values of the multiple pixels included in the background region will be referred to as pixel value Rbase, pixel value Gbase, and pixel value Bbase, respectively, for the pixel values of color component R, color component G, and color component B.
[0019] The base color adjustment unit 202 performs color space adjustment of the density around the base. The base color adjustment unit 202 extracts the maximum pixel value and the color component of the color component Bbase, which are the pixel values of the color component R, which constitute the representative pixel value of multiple pixels included in the base region, and the color component of the maximum pixel value. It then performs adjustment including a γ process to match the extracted maximum pixel value with the pixel values of the color components other than the color component of the extracted maximum pixel value. When the pixel values of the color component R, the color component G, and the color component B that constitute the pixel match, the color of the pixel becomes achromatic. In the following description, for each pixel whose color space has been adjusted, the pixel values of color component R, color component G, and color component B will be denoted as pixel value Rout1, pixel value Gout1, and pixel value Bout1, respectively.
[0020] The background color removal unit 203 performs color removal of the background region. Color removal of the background region involves correcting the pixel values of color component R, color component G, and color component B included in the background region from the pixel values (Rout1, Gout1, Bout1) of multiple pixels that have been color space adjusted, to the upper limit pixel value MaxPix. The upper limit pixel value MaxPix is 255 when the number of gradations of the pixel value is 8 bits. In other words, when the number of gradations of the pixel value is 256, the upper limit pixel value MaxPix is 255. In this disclosure, the case where the number of gradations of the pixel value is 256 is used as an example, but this does not mean that the number of gradations of the pixel value is limited to 256. In other words, the background color removal unit 203 corrects the pixel values (Rout1, Gout1, Bout1) of the pixels included in the color space adjusted image data so that the background region that has been color space adjusted becomes white. In the following explanation, for each pixel in the image data from which the background color has been removed, the pixel values of color component R, color component G, and color component B will be denoted as pixel value Rout2, pixel value Gout2, and pixel value Bout2, respectively.
[0021] Figures 3A to 3C are diagrams illustrating a first comparative example of this embodiment, and are graphs showing an example of correction characteristics in removing color from the background area. Figure 3A shows the correction characteristics of color component R, with the pixel value Rin of the color component R of the image data plotted on the horizontal axis and the pixel value Rout1 of the color component R after background removal on the vertical axis. Figure 3B shows the correction characteristics of color component G, with the pixel value Gin of the color component G of the image data plotted on the horizontal axis and the pixel value Gout1 of the color component G after background removal on the vertical axis. Figure 3C shows the correction characteristics of B, with the pixel value Bin of the color component B of the image data plotted on the horizontal axis and the pixel value Bout1 of the color component B after background removal on the vertical axis. In the correction characteristics of color component R shown in Figure 3A, the pixel value Rbase of color component R is corrected to 255 for the representative pixel value of multiple pixels included in the background area. In the correction characteristics of color component G shown in Figure 3B, the pixel value Gbase of color component G is corrected to 255 for the representative pixel value of the background area. In the color component B correction characteristics shown in Figure 3C, the representative pixel value of color component B, Bbase, is corrected to 255 for the background region.
[0022] When the color of the base area is removed by γ processing based on the correction characteristics illustrated in Figures 3A to 3C, the color space is also adjusted in areas other than the base area that have relatively high density, and the saturation changes. As a result, the saturation increases in areas other than the base area, and a change in color occurs.
[0023] Next, the operation of the image processing apparatus 100 according to this embodiment will be described with reference to Figures 4 to 6.
[0024] Figure 4 is a flowchart showing an example of the operation of the image processing device 100 according to this embodiment.
[0025] In step S401, the image acquisition unit 104 acquires image data.
[0026] In step S402, the background color identification unit 201 identifies the background region included in the image data. Specifically, the background color identification unit 201 identifies the pixel values of pixels included in the background region included in the image data. For example, the background color identification unit 201 generates a histogram of the pixel values of multiple pixels included in the image data. The background color identification unit 201 then determines that the pixel values of pixels whose frequencies shown in the generated histogram are above a threshold are the pixel values of pixels included in the background region.
[0027] In step S403, the background color identification unit 201 calculates a representative pixel value for the background region. Specifically, the background color identification unit 201 calculates a representative value for the pixel values of multiple pixels included in the background region identified in step S402. For example, the representative value for the pixel values of multiple pixels included in the background region is represented by the average value of the pixel values of multiple pixels included in the background region. In this case, the average value of the pixel values of multiple pixels included in the background region is represented by a set of the average values of the pixel values of color component R, the average values of the pixel values of color component G, and the average values of the pixel values of color component B for multiple pixels included in the background region.
[0028] In step S404, the background color identification unit 201 identifies the maximum background RGB pixel value and the minimum background RGB pixel value from among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the background region. The maximum background RGB pixel value is the maximum value among the pixel values Rbase, Gbase, and Bbase. The minimum background RGB pixel value is the minimum value among the pixel values Rbase, Gbase, and Bbase.
[0029] In step S405, the background color identification unit 201 determines whether the difference between the maximum background RGB pixel value and the minimum background RGB pixel value exceeds a threshold.
[0030] If, in step S405, it is determined that the difference between the maximum background RGB pixel value and the minimum background RGB pixel value exceeds a threshold, the control unit 105 proceeds to step S501, as illustrated in Figure 5. On the other hand, if, in step S405, it is determined that the difference between the maximum background RGB pixel value and the minimum background RGB pixel value is less than or equal to the threshold, the control unit 105 proceeds to step S601, as illustrated in Figure 6.
[0031] Figure 5 is a flowchart showing an example of the operation of the image processing device 100 following Figure 4.
[0032] In step S405, illustrated in Figure 4, if the difference between the maximum background RGB pixel value and the minimum background RGB pixel value is determined to exceed a threshold, that is, if the background region is chromatic, then in step S501, the background color adjustment unit 202 determines adjustment characteristics for each of the color components R, G, and B so that the pixel values of the color component R, G, and B that constitute the background region included in the image data match the maximum background RGB pixel value. In the γ processing, the background color adjustment unit 202 adjusts the pixel values of the influencing pixels that constitute the image region affected by the background color from the background region within the adjustment range, and determines the adjustment characteristics so as not to adjust the pixel values of pixels other than the influencing pixels. The adjustment range is determined according to the difference between the pixel values of the color component R, G, and B of the pixels included in the background region and the maximum pixel value among the pixel values of the color component R, G, and B of the pixels included in the background region.
[0033] In step S502, the background color adjustment unit 202 adjusts the color space of the image data for each of the R, G, and B components that make up each pixel of the image data, according to the adjustment characteristics determined in step S501.
[0034] When the control unit 105 executes the processes from steps S405 to S502 illustrated in Figure 4, the control unit 105 performs color space adjustments to make the background region color achromatic if the background region color included in the image data is chromatic, or if the difference between the maximum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the background region color and the minimum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value exceeds a threshold, the control unit 105 performs color space adjustments to make the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the background region match the maximum background RGB pixel value, thereby making the background region color achromatic.
[0035] In step S503, the background color removal unit 203 calculates the minimum RGB pixel value for each pixel included in the image data whose color space has been adjusted. This minimum RGB pixel value is the smallest of the pixel values Rout1, Gout1, and Bout1.
[0036] In step S504, the background color removal unit 203 calculates a background removal coefficient for each pixel included in the color space adjusted image data, corresponding to the minimum RGB pixel value calculated in step S503. Here, the background color removal unit 203 sets the background removal coefficient for pixels included in the color space adjusted background region to a value that makes the pixels included in the color space adjusted background region white, according to the minimum pixel value among the pixel values of color component R, color component G, and color component B. Furthermore, the background color removal unit 203 determines a background color removal coefficient for pixels included in the color space adjusted general image region, according to the minimum pixel value among the pixel values of color component R, color component G, and color component B, so that the pixel values of color component R, color component G, and color component B do not change before and after the removal of color from the background region.
[0037] In step S505, the background color removal unit 203 removes the background color from the image data in the color space by applying the background removal coefficient calculated in step S504 to the pixel value of each pixel included in the color space adjusted image data. In other words, the background color removal unit 203 calculates the pixel value of each pixel using a background removal coefficient corresponding to the minimum pixel value among the pixel values of color component R, color component G, and color component B of the pixel included in the color space adjusted image data. Specifically, the background color removal unit 203 corrects the color space adjusted image data by applying the background removal coefficient calculated in step S504 to the pixel value of each pixel using equations 1 to 3. As a result, the background color removal unit 203 removes the background color from the image data in the color space adjusted image data.
number
number
number
[0038] Based on the above, the control unit 105 executes the processes in steps S501 to S505, and if the color of the background region included in the image data is chromatic, and the difference between the maximum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the background region color and the minimum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value exceeds a threshold, it performs color space adjustment of the image data and removes the color of the background region included in the adjusted image data.
[0039] In step S506, the control unit 105 performs a process to output image data from which the color of the background area has been removed. For example, by performing a process to output image data from which the color of the background area has been removed, the control unit 105 transmits image data from which the color of the background area has been removed to an image forming apparatus (not shown) different from the image processing apparatus 100. The image forming apparatus applies colorant to the paper and forms an image on the paper indicated by the image data transmitted from the image processing apparatus 100. For example, the image forming apparatus can be a laser printer using an electrophotographic method or an inkjet printer using an inkjet method.
[0040] Alternatively, instead of executing the process in step S506, the control unit 105 may execute a process to store the image data from which the background color has been removed in the storage unit 101.
[0041] Figure 6 is a flowchart showing an example of the operation of the image processing device 100 following Figure 4.
[0042] In step S405, illustrated in Figure 4, if it is determined that the difference between the maximum background RGB pixel value and the minimum background RGB pixel value is less than or equal to a threshold, in step S601, the background color removal unit 203 calculates the minimum RGB pixel value for each pixel included in the image data. This minimum RGB pixel value is the smallest of the pixel values Rin, Gin, and Bin.
[0043] In step S602, the background color removal unit 203 calculates a background removal coefficient for each pixel included in the image data that corresponds to the minimum RGB pixel value calculated in step S601.
[0044] In step S603, the background color removal unit 203 removes the background color from the image data by applying the background removal coefficient calculated in step S602 to the pixel value of each pixel in the image data. In step S604, the background color removal unit 203 outputs image data from which the background color has been removed. The processes in steps S601 to S604 are the same as the processes in steps S503 to S506 illustrated in Figure 5, so a detailed explanation is omitted.
[0045] Based on the above, the control unit 105 executes the processes in steps S601 to S604, and if the color of the background region included in the image data is achromatic, and the difference between the maximum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the background region color and the minimum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value is less than or equal to a threshold, it does not perform color space adjustment of the image data and performs removal of the background region color.
[0046] The adjustment characteristics in color space adjustment will be explained with reference to Figures 7A to 7C. Figures 7A to 7C are graphs showing examples of adjustment characteristics by gamma processing in color space adjustment. Figure 7A shows the adjustment characteristics of color component R, with the pixel value Rin of the color component R of the image data on the horizontal axis and the pixel value Rout1 of the color component R after color space adjustment on the vertical axis. Figure 7B shows the adjustment characteristics of color component G, with the pixel value Gin of the color component G of the image data on the horizontal axis and the pixel value Gout1 of the color component G after color space adjustment on the vertical axis. Figure 7C shows the adjustment characteristics of color component B, with the pixel value Bin of the color component B of the image data on the horizontal axis and the pixel value Bout1 of the color component B after color space adjustment on the vertical axis. The graphs illustrated in Figures 7A to 7C illustrate that when the pixel value Rbase of the color component R for a representative pixel value of multiple pixels included in the background area is larger than the pixel value Gbase of the color component G or the pixel value Bbase of the color component B, that is, when Rbase is the maximum RGB pixel value of the background, in Figure 7A, the pixel value Rbase of the color component R of the representative pixel value included in the background area does not need to be corrected, and therefore the pixel value Rin of the color component R in the image data becomes Rout1 without correction.
[0047] The background color adjustment unit 202 outputs the pixel value Rin of the color component R of the image data as Rout1 without correcting it.
[0048] Next, in Figure 7B, the pixel value Gbase of the color component G of the representative pixel value included in the background area is corrected to become the background's maximum RGB pixel value, Rbase. Second threshold TH2 G This is calculated using Equation 4, where α is an arbitrary constant, and here it is set to 1. First threshold TH1 G (TH2 G ,TH2 G When connecting the two points (Gbase, Rbase), the value of Gin is defined as the value of Gin such that Gout1 is 255.
number
[0049] The background color adjustment unit 202 adjusts the pixel value Gin of the color component G included in the image data to the first threshold TH1 GIf it is larger, correct Gin to 255. Next, when the pixel value of the color component G included in the image data is greater than the second threshold value TH2 G and less than or equal to the first threshold value TH1 G correct the pixel value Gin of the color component G by Equation 5 to increase it. Subsequently, when the pixel value Gin of the color component G included in the image data is less than or equal to the second threshold value TH2 G no correction of the pixel value Gin is performed.
Equation
[0050] Similarly, in FIG. 7C, correct the pixel value Bbase of the color component B of the representative pixel value included in the base region so that it becomes the base maximum RGB pixel value, Rbase. The second threshold value TH2 B is calculated by Equation 6, where α is an arbitrary constant, which is 1 here. The first threshold value TH1 B is, in FIG. 7C, the value of Bin when Bout1 becomes 255 when connecting the two points of (TH2 B , TH2 B ) and (Bbase, Rbase).
Equation
[0051] When the pixel value Bin of the color component B included in the image data is greater than the first threshold value TH1 B the base tone adjustment unit 202 corrects Bin to 255. Next, when the pixel value of the color component B included in the image data is greater than the second threshold value TH2 B and less than or equal to the first threshold value TH1 B the base tone adjustment unit 202 corrects the pixel value Bin of the color component B by Equation 7 to increase it. Subsequently, when the pixel value Bin of the color component G included in the image data is less than or equal to the second threshold value TH2 B no correction of the pixel value Bin is performed.
Equation
[0052] For example, the arbitrary constant α used to calculate the second threshold may be specified by the user. In other words, the user can change the adjustment range. For example, the control unit 105 calculates the second threshold TH2 based on the α specified by the user. G and TH2 B The first threshold TH1 is calculated accordingly. G and TH1 B This determines the result. As a result, increasing α reduces the influence of the background color, while decreasing α leaves the influence of the background color in the image.
[0053] Figure 8 is a graph showing an example of the background removal coefficient in removing color from the background area. In Figure 8, the horizontal axis represents the minimum pixel value Min(R, G, B) for the pixel values of color components R, G, and B that constitute the pixel, and the vertical axis represents the background removal coefficient. The second threshold THMin2 is the minimum RGB pixel value of the background among the representative pixel values Rbase, Gbase, and Bbase included in the background area, and the first threshold THMin1 is calculated using Equation 8. β is an arbitrary constant, and here it is set to 30. Note that β may be specified by the user. In other words, the user may be able to change the section affected in the removal of color from the background area.
number
[0054] The base layer removal coefficient γ is created according to the minimum RGB pixel value of the base layer after base layer color adjustment by the base layer color adjustment unit 202. As shown in Equation 8, β may be an arbitrary constant, or 256 steps of the γ curve may be stored in memory in advance, corresponding to all minimum RGB pixel values of the base layer from 255 to 0.
[0055] For example, the background color removal unit 203, for each pixel included in the color space-adjusted image data, sets the background removal coefficient to 0 if the minimum RGB pixel value Min(R, G, B) is greater than or equal to the threshold THMin2 exemplified in Figure 8, and calculates the upper limit pixel value MaxPix using equations 1 to 3, with the pixel value Rout2 for color component R, the pixel value Gout2 for color component G, and the pixel value Bout2 for color component B being the upper limit pixel value MaxPix.
[0056] For example, if the minimum RGB pixel value is greater than threshold THMin1 and less than threshold THMin2 as illustrated in Figure 8, the background color removal unit 203 uses a background removal coefficient such that 0 < background removal coefficient < upper limit pixel value MaxPix, as shown by the graph illustrated in Figure 8, and calculates pixel values Rout2, Gout2, and Bout2 using equations 1 to 3. In other words, if the minimum RGB pixel value is greater than threshold THMin1 and less than threshold THMin2, the background color removal unit 203 corrects the pixel values Rout2, Gout2, and Bout2 so that they do not change significantly from pixel values Rout1, Gout1, and Bout1 as the minimum RGB pixel value decreases. Furthermore, if the minimum RGB pixel value is greater than threshold THMin1 and less than threshold THMin2, the pixel values for color component R, color component G, and color component B are calculated using the same background removal coefficient with equations 1 to 3, so the hue does not change even if the density becomes lighter.
[0057] For example, in the background color removal unit 203, if the minimum RGB pixel value is less than or equal to the threshold THMin1, the background removal coefficient = MaxPix, and according to equations 1 to 3, the pixel values Rout2, Gout2, and Bout2 are made to match the pixel values Rout1, Gout1, and Bout1.
[0058] Figure 9 is a diagram illustrating the image formed by the image processing apparatus 100 according to this embodiment.
[0059] The representative pixel values of multiple pixels included in the background region 902 are (Rbase, Gbase, Bbase) = (235, 230, 205). In this case, the background color adjustment unit 202 can make the pixel values of color component R, color component G, and color component B match by increasing the representative pixel value of color component G by 5 and the representative pixel value of color component B by 30 for multiple pixels included in the background region 902. Therefore, the background color adjustment unit 202 determines the γ value so as to convert the pixel value of color component G included in the image data from 230 to 235 and the pixel value of color component B from 205 to 235.
[0060] As a result, the background color adjustment unit 202 corrects the pixel values of multiple pixels included in the background region 1002 to (Rout1, Gout1, Bout1) = (235, 235, 235). In other words, the background color adjustment unit 202 corrects the image 1001 so that the pixel values of color component R, color component G, and color component B in the background region 1002 match. In other words, the background color adjustment unit 202 corrects the chromatic background region 902 to become achromatic. As a result, in the background region 1002, the bias in brightness and saturation of color components R, G, and B is removed compared to the background region 902 before γ processing.
[0061] The pixel values of multiple pixels contained in region 903 are (Rin, Gin, Bin) = (235, 26, 31). In other words, the pixel values of the color component G contained in region 903 are the second threshold TH2 G Since it is 225 or less, the control unit 105 corrects so as not to change the pixel value of color component G included in region 903. Also, the pixel value of color component B included in region 903 is the second threshold TH2 B Since it is 175 or less, the control unit 105 corrects the pixel value of the color component G included in region 903 so as not to change.
[0062] Region 1003 is a region whose color space has been adjusted by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, relative to region 903. The background color adjustment unit 202 corrects so as not to change the pixel values of color component G and color component B included in region 903, so the pixel values of multiple pixels included in region 1003 are (Rout1, Gout1, Bout1) = (235, 26, 31). In other words, when the color space is adjusted by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, region 1003 has the same hue, lightness, and saturation as region 903.
[0063] The pixel values of multiple pixels contained in region 904 are (Rin, Gin, Bin) = (235, 230, 100). The pixel value of color component G contained in region 904 is the second threshold TH2 G The first threshold TH1 is greater than 225. G Since it is less than or equal to 240, it is corrected to 235 according to Equation 5. The pixel value of color component B contained in region 904 is the second threshold TH2 B Since it is 175 or less, the control unit 105 corrects the pixel value of color component G included in region 904 only slightly, and corrects it so as not to change the pixel value of color component B.
[0064] Region 1004 is a region whose color space has been adjusted by γ processing based on the adjustment characteristics illustrated in Figure 11, relative to region 904. The background color adjustment unit 202 corrects the pixel values of color component G and color component B included in region 904 so as not to change them, so the pixel values of multiple pixels included in region 1004 are (Rout1, Gout1, Bout1) = (235, 235, 100). In other words, when the color space is adjusted by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, region 1004 and region 904 have almost the same hue, lightness, and saturation.
[0065] The pixel values of multiple pixels contained in region 905 are (Rin, Gin, Bin) = (205, 230, 205). The pixel value of the color component G contained in region 905 is the second threshold TH2 G The first threshold TH1 is greater than 225.G Since it is less than or equal to 240, it is corrected to 235 according to Equation 5. Also, the pixel value of color component B included in region 305 is also corrected to the second threshold TH2 B The first threshold TH1 is greater than 175. B Since it is less than or equal to 215, we correct it to 235 according to Equation 7.
[0066] Region 1005 is a region whose color space has been adjusted by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, relative to region 905. The base color adjustment unit 202 corrects the pixel values of color component B included in region 905 using equations 5 and 7, so the pixel values of the multiple pixels included in region 1005 are (Rout1, Gout1, Bout1) = (205, 235, 235). In other words, when the color space is adjusted by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, the pixel values of G and color component B among the pixel values (Rout1, Gout1, Bout1) of the pixels included in region 1005 change from the pixel values (Rin, Gin, Bin) of the pixels included in region 905, but the changes in hue, lightness, and saturation are smaller compared to the first comparative example illustrated in Figures 3A to 3C.
[0067] Image 1011, illustrated in Figure 9, is image data from which the color of the background region has been removed from Image 1001 using the background removal coefficient illustrated in Figure 8 and calculated using Equations 1 to 3. The second threshold THMin2, illustrated in Figure 8, is 235 because it is the smallest RGB pixel value of the background among the representative pixel values Rbase, Gbase, and Bbase included in the background region. Furthermore, the first threshold THMin1 is calculated using Equation 8, and if β is set to 30, it is 205.
[0068] The pixel values of multiple pixels included in the background region 1002 are (Rout1, Gout1, Bout1) = (235, 235, 235). Since the minimum RGB pixel value for the background region 1002 is 235, and is greater than or equal to the second threshold THMin2 of 235, the background color removal unit 203 sets the background removal coefficient to 0, and according to equations 1 to 3, the control unit 105 calculates the pixel values of multiple pixels included in the background region 1012 as (Rout2, Gout2, Bout2) = (255, 255, 255). In other words, in image 1011, the background region 1012 is white, and the background color has been removed.
[0069] Region 1013 is the region calculated using Equations 1 to 3 with respect to region 1003, using the background removal coefficient illustrated in Figure 8. The pixel values of multiple pixels included in region 1003 are (Rout1, Gout1, Bout1) = (235, 26, 31). For region 1003, the minimum RGB pixel value is 26, and if it is less than or equal to the threshold THMin1 of 205, the background color removal unit 203 sets the background removal coefficient = 255. Then, using Equations 1 to 3, the background color removal unit 203 matches the pixel values Rout2 of color component R, Gout2 of color component G, and Bout2 of color component B for region 1013 with the pixel values Rout1 of color component R, Gout1 of color component G, and Bout1 of color component B.
[0070] The base color removal unit 203 makes the pixel values Rout2, Gout2, and Bout2 of region 1013 match those of pixel values Rout1, Gout1, and Bout1. Therefore, the pixel values of multiple pixels included in region 1013 are (Rout2, Gout2, Bout2) = (235, 26, 31). In other words, when the color of the base region is removed using the base removal coefficient exemplified in Figure 8 and calculated using equations 1 to 3, region 1013 has the same hue, lightness, and saturation as region 903.
[0071] Region 1014 is the region calculated using Equations 1 to 3 with respect to region 1004 using the background removal coefficient illustrated in Figure 8. The pixel values of multiple pixels included in region 1004 are (Rout1, Gout1, Bout1) = (235, 235, 100). For region 1004, the minimum RGB pixel value is 100, and if it is less than or equal to the threshold THMin1 of 205, the background color removal section 203 sets the background removal coefficient = 255, and using Equations 1 to 3, the pixel values Rout2 for color component R, Gout2 for color component G, and Bout2 for color component B in region 1014 are made to match the pixel values Rout1 for color component R, Gout1 for color component G, and Bout1 for color component B.
[0072] The base color removal unit 203 makes the pixel values Rout2, Gout2, and Bout2 of region 1014 match those of pixel values Rout1, Gout1, and Bout1. Therefore, the pixel values of multiple pixels included in region 1014 are (Rout2, Gout2, Bout2) = (235, 235, 100). In other words, when the color of the base region is removed using the base removal coefficient exemplified in Figure 8 and calculated using equations 1 to 3, region 1014 has almost the same hue, lightness, and saturation as region 904.
[0073] Region 1015 is the region calculated using Equations 1 to 3 with respect to region 1005, using the background removal coefficient illustrated in Figure 8. The pixel values of multiple pixels included in region 1005 are (Rout1, Gout1, Bout1) = (205, 235, 235). For region 1005, the minimum RGB pixel value is 205, and if it is less than or equal to the threshold THMin1 of 205, the background color removal section 203 sets the background removal coefficient = 255, and according to Equations 1 to 3, for region 1015, the pixel values Rout2, Gout2, and Bout2 are made to match the pixel values Rout1, Gout1, and Bout1.
[0074] The pixel values of multiple pixels included in region 1015 are (Rout2, Gout2, Bout2) = (205, 235, 235). In other words, when the color of the background region is removed using the background removal coefficient exemplified in Figure 8 and calculated using equations 1 to 3, region 1015 has the same hue, lightness, and saturation as region 1005.
[0075] Therefore, when the image processing apparatus 100 according to this embodiment adjusts the color space to make the background region achromatic by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, it removes the bias in brightness and saturation between each color component R, color component G, and color component B in the background region without significantly changing the hue, brightness, and saturation in areas other than the background region. Then, after adjusting the color space to make the background region achromatic by γ processing based on the adjustment characteristics illustrated in Figures 7A to 7C, the image processing apparatus 100 according to this embodiment removes the color of the background region by calculating using equations 1 to 3 with the background removal coefficient illustrated in Figure 8. As a result, the image processing apparatus 100 according to this embodiment can remove the color of the background region without significantly changing the hue, brightness, and saturation in areas other than the background region. As a result, the image processing apparatus 100 according to this embodiment can provide a good image with the background region color removed while suppressing changes in color, increases in saturation, and the disappearance of light colors.
[0076] The processes performed in the above embodiments are not limited to the processing modes exemplified in each embodiment. The functional blocks described above may be implemented using either logic circuits (hardware) formed on an integrated circuit or software using a CPU. The processes performed in the above embodiments may be executed on multiple computers. For example, some of the processes performed by the control unit 105 may be executed on other computers, or all of the processes may be shared and executed on multiple computers.
[0077] Furthermore, each functional block or feature of the apparatus used in the embodiments described above may be implemented or executed by an electrical circuit, such as an integrated circuit or a combination of integrated circuits. An electrical circuit designed to perform the functions described herein may include a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or a combination thereof. The general-purpose processor may be a microprocessor, a conventional processor, controller, microcontroller, or state machine. The aforementioned electrical circuit may consist of digital circuits or analog circuits. Also, if advances in semiconductor technology lead to the emergence of integrated circuit technologies that replace current integrated circuits, one or more aspects of this disclosure may use new integrated circuits based on such technologies.
[0078] This disclosure is not limited to the embodiments described above, and may be replaced with configurations substantially identical to those shown in the embodiments, configurations that produce the same effects, or configurations that can achieve the same objectives. This disclosure also includes embodiments obtained by appropriately combining the technical means disclosed in different embodiments. Furthermore, new technical features can be formed by combining the technical means disclosed in each embodiment. [Explanation of symbols]
[0079] 100 Image processing device, 101 Storage unit, 102 Operation unit, 103 Display unit, 104 Image acquisition unit, 105 Control unit, 201 Background color identification unit, 202 Background color adjustment unit, 203 Background color removal unit, 901 Image, 902 Background area, 903 Area, 904 Area, 905 Area, 1001 Image, 1002 Background area, 1003 Area, 1004 Area, 1005 Area, 1011 Image, 1012 Background area, 1013 Area, 1014 Area, 1015 Area
Claims
1. An image acquisition unit that acquires image data obtained by reading with an image reading device, If the background region included in the image data is chromatic, the control unit performs an adjustment of the color space of the image data to make the background region achromatic, and removes the color of the background region included in the adjusted image data. An image processing device equipped with the following features.
2. The image processing apparatus according to claim 1, wherein the control unit extracts the maximum pixel value and the color component of the maximum pixel value from among the pixel values of color component R, color component G, and color component B that constitute the representative pixel values of a plurality of pixels included in the background region, and performs adjustments including a γ process to match the extracted maximum pixel value with the pixel values of the color components other than the color component of the maximum pixel value.
3. The image processing apparatus according to claim 1 or 2, wherein the control unit performs removal, which includes a process of calculating the pixel value of each pixel using a background removal coefficient corresponding to the minimum pixel value among the pixel values of color component R, color component G, and color component B of the pixel included in the adjusted image data.
4. The image processing apparatus according to claim 3, wherein the control unit performs removal, which includes setting a background removal coefficient corresponding to the minimum pixel value among the pixel values of color component R, color component G, and color component B for pixels included in the adjusted background region to a value that makes the pixels included in the adjusted background region white.
5. The image processing apparatus according to claim 4, wherein the control unit performs removal, which includes a process of setting a background removal coefficient corresponding to the minimum pixel value among the pixel values of color component R, color component G, and color component B, so that the pixel values of color component R, color component G, and color component B do not change before and after the removal for pixels included in the adjusted general image region.
6. The image processing apparatus according to claim 1 or 2, wherein the control unit performs the adjustment and performs the removal when the color of the background region included in the image data is chromatic, and the difference between the maximum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the color of the background region and the minimum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value exceeds a threshold.
7. The image processing apparatus according to claim 6, wherein the control unit, when the color of the background region is achromatic and the difference between the maximum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value of the color of the background region and the minimum pixel value among the pixel values of color component R, color component G, and color component B that constitute the representative pixel value is less than or equal to a threshold value, does not perform the adjustment and performs removal of the color of the background region.
8. In the γ processing, the control unit adjusts the pixel values of the influencing pixels that constitute the image region affected by the background color from the background region within the adjustment range, and does not adjust the pixel values of pixels other than the influencing pixels. The image processing apparatus according to claim 2, wherein the adjustment range is determined according to the difference between the pixel value of color component R, the pixel value of color component G, and the pixel value of color component B of the pixels included in the background region, and the maximum pixel value among the pixel values of color component R, color component G, and color component B of the pixels included in the background region.
9. The image processing apparatus according to claim 8, wherein the user can change the adjustment range.
10. The image processing apparatus according to claim 3, wherein the user can change the section affected in the removal of color in the background region.
11. A process of acquiring image data obtained by reading with an image reading device, If the background region included in the image data is chromatic, the process of adjusting the color space of the image data to make the background region achromatic is performed. A step of removing the color of the background region included in the adjusted image data, Image processing methods including [specific details omitted].
12. A function to acquire image data obtained by reading with an image reading device, If the background color included in the image data is chromatic, the image data has a function to adjust the color space so that the background color becomes achromatic. A function to remove the color of the background region included in the adjusted image data, A program that executes the command.