Image processing device, control method thereof, and program

The image processing apparatus maintains gradation differences between paper backgrounds and corrections by converting to Lab space, detecting paper-white areas, and using variance distribution and edge information to preserve correction mark visibility.

JP7790995B2Active Publication Date: 2025-12-23CANON KK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022014349
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-02-01
Publication Date
2025-12-23
Estimated Expiration
2042-02-01

AI Technical Summary

Technical Problem

Existing image processing methods for digitizing documents with low-density achromatic backgrounds and corrections made with white correction fluid result in the loss of gradation difference between the paper background and corrections, leading to invisible corrections in electronic documents, which fail to meet legal recognition criteria.

Method used

An image processing apparatus that converts the read image to Lab space, detects paper-white signal areas, generates variance distribution images, extracts correction trace candidates, and detects correction marks using edge information to maintain gradation differences.

Benefits of technology

Prevents the disappearance and deterioration of correction marks in electronic documents, ensuring they remain visible and meet legal recognition criteria.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007790995000002
    Figure 0007790995000002
  • Figure 0007790995000003
    Figure 0007790995000003
  • Figure 0007790995000004
    Figure 0007790995000004
Patent Text Reader

Abstract

To provide an image processing apparatus that prevents a loss and a reduction in visibility of a correction trace in an electronic document read in a dark reading mode and stored, a method for controlling the same, and a program.SOLUTION: An image processing apparatus executes image processing on a read image obtained by an image reading device reading a document in a dark reading mode in which the quantity of light is reduced compared to a normal reading mode, and the image processing apparatus comprises: conversion means that converts the read image from an RGB image to a Lab image; first detection means that detects a paper white signal area being an area of the document paper itself in the read image; extraction means that extracts correction trace candidate pixels based on a variance distribution image obtained by defining the variance of L values obtained by using L values of respective pixels of the entire pixels in a range of a predetermined number of pixels including a certain target pixel in the Lab image, as the variance of the target pixel, with the pixels in the Lab image sequentially as the target pixel, and the detected paper white signal area; creation means that creates an edge image having a boundary line between bright and dark in the Lab image; and second detection means that detects a correction trace based on the created edge image and the extracted correction trace candidate pixels.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

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

[0002] Devices that optically scan paper documents to generate digital documents include single-function scanners and scanners installed in copiers. In recent years, mobile devices and other devices have also become available as document scanners (hereinafter, these devices will be collectively referred to as "reading devices"). When a paper document with a low-density, achromatic (close to white) background (paper background) is digitized using a reading device, the background above a certain brightness is subjected to signal processing to turn it white, a process known as "background removal." This "background removal" process improves the appearance of the digital document by clarifying the contrast between the background and the text and eliminating the "roughness" of the background.

[0003] In recent years, advances in electronic document technology have led to changes in the legal system, which previously only recognized paper documents, such as tax-related forms, as "originals." However, electronic documents can now also be recognized as originals if certain conditions are met. One of the conditions for an electronic document to be recognized as an "original" is that when a manuscript containing redactions is converted into a digital document, the redactions are not lost (in other words, the visibility of the redactions is maintained).

[0004] However, the condition that information such as corrections will not be lost may not be met if the above-mentioned "background removal process" is performed. For example, corrections made with white correction fluid or the like are often whiter than the paper base of the paper document. Therefore, the "background removal process" that turns the paper base white also turns the corrections white. This eliminates the gradation difference between the paper base and the corrections. As a result, the corrections disappear from the electronic document, and the above-mentioned condition is no longer met.

[0005] Therefore, when reading a paper document, the amount of light irradiated is reduced and the paper document is read in a darker state (hereinafter, this reading method will be referred to as "dark reading"). This prevents correction marks and the like from turning white even when the above-mentioned "background removal process" is performed, and by maintaining the gradation difference between the paper background and the correction marks, a technology has been disclosed that prevents the disappearance of the correction marks (in other words, maintains their visibility) (see Patent Document 1).

[0006] On the other hand, apart from the "background removal process," there are cases where corrections disappear (in other words, visibility is reduced). This is a reduction in the read gradation when the original is read. When the read gradation is reduced, the gradation of the electronic document is also reduced. As a result, the difference in gradation between the paper background and the corrections in the electronic document becomes smaller. When the difference in gradation between the paper background and the corrections becomes small enough, the corrections become invisible on the electronic document, and the electronic document no longer meets the conditions for being recognized as an original. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] Japanese Patent Application Laid-Open No. 2006-295307 Summary of the Invention [Problem to be solved by the invention]

[0008] The above-mentioned "dark reading" is prone to a decrease in the gradation of the electronic document due to the low amount of light used during reading. Therefore, by performing "dark reading" as disclosed in Patent Document 1, the disappearance of correction marks due to the "background removal process" can be suppressed. On the other hand, there is a possibility that the disappearance of correction marks and the decrease in visibility due to the decrease in gradation may occur.

[0009] An object of the present invention is to provide a mechanism for preventing the disappearance and deterioration of visibility of corrections in an electronic document that has been stored in the dark. [Means for solving the problem]

