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

The image processing apparatus efficiently removes shadows by reducing and then enlarging the image correction table, addressing inefficiencies in existing methods and improving processing speed and accuracy.

JP2025097554APending Publication Date: 2025-07-01FUJITSU FRONTECH LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023213790
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

Existing image processing methods for removing shadows from images are inefficient due to the high computational load required for calculating correction values for each pixel, especially when dealing with large numbers of pixels.

Method used

An image processing apparatus that reduces the image, generates a correction table for the reduced image, and then enlarges this table to the original size for application to each pixel, thereby reducing the number of pixels to be processed.

Benefits of technology

This approach allows for efficient image processing by reducing the computational load, enabling faster shadow removal and preventing misrecognition of shadows due to color differences or characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025097554000001_ABST
    Figure 2025097554000001_ABST
Patent Text Reader

Abstract

To efficiently perform image processing for removing shadows from an image.SOLUTION: An image processing apparatus 10 reduces a read image 1. The image processing apparatus 10 generates a first correction table 3 indicating correction values to be applied to each pixel of a reduced image 2 to remove shadows from the reduced image 2 obtained by reducing the read image 1. The image processing apparatus 10 generates a second correction table 4 in which the first correction table 3 is enlarged to the same size as the read image 1. The image processing apparatus 10 applies the correction value shown in the second correction table 4 to each pixel of the read image 1 and outputs a corrected image 5.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing apparatus, an image processing method, and an image processing program.

Background Art

[0002] When reading documents or the like with a stand-type scanner, shadows may be reflected in the read image. In order to appropriately recognize characters and the like when performing OCR (Optical Character Recognition) processing using the read image, image processing for removing shadows is executed.

[0003] As an image processing technology for removing shadows, for example, an image processing apparatus has been proposed that reduces the labor of an operator and enables stable reading of an image without being affected by shadows generated after calibration. Further, as an image processing technology, for example, an image processing apparatus has been proposed that reduces the influence of noise and always accurately extracts a subject by high-pass filter processing. Further, for example, an image processing apparatus has been proposed that appropriately performs correction processing in copying an image in which characters, graphs, photographs, etc. are mixed on a document.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Patent Document 2

Patent Document 3

Summary of the Invention

Problems to be Solved by the Invention

[0005] In order to remove shadows from an image, it is conceivable to calculate a correction value for each pixel of the image and apply the calculated correction value to each pixel. However, when the number of pixels in the image to be processed is large, image processing takes time.

[0006] On one aspect, the present case aims to efficiently perform image processing for removing shadows from an image.

Means for Solving the Problem

[0007] In one proposal, an image processing apparatus having a processing unit is provided. The processing unit reduces the read image, generates a first correction table indicating a correction value to be applied to each pixel of the reduced image in order to remove shadows from the reduced image obtained by reducing the read image, generates a second correction table obtained by enlarging the first correction table to the same size as the read image, and applies the correction value indicated in the second correction table to each pixel of the read image to output a corrected image.

Effect of the Invention

[0008] According to one aspect, it is possible to efficiently perform image processing for removing shadows from an image.

Brief Description of the Drawings

[0009]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Embodiments for Carrying Out the Invention

[0010] Hereinafter, this embodiment will be described with reference to the drawings. Note that multiple embodiments can be combined and implemented within a non - conflicting range. 〔First Embodiment〕 First, the first embodiment will be described.

[0011] FIG. 1 is a diagram showing an example of an image processing apparatus according to the first embodiment. The first embodiment is for removing shadows from an image. The image processing apparatus 10 is a computer that executes image processing for removing shadows from an image. The image processing apparatus 10 is, for example, a PC (Personal Computer) operated by a staff member at a window of a financial institution such as a bank. The image processing apparatus 10 has a processing unit 11. The processing unit 11 controls the image processing apparatus 10 and can execute required processing. The processing unit 11 is, for example, a processor or an arithmetic circuit included in the image processing apparatus 10.

[0012] First, the processing unit 11 acquires a read image 1. The read image 1 is an image obtained by reading a document such as a form used in a financial institution. For example, the processing unit 11 causes a stand - type scanner to read a document placed by a staff member and generates the read image 1. The processing unit 11 reduces the read image 1. For example, when the processing unit 11 reduces the read image 1 to 1 / n, it divides the read image 1 into blocks of n×n pixels each in the vertical and horizontal directions. For each block, the processing unit 11 generates a reduced image 2 by setting the pixels at positions that overlap when the read image 1 is reduced to 1 / n to the average of the pixel values of the pixels included in the block. Note that the processing unit 11 may generate a reduced image 2 by reducing the read image 1 by a bilinear method, a bicubic method, or the like.

