Image processing device
Patent Information
- Application Number
- JP2023149677
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2026-09-28
AI Technical Summary
In the prior art, when judging whether a color document is blank, there is a situation where it is impossible to correctly distinguish the background color and text of the document. Especially when the density of the background color and text are the same, judgment through the average density value will lead to blurring of the boundaries and misjudging it as blank.
By acquiring multiple components of a color image, the number of edges of each component is calculated, and the determination value is calculated based on the number of edges to determine whether the document is blank.
Even if the background color of the document and the text color are the same, edge recognition can still accurately determine whether the document is blank and avoid misjudgment.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing apparatus including an image reading device that reads an image of a document by photoelectrically converting light reflected from the document. [Background technology]
[0002] There are conventional devices that use an image sensor to read an image of an original document and process the image of the original document through digital processing. In addition, some of these conventional image reading devices and image processing devices have a function that prevents the image data of a blank original document from being saved when the original document is read and does not need to be saved. Since such devices do not save unnecessary image data, they are useful for saving capacity when saving images on a recording medium such as a hard disk.
[0003] As a method for determining whether a document is blank, a method has been proposed in which binary image data is created from multi-value image data output by scanning the document, and a determination is made based on the binary image data (Patent Document 1). When a document is scanned in color, the multi-value image data will have three colors, for example, R (red), G (green), and B (blue). Patent Document 1 proposes a method for determining whether a document is blank based on a grayscale image obtained by averaging the density values of R, G, and B for each pixel through calculation when the document is scanned as a color image. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 5166158 Summary of the Invention [Problem to be solved by the invention]
[0005] However, if the document contains colored content such as text or a colored background, it may not be possible to properly determine whether it is a blank page. For example, if the background is green and the text is red, and the background and text have the same density, averaging the density of the three colors R, G, and B will make it difficult to distinguish the boundary between the background and the text, and the page will be determined to be blank even if it contains text or other content. [Means for solving the problem]
[0006] In view of the above, an image processing device according to one aspect of the present invention comprises: An acquisition means for acquiring a plurality of components constituting a color image obtained by reading an original; an edge counting means for counting the number of edges of the image data for each of the plurality of components acquired by the acquiring means; a judgment value calculation means for calculating a judgment value for determining whether the document is blank or not based on the number of edges; a blank page determining means for determining whether the document is a blank page or not based on the determination value; The present invention is characterized by having the following. Effect of the Invention
[0007] According to the present invention, even if the background and characters are colored, edges can be recognized and it is possible to appropriately determine whether or not a page is blank. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram showing an example of an image reading system to which the image processing apparatus of the present embodiment can be applied. [Diagram 2] FIG. 1 is a diagram showing an example of the configuration of a sheet-fed scanner according to an embodiment of the scanner. [Diagram 3] FIG. 4 is a block diagram showing an example of a control configuration of a scanner. [Figure 4] FIG. 2 is a block diagram showing an example of the configuration of a PC. [Diagram 5] FIG. 2 is a diagram showing an example of the configuration of an application and a scanner driver that run on a PC. [Figure 6]FIG. 2 is a block diagram illustrating an embodiment of an image processing unit of a scanner. [Figure 7] FIG. 2 is a block diagram showing the configuration of an image processing unit of the scanner according to the first embodiment. [Figure 8] FIG. 2 is a block diagram showing the configuration of a blank paper determination processing unit of the scanner according to the first embodiment. [Figure 9] FIG. 4 is an explanatory diagram of an edge according to the first embodiment. [Figure 10] FIG. 11 is a block diagram showing the configuration of an image processing unit of a scanner according to a second embodiment. [Figure 11] FIG. 11 is a block diagram showing the configuration of a blank paper determination processing unit of a scanner according to a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An image processing system including an image reading device and an information processing device connectable to the image reading device will now be described with reference to the accompanying drawings.
[0010] First Embodiment FIG. 1 is a diagram showing an example of an image reading system to which an image processing device according to a first embodiment of the present invention can be applied. In FIG. 1, a scanner 100 is an image reading device that reads image data from a document. The scanner 100 is communicably connected to a personal computer (PC) 200. The scanner 100 and the PC 200 may be connected via a communication interface such as a USB, or may be connected via a network. The network may be either wired or wireless. The PC 200 is an information processing device that controls the scanner 100.
[0011] The configuration and operation of scanner 100 will be described below with reference to Fig. 2. Fig. 2 is a diagram showing an example of the configuration of a sheet-fed scanner shown as an example of scanner 100. In this embodiment, a sheet-fed scanner that sequentially scans stacked documents (hereinafter referred to as "sheets") will be used for explanation, but the present invention is not limited to this.
[0012] As shown in FIG. 2, the scanner 100 includes an automatic document feeder (ADF) 101. A plurality of sheets are stacked on the sheet stacking platform 1, and the sheet stacking platform 1 is configured to be freely raised and lowered. A sheet stacking platform drive motor (not shown) raises and lowers the sheet stacking platform 1. The sheet detection sensor 3 detects that the sheets stacked on the sheet stacking platform 1 are at the sheet intake position. The sheet stacking detection sensor 12 detects that the sheets are stacked on the sheet stacking surface 1a of the sheet stacking platform 1. The document jump-up detection sensor 35 includes a plurality of sensors arranged in a direction perpendicular to the sheet stacking surface 1a, and detects the jump-up of the sheets stacked on the sheet stacking platform 1. For example, the document jump-up detection sensor 35 can detect the jump-up of the document that occurs when a stapled document is loaded on the sheet stacking platform 1 and fed. This makes it possible to control the feeding of the stapled document, for example, by stopping the feeding of the stapled document.
[0013] The pickup roller 4, which is an example of a sheet pickup section, sends out a sheet on the sheet stacking table 1 from the sheet stacking table 1. A pickup roller drive motor (not shown) rotates the pickup roller 4 in a direction to take in the sheet. The pickup roller 4 can move to a sheet take-in position and a retracted position above the sheet take-in position. The pickup roller 4 is moved to the sheet take-in position when taking in a sheet, and is moved to the retracted position when the take-in is completed. The pickup roller 4 plays an auxiliary role in ensuring that separation and feeding are performed reliably by a separation roller pair 42, which will be described later. If the pickup roller 4 sends the sheet on the sheet stacking table 1 into the nip portion of the separation roller pair 42, separation and feeding by the separation roller pair 42 can be performed reliably.
[0014] In the separation roller pair 42, the feed roller 6 is driven by a feed motor (not shown) to rotate in a direction to feed the sheet downstream in the conveying direction (feeding direction). The separation roller 7 constantly receives a rotational force from the separation motor (not shown) via a torque limiter (slip clutch) (not shown) that rotates in a direction to push back the sheet upstream in the conveying direction.
[0015] When one sheet is present between the feed roller 6 and the separation roller 7, the torque in the direction in which the sheet is fed downstream by the feed roller 6 due to the frictional force between the separation roller 7 and the sheet fed downstream is greater than the upper limit of the torque in the direction in which the separation roller 7 pushes the sheet back upstream, which is transmitted by the torque limiter described above. Therefore, the separation roller 7 rotates following the feed roller 6.
[0016] On the other hand, when there are multiple sheets between the feeding roller 6 and the separation roller 7, the separation roller 7 receives rotation from the roller shaft in a direction to push the sheets back upstream, so that sheets other than the topmost sheet are not transported downstream.
[0017] In this way, overlapping sheets are separated and fed by the action of the feed roller 6 feeding the sheets downstream and the action of the separation roller 7 preventing the sheets from being transported downstream. Even if overlapping sheets are fed into the nip portion (contact portion between the feed roller 6 and the separation roller 7) formed between the feed roller 6 and the separation roller 7, only the topmost sheet is fed downstream, and the other sheets are not transported downstream.
[0018] The feed roller 6 and the separation roller 7 constitute a pair of separation rollers 42 (sheet separation section). In this embodiment, the separation roller pair 42 is used, but instead of the separation roller pair 42, a separation belt roller pair in which either the separation roller or the feed roller is a belt may be used. Also, the separation roller may be replaced with a separation pad that abuts against the sheet to prevent multiple sheets from being transported downstream. Also, the separation roller 7 may be used to abut against the sheet like a separation pad without rotating.
[0019] The sheets stacked on the sheet stacking tray 1 are separated one by one and taken into the scanner 100 by the sheet pickup section composed of the pickup roller 4, the feeding roller 6, the separation roller 7, etc. thus configured.
[0020] Furthermore, by providing the double-feed detection sensor 30 at a position where the separated sheets pass (that is, downstream of the pair of separation rollers 42), it is possible to detect whether the sheets have been separated one by one by the sheet separation unit.
[0021] A conveying motor (not shown) drives other rollers (sheet conveying section) to convey the separated sheet to an image reading position where the image on the sheet is read by image reading sensors 14 and 15, and further to a discharge position. The conveying motor also drives each roller so that the sheet conveying speed can be changed according to settings such as the optimum speed for reading the sheet and the sheet resolution.
[0022] A nip gap adjustment motor (not shown) adjusts the gap between the feeding roller 6 and the separation roller 7, or the pressure (nip pressure) with which the feeding roller 6 presses against the separation roller 7 via the sheet. This allows the gap or pressure to be adjusted to suit the thickness of the sheet, allowing the sheet to be separated.
[0023] A registration clutch (not shown) transmits or blocks the rotational driving force of the conveying motor to registration rollers 18 (sheet conveying section). By stopping the rotation of the first registration roller pair consisting of registration rollers 17 and 18, the leading edge of the fed sheet is abutted against the nip portion of the registration roller pair to correct the skew of the sheet.
[0024] The second registration roller pair consisting of registration rollers 20 and 21, the conveying roller pair consisting of conveying rollers 22 and 23, the conveying roller pair consisting of conveying rollers 24 and 25, and the discharge roller pair consisting of discharge rollers 26 and 27 convey the sheet, and finally convey it to a discharge stacking section 44. The discharge sensor 16 detects the passage of the conveyed sheet. The two guide plates, the upper guide plate 40 and the lower guide plate 41, guide the sheet conveyed by the separation roller pair, the registration roller pair, each conveying roller pair, and the discharge roller pair.
[0025] The pre-registration sensor 32 is disposed upstream of the first registration roller pair 17, 18 and detects the fed sheet. The post-registration sensor 34 is disposed downstream of the second registration roller pair 20, 21 and detects the conveyed sheet. Furthermore, the registration sensor 33 is disposed downstream of the first registration roller pair 17, 18 and upstream of the second registration roller pair 20, 21 and detects the conveyed sheet.
[0026] When the post-registration sensor 34 detects the sheet, a control unit (CPU 306 described later) issues an instruction to image reading sensors 14 and 15 to read the image, and the image on the conveyed sheet is read. The image reading sensor 14 reads the front side of the sheet, and the image reading sensor 15 reads the back side of the sheet simultaneously. The image reading sensors 14 and 15 are provided with platen rollers 14a and 15a, respectively, and reading can be performed while the sheet is in close contact with the image reading sensors 14 and 15. The image of the sheet read by the image reading sensors 14 and 15 is transmitted to an external device such as an information processing device via an interface unit (not shown).
[0027] 3 is a block diagram showing an example of a control configuration of the scanner 100. A / D conversion units (ADC) 301a and 301b perform analog processing such as amplification and black level clamping on the output signal of the line image sensor (image reading sensors 14 and 15 in FIG. 2), and then convert it into digital data (image data). An image processing unit 302 controls the line image sensors 14 and 15 and the ADCs 301a and 301b, and performs various image processing on the image data output from the ADCs 301a and 301b. The image processing unit 302 has an image processing buffer that stores image data therein.
[0028] The I / F 304 is an interface for communicating with an external host device (such as the PC 200). The I / F 304 is connected to an external host device such as a PC via a signal cable 305. For example, the I / F 304 is a USB interface. The I / F 304 may be a wired interface such as a USB interface or a wired LAN interface, or may be a wireless interface such as a wireless LAN, a wireless USB, BLUETOOTH (registered trademark), or NFC.
[0029] The CPU 306 is a control unit that controls the scanner 100. The image processing unit 302 and the CPU 306 are connected via a bus 307. The CPU 306 accesses the RAM 303 and the ROM 310 via the bus 307. The ROM 310 stores programs and various data. The RAM 303 functions as a work memory for the CPU 306.
[0030] The driving unit 309 is a motor or the like for driving various loads such as the pickup roller 4, the feeding roller 6, and the separation roller 7. The motor driver 308 is a control circuit for controlling the driving unit 309 based on instructions from the CPU 306.
[0031] 4 is a block diagram showing an example of the configuration of a personal computer (PC) 200, which is an example of an external host device connected to the scanner 100. A CPU 406 comprehensively controls each unit of the PC 200 based on a computer program. The CPU 406 controls the scanner 100 according to an application 501 and a scanner driver 502 shown in FIG. 5, which will be described later.
[0032] The ROM 401 is a non-volatile storage unit that stores a control program such as firmware. The RAM 402 is a volatile storage unit that functions as a work area. The hard disk drive (HDD) 403 is a large-capacity storage unit. The display device 405 is a display unit for displaying various information to a user. The operation unit 407 is an input unit such as a pointing device or a keyboard. The communication I / F 404 is a communication unit such as a USB. The CPU 406 communicates with the scanner 100 via the communication I / F 404. For example, the communication I / F 404 is a USB interface or the like. The communication I / F 404 may be a wired interface such as a USB interface or a wired LAN interface, or may be a wireless interface such as a wireless LAN, a wireless USB, BLUETOOTH (registered trademark), or NFC.
[0033] FIG. 5 is a diagram showing an example of the configuration of applications and a scanner driver that run on the PC 200. As shown in FIG.
[0034] The application 501 and the scanner driver 502 are program modules installed in the PC 200. That is, the application 501 and the scanner driver 502 are realized by the CPU 406 of the PC 200 loading a program stored in the HDD 403 into the RAM 402 as necessary and executing the program.
[0035] The application 501 is a program capable of inputting and outputting information to and from the scanner driver 502, and specific examples thereof include an image editing program, an album program, a text editing program, etc. Note that the application 501 is not limited to these, and any application that receives image data from the scanner driver 502 may be used.
[0036] An application 501 controls the scanner 100 via a scanner driver 502 and performs image processing on image data received from the scanner driver 502. The image processing of the images read by the image reading sensors 14 and 15 may be performed on the scanner 100, on the PC 200, or may be performed by both.
[0037] Communication is performed between the application 501 and the scanner driver 502, and between the scanner driver 502 and the scanner 100, using respective determined protocols. For example, the application 501 and the scanner driver 502 communicate using a protocol determined by the TWAIN standard. This protocol determined by the TWAIN standard is a driver interface for communicating with the scanner driver 502, and is also an example of an application interface for communicating with an application program.
[0038] Communication between the scanner driver 502 and the scanner 100 is performed using a protocol defined by the USB (Universal Serial Bus) standard. The protocol defined by the USB standard is used as an interface for communicating with an image reading device. Note that the communication standards and protocols are not limited to these, and other protocols may be adopted. Note that control commands and image data are transmitted and received between the scanner and the driver via these protocols.
[0039] <Image processing unit> The image processing unit 302 of the scanner 100 is described in more detail below.
[0040] As shown in Fig. 6, the image processing unit 302 processes the front side and back side of the sheet separately. The image on the front side of the sheet is output from the ADC 301a to the image processing unit 302a. Similarly, the image on the back side of the sheet is output from the ADC 301b to the image processing unit 302b. The image processing units 302a and 302b have the same processing content, except that the input images are front and back. When each processing is completed, it is transferred to the RAM 303 etc. via the bus 307.
[0041] In this embodiment, the image processors 302a and 302b are configured to perform the same processing on the front and back sides independently, but they do not necessarily need to be independent. There may be cases where an image of one side is required for processing the other side, and the processing of the front and back sides may each use the other's image.
[0042] The configuration of image processing unit 302a is shown in Fig. 7. The flow of image data is indicated by solid arrows, and the flow of settings to each processing unit and notification of judgment results is indicated by dotted arrows. Line image sensor 14 can read the three colors R (red), G (green), and B (blue), and ADC 301a converts the data into image data for each digitized R, G, and B component. Image processing unit 302a acquires the image data for the three colors R, G, and B. Note that image processing unit 302b is similar to image processing unit 302a, so a description thereof will be omitted.
[0043] In this embodiment, the image data output from each processing unit in the image processing unit 302a (such as a shading correction processing unit 350 and a color space conversion processing unit 351, which will be described later) is configured by pipeline processing so that the image data is input to another processing unit. This may be configured differently. For example, some or all of the processing units may be connected to the RAM 303 via the bus 307. In that case, the input and output of image data to each processing unit is performed via the RAM 303.
[0044] Image data for each component decomposed into R, G, and B is input to the image processing unit 302a. The image data for each component input to the image processing unit 302a is subjected to shading correction for each component by the shading correction processing unit 350. In the line image sensor 14, there is unevenness in the amount of light due to the light source, etc., and unevenness in the sensitivity of the optical sensor element, so it is not possible to perform uniform image reading as is. In order to enable uniform image reading, shading correction is performed to correct the image data obtained from the output value when the sheet is read, using the output value when the color reference member is read. The image data after shading correction is also output for each R, G, and B component, similar to the input.
[0045] The image data output from the shading correction processing unit 350 is input to a color space conversion processing unit 351. The color space conversion processing unit 351 converts the image data for each R, G, and B component into a YCbCr format. Y is a luminance component, and Cb and Cr are color difference components. Each value of Y, Cb, and Cr is calculated for each pixel by multiplying each value of R, G, and B by a predetermined coefficient, and output. As an example, Y=0.299×R+0.587×G+0.114×B, Cb=-0.168736×R-0.331264×G+0.5×B, and Cr=0.5×R-0.418688×G-0.081312×B. By converting to the YCbCr color space here, the processing in the color gray detection processing unit 352 described later can be simplified, and the color space conversion required in the JPEG conversion processing unit 355 can be omitted.
[0046] The image data in YCbCr format acquired by the color space conversion processing unit 351 is input to a color gray detection processing unit 352 and a color gray conversion processing unit 353. The color gray detection processing unit 352 determines that an image is a color image if it contains a large amount of color difference components Cb and Cr, and determines that an image is a grayscale image if it contains few color difference components. For example, it determines that an image is a color image if there are a certain number of pixels with a certain threshold or more for the Cb and Cr components. The result of the determination as to whether the image is a color image or a grayscale image is notified to the CPU 306 via the bus 307 (DS1). If the CPU 306 wants to reflect the result of the determination by the color gray detection processing unit 352 in image processing, it changes the processing settings in the color gray conversion processing unit 353 (SS1).
[0047] The color-gray conversion processing unit 353 converts a color image into a grayscale image according to settings from the CPU 306. If a color image is not converted into a grayscale image, the input Y, Cb, and Cr components are output as is. If a color image is converted into a grayscale image, only the Y component is output, and the Cb and Cr components are not output.
[0048] The image data output from the color gray conversion processing unit 353 is input to the JPEG conversion processing unit 355. The JPEG conversion processing unit 355 compresses the image data into JPEG format. JPEG compression is often performed in YCbCr format, and a high image compression rate is achieved while suppressing visual effects by thinning out the color difference components Cb and Cr to 1 / 2 or 1 / 4. The CPU 306 sets the compression method in the JPEG conversion processing unit 355 depending on whether the image output from the color gray conversion processing unit 353 is a color image or a grayscale image. When a color image is output, JPEG compression is performed using the Y, Cb, and Cr components (SS2). When a grayscale image is output, compression is performed using only the Y component. The compressed image is stored in the RAM 303 via the bus 307.
[0049] On the other hand, the image data output from the color-gray conversion processing unit 353 is also input to a blank page determination processing unit 354. The blank page determination processing unit 354 determines whether the input image contains content such as text or is a blank image with no content. The determination result is notified to the CPU 306 via the bus 307 (DS2).
[0050] The image data stored in the RAM 303 is transferred to the PC 200 via the I / F 304 and the signal cable 305 according to the result of the determination by the blank page determination processor 354. If the blank page determination processor 354 determines that the page is blank, the image data is not transferred to the PC 200.
[0051] <Blank page determination process> The process of the blank page determination processing unit 354 will be described in detail with reference to FIG. 8. In FIG. 8, the flow of image data is indicated by solid arrows, and the flow of numerical values and determination results is indicated by dotted arrows. First, image data for each component of Y, Cb, and Cr is input to the blank page determination processing unit 354. At this time, when a grayscale image is output, only the Y component is input. The image data for each component of Y, Cb, and Cr is input to resolution conversion processing units 360a, 360b, and 360c, respectively, and converted to a resolution lower than that of the input image. For example, it is converted to 100 dpi regardless of the input resolution. By thinning out some pixels in the horizontal direction of the image data and then thinning out some pixels in the vertical direction in the same manner, the resolution is converted to 100 dpi in both the horizontal and vertical directions. Since a low-resolution image is sufficient for blank page determination, it is preferable to lower the resolution to improve the processing speed. However, if the resolution conversion processing does not become a bottleneck in the entire image processing from the viewpoint of processing speed, the resolution conversion processing units 360a, 360b, and 360c may not be required. For example, when a grayscale image is output, calculations are performed only on the Y component, so that processing may be performed at a higher resolution than when a color image is output.
[0052] <Resolution conversion> Here, an example of resolution conversion will be described. In this embodiment, the configuration is capable of executing resolution conversion processing to convert the resolution to 1 / 3, 1 / 2, 2 / 3, or 4 / 5. This can be realized by simply thinning out pixels or taking a weighted average of a plurality of pixels so that the number of pixels matches the resolution after conversion. In addition, when transferring image data from the first storage means to the second storage means (for example, from DRAM to SRAM), the transfer can be performed by DMA (Direct Memory Access) transfer. The transfer unit in this DMA transfer can be controlled by a DMAC (Direct Memory Access Controller), and the image is transferred by burst transfer. At this time, the transfer size is preferably an integer multiple of the burst length, and further preferably a magnification corresponding to all the above-mentioned resolution conversions and a multiple of the processing unit when processing in other hardware IPs that the image processing unit 302 has, and in this embodiment, the transfer size is set to 16 times the burst length.
[0053] The image data output from the resolution conversion processing units 360a, 360b, and 360c are input to binarization processing units 361a, 361b, and 361c, respectively. The binarization processing units 361a, 361b, and 361c convert the multi-value pixel data for each pixel into binary data. Here, if the pixel data is equal to or greater than a threshold, it is converted to 1, and if it is less than the threshold, it is converted to 0. By converting a multi-value image into a binary image, the amount of image data can be reduced, thereby reducing the processing load in the subsequent stages.
[0054] The binary image data output from the binarization processing units 361a, 361b, and 361c are input to edge count processing units 362a, 362b, and 362c, respectively. In the edge count processing units 362a, 362b, and 362c, if there is a change in the value of the adjacent pixel for each pixel, it is considered as an edge and counted. In the binary image of FIG. 9(a), the value of a white pixel is 1 and the value of a black pixel is 0. Using this figure as an example, edge counting will be explained. FIG. 9(a) is an image in which a dot of one pixel and the letter A are lined up. FIG. 9(b) shows the dot portion. If the pixel of interest is the central pixel P0, pixels P1, P2, P3, and P4 are adjacent pixels of the pixel of interest P0. If the pixel value of the pixel of interest and the adjacent pixel changes from 0 to 1 or from 1 to 0, it is counted as an edge. In the case of FIG. 9(b), the value of P0 is 0, the values of P1, P2, P3, and P4 are each 1, and the number of edges whose values change between the pixel of interest and the adjacent pixels is counted as 4. Also, FIG. 9(c) is an extracted upper left part of the text in FIG. 9(a). In this case, the value of the pixel of interest P0 is 0, the values of P1 and P4 among the adjacent pixels are 1, and the values of P2 and P3 are 0, and the number of edges whose values change between the pixel of interest and the adjacent pixels is counted as 2. This process is applied to all pixels of each color component, and the number of edges for each of Y, Cb, and Cr is output. The number of edges output from the edge count processing unit 362a is Ey, the number of edges output from the edge count processing unit 362b is Ecb, and the number of edges output from the edge count processing unit 362c is Ecr.
[0055] The edge counts Ey, Ecb, and Ecr counted by the edge count processors 362a, 362b, and 362c are input to a judgment value calculator 363. The judgment value calculator 363 calculates a judgment value for judging whether the document is blank or not using Ey, Ecb, and Ecr. The judgment value calculator 363 outputs the maximum value of the three input edge counts as a judgment value. If the judgment value is Jmax, it is calculated as Jmax=MAX(Ey, Ecb, Ecr). Here, MAX is a function that calculates the maximum value of multiple values entered as arguments. By using the maximum value to calculate the judgment value here, it is possible to calculate the judgment value required for appropriate blank page judgment, even if the document is biased toward the Y component, such as a document with only black characters on a white background, or a document with many color characters and the like, biased toward the color difference component.
[0056] The judgment value Jmax output from judgment value calculation unit 363 is input to blank page judgment unit 364. Blank page judgment unit 364 compares the judgment value output from judgment value calculation unit 363 with a threshold value preset by CPU 306. If the judgment value is equal to or greater than the threshold value, it can be determined that the document image contains content such as text, and is therefore determined to be not blank. If the judgment value is less than the threshold value, it can be determined that the document image does not contain any content, and is therefore determined to be blank. The judgment result is output from blank page judgment unit 364 and becomes the output of blank page judgment processing unit 354.
[0057] In this embodiment, the binary images are generated by the binarization processing units 361a, 361b, and 361c (binary image generating means), and the binary images are input to the edge count processing units 362a, 362b, and 362c to count the number of edges. However, the edges may be counted without generating a binary image. For example, the binarization processing units 361a, 361b, and 361c may be omitted, and the number of edges may be counted by the edge count processing units 362a, 362b, and 362c using a multi-value image. In this case, the difference in pixel value between the pixel of interest and the adjacent pixel may be calculated, and if the difference is equal to or greater than a threshold, it may be counted as an edge, or the edges may be counted by other methods. Furthermore, in consideration of the visual characteristic that humans are sensitive to changes in brightness, processing may be performed to detect more edges with respect to changes in the Y component. For example, the threshold value of the difference to be counted as an edge may be set to be small for the Y component and large for the Cb·Cr components.
[0058] In this embodiment, the edge count processing units 362a, 362b, and 362c count the change with adjacent pixels as an edge, but the edges may be counted by a method that does not use the change with adjacent pixels. For example, before inputting image data to the binarization processing units 361a, 361b, and 361c, a HPF (high pass filter) is applied to remove low frequency components. Then, in the binary image generated by the binarization processing units 361a, 361b, and 361c, pixels with a value of 1 can be regarded as edges. The edge count processing units 362a, 362b, and 362c can find the number of edges by counting the pixels with a value of 1.
[0059] In this embodiment, the image data in the RGB color space is converted to the YCbCr format by the color space conversion processing unit 351, but it may be converted to another format as long as the color space includes luminance or brightness as one component. For example, it may be converted to the Lab color space, and L (brightness) may be used instead of Y (luminance), and a·b (chromaticity) may be used instead of Cb·Cr (chrominance). Alternatively, it may be converted to the HSV color space, and V (brightness) may be used instead of Y (luminance), and H (hue)·S (saturation) may be used instead of Cb·Cr (chrominance).
[0060] In this embodiment, the judgment value calculation unit 363 is configured to set the maximum value of the edge counts Ey, Ecb, and Ecr as the judgment value, but the judgment value may be calculated after weighting each edge count. For example, the coefficients Ky, Kcb, and Kcr are weighted for the edge counts Ey, Ecb, and Ecr, respectively, and the judgment value is calculated as Jmax=MAX(Ky×Ey, Kcb×Ecb, Kcr×Ecr). Here, if Ky=1.0 and Kcb=Kcr=0.5, the luminance component can be emphasized and the system can be insensitive to extreme fluctuations in the color difference components. For example, image data with color shifts due to misalignment of the R, G, and B light receiving elements in the line image sensor 14 may be input. Then, the number of edges in the color difference component image data becomes extremely large, but the weighting of the number of edges can be used to set an appropriate judgment value.
[0061] In the above embodiment, the number of edges in the image data is counted for each component and used to determine whether the page is blank. This makes it possible to recognize boundaries that have the same brightness or luminance but different colors as edges. For example, edges can be recognized even if the background and text are different colors and have the same density, and it is possible to appropriately determine whether the page is blank or not.
[0062] In the above embodiment, the blank page determination is performed by using the maximum value of the edge counts of the image data for each component as the determination value. This allows the blank page determination value to be properly calculated even in a color space composed of different types of color components such as luminance and chrominance, such as YCbCr. For example, in an image with a large luminance component such as a grayscale image, a large number of edges are counted only in the Y component, and conversely, in an image with small changes in luminance and large changes in color, a large number of edges are counted in the Cb and Cr components. By taking the maximum value of these, a determination value that properly reflects the edge count can be obtained, allowing for accurate blank page determination.
[0063] In the above embodiment, the image data input to the blank page determination processing unit is in YCbCr format, which makes it possible to omit the color space conversion process required for the JPEG conversion process in the later stage, and allows for more efficient processing.
[0064] Second Embodiment In the first embodiment, a configuration in which an image in the YCbCr color space is input to the blank page determination process is shown, whereas in the second embodiment, a configuration in which an image in the RGB color space is input to the blank page determination process is shown.
[0065] The configuration of image processing units 302a and 302b in this embodiment is as shown in Fig. 10. The difference from Fig. 7 of the first embodiment is that there is no color space conversion processing unit 351, color gray detection processing unit 352, color gray conversion processing unit 353, or JPEG conversion processing unit 355. Accordingly, after the shading correction processing unit 350, the images for each of the R, G, and B components are output directly to the bus 307 and stored in the RAM 303. In addition, image data for each of the R, G, and B components is input to the blank paper determination processing unit 371. With this configuration, the image processing configuration can be simplified, which is effective in reducing costs.
[0066] Details of the blank page determination processing unit 371 are shown in Fig. 11. In Fig. 11, unlike the first embodiment, the input image data is inputted for each of the R, G, and B components, rather than Y, Cb, and Cr. The inputted image data for each component undergoes resolution conversion in resolution conversion processing units 360a, 360b, and 360c, respectively, and is binarized in binarization processing units 361a, 361b, and 361c, and the number of edges is counted in edge count processing units 362a, 362b, and 362c. These processes are the same as the processes of the same symbols in Fig. 8, except that the color components of the inputted image data are different. Note that the number of edges outputted from the edge count processing units 362a, 362b, and 362c are Er, Eg, and Eb, respectively.
[0067] The three edge counts Er, Eg, and Eb counted by edge count processing units 362a, 362b, and 362c, respectively, are input to a judgment value calculation unit 380. These three edge counts are used to calculate a judgment value for judging whether the document is blank or not. Unlike the first embodiment, the judgment value calculation unit 380 outputs the sum of the three edge counts as the judgment value. If the judgment value is Jsum, it is calculated as Jsum=Er+Eg+Eb. By taking the sum of the three edge counts of R, G, and B, it is possible to accurately judge whether an image is blank or not, whether it is an achromatic image or an image with many colors.
[0068] In addition, the judgment value calculation unit 380 calculates the total value of the three edge counts of R, G, and B, but it may also calculate the average value. In that case, if the judgment value is Jave, it is calculated as Jave = (Er + Eg + Eb) / 3.
[0069] As described above, in the second embodiment, image data for each of the R, G, and B components is input to the blank page determination process. This makes it possible to simplify the overall image processing configuration, which contributes to reducing the cost of the device.
[0070] In the second embodiment, the number of edges in the image data for each R, G, and B component is counted, and a blank page is judged based on the total number of edges for the three. This makes it possible to calculate a judgment value that properly reflects the edges of an image in a color space composed of the same color components such as R, G, and B, and to properly judge whether or not the page is blank.
[0071] Third Embodiment In the above-described embodiment, the image processing including blank page determination is performed by the image processing unit 302 in the scanner 100. In the present embodiment, the image processing may be performed by the application 501 or scanner driver 502 of the PC 200. Some or all of the processing in the image processing unit 302a shown in Fig. 7 may be performed on the PC 200. In this case, it can be said that an image processing device is realized by a configuration including the scanner 100 and the application 501 and scanner driver 502 of the PC 200.
[0072] When all the processing of the image processing unit 302a is performed by the PC 200, an image output from the ADC 301a in the scanner 100 is transmitted to the PC 200 via the bus 307, RAM 303, CPU 306, I / F 304, and signal cable 305. The image received by the PC 200 is processed by a scanner driver 502 and an application 501. The image processing on the PC 200 is realized by a program similar to the processing of the image processing unit 302a in FIG.
[0073] As described above, in the third embodiment, image processing is realized on the PC 200. This makes it possible to reduce the cost of the scanner 100, which contributes to reducing the cost of the entire system. [Explanation of symbols]
[0074] 1 Seat loading platform 14, 15 Image reading sensor (line image sensor) 100 Scanner 200 Personal Computers (PC) 301a, 301b A / D conversion section (ADC) 302, 302a, 302b Image processing unit 303 RAM 304 Interface 310 ROM 350 Shading correction processing section 351 Color space conversion processing unit 352 Color gray detection processing unit 353 Color-gray conversion processing section 354 Blank page determination processing unit 355 JPEG conversion processing section 360a, 360b, 360c Resolution conversion processing unit 361a, 361b, 361c Binarization processing unit (binary image generating means) 362a, 362b, 362c Edge count processing unit 363 Judgment value calculation unit 364 Blank page judgment section 365 Binary Image Synthesis Processing Unit 370 Color-gray conversion processing section 371 Blank page determination processing unit 380 Judgment value calculation unit 401 ROM 402 RAM 403 Hard Disk Drive (HDD) 404 Communication I / F 405 Display device 406 CPU 407 Operation section 501 Application 502 Scanner driver
Claims
1. An acquisition means for obtaining multiple components that constitute a color image obtained by scanning a document, An edge counting means for counting the number of edges of the image data for each of the plurality of components acquired by the acquisition means, A determination value calculation means for calculating a determination value for determining whether the document is blank based on the number of edges, A blank document determination means for determining whether the document is blank based on the determination value, An image processing apparatus characterized by having
2. The image processing apparatus according to claim 1, characterized in that the plurality of components are second components obtained by converting a first component, which is a component of the RGB color space obtained by reading the original document, into a color space having a component that includes either luminance or lightness.
3. The image processing apparatus according to claim 2, characterized in that the determination value calculation means uses the maximum value among the number of edges as the determination value.
4. The aforementioned plurality of components are the first components, which are components of the RGB color space obtained by reading the original document. The image processing apparatus according to claim 1, characterized in that the determination value calculation means uses the sum or average value of the number of edges as the determination value.
5. The image processing apparatus according to claim 2 or 3, characterized in that the color space is the YCbCr color space.
6. The system includes a binary image generation means that generates a binary image by binarizing each pixel in the plurality of components, The image processing apparatus according to claim 5, characterized in that the edge counting means counts each pixel in the binary image as an edge if there is a change in the pixel value between it and an adjacent pixel.
7. The image processing apparatus according to claim 6, further comprising a resolution conversion means that performs a resolution conversion process to reduce the resolution of each of the plurality of components of the image data input to the binary image generation means.
8. The image processing apparatus according to claim 7, characterized in that the determination value calculation means changes the weighting of the determination value for each of the plurality of components.
9. The image processing apparatus according to claim 7, further comprising a JPEG conversion processing means that performs a JPEG conversion process on the image data consisting of the plurality of components in parallel with the resolution conversion process by the resolution conversion means.