[0010] In order to achieve the above object, the present invention provides an image processing apparatus that performs image processing on a read image obtained by reading an original document in a dark reading mode in which an image reading device reduces the amount of light compared to normal, the image processing apparatus comprising: a conversion means for converting the read image from an RGB image to an Lab image; a first detecting means for detecting a paper white signal area, which is an area of ​​the document paper itself in the read image; an extraction means for extracting pixels of correction trace candidates based on a variance distribution image obtained by sequentially using each pixel of the Lab image as a target pixel and the detected paper-white signal area, the variance value of the L values ​​being calculated using the L values ​​of all pixels in a range of a predetermined number of pixels including a certain target pixel in the Lab image, and the variance value of the target pixel; a generation means for generating an edge image having a light-dark boundary line in the Lab image; and a second detection means for detecting correction marks based on the generated edge image and the extracted pixels of the correction mark candidates. [Effects of the Invention]

[0011] According to the present invention, it is possible to prevent the disappearance and deterioration of visibility of corrections in an electronic document that has been saved in a dark environment. [Brief explanation of the drawings]

[0012] [Figure 1] FIG. 1 is a configuration diagram of an image processing device. [Figure 2] 10 is a flowchart showing correction mark detection processing according to the first embodiment. [Figure 3] 10 is a flowchart showing correction mark correction processing according to the first embodiment. [Figure 4] FIG. 10 is an explanatory diagram of an example of an operation panel related to scan settings. [Figure 5] FIG. 10 is an explanatory diagram of a histogram when calculating a paper-white signal region. [Figure 6] FIG. 10 is an explanatory diagram of a color conversion table. [Figure 7] 10 is a flowchart showing correction mark edge correction processing according to the second embodiment. [Figure 8] FIG. 4 is an explanatory diagram of an example of detecting an enclosing edge according to the first embodiment. [Figure 9] FIG. 4 is an explanatory diagram of an example of inside / outside determination in the first embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0013] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. However, the configurations described in the following embodiments are merely examples, and the scope of the present invention is not limited to the configurations described in the embodiments. First, a first embodiment of the present invention will be described.

[0014] First Embodiment The processing described in the first embodiment is widely applicable to devices equipped with image reading devices, such as scanners, copiers, laser printers, and inkjet printers. In the first embodiment, an MFP (Multifunction Peripheral), a multifunction device equipped with scanning, printing, copying, and faxing functions, is used as an example. In the following embodiments, colors corresponding to each color space held by image data are represented by letters such as "R," "G," and "B," or "L," "a," and "b." For example, "R" indicates the red component in the RGB color space. A "relative color space" based on the color reproduction range of a device, such as a printer engine or scanner unit (described later), is referred to as a "device-dependent color space." Conversely, an "absolute color space" defined as a standard, such as "CIE L*a*b*," established by the CIE, is referred to as a "device-independent color space."

[0015] Furthermore, "image data" refers to two-dimensional data with multiple planes, each with a plane for each color. For example, image data in an "RGB color space" refers to layered data with three two-dimensional planes, one for each of "R," "G," and "B." In this embodiment, "R," "G," "B," and "L," "a," and "b" are each described as having 8-bit (0-255) values. Furthermore, table data containing values ​​of discrete points within a color space is used to perform color adjustment processing for the same color space, "color conversion processing" to convert values ​​that represent the same color in color spaces with different definitions, and "color adjustment processing" to convert the color space after applying optional adjustment processing. In this embodiment, the discrete points within the color space are defined as "lattice points." A "lattice point" refers to one of the elements, such as "R," "G," "B," "L," "a," or "b," that make up the table data representing the color space. Detailed examples of table data will be described later.

[0016] <Configuration> 1 is a diagram showing the configuration of an image processing device 100 according to an embodiment of the present invention. The image processing device 100 includes a control unit 110, an operation unit 121, a printer unit 122, and a scanner unit 123. The control unit 110 includes a CPU 111, a ROM 112, a RAM 113, a HDD 114, an operation unit I / F 115, a printer I / F 116, a scanner I / F 117, a network I / F 118, a scan image processing unit 119, and a print image processing unit 120.

[0017] The control unit 110 controls the overall operation of the image processing device 100. The CPU 111 reads out a control program stored in the ROM 112 and controls the execution of various processes in this embodiment. The RAM 113 is used as a temporary storage area such as the main memory or work area of ​​the CPU 111. The HDD 114 is a large-capacity storage unit that stores image data and various programs.

[0018] The operation unit I / F 115 is an interface that connects the operation unit 121 and the control unit 110. The operation unit 121 is equipped with a touch panel and hard keys, and accepts operations, inputs, instructions, etc. from a user. The printer I / F 116 is an interface that connects the printer unit 122 and the control unit 110. Image data to be printed is transferred from the control unit 110 to the printer unit 122 via the printer I / F 116, and the image data to be printed is printed on a recording medium such as paper. The scanner I / F 117 is an interface that connects the scanner unit 123 and the control unit 110. The scanner unit 123 inputs an image obtained by scanning a document set on a document table or an ADF (Auto Document Feeder), not shown, to the control unit 110 via the scanner I / F 117.

[0019] The scan image processing unit 119 performs various image processing such as color conversion processing and filter processing on an image input to the control unit 110 via the scanner I / F 117. The image processed by the scan image processing unit 119 can be saved in the HDD 114 or transmitted to an external device via a LAN. In addition, the print image processing unit 120 converts the image processed by the scan image processing unit 119 into a format that can be printed by the printer unit 122.