[0013] The processing unit 11 generates a first correction table 3 indicating correction values to be applied to each pixel of the reduced image 2 in order to remove the shadow from the reduced image 2. For example, the processing unit 11 generates a first correction table 3 indicating correction values to be applied to the brightness of each pixel of the reduced image 2 as follows. The processing unit 11 generates a brightness image indicating the brightness of each pixel of the reduced image 2. The processing unit 11 groups the pixels of the brightness image based on the hue and saturation of the reduced image 2. The processing unit 11 sets the correction value of each pixel of the first correction table 3 to the ratio of the brightness of the corresponding pixel of the brightness image to the pixel with the highest brightness among the pixels in the same group as the said pixel.

[0014] The processing unit 11 generates a second correction table 4 obtained by enlarging the first correction table 3 to the same size as the read image 1. For example, the processing unit 11 identifies a plurality of second pixels at positions corresponding to the first pixel 3a of the first correction table 3. Here, the processing unit 11 identifies the second pixels 4a, 4b, 4c, 4d at positions overlapping with the first pixel 3a when the first correction table 3 is enlarged to the same size as the read image 1. Then, the processing unit 11 generates a second correction table 4 in which the correction values of the second pixels 4a, 4b, 4c, 4d are set to the correction value of the first pixel 3a. Note that the processing unit 11 may generate the second correction table 4 by enlarging the first correction table 3 by means of bilinear interpolation, bicubic interpolation, or the like.

[0015] The processing unit 11 outputs a corrected image 5 by applying the correction values indicated in the second correction table 4 to each pixel of the read image 1. For example, the processing unit 11 outputs a corrected image 5 in which the value obtained by multiplying the brightness of each pixel of the read image 1 by the correction value indicated in the corresponding pixel of the second correction table 4 is taken as the brightness, and the hue and saturation are the hue and saturation of the read image 1.

[0016] According to the first embodiment, the processing unit 11 of the image processing apparatus 10 reduces the read image 1 and generates a first correction table 3 indicating correction values to be applied to each pixel of the reduced image for removing shadows from the reduced image 2 obtained by reducing the read image 1. The processing unit 11 generates a second correction table 4 obtained by enlarging the first correction table 3 to the same size as the read image 1, and outputs a corrected image 5 by applying the correction values indicated in the second correction table 4 to each pixel of the read image 1.

[0017] Thereby, the image processing apparatus 10 can perform the creation process of the correction table, which is a process with a large load among the image processing for removing shadows, using the reduced image 2 having a smaller number of pixels than the read image 1. Therefore, the image processing apparatus 10 can efficiently perform the image processing for removing shadows from the image.

[0018] Further, the processing unit 11 generates a second correction table 4 in which the correction values of the second pixels 4a, 4b, 4c, 4d at the positions corresponding to the first pixel 3a of the first correction table 3 are set to the correction value of the first pixel 3a. Thereby, the image processing apparatus 10 can efficiently generate the second correction table 4 from the first correction table 3.

[0019] Note that the processing unit 11 may generate a brightness image indicating the brightness of each pixel of the reduced image 2, and group the pixels of the brightness image based on the hue and saturation of the reduced image. Then, the processing unit 11 may set the correction value of the first correction table 3 corresponding to the third pixel of the brightness image based on the brightness of the third pixel and the brightness of the pixels in the same group as the third pixel. Thereby, the image processing apparatus 10 can prevent misrecognizing the shadow part due to the color difference.

[0020] Further, the processing unit 11 may extract characters from the brightness image and group the pixels of the brightness image obtained by removing the extracted characters. Thereby, the image processing apparatus 10 can prevent misrecognizing the characters included in the image as shadows.

[0021] 〔Second Embodiment〕 Next, a second embodiment will be described. The second embodiment is to remove shadows from an image obtained by reading a document with a scanner in a financial institution.

[0022] FIG. 2 is a diagram showing an example of an information processing system according to the second embodiment. The information processing system of the second embodiment is installed at the window of a financial institution such as a bank. The information processing system of the second embodiment includes a scanner 20, a monitor 31, and a control PC 100.

[0023] The scanner 20 is a stand-alone scanner connected to the control PC 100. The scanner 20 reads a document placed by a staff member of the financial institution to generate an image of the document, and transmits the generated image to the control PC 100. The monitor 31 is a display device connected to the control PC 100. The monitor 31 displays an image obtained by the control PC 100 performing image processing to remove shadows from the image generated by the scanner 20.

[0024] The control PC 100 is a PC operated by a staff member at the window of the financial institution. When the control PC 100 acquires an image from the scanner 20, it reduces the acquired image. The control PC 100 generates a correction table for removing shadows from the reduced image. The control PC 100 enlarges the correction table and applies it to the original acquired image to remove shadows from the image acquired from the scanner 20. The control PC 100 causes the monitor 31 to display the shadow-removed image. In addition, the control PC 100 identifies information related to transactions described in the read document, such as the account number and transaction amount of the account for the transaction, by performing OCR processing on the shadow-removed image. Next, the scanner 20 will be described.