[0020] The network I / F 118 is an interface that connects the control unit 110 (image processing device 100) to a LAN. The image processing device 100 uses the network I / F 118 to transmit image data to a PC or the like connected to the network and to receive various information. The configuration of the image processing device 100 described above is an example, and the image processing device 100 may include other components or may not have some of the components as necessary.

[0021] <Retouching detection process> Fig. 2 is a flowchart for explaining the process of detecting "correction marks" in an image obtained by scanning. The process shown in Fig. 2 is performed by the scanned image processing unit 119. The series of processes shown in Fig. 2 is realized by the CPU 111 reading a program stored in the ROM 112 into the RAM 113 and executing it.

[0022] First, in step S201, the scanned image processing unit 119 acquires an image (scanned image) scanned by the scanner unit 123 and input via the scanner I / F 117. In this embodiment, the scanned image input to the scanned image processing unit 119 is described as an RGB image. Next, in step S202, the scanned image processing unit 119 acquires scan setting values. The scan setting values ​​include, for example, "color selection," "scanning magnification," and "document type." "Color selection" selects either color or monochrome when saving or copying the scanned image. "Scanning magnification" relates to the enlargement or reduction of the scanned image. "Document type" sets the type of document to be scanned. In addition, there is a setting value associated with the "scanning mode" linked to the document type. "Scanning mode" relates to the amount of light used when the document is read by the scanner unit 123.

[0023] In this embodiment, the device will be described as having two modes: "normal reading" and "dark reading" in which the amount of light is less than that of normal reading. For each reading mode, the reading device is provided with a "standard density plate." The amount of light is adjusted so that the read signal value when the "standard density plate" is read is a predetermined value. Reading with the amount of light in which the read signal value when the "standard density plate" is read is the predetermined value is referred to as "normal reading."

[0024] On the other hand, in this embodiment, "dark reading" is reading with the light intensity reduced by "50(%)" compared to normal reading. However, "dark reading" is not limited to this, and the light intensity may be adjusted depending on the paper type of the document being read. The "reading mode" is linked to a button on the operation unit 121 selected by the user. A setting value corresponding to "normal reading" or "dark reading" is transmitted to the scanned image processing unit 119 via the operation unit I / F 115. For example, in this embodiment, the setting value is held in the form of a flag with "normal reading" set to "0" and "dark reading" set to "1" and transmitted to the scanned image processing unit 119.

[0025] FIG. 4 shows an example of a scan setting screen displayed on the operation unit 121. FIG. 4(a) displays buttons (401, 402, 403) for transitioning to a setting screen for selecting color during scanning, magnification, and document type, as well as a start button 404 for starting scanning. FIG. 4(b) shows an example of a screen transitioned to after document type switching button 403 is pressed. The document type setting is a function for switching to image processing prepared in advance for each document type in accordance with the document type selected by the user. The document type setting screen displays buttons (411, 412, 413, 414) corresponding to representative document types. The text / photo / map button 411 corresponds to documents containing various content such as photos and text. The print photo button 412 corresponds to document documents centered on photos. The text button 413 corresponds to document documents centered on text. The electronic document 414 button corresponds to documents such as slips. In this embodiment, if an electronic document is selected, the aforementioned reading mode flag is set to "1," and if any other document type is selected, the reading mode flag is set to "0."

[0026] <Dark reading mode determination> Next, in step S203, the scan image processing unit 119 determines whether the reading mode is the "dark reading mode". In step S202, the scan image processing unit 119 obtains the setting value (reading mode flag) of the reading mode belonging to the obtained scan setting value. If the reading mode flag is "1", it is determined as the "dark reading mode", and if the reading mode flag is "0", it is determined as the normal reading mode.

[0027] <RGB·Lab Conversion> Next, in step S203, if it is determined to be the dark reading mode (Yes), the process proceeds to step S204, and the scan image processing unit 119 converts the scan image obtained in step S201 into a "Lab image". The conversion to the Lab image is performed by interpolation calculation by referring to the "RGB→Lab conversion table" stored in advance in the HDD 114. The "RGB→Lab conversion table" defines a cube in a three-dimensional color space defined by RGB signals. As shown in FIG. 6, the coordinates in the cube (601) of the three-dimensional color space can be determined according to the values of each 8-bit data (0 to 255) of RGB.

[0028] The eight vertices of the cube represent "R", "G", "B", "Y", "M", "C", "K", "W". Also, the "RGB→Lab conversion table" is defined by the RGB values of the input data. For example, it has "9×9×9 (pieces)" of lattice points, and the Lab values corresponding to these lattice points are stored as table data. For example, in 602 shown in FIG. 6, the Lab value (44.01, 61.37, 39.68) is stored as the table data corresponding to the RGB value (255, 0, 0). The interpolation calculation process performs interpolation processing using the value defined in the calculation table close to the input value when a value not defined in the calculation table is input.