[0025] FIG. 3 is a diagram showing an example of a stand-type scanner. Scanner 20 has a camera 40, a pedestal 50, and a support column 60. The camera 40 and the pedestal 50 are attached to the support column 60 so as to face each other. The camera 40 is a camera for photographing a document (reading medium) installed by a staff member. The camera 40 has a lens 40a facing the direction of the pedestal 50. The photographing direction of the camera 40 is the direction of the pedestal 50 towards which the lens 40a is facing. The pedestal 50 is a pedestal for installing a reading medium. For example, the pedestal 50 is uniformly black in order to facilitate detection of the outline of the reading medium and reduce the influence caused by the reading medium being transparent.

[0026] The control PC 100 causes such a scanner 20 to read a reading medium and generate an image. Here, an object placed near the scanner 20 or the light from the light source to the pedestal 50 may be blocked by the operator, and a shadow may be formed on the pedestal 50. Then, the scanner 20 generates an image of the reading medium in which the shadow formed on the pedestal 50 is reflected. When the control PC 100 performs OCR processing using the image of the reading medium in which the shadow is reflected, it may misrecognize the information of the transaction described on the reading medium.

[0027] In order to improve the accuracy of the OCR processing, it is conceivable to remove the shadow using a correction table showing a correction value for the brightness of the image of the reading medium. However, in the shadow removal using the correction table, since the correction value for each pixel is calculated, when the number of pixels of the image of the reading medium is large, the processing time becomes long.

[0028] Therefore, in the second embodiment, the control PC 100 reduces the image of the reading medium and generates a correction table for removing the shadow from the reduced image. Then, the control PC 100 enlarges the generated correction table and applies it to the original image of the reading medium to remove the shadow from the image of the reading medium.

[0029] FIG. 4 is a diagram showing a configuration example of the hardware of the control PC. The control PC 100 is controlled as a whole by a processor 101. A memory 102 and a plurality of peripheral devices are connected to the processor 101 via a bus 110. The processor 101 may be a multiprocessor. The processor 101 is, for example, a CPU (Central Processing Unit), an MPU (Micro Processing Unit), or a DSP (Digital Signal Processor). At least a part of the functions realized by the execution of a program by the processor 101 may be realized by an electronic circuit such as an ASIC (Application Specific Integrated Circuit) or a PLD (Programmable Logic Device).

[0030] The memory 102 is used as the main storage device of the control PC 100. At least a part of the OS (Operating System) program and the application program to be executed by the processor 101 is temporarily stored in the memory 102. Also, various data used for the processing by the processor 101 is stored in the memory 102. As the memory 102, for example, a volatile semiconductor storage device such as a RAM (Random Access Memory) is used.

[0031] The peripheral devices connected to the bus 110 include a storage device 103, a GPU (Graphics Processing Unit) 104, an input interface 105, an optical drive device 106, device connection interfaces 107 and 108, and a network interface 109.

[0032] The storage device 103 writes and reads data electrically or magnetically to and from the built-in recording medium. The storage device 103 is used as an auxiliary storage device of a computer. The storage device 103 stores the OS program, application programs, and various data. Note that as the storage device 103, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive) can be used.

[0033] The monitor 31 is connected to the GPU 104. The GPU 104 displays an image on the screen of the monitor 31 according to an instruction from the processor 101. Examples of the monitor 31 include a display device using organic EL and a liquid crystal display device.

[0034] The keyboard 32 and the mouse 33 are connected to the input interface 105. The input interface 105 transmits signals sent from the keyboard 32 or the mouse 33 to the processor 101. Note that the mouse 33 is an example of a pointing device, and other pointing devices can also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, and a trackball.

[0035] The optical drive device 106 reads data recorded on the optical disc 34 using a laser beam or the like. The optical disc 34 is a portable recording medium on which data is recorded so that it can be read by reflection of light. Examples of the optical disc 34 include a DVD (Digital Versatile Disc), a DVD-RAM, a CD-ROM (Read Only Memory), and a CD-R (Recordable) / RW (ReWritable).

[0036] The device connection interface 107 is a communication interface for connecting peripheral devices to the control PC 100. For example, a memory device 35 and a memory reader / writer 36 can be connected to the device connection interface 107. The memory device 35 is a recording medium equipped with a communication function with the device connection interface 107. The memory reader / writer 36 is a device for writing data to or reading data from the memory card 37. The memory card 37 is a card-type recording medium.

[0037] The camera 40 of the scanner 20 is connected to the device connection interface 108. The camera 40 has a control CPU 41, an image sensor 42, and a RAM 43. The control CPU 41 controls the camera 40 in response to an instruction from the control PC 100. The control CPU 41 has a USB (Universal Serial Bus) controller 41a. The USB controller 41a transmits and receives data to and from the device connection interface 108 via USB connection. The control CPU 41 causes the image sensor 42 to generate image data and stores the image data generated by the image sensor 42 in the RAM 43. Also, the control CPU 41 transmits the image data stored in the RAM 43 to the control PC 100.

[0038] The image sensor 42 is an element that generates image data of the scene in front of the lens 40a. The image sensor 42 is equipped with an RGB (Red Green Blue) color filter and can generate a color image. The RAM 43 is a storage area that stores the image data generated by the image sensor 42.

[0039] The network interface 109 is connected to the network 30. The network interface 109 transmits and receives data to and from other computers or communication devices via the network 30.

[0040] The control PC 100 can realize the processing functions of the second embodiment with the above-described hardware configuration. Note that the image processing apparatus 10 shown in the first embodiment can also be realized with the same hardware as the control PC 100 shown in FIG. 4. Further, the processor 101 is an example of the processing unit 11 shown in the first embodiment.

[0041] The control PC 100 realizes the processing functions of the second embodiment by executing a program recorded on a computer-readable recording medium, for example. Programs describing the processing contents to be executed by the control PC 100 can be recorded on various recording media. For example, a program to be executed by the control PC 100 can be stored in the storage device 103. The processor 101 loads at least a part of the program in the storage device 103 into the memory 102 and executes the program. Also, a program to be executed by the control PC 100 can be recorded on a portable recording medium such as an optical disk 34, a memory device 35, or a memory card 37. The program stored in the portable recording medium becomes executable after being installed in the storage device 103 under the control of, for example, the processor 101. Also, the processor 101 can directly read and execute the program from the portable recording medium. Next, the functions of the control PC 100 will be described in detail.

[0042] FIG. 5 is a block diagram showing a functional example of the control PC. The control PC 100 includes an image acquisition unit 121, an image reduction unit 122, a division unit 123, an edge removal unit 124, a grouping unit 125, a shadow information creation unit 126, a shadow information expansion unit 127, a shadow correction unit 128, and a storage unit 130. The image acquisition unit 121, the image reduction unit 122, the division unit 123, the edge removal unit 124, the grouping unit 125, the shadow information creation unit 126, the shadow information expansion unit 127, and the shadow correction unit 128 are realized by the processor 101 executing a program stored in the memory 102.

[0043] The storage unit 130 is realized by using the storage area of the memory 102 or the storage device 103. The storage unit 130 stores a grouping table 131. The grouping table 131 is a table showing a pixel grouping pattern according to hue and saturation.

[0044] The image acquisition unit 121 acquires an image of a reading medium photographed. For example, the image acquisition unit 121 causes the camera 40 of the scanner 20 to photograph the reading medium and acquires the photographed image. The image reduction unit 122 reduces the original image acquired by the image acquisition unit 121. For example, the image reduction unit 122 divides the original image into blocks of n×n pixels each in the vertical and horizontal directions. The image reduction unit 122 generates, for each block, an image in which pixels at overlapping positions when the original image is reduced to 1 / n are set to the average of the pixel values of the pixels included in the block.

[0045] The division unit 123 performs HSV (Hue Saturation Value) conversion on the reduced image reduced by the image reduction unit 122. For example, the division unit 123 converts the RGB pixel values set for each pixel of the reduced image into pixel values of hue, saturation, and lightness. Further, the division unit 123 generates a lightness image in which lightness is extracted from the HSV image obtained by subjecting the reduced image to HSV conversion.

[0046] The edge removal unit 124 removes character information from the lightness image generated by the division unit 123. For example, the edge removal unit 124 detects edge pixels from the lightness image by edge detection processing and complements the edge pixels using the lightness of surrounding pixels.

[0047] The grouping unit 125 groups the pixels of the lightness image based on the hue and saturation of the HSV image. For example, the grouping unit 125 refers to the ranges of hue and saturation corresponding to each group set in the grouping table 131. The grouping unit 125 identifies that each pixel of the lightness image belongs to a group whose corresponding hue and saturation of the corresponding pixel in the HSV image are included in the corresponding range.

[0048] The shadow information creation unit 126 creates a correction table for removing shadows from the reduced image. The shadow information creation unit 126 calculates a correction value for removing shadows for each group of pixels grouped by the grouping unit 125. The shadow information creation unit 126 determines, as a reference pixel, the pixel with the highest brightness among the pixels included in each group. Then, the shadow information creation unit 126 calculates the correction value of the pixel in the correction table as the value obtained by dividing the brightness of the reference pixel in the same group as the pixel by the brightness of the pixel in the brightness image.