[0029] There is an interpolation operation process called "tetrahedron interpolation". "Tetrahedron interpolation" performs an interpolation operation process using values defined in four operation tables close to the input values. Taking the input as the RGB values of each pixel of the scanned image and using the "RGB→Lab conversion table" as the operation table, the tetrahedron interpolation operation is performed. Thereby, the Lab value of each pixel is obtained. By converting all the pixels of the scanned image into Lab values, a Lab image can be obtained. In this embodiment, "tetrahedron interpolation" is used for the conversion, but the interpolation operation process adopted is not limited to this. For example, any method may be adopted as long as the RGB space can be converted into the Lab space by conversion using an arithmetic formula or the like. Also, not limited to the Lab space, any color space may be adopted as long as it is a space that separates the lightness and chromaticity components and can handle the lightness independently.

[0030] <L-value histogram generation> Next, in step S205, the scanned image processing unit 119 generates a histogram of the L-values using the pixel values of the Lab image in step S204. The generation of the histogram classifies the L-values of each pixel of the Lab image converted in step S204 into 0 to 100 (integer values) and counts how many pixels have each L-value. For example, the following formula is used to generate the histogram.

[0031] HIST[InL[x][y]] = HIST[InL[x][y]]+1 (Equation 1) HIST[] is the count value of pixels for each of 0 to 100, and the value inside [] represents a numerical value from 0 to 100. InL[x][y] is the value obtained by rounding the fractional part of the L-value of each pixel to an integer, and "x" and "y" represent the coordinate positions on the image. "x" is the horizontal axis and "y" is the vertical axis direction.

[0032] <Paper white signal region detection> Next, in step S206, the scanned image processing unit 119 detects a "paper-white signal region." A "paper-white signal region" is a signal region of the paper itself that has no printing or correction marks. In this embodiment, the "paper-white signal region" is detected by detecting the peak of the histogram generated in step S205. The peak of the histogram is the L value with the highest pixel count value among L values ​​from "0" to "100." In this embodiment, the peak L value is the center, and L values ​​in the range of "±5" from the peak L value are defined as the "paper-white signal region." For example, FIG. 5 shows an example of a generated histogram. The horizontal axis is the L value, and the vertical axis is the pixel count value. The peak is an L value of "75," and the "paper-white signal region" is defined as an L value range from "70" to "80."

[0033] That is, the scanned image processing unit 119 generates a histogram of the brightness component of the read image, and detects an area corresponding to a preset range of brightness centered on the brightness with the maximum frequency in the generated histogram as a paper white signal area.

[0034] <Dispersion distribution image generation> Next, in step S207, the scanned image processing unit 119 generates a "variance distribution image" using the L value of the Lab image generated in step S204. The "variance distribution image" is an image that represents the distribution of the variance values ​​of all pixels by calculating the variance value of each pixel based on the L value of each pixel and the pixels in an "M × N" range centered on each pixel.

[0035] Correction marks in an electronic document have a characteristic that they have a variance value that is approximately the same as that of the paper base. Therefore, a "variance distribution image" is generated to extract the "variance value," which is one of the feature quantities necessary for detecting correction marks in an electronic document. In this embodiment, the "M x N" range is described as a "5 x 5 pixel" range. However, this is not limited to a "5 x 5 pixel" range, and the number of pixels acquired may be changed depending on the image data size, etc.

[0036] To generate a "variance distribution image," first obtain one pixel (pixel of interest) from the L-value image data of the Lab image generated in step S204. Next, obtain "5 x 5 pixels" (25 pixels including the pixel of interest) centered on the obtained pixel from the L-value image data. If the pixel of interest is at the edge of the image data, the RGB values ​​of non-existent pixels are treated as "0." Next, the variance of the pixel of interest is calculated from the obtained pixel of interest and its surrounding pixels. The variance value is calculated using the following equation 2.

[0037]

number

[0038] "σL[n]" is the L value of the nth pixel in the image data, "xLi" is the i-th L value within the "5x5 pixels", "μL" is the L average value of the "5x5 pixels", and N is the total number of pixels (25 pixels) in the "5x5 pixels". Also, "Σ" represents the calculation of the sum. A "variance distribution image" is generated by performing calculations for all pixels.

[0039] That is, the scanned image processing unit 119 determines the variance of the L values ​​of all pixels (25 pixels) in a predetermined range of pixels (for example, 5 pixels horizontally by 5 pixels vertically) including a certain "pixel of interest" in the scanned image converted into a Lab image as the variance of the pixel of interest. This is done by calculating the variance of each pixel of the Lab image in turn as the pixel of interest, and generating a "variance distribution image."

[0040] <Extracting correction mark candidate pixels> Next, in step S208, the scanned image processing unit 119 extracts "correction trace candidate pixels" (pixels that are correction trace candidate). As mentioned above, correction traces in an electronic document have approximately the same variance as the paper base, but also have the characteristic of having a predetermined brightness difference. In other words, an area in an electronic document that has approximately the same variance as the paper base and also has a brightness difference is likely to be a correction trace. However, this condition is not limited to correction traces; it also applies to, for example, show-through (a phenomenon in which characters on the back side of a double-sided printed document show through to the front side). For this reason, in step S208, pixels in an area that has approximately the same variance as the paper base and also has a brightness difference are extracted as "correction trace candidate pixels."