[0049] The shadow information expansion unit 127 generates a correction table obtained by expanding the correction table generated by the shadow information creation unit 126 to the same size as the original image. For example, the shadow information expansion unit 127 generates a correction table in which the correction value of each pixel is set to the correction value of the pixel in the correction table generated by the shadow information creation unit 126 at a position that overlaps when the correction table generated by the shadow information creation unit 126 is expanded to the same size as the original image.

[0050] The shadow correction unit 128 corrects the original image using the correction table generated by the shadow information expansion unit 127. For example, the shadow correction unit 128 generates a corrected image obtained by multiplying the brightness of each pixel in the original image by the correction value of the pixel at the same position in the correction table generated by the shadow information expansion unit 127 for correction.

[0051] Note that the lines connecting the elements shown in FIG. 5 indicate a part of the communication path, and communication paths other than the illustrated communication path can also be set. Next, the grouping table 131 stored in the storage unit 130 will be described in detail.

[0052] FIG. 6 is a diagram showing an example of the grouping table. The grouping table 131 is a table showing a pixel grouping pattern according to hue and saturation. The grouping table 131 has columns for group, H, and S. In the group column, a group corresponding to the values in the H and S columns is set. In the H column, a range of pixel values indicating hue is set. In the S column, a range of pixel values indicating saturation is set.

[0053] For example, in the grouping table 131, when the item of the group is G1, the item of H is associated with 0 to 30, and the item of S is associated with 0 to 15. Then, the grouping unit 125 sets the pixels whose hue pixel value of the HSV image is 0 to 30 and whose saturation pixel value is 0 to 15 to the group G1. Next, the correction process of the image of the reading medium will be described.

[0054] FIG. 7 is a diagram (part 1) showing an example of the image correction process. The control PC 100 executes an image correction process for removing the shadow after the camera 40 of the scanner 20 captures the reading medium. First, the image acquisition unit 121 acquires an image 71 from the scanner 20. The image 71 is an image obtained by photographing the reading medium with the camera 40. RGB pixel values are set for each pixel of the image 71. The image reduction unit 122 generates a reduced image 72 of the image 71.

[0055] Here, the image reduction unit 122 generates an image 72 whose vertical and horizontal pixel numbers are half of those of the image 71. For example, the image reduction unit 122 divides the image 71 into blocks of 2×2 pixels each in the vertical and horizontal directions. For each block, the image reduction unit 122 generates an image 72 in which the pixels at the overlapping positions when the image 71 is reduced to half the size are set to the average of the pixel values of the pixels included in the block. Note that the image reduction unit 122 may reduce the image 71 by a bilinear method, a bicubic method, or the like.

[0056] The division unit 123 performs HSV conversion on the image 72. The division unit 123 converts the RGB pixel values of each pixel of the image 72 into hue, saturation, and lightness pixel values. The division unit 123 generates an image 73 in which the color components (saturation and lightness) are removed from the HSV-converted image 72 and the lightness is extracted. The edge removal unit 124 generates an image 74 from which the character information is removed from the image 73. For example, the edge removal unit 124 detects edge pixels from the image 73. Then, the edge removal unit 124 generates an image 74 in which the lightness of the detected edge pixels is complemented based on the lightness of the pixels other than the surrounding edge pixels.

[0057] FIG. 8 is a diagram (part 2) showing an example of image correction processing. The grouping unit 125 groups the pixels of the HSV-converted image 72 according to hue and saturation. The grouping unit 125 refers to the grouping table 131 and identifies that each pixel of the image 72 belongs to a group included in the corresponding range of hue and saturation. Here, it is assumed that the grouping unit 125 has identified that the pixels included in the region 72a, which is the dark red part of the image 72, belong to the same group. Also, it is assumed that the grouping unit 125 has identified that the pixels included in the region 72b, which is the light red part of the image 72, belong to the same group.

[0058] The shadow information creation unit 126 calculates a correction value for removing the shadow for each group. The shadow information creation unit 126 determines, as a reference pixel, the pixel with the highest brightness among the pixels included in each group. Then, the shadow information creation unit 126 calculates the correction value of the pixel included in the image 74 as the value obtained by dividing the brightness of the reference pixel of the same group as the pixel by the brightness of the pixel.

[0059] Here, it is assumed that the shadow information creation unit 126 has determined that each pixel included in the region 74a-1 of the region 74a at the same position as the region 72a in the image 74 is the reference pixel with the highest brightness among the pixels included in the region 74a. And it is assumed that when the brightness of the reference pixel is divided by the brightness of each pixel included in the region 74a-2 of the region 74a, the result is calculated as 1.5. Then, the shadow information creation unit 126 calculates a correction value indicating that the brightness of the pixel at the position corresponding to the region 74a-2 is to be multiplied by 1.5.

[0060] Further, it is assumed that in the image 74, each pixel included in the region 74b-1 of the region 74b at the same position as the region 72b is determined to be the reference pixel having the highest brightness among the pixels included in the region 74b. Then, it is assumed that when the brightness of the reference pixel is divided by the brightness of each pixel included in the region 74b-2 of the region 74b, the result is calculated to be 1.5. Then, the shadow information creation unit 126 calculates a correction value indicating that the brightness of the pixel at the position corresponding to the region 74b-2 is to be multiplied by 1.5.

[0061] The shadow information creation unit 126 generates a correction table 81 by combining the information on the correction values calculated for each group. The correction table 81 has the same size as the image 72, and correction values are set for each pixel. Here, the shadow information creation unit 126 generates a correction table 81 indicating that the brightness of the pixels included in the region 81a including the regions at the same positions as the regions 74a-2 and 74b-2 is to be multiplied by 1.5.

[0062] FIG. 9 is a diagram (part 3) showing an example of the image correction process. The shadow information enlarging unit 127 generates a correction table 82 obtained by enlarging the correction table 81 to the same size as the image 71. For example, the shadow information enlarging unit 127 generates a correction table 82 in which the correction value of each pixel is set to the correction value of the pixel of the correction table 81 at the overlapping position when the correction table 81 is enlarged to the same size as the image 71. Here, the shadow information creation unit 126 generates a correction table 82 indicating that the brightness of the pixels included in the region 82a at the position overlapping the region 81a when the correction table 81 is enlarged to the same size as the image 71 is to be multiplied by 1.5.

[0063] Then, the shadow correction unit 128 corrects the image 71 using the correction table 82. The shadow correction unit 128 generates a corrected image 75 by multiplying the brightness value of each pixel of the HSV-converted image 71 by the correction value of the pixel at the same position in the correction table 82. Here, the shadow correction unit 128 generates a corrected image 75 by multiplying the brightness of the pixels included in the region indicated by the region 82a of the image 71 by 1.5.

[0064] In this way, the control PC 100 generates the image 75 from which the shadow has been removed from the image 71. Here, even in a portion where the shadow in the image is not reflected, the brightness may vary depending on the color. Therefore, if a pixel with a low brightness is simply determined to be a portion where the shadow is reflected, a portion of a color with a low brightness may be misrecognized as a portion where the shadow is reflected. Thus, the control PC 100 groups the pixels based on the hue and saturation, determines that a pixel with a low brightness within the group is a portion where the shadow is reflected, and sets a correction value. Thereby, the control PC 100 can prevent misrecognizing a portion where the shadow is reflected due to a color difference.

[0065] Also, for example, in a portion where black characters in the image are reflected, the brightness becomes low. Therefore, a portion where black characters are reflected may be misrecognized as a portion where the shadow is reflected. Thus, the control PC 100 removes the edge portion and then groups the pixels and calculates a correction value. Thereby, the control PC 100 can prevent misrecognizing the characters included in the image as a shadow.

[0066] The control PC 100 executes the generation of the image 73 indicating the brightness, the removal of the character information, the grouping of the pixels, and the generation of the correction table 81 by calculating the correction value for each group, using the image 72 obtained by reducing the image 71. Since the conversion process of converting the RGB pixel values to the HSV pixel values, the edge removal process, and the correction value calculation process are performed for each pixel, if the size of the image is large, the processing load becomes large. Thus, the control PC 100 can efficiently perform the image processing for removing the shadow from the image 71 by performing the processing with a large load using the image 72 having fewer pixels than the image 71. Next, the enlargement process of the correction table will be described.

[0067] FIG. 10 is a diagram showing an example of the enlargement process of the correction table. The correction table 81 is a correction table for removing shadows from the image 72. The correction table 81 has the same size as the image 72 and includes N pixels in the vertical direction and M pixels in the horizontal direction. A correction value is set for each pixel of the correction table 81. When the correction value of the pixel at the same position in the correction table 81 is multiplied by the brightness value of each pixel of the HSV-converted image 72, the shadow is removed from the image 72.

[0068] The shadow information enlarging unit 127 generates a correction table 82 obtained by enlarging the correction table 81 by a factor of 2. The correction table 82 has the same size as the image 71 and includes 2N pixels in the vertical direction and 2M pixels in the horizontal direction. The shadow information enlarging unit 127 sets the correction values of the pixels indicated by (2x - 1, 2y - 1), (2x, 2y - 1), (2x - 1, 2y), and (2x, 2y) in the correction table 82 to the correction value of the pixel indicated by (x, y) in the correction table 81. Here, let (x, y) indicate the pixel at the x-th position from the left and the y-th position from the top. For example, when the correction value of the pixel indicated by (1, 1) in the correction table 81 is 1.0, the shadow information enlarging unit 127 sets the correction values of the pixels indicated by (1, 1), (2, 1), (1, 2), and (2, 2) in the correction table 82 to 1.0.