[0041] To extract correction trace candidate pixels, first, the L values ​​of pixels having the same variance value are added based on the variance value calculated in step S207 corresponding to the pixels having the L value in the "paper-white signal area" detected in step S206. Expressed mathematically as follows:

[0042] TL[σL[n]] = TL[σL[n]] + PL (Formula 3) "TL" represents the array that holds the sum of the L values ​​for each variance value, and its initial value is "0." "PL" represents the L value of the pixel of interest. It also counts how many pixels correspond to each variance value. Expressed mathematically, it is as follows:

[0043] CL[σL[n]] = CL[σL[n]] + 1 (Formula 4) "CL" represents an array that holds the total number of pixels corresponding to each variance value, and its initial value is "0". This process is performed for all pixels. After processing all pixels, the "average pixel value" is calculated from the total sum of pixel values ​​for each variance value and the total number of pixels. The "average pixel value" is calculated using Equation 5.

[0044] AveL[σL[n]] = TL[σL[n]] / CL[σL[n]] (Formula 5) "AveL" represents the average pixel value for each variance value. Next, pixels outside the "paper-white signal area" that have the same variance value as the pixels with an L value inside the "paper-white signal area" are extracted. The difference between "AveL" and the L value of the extracted pixel outside the "paper-white signal area" is calculated and recorded and saved in the HDD 114. Equation 6 is used to calculate the difference.

[0045] DL[n] = ZL[n] - AveL[σL[n]] (Formula 6) DL represents the difference in L values, and "ZL" represents the L value of the pixel outside the extracted paper-white signal area. Also, "n" represents the nth pixel. Here, pixels that are "outside the paper-white signal area" and have a variance value that differs from the variance value of pixels "inside the paper-white signal area" are stored as "DL[n] = 0." Through the above processing, pixels that are "outside the paper-white signal area" and for which "DL[n] ≠ 0" are defined as "correction trace candidate pixels."

[0046] That is, the scanned image processing unit 119 extracts "correction trace candidate pixels" based on the variance distribution image and the detected paper-white signal area. More specifically, it calculates the difference in brightness between pixels that have the same variance value as the variance value of pixels in the "variance distribution image" that correspond to pixels included in the "paper-white signal area" and are not included in the "paper-white signal area," and pixels that are included in the "paper-white signal area" and have the same variance value. Then, if the calculated difference exceeds a preset range, the pixel that is not included in the "paper-white signal area" is extracted as a "correction trace candidate pixel."

[0047] <Edge image generation> Next, in step S209, the scanned image processing unit 119 generates an edge image having light and dark boundary lines in the Lab image. In step S208, "correction trace candidate pixels" were extracted, and in step S209, edge information is further used to determine "correction trace areas" in the electronic document. In addition to the characteristics described above, correction traces in electronic documents are characterized by the presence of edges at the boundaries between the correction trace areas and other areas (such as the paper base). On the other hand, show-through and the like do not have edges at the boundaries of areas. Therefore, "correction trace areas" in the electronic document are extracted by extracting areas that have approximately the same variance as the paper base, have brightness differences, and also have edges.

[0048] Therefore, first, in step S209, an edge image is generated and edge information is extracted. The edge image is generated using the L value image of the scanned image converted into a Lab image in step S204. The edge image is generated by, for example, extracting edges using the Canny method or the like, and ultimately generating a binary image in which edge pixels are set to "1" and non-edge pixels are set to "0."

[0049] <Comparison of candidate pixels and rectangular edge regions: Correction mark detection> Next, in step S210, the scanned image processing unit 119 detects "correction marks" using the correction mark candidate pixels extracted in step S208 and the edge image generated in step S209. Correction marks are detected by calculating the degree of match between the "correction mark candidate pixels" and "edge pixels." As mentioned above, correction marks are basically detected as edges at the boundary between the correction marks and the paper base. Therefore, if the coordinate positions of the "edge pixels" and "correction mark candidate pixels" match, the matching area can be determined to be "correction marks."

[0050] Therefore, by detecting that there are a certain number or more of "correction trace candidate pixels" within an area surrounded by "edge pixels," the area can be determined to be a "correction trace." To detect "correction traces," first, edges that form an "enclosing" shape are extracted. Here, "enclosing" refers to a series of edges that are closed, such as a rectangle. Figure 8 is an explanatory diagram of an example method for detecting enclosing edges. Reference numeral 800 in Figure 8 is the edge image generated in step S209. The black pixel portion of reference numeral 801 is the extracted "edge pixel."

[0051] First, one pixel is selected from the edge pixels (pixels with a pixel value of "1"), and it is determined whether or not the pixels adjacent to the selected pixel are "edge pixels." The determination of whether or not the adjacent pixels are "edge pixels" is performed as follows: As shown by reference numeral 802 in Figure 8, a "3 x 3 pixel" area is extracted with the "pixel of interest" at its center, and it is determined whether or not there is an edge pixel (a pixel with a value of "1") among the eight pixels other than the pixel of interest. If it is determined that there is a pixel adjacent to the pixel of interest, it is determined in a similar manner whether or not the pixel further adjacent to the adjacent pixel is an "edge pixel."

[0052] A pixel that has an adjacent "edge pixel" is called a "continuous edge pixel." This process is repeated until there are "continuous edge pixels" among the pixels adjacent to the finally selected pixel of interest, excluding the previous pixel of interest, and it is determined that there is an enclosed "edge pixel group." For example, in FIG. 8, reference numeral 803 is determined to have an enclosed "edge pixel group" (pixel group 801) because the pixel above the pixel of interest is a continuous edge pixel (the pixel below the pixel of interest is excluded because it is the previous pixel of interest).

[0053] If no adjacent edge pixels are detected before an edge pixel that has already been determined to be an edge pixel is found adjacent to the selected pixel, it is determined that there is no enclosing "edge pixel group" and no correction trace. Note that the method for detecting an enclosing edge is not limited to this method. For example, a method may be used in which a proximity line of edge pixels is generated and the area where the proximity line forms an enclosing line may be extracted. If it is determined that there is an enclosing "edge pixel group," pixels inside the edge enclosure are extracted and it is determined whether the extracted pixels are "correction trace candidate pixels." A general method for determining whether a point is inside or outside a polygon is used to extract pixels inside or outside a polygon. This method determines whether a point is inside or outside a polygon by drawing a straight line from the point (pixel) to be determined to be inside the polygon (in this embodiment, the enclosing edge portion) and determining if the number of intersections between the line and the polygon is odd or even.

[0054] FIG. 9 is an explanatory diagram of an example of inside / outside determination. Reference numeral 900 in FIG. 9 is the "edge image" generated in step S209. The black pixel portion indicated by reference numeral 901 is the extracted "edge pixel." Reference numeral 902 is an example of a pixel outside the enclosing edge, and reference numeral 903 is an example of a pixel inside the enclosing edge. As indicated by reference numeral 902, when a straight line is drawn from a pixel to the enclosing edge, there are "two" intersections, which is an even number. As indicated by reference numeral 903, when a straight line is drawn from a pixel to the enclosing edge, there is "one" intersection, which is an odd number. Therefore, reference numeral 902 is determined to be "outside" the enclosing edge, and reference numeral 903 is determined to be "inside" the enclosing edge.

[0055] In this embodiment, among the pixels determined to be inside the enclosed edge by the inside / outside determination, the number of pixels for which "DL[n]" is not "0" is counted. Then, if 90 (%) or more of the number of pixels that come inside the enclosed edge are "correction mark candidate pixels", the inside region of the enclosed edge is determined to be a "correction mark". Note that in this embodiment, the determination of the correction mark is made based on whether the pixels inside the edge enclosure are "correction mark candidate pixels", but it is not limited to this method. Any method may be adopted as long as the matching between the edge and the region of the correction mark candidate can be achieved. In this embodiment, the scan image processing unit 119 generates an image (correction mark determination image) in which the pixels determined to be "correction marks" are "1" and the other pixels are "0", and records and holds it in the HDD 114.

[0056] Next, in step S211, the scan image processing unit 119 determines whether a correction mark has been detected. The determination of whether a correction mark has been detected is made by determining whether there are "correction mark pixels" in the "correction mark determination image" generated in step S210. In this embodiment, if there is even one correction mark pixel, it is determined that a correction mark has been detected. If it is determined in step S211 that a correction mark has been detected (Yes), correction of the correction mark is performed in step S212. Details of the correction of the correction mark will be described later.

[0057] As described above, the scan image processing unit 119 determines whether the pixels included in the edge region connected in an enclosed shape in the edge image are "correction mark candidate pixels". Then, when the ratio of the "number of correction mark candidate pixels" included in the enclosed edge region to the total number of pixels in the enclosed edge region exceeds a preset range, the entire enclosed edge region is detected as a correction mark.

[0058] <Lab·RGB Conversion> Next, in step S213, the Lab image in which the correction traces have been corrected in step S212 is converted into an RGB image. Alternatively, if no correction traces are detected in step S211 (NO), the Lab image converted in step S204 is converted into an RGB image. The conversion of the Lab image into an RGB image is performed by interpolation, as in step S204. A "Lab → RGB conversion table" pre-stored in HDD 114 is used. Note that, as in the process in step S204, the conversion method is not limited to interpolation, and conversion using an arithmetic expression may also be used. In other words, any method may be used as long as it can convert the Lab image into an RGB image.

[0059] <Scan image processing> After the processing in step S213, or if it is determined in step S203 that the mode is not "dark reading mode" (NO), in step S214, the scanned image processing unit 119 performs image processing on the scanned image. The scanned image processing is image processing necessary for saving or printing the scanned image, such as gamma correction, color conversion processing, and filter processing. Finally, in step S215, if the scanned image is to be saved, the scanned image processing unit 119 saves it in the HDD 114. If the scanned image is to be sent to a PC or the like, the scanned image processing unit 119 outputs it to the PC via the network I / F 118. If the scanned image is to be printed, the scanned image processing unit 119 outputs the image to the print image processing unit 120.

[0060] In the extraction of "correction trace candidate pixels" in step S208, all pixels that meet the above conditions are determined to be "correction trace candidate pixels." However, correction traces usually exist in only a portion of a document, and rarely occupy a large area relative to the size of the scanned image. For this reason, if the "correction trace candidate pixel group (a pixel group formed by connecting correction trace candidate pixels)" reaches a specified area in the scanned image, the corresponding pixels may be excluded from the "correction trace candidate pixels."