[0069] In this way, the control PC 100 enlarges the correction table 81 to generate the correction table 82. Here, since the control PC 100 sets the correction value of the correction table 82 to the correction value at the corresponding position of the calculated correction table 81, the processing load is small. Therefore, the control PC 100 can efficiently generate the correction table 82 from the correction table 81. Note that the control PC 100 may enlarge the correction table 81 by a bilinear method, a bicubic method, or the like to generate the correction table 82. Hereinafter, the processing executed by the control PC 100 will be described in detail.

[0070] FIG. 11 is a flowchart showing an example of the procedure of the image correction process. Hereinafter, the process shown in FIG. 11 will be described according to the step numbers. [Step S11] The image acquisition unit 121 acquires an image of the reading medium. For example, the image acquisition unit 121 causes the camera 40 of the scanner 20 to capture the reading medium and acquires the captured image. Note that the image acquisition unit 121 may perform calibration to remove the shadow caused by the installation environment such as the shadow caused by the support column 60 from the acquired image.

[0071] [Step S12] The image reduction unit 122 reduces the original image acquired in Step S11. For example, the image reduction unit 122 divides the original image into blocks of pixels of n×n each in the vertical and horizontal directions. The image reduction unit 122 generates an image in which, for each block, the pixels at the overlapping positions when the original image is reduced to 1 / n are set to the average of the pixel values of the pixels included in the block.

[0072] [Step S13] The division unit 123 performs HSV conversion on the reduced image reduced in Step S12. For example, the division unit 123 converts the RGB pixel values set for each pixel of the reduced image into pixel values of hue, saturation, and lightness.

[0073] [Step S14] The division unit 123 generates a lightness image in which lightness is extracted from the HSV image HSV-converted in Step S13. [Step S15] The edge removal unit 124 removes character information from the lightness image generated in Step S14. The edge removal unit 124 detects edge pixels from the lightness image by edge detection processing and sets the lightness of the edge pixels to 0. The edge removal unit 124 complements the pixels with a lightness of 0 using the lightness of the surrounding pixels. For example, the edge removal unit 124 sets the lightness of the pixels with a lightness of 0 to the average value or the maximum value of the lightness of the pixels within a predetermined range from the pixel.

[0074] [Step S16] The grouping unit 125 groups the pixels of the HSV image based on the hue and saturation. For example, the grouping unit 125 selects one group set in the group item of the grouping table 131. The grouping unit 125 determines that the pixels having the hue within the range set in the H item corresponding to the selected group and the saturation within the range set in the S item corresponding to the selected group in the image HSV-converted in step S13 belong to the selected group. The grouping unit 125 executes the above processing for each group set in the group item of the grouping table 131.

[0075] [Step S17] The shadow information creation unit 126 selects one group of the pixels of the HSV image grouped in step S16. [Step S18] The shadow information creation unit 126 refers to the pixels at the same positions as the pixels belonging to the selected group in the lightness image. The shadow information creation unit 126 determines the pixel with the highest lightness among the referred pixels as the reference pixel.

[0076] [Step S19] The shadow information creation unit 126 calculates, for each pixel of the lightness image referred to in step S18, the ratio of the lightness to the reference pixel determined in step S18 as the correction value. For example, the shadow information creation unit 126 calculates the correction value of the pixel of the lightness image referred to in step S18 as the value obtained by dividing the lightness of the reference pixel by the lightness of the pixel.

[0077] [Step S20] The shadow information creation unit 126 determines whether all groups have been selected in step S17. If the shadow information creation unit 126 determines that all groups have been selected, the process proceeds to step S21. If the shadow information creation unit 126 determines that there are still unselected groups, the process proceeds to step S17.

[0078] [Step S21] The shadow information creation unit 126 combines the information on the correction values calculated for each group to generate a correction table. For example, the shadow information creation unit 126 sets the correction value calculated in Step S19 for each pixel of the correction table having the same size as the reduced image.

[0079] [Step S22] The shadow information enlarging unit 127 enlarges the correction table generated in Step S21. For example, the shadow information enlarging unit 127 generates a correction table in which the correction value of each pixel is set to the correction value of the pixel of the correction table generated in Step S21 at the overlapping position when the correction table generated in Step S21 is enlarged to the same size as the original image.

[0080] [Step S23] The shadow correction unit 128 corrects by multiplying the brightness of each pixel of the original image by the correction value of the correction table generated in Step S22. For example, the shadow correction unit 128 generates a corrected image by multiplying the value of the brightness of each pixel of the HSV-converted original image by the correction value of the pixel at the same position of the correction table generated in Step S22 for correction.

[0081] [Step S24] The shadow correction unit 128 outputs the corrected image. For example, the shadow correction unit 128 causes the corrected image to be displayed on the monitor 31. Further, the shadow correction unit 128 may store the corrected image in the storage device 103, or may output the corrected image to software that executes OCR processing.

[0082] In this way, the control PC 100 corrects the original image captured by the camera 40. The control PC 100 reduces the original image and generates a correction table for removing shadows from the reduced image. Then, the control PC 100 enlarges the generated correction table to the same size as the original image, and applies the correction value indicated in the enlarged correction table to each pixel of the original image to generate a corrected image.

[0083] As a result, the control PC 100 can perform processing with a large load per pixel, such as conversion processing from RGB pixel values to HSV pixel values, edge removal processing, and correction value calculation processing, using a reduced image with fewer pixels than the original image. Therefore, the control PC 100 can reduce the number of pixels to be processed and efficiently perform image processing for removing shadows from the image. In this way, the control PC 100 can reduce the waiting time from when a customer submits a document until the transaction is executed in a financial institution by shortening the image processing time for the reading medium.

[0084] In addition, the control PC 100 generates an enlarged correction table by setting the correction values of a plurality of pixels at positions corresponding to the pixels of the correction table generated using the reduced image to the correction values of the pixels of the correction table generated using the reduced image. Thereby, the control PC 100 can efficiently execute the enlargement of the correction table.

[0085] In addition, in generating the correction table using the reduced image, the control PC 100 groups each pixel of the lightness image based on the hue and saturation of the reduced image. Then, the control PC 100 sets the correction value of the correction table corresponding to the pixel of the lightness image to the lightness of the pixel and the ratio of the lightness of the pixels in the same group as the pixel. Thereby, the control PC 100 can determine that a pixel with a small lightness in a portion where the color is the same is a portion where a shadow is reflected, and can prevent misrecognizing the shadow portion due to a color difference.

[0086] In addition, the control PC 100 extracts characters from the lightness image before grouping and removes the extracted characters. Thereby, the control PC 100 can prevent misrecognizing the characters included in the image as a shadow.

[0087] As described above, although the embodiments have been illustrated, the configurations of each part shown in the embodiments can be replaced with other ones having the same functions. Also, other arbitrary components or steps may be added. Furthermore, combinations of any two or more of the configurations (features) in the above-described embodiments may be used.

Description of Reference Numerals

[0088] 1 Read image 2 Reduced image 3 First correction table 3a First pixel 4 Second correction table 4a, 4b, 4c, 4d Second pixel 5 Corrected image 10 Image processing apparatus 11 Processing unit

Claims

1. A processing unit that reduces a read image, generates a first correction table indicating correction values to be applied to each pixel of the reduced image in order to remove shadows from the reduced image obtained by reducing the read image, generates a second correction table obtained by enlarging the first correction table to the same size as the read image, and outputs a corrected image by applying the correction values indicated in the second correction table to each pixel of the read image. An image processing apparatus having the same.

2. The processing unit generates the second correction table in which the correction values of a plurality of second pixels at positions corresponding to the first pixel of the first correction table are set to the correction value of the first pixel. The image processing apparatus according to Claim 1.

3. The processing unit generates a brightness image indicating the brightness of each pixel of the reduced image, groups the pixels of the brightness image based on the hue and saturation of the reduced image, and sets the correction value of the first correction table corresponding to the third pixel of the brightness image based on the brightness of the third pixel and the brightness of the pixels in the same group as the third pixel. The image processing apparatus according to Claim 1.

4. The processing unit extracts characters from the brightness image and groups the pixels of the brightness image from which the extracted characters have been removed. The image processing apparatus according to Claim 3.

5. A computer reduces a read image, generates a first correction table indicating correction values to be applied to each pixel of the reduced image in order to remove shadows from the reduced image obtained by reducing the read image, generates a second correction table obtained by enlarging the first correction table to the same size as the read image, applies the correction values indicated in the second correction table to each pixel of the read image, and outputs a corrected image. An image processing method.

6. Causes a computer to reduce a read image, generate a first correction table indicating correction values to be applied to each pixel of the reduced image in order to remove shadows from the reduced image obtained by reducing the read image, generate a second correction table obtained by enlarging the first correction table to the same size as the read image, apply the correction values indicated in the second correction table to each pixel of the read image, and output a corrected image. An image processing program for executing the processing.

Citation Information

Patent Citations

  • Shading correcting circuit

    JP2003153132A

  • Document display apparatus, and control method and program for document display apparatus

    JP2006091201A

  • Image processing unit, image processing method, and stand-type scanner

    JP2014045396A

  • Image processing device and image processing method

    JP2017146856A

  • Unit and method for processing image

    JP2009038580A