[0061] In other words, if a "correction mark candidate pixel group" formed by connecting multiple "correction mark candidate pixels" exceeds a predetermined area of ​​the read image, the scanned image processing unit 119 excludes the "correction mark candidate pixel group" from the "correction mark candidate pixels."

[0062] <Correction mark correction processing> Next, the method for correcting correction marks in step S212 will be described in detail with reference to Fig. 3. The process shown in Fig. 3 is executed by the scanned image processing unit 119. The series of processes shown in Fig. 3 is realized by the CPU 111 reading a program stored in the ROM 112 into the RAM 113 and executing it.

[0063] First, in step S301, the scanned image processing unit 119 acquires the Lab image converted to Lab in step S204. Next, in step S302, the scanned image processing unit 119 acquires the brightness histogram generated in step S205. Next, in step S303, the scanned image processing unit 119 extracts the brightness distribution of each pixel in the correction trace area. In step S301, the scanned image processing unit 119 extracts the L value of the correction trace pixel determined in step S210 from among the pixels of the acquired Lab image.

[0064] Next, in step S304, the scanned image processing unit 119 calculates the difference in brightness between the paper background and the correction mark pixels. The peak value of the paper white signal area calculated in step S206 is used as the brightness of the paper background. The brightness of the correction mark pixels is the lowest or highest L value among the correction mark pixels. If the correction mark is darker than the paper background, the lowest L value is used, and conversely, if the correction mark is lighter than the paper background, the highest L value is used. The brightness difference is calculated using the following formula:

[0065] Ldiff = abs(Hstpeak-Lrep) (Equation 7) "Ldiff" represents the brightness difference, "Hstpeak" represents the L value of the peak of the histogram, "Lrep" represents the maximum or minimum L value of the correction marks, and "abs" represents the calculation of the absolute value.

[0066] Next, in step S305, the scanned image processing unit 119 determines whether the brightness difference is less than a threshold value. In this embodiment, the threshold value is "10," and if "Ldiff<10," it is determined that the brightness difference is less than the threshold value (Yes). If the brightness difference is equal to or greater than the threshold value (No), the processing ends. If it is determined in step S305 that the brightness difference is less than the threshold value, brightness correction of the correction traces is performed in step S306. The brightness correction of the correction traces is performed using the following formula:

[0067] RepL[n] = RepL[n] + Ldiff (if Hstpeak< Lrep) RepL[n] = RepL[n] + Ldiff (if Hstpeak > Lrep) (Equation 8) "RepL" indicates the L value of each pixel in the repair mark, and "n" indicates the pixel position within the repair mark.

[0068] In other words, if the difference between the peak L value (brightness) of the paper-white signal area and the L value (brightness) of the correction marks is less than a predetermined threshold, the scanned image processing unit 119 corrects the L value (brightness) of the correction marks. In this embodiment, only the "L value" of the correction marks is corrected based on the brightness difference, but any method that can increase the signal difference between the paper background and the correction marks may be used, such as correcting the signal value of the paper background or correcting both the signal values ​​of the paper background and the correction marks. In this way, even if the gradation of the electronic document decreases due to dark reading, increasing the gradation difference between the paper background and the correction marks can prevent the visibility of the correction marks from being lost.

[0069] Second Embodiment In the first embodiment, the entire correction trace area was corrected. However, in terms of maintaining the visibility of the correction trace, it is also possible to maintain visibility by correcting and emphasizing only the edge portion of the correction trace. Therefore, in the second embodiment, a method of correcting the edge portion of the correction trace based on the edge information of the correction trace when correction of the correction trace is necessary will be described.

[0070] Referring to FIG. 7, the correction method for the correction marks in the second embodiment will be described in detail. The processing shown in FIG. 7 is executed by the scan image processing unit 119. The series of processing shown in FIG. 7 can be realized by the CPU 111 reading the program stored in the ROM 112 into the RAM 113 and executing it.

[0071] Since the processing of S701 to S705 in FIG. 7 is the same as the processing of S301 to S305 in FIG. 3, the description thereof will be omitted. In step S705, when the scan image processing unit 119 determines that the brightness difference is less than the threshold value (YES), in step S706, the surrounding edge information generated in step S210 is acquired. In step S707, the scan image processing unit 119 corrects the L value of the pixel at the position corresponding to the coordinate position of the surrounding edge of the Lab image acquired in step S701 based on the surrounding edge information acquired in step S706. The correction of the L value uses the following formula.

[0072] RepL[EDGx][EDGy]=RepL[EDGx][EDGy]+Ldiff (when Hstpeak<Lrep) RepL[EDGx][EDGy]=RepL[EDGx][EDGy]+Ldiff (when Hstpeak>Lrep) (Formula 9)

[0073] "RepL" represents the L value of each pixel of the correction mark, and "EDGx" and "EDGy" represent the coordinate positions of the surrounding edge. "Ldiff", "Hstpeak", and "Lrep" are the same as those in the first embodiment. By doing the above, only the edge portion of the correction mark is corrected and emphasized, and the visibility of the correction mark in the electronic document can be maintained.

[0074] <Corresponding relationship between claims and embodiments> The "conversion unit" in the claims corresponds to S204 in Fig. 2, the "paper-white signal area detection unit" corresponds to S206 in Fig. 2, and the "correction mark candidate pixel extraction unit" corresponds to S208 in Fig. 2. Also, the "edge image generation unit" corresponds to S209 in Fig. 2, and the "correction mark detection unit" corresponds to S210 and S211 in Fig. 2. The "correction unit" corresponds to S301 to S306 in Fig. 3.

[0075] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and various modifications and variations are possible within the scope of the gist of the present invention. For example, the present invention can be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or recording medium, and having a computer processor in the system or device execute the program. The present invention can also be realized by a circuit (e.g., an ASIC) that realizes one or more functions. [Explanation of symbols]

[0076] 100 Image processing device 110 control section 111 CPU 112 ROM 113 RAM 119 Scan image processing unit 121 Operation section 122 Printer section 123 Scanner

Claims

1. An image processing device that performs image processing on a read image obtained by reading an original document in a dark reading mode in which an image reading device reduces the amount of light compared to normal, a conversion means for converting the scanned image from an RGB image to a Lab image; a first detecting means for detecting a paper white signal area, which is an area of ​​the document paper itself in the read image; an extraction means for extracting pixels of correction trace candidates based on a variance distribution image obtained by sequentially using each pixel of the Lab image as a target pixel and the detected paper-white signal area, the variance value of the L values ​​being calculated using the L values ​​of all pixels in a range of a predetermined number of pixels including a certain target pixel in the Lab image, as the variance value of the target pixel; a generating means for generating an edge image having a light / dark boundary line in the Lab image; and second detection means for detecting correction marks based on the generated edge image and the extracted pixels of the correction mark candidates.

2. 2. The image processing apparatus according to claim 1, further comprising a correction unit that corrects the image when the correction trace is detected.

3. The correction means 3. The image processing apparatus according to claim 2, wherein when a difference between a peak value of the brightness of the paper-white signal area and the brightness of the correction trace is less than a predetermined threshold, the brightness of the correction trace is corrected.

4. The first detection means 2. The image processing device according to claim 1, wherein a histogram of the brightness component of the read image is generated, and an area corresponding to a brightness within a preset range centered on the brightness of the maximum frequency in the generated histogram is detected as a paper white signal area.

5. The extraction means 2. The image processing device according to claim 1, wherein a difference is calculated between the brightness of a pixel that has the same variance value as a variance value of a pixel in the variance distribution image that corresponds to a pixel included in the paper-white signal area and is not included in the paper-white signal area, and the brightness of a pixel that is included in the paper-white signal area and has the same variance value, and if the difference exceeds a preset range, the pixel that is not included in the paper-white signal area is extracted as a pixel that is a correction trace candidate.

6. The second detection means 2. The image processing device according to claim 1, wherein a determination is made as to whether pixels included in an edge region connected in an enclosing shape in the edge image are pixels of correction mark candidates, and if a ratio of the number of pixels of the correction mark candidates included in the enclosing edge region to the total number of pixels in the enclosing edge region exceeds a preset range, the entire enclosing edge region is detected as a correction mark.

7. The extraction means further comprises:

2. The image processing device according to claim 1, wherein if a group of pixels of a correction mark candidate formed by connecting pixels of a plurality of correction mark candidates exceeds a predetermined area of ​​the read image, the group of pixels of the correction mark candidate is excluded from the pixels of the correction mark candidate.

8. A control method for an image processing device in which an image reading device reads an original in a dark reading mode in which an amount of light is reduced compared to normal and performs image processing on the read image, converting the scanned image from an RGB image to a Lab image; detecting a paper white signal area, which is an area of ​​the document paper itself, in the read image; a step of extracting pixels of correction trace candidates based on a variance distribution image obtained by sequentially using each pixel of the Lab image as a target pixel and the detected paper-white signal area, in which a variance value of the L values ​​obtained using the L values ​​of each pixel of all pixels in a range of a predetermined number of pixels including a certain target pixel in the Lab image is set as a variance value of the target pixel; generating an edge image having a light-dark boundary line in the Lab image; detecting correction marks based on the generated edge image and the extracted pixels of the correction mark candidates; and correcting the image when the correction trace is detected.

9. A program that causes a computer to execute a control method for an image processing device that performs image processing on a read image obtained by reading a document in a dark reading mode in which the image reading device reads a document in a dark reading mode in which the amount of light is reduced compared to normal, The control method includes: converting the scanned image from an RGB image to a Lab image; detecting a paper white signal area, which is an area of ​​the document paper itself, in the read image; a step of extracting pixels of correction trace candidates based on a variance distribution image obtained by sequentially using each pixel of the Lab image as a target pixel and the detected paper-white signal area, in which a variance value of the L values ​​obtained using the L values ​​of each pixel of all pixels in a range of a predetermined number of pixels including a certain target pixel in the Lab image is set as a variance value of the target pixel; generating an edge image having a light-dark boundary line in the Lab image; detecting correction marks based on the generated edge image and the extracted pixels of the correction mark candidates; and correcting the image when correction traces are detected.

Citation Information

Patent Citations

  • Image reading apparatus

    JP2006295307A

  • Image reader, image processor and program

    JP2008048057A

  • Image processing apparatus and image processing method

    JP2009111786A