Reading device
By using a reader and a controller in the reading device, estimating the corner shape of the ID card, the problem of not being able to fully read the ID card surface in the prior art, and high-precision reading of the ID card surface is achieved.
Patent Information
- Application Number
- CN202110251751.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-06
- Filing Date
- 2021-03-08
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-03-08
AI Technical Summary
The existing tablet reading device cannot effectively read the four circular corners of the ID card, resulting in missing some card information in the image data.
A reading device is designed, through the cooperation of the reader and the controller, the image data of the ID card can be read, and the corner shape of the card is estimated by the edge information, thereby fully reading the surface of the card.
Complete reading of the entire surface of the ID card is achieved, avoiding the black area in the image data to represent the unreaded part, and improving the reading accuracy and accuracy.
Smart Images

Figure CN113364931B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a reading device. Background Art
[0002] Authentication or similar processing is generally performed at various service windows and via mail correspondence or the Internet. Therefore, there is an increasing demand for a technique for reading the surface of a thick ID card such as a driver's license or a health insurance card for reading and copying.
[0003] To meet this demand, some conventional devices having an original reading function have been provided with a specific mode for reading both the front and back of a card and outputting the images of the front and back together to a single file or to a single sheet of paper.
[0004] A device for reading an original using a flatbed system is provided with a platen glass on which the original is placed and a reading unit movably disposed below the platen glass. When the original is set in the original placement area of the platen glass, the reading unit moves under the glass to read the original. Many of these conventional flatbed reading devices do not have the ability to read an image in the front edge portion of the original placement area (i.e., the edge of the original placement area on the side from where the reading unit starts to move). Therefore, if a card is placed on the platen glass of a flatbed reading device having these specifications such that the corner of the card is aligned with the corner of the original placement area, the image data read by such a device will miss a part of the card because the device cannot read the image in this area. Therefore, the user has to arrange the card such that the corner of the card is separated from the corner of the original placement area. However, reading devices developed in recent years are designed to have the ability to read the entire original placement area. Therefore, even when the corner of the card is aligned with the corner of the original placement area, these devices are able to read the entire surface of the card placed on the platen glass.
[0005] Since most ID cards are formed such that their four corners are rounded, such a card is different from a normal document having corners formed substantially at right angles. Thus, when the card is placed on a platen glass such that the corners are aligned with the corners of the document placement area, the card document does not fill the entire corner of the document placement area. In a conventional flatbed type apparatus, a document cover provided for covering the back of a document placed on a platen glass includes document holding paper including white on its inner surface. However, in consideration of potential play (looseness) in the document cover, such document holding paper is formed to be slightly smaller than the document placement area so as to reliably restrain the document. Thus, when the corners of the document placement area are not completely filled by the document and the document holding paper for providing a white background does not cover this area, the corner area will be read as black. In other words, the image represented by the image data obtained by reading a card placed on a platen glass can include not only a part of the image of the card, but also a part that is not included in the image of the card in any one of the four corners ( Figure 8 the black areas in the shown corners C1 to C4).
[0006] In addition, even when an apparatus in which an automatic document feeder system is used to read a document is used to read a card, the image represented by the image data acquired by the apparatus can include a part that is not included in the image of the card in any one of the four corners. It should be noted that since the document holding paper is smaller, the reason why the image represented by the acquired image data includes a part that is not included in the image of the card is not necessarily so.
[0007] When a black area appears in the reading result, if it is already known that the black area is merely an area where no document (and white holding paper) exists, the image data of the black area can be deleted from the scanning result. However, determining whether the black area is formed due to the non-existence of a document is not an easy process. In addition, since there are various shapes of rounded corners depending on the type of card, the shapes of these corners cannot be determined in advance. SUMMARY OF THE INVENTION
[0008] In view of the above circumstances, an object of the present disclosure is to provide a reading apparatus capable of estimating the corner shape of a document.
[0009] (1)To achieve the above and other objects, the present invention provides a reading device, comprising: a reader; and a controller. The reader is configured to read both paper and cards as originals. When a card having four original corners is set as the original, the controller is configured to perform a card reading function: (a) reading; and (b) obtaining. (a) Reading reads the original using the reader to obtain original image data corresponding to an original image area having four corner areas. (b) Obtaining obtains edge information of a first original corner from the original image data to estimate a circular shape of the first original corner. The first original corner is one of the four original corners in the original.
[0010] (2)In the reading device according to aspect (1), preferably, the controller is configured to further perform (c) selection. (c) Selection selects whether to enable or disable the card reading function. In response to selecting to enable the card reading function in (c), (a) reading and (b) obtaining are performed.
[0011] (3)In the reading device according to aspect (2), preferably, the controller is configured to further perform (d) determination. The (d) determination determines whether the original is a card based on the size of the original. In response to determining in (d) that the original is a card, (c) selection selects to enable the card reading function.
[0012] (4)In the reading device according to aspect (3), preferably, when the size of the original falls within a predetermined range of the card size, (d) determination determines that the original is a card.
[0013] (5)In the reading device according to aspect (2), preferably, the controller is configured to further perform (e) receiving. (e) Receiving receives an instruction for enabling the card reading function. In response to receiving a selection of the card reading function in (e), (c) selection selects to enable the card reading function.
[0014] (6)Preferably, the reading device according to aspects (1) to (5) further comprises: a platen; and an original holder. The platen has an original placement surface, wherein a rectangular area is defined as the original placement area. Among the four original corners in the original, there is also a second original corner that is diagonally opposite to the first original corner. The original is arranged in the original placement area, wherein the second original corner is aligned with a corner area of the original placement area. The reader is disposed on the opposite side of the original placement surface with respect to the platen. The reader is configured to read the original placed on the original placement surface while moving in a moving direction parallel to the original placement surface. The original holder is provided on the same side as the original placement surface with respect to the platen. The original holder is configured to press the original against the original placement surface. When the original holder is pressing the original, (a) reading reads the original to obtain original image data corresponding to the original placement area.
[0015] (7) In the reading device according to aspects (1) to (6), preferably, four original corners in the original further include a second original corner that is diagonally opposite to the first original corner. Four corner regions of the original image region include a first corner region including the first original corner and a second corner region including the second original corner. The original image data includes corner image data corresponding to the first corner region. (b) Acquisition includes: (b1) Division; (b2) Acquisition; and (b3) Estimation. (b1) Division divides the first corner region into an inner region and an outer region with a boundary. The inner region is on the same side of the boundary between the inner region and the outer region as the second corner region. The outer region is on the opposite side of the boundary from the second corner region. (b2) Acquisition acquires edge information representing the shape of the boundary. (b3) Estimation uses the acquired edge information to estimate the circular shape of the first original corner.
[0016] (8) In the reading device according to aspects (1) to (6), preferably, (b) Acquisition includes: (b4) Calculation; and (b5) Estimation. (b4) Calculation calculates the rounded corner radius of the circular shape of the first original corner using the edge information. (b5) Estimation estimates the circular shape of the first original corner based on the rounded corner radius.
[0017] (9) In the reading device according to aspects (1) to (8), preferably, the controller is configured to further perform (f) Determination. (f) Determination determines the original region in which the original exists based on the circular shape of the first original corner.
[0018] (10) In the reading device according to aspect (9), preferably, four original corners in the original further include a second original corner, a third original corner, and a fourth original corner. The second original corner is diagonally opposite to the first original corner. The fourth original corner is diagonally opposite to the third original corner. (f) Determination includes: (f1) Application; and (f2) Determination. (f1) Application applies the circular shape of the first original corner to the circular shape of each of the second original corner, the third original core, and the fourth original corner. (f2) Determination determines the original region based on the circular shape of each of the first original corner, the second original corner, the third original corner, and the fourth original corner.
[0019] (11) In the reading device according to aspect (10), preferably, each of the four corner regions of the original image region contains a separate original corner. (f1) Application divides each of the four corner regions into an inner region and an outer region by a boundary having a circular shape of the first original corner. The inner region in a corner region containing one original corner is located on the same side of the boundary as another original corner. The other original corner is diagonally opposite to one original corner. The outer region in a corner region is located on the opposite side of the boundary from the other original corner. (f2) Determination determines the original region by including the inner regions determined for each of the four corner regions and excluding the outer regions determined for each of the four corner regions.
[0020] (12) In the reading device according to aspect (11), preferably, the four corner regions include a first corner region containing a first original corner, a second corner region containing a second original corner, a third corner region containing a third original corner, and a fourth corner region containing a fourth original corner. (f1) Application divides each of the first corner region, the second corner region, the third corner region, and the fourth corner region into an inner region and an outer region by a boundary having a circular shape of the first original corner. The inner region of the first corner region is located on the same side of the boundary as the second corner region. The outer region of the first corner region is located on the opposite side of the boundary from the second corner region. The inner region of the second corner region is located on the same side of the boundary as the first corner region. The outer region of the second corner region is located on the opposite side of the boundary from the first corner region. The inner region of the third corner region is located on the same side of the boundary as the fourth corner region. The outer region of the third corner region is located on the opposite side of the boundary from the fourth corner region. The inner region of the fourth corner region is located on the same side of the boundary as the third corner region. The outer region of the fourth corner region is located on the opposite side of the boundary from the third corner region. (f2) Determination determines the original region by including the inner regions determined for each of the first corner region, the second corner region, the third corner region, and the fourth corner region and excluding the outer regions determined for each of the first corner region, the second corner region, the third corner region, and the fourth corner region.
[0021] (13) In the reading device according to aspects (11) and (12), preferably, the controller is configured to further perform (g) replacement. (g) Replacement replaces the image data corresponding to the outer regions determined for each of the four corner regions with white data.
[0022] (14) In the reading device according to aspects (9) to (13), preferably, the four corner regions of the original image region include a first corner region containing a first original corner, a second corner region containing a second original corner, a third corner region containing a third original corner, and a fourth corner region containing a fourth original corner. When (b) it is obtained that the circular shape estimating the first original corner follows an elliptical shape, (f) it is determined to determine the original region including the first corner region, the second corner region, the third corner region, and the fourth corner region.
[0023] (15) In the reading device according to aspects (9) to (14), preferably, when (a) the first surface of the original is read and then the second surface of the original is read, both (b) obtaining and (f) determining are performed in response to reading the first surface, and (b) obtaining is skipped and (f) determining is performed in response to reading the second surface.
[0024] With the above configuration, the reading device has a card reading function as one of its functions to read the original. When the original to be read is an ID card such as a driver's license or a health insurance card, and the card reading function is selected or the original is determined to be a card based on the size of the original, the reading device uses a reader assuming the original is a card to obtain the original image data. Then, the reading device determines that the first original corner of the original (card) diagonally opposite to the second original corner aligned with a corner of the original placement region has a circular shape. The reading device also determines that: the image data corresponding to the region outside the boundary of the circular shape of the first original corner does not contain the original image, but contains the image of the original holder. Therefore, it is possible to determine that the edge information of the second original corner indicates that the boundary between the internal region and the external region is the boundary of the original image. Therefore, the reading device can obtain the edge information of the circular shape from the original image data read by the reader, and can estimate the circular shape of the first original corner of the original from the edge information.
[0025] According to the following description in conjunction with the drawings, specific features and advantages of the present disclosure and other objects will become apparent, where: BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A perspective view showing a reading device according to an embodiment of the present disclosure.
[0027] Figure 2 Showing the upper surface of the housing of the reading device according to an embodiment of the present disclosure;
[0028] Figure 3 Showing a schematic cross-sectional view of the reading device according to an embodiment of the present disclosure;
[0029] Figure 4is a block diagram showing the electrical structure of a reading device according to an embodiment of the present invention.
[0030] Figure 5A is a flowchart showing some steps in a reading process executed by a CPU of a reading device according to an embodiment of the present disclosure;
[0031] Figure 5B is a flowchart showing the remaining steps in a reading process executed by a CPU of a reading device according to an embodiment of the present disclosure;
[0032] Figure 6 is a flowchart showing steps in a corner shape estimation process executed by a CPU of a reading device according to an embodiment of the present disclosure;
[0033] Figure 7 is an explanatory diagram showing an example of the center coordinates of a circular shape of a fourth corner of an ID card read by a reading device, the fillet radius along the X-axis, and the fillet radius along the Y-axis; and
[0034] Figure 8 is an explanatory diagram showing an image of a first surface of an ID card read by a reading device. Detailed Description of the Embodiment
[0035] Next, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0036] <Structure of the Reading Device>
[0037] Figure 1 Shows a reading device 1 capable of reading an original according to a flatbed method. The reading device 1 can be provided in a multi-functional peripheral (MFP) that includes a printing device (not shown) for printing an image on paper based on image data and has multiple functions including a reading function and a printing function. In this case, the reading device 1 is placed above the printing device.
[0038] The reading device 1 has a housing 2 having a substantially rectangular parallelepiped shape and a lid 3 that opens and closes on the upper surface of the housing 2. The lid 3 is provided so as to be rotatable about an axis extending along one side of the housing 2. The lid 3 can pivot between an open position and a closed position, where in the open position the lid 3 stands up above the upper surface of the housing 2 to expose the upper surface, and in the closed position the lid 3 is laid down on the upper surface of the housing 2 to cover the upper surface.
[0039] In the reading device 1 according to the present embodiment, the side on which the pivot axis of the lid 3 is set will be the back side, and the opposite side will be the front side. The front, back, left, and right directions used in the following description will be defined based on the perspective of a user facing the front side of the reading device 1, and these directions as well as the up and down directions are determined byFigure 1 , 2 and the arrows in 3 indicate.
[0040] A rectangular opening 4 is formed in the upper surface of the housing 2, and the opening 4 has edges extending in the front-rear direction and the left-right direction. A pressure plate glass 5 (an example of the pressure plate of the present disclosure) made of a transparent glass plate is disposed inside the housing 2 so as to close the opening 4 from the bottom. The peripheral edge of the pressure plate glass 5 is set in and supported by a portion of the housing 2 surrounding the periphery of the opening 4. The upper surface of the pressure plate glass 5 is flat and constitutes an original placement surface 6, on which an original to be read, such as an ID card CA, is placed. A rectangular area of the original placement surface 6 exposed through the opening 4 is defined as an original placement area. The original is arranged on the original placement surface 6, with one corner of the original aligned with a left rear corner 7 formed by the intersection of the left edge and the rear edge of the opening 4, such that the original contacts the left edge and the rear edge of the opening 4.
[0041] As Figure 2 and 3 shown, a contact image sensor unit 11 (an example of the reader of the present invention) and a reciprocating mechanism 12 are provided below the pressure plate glass 5. Hereinafter, the contact image sensor unit will be abbreviated as the "CIS unit".
[0042] As Figure 3 shown, the CIS unit 11 houses a light source 21, a rod lens array 22, and an image sensor 23. The light source 21 is provided for irradiating light onto the pressure plate glass 5. The irradiated light is in the form of a line extending in the front-rear direction. The image sensor 23 is, for example, a linear image sensor composed of a plurality of light receiving elements arranged in the main scanning direction. The image sensor 23 is arranged such that the main scanning direction is aligned with the front-rear direction.
[0043] The light from the light source 21 is reflected from the surface of the original or other reading object on the pressure plate glass 5, and the reflected light passes through the rod lens array 22 and is incident on the image sensor 23. When the light is incident on the image sensor 23, each light receiving element of the image sensor 23 outputs a voltage through photoelectric conversion. The voltage output from the light receiving element is first amplified by a gain control circuit and then converted into a digital pixel value by an A / D converter circuit. For example, the A / D converter circuit has a resolution of 8 bits (0 - 255). The A / D conversion circuit converts all voltages lower than the lower limit reference voltage (lower limit value) to "0", all voltages higher than the upper limit reference voltage (upper limit value) to "255", and voltages between the lower limit value and the upper limit value to pixel values corresponding to the magnitude of the voltage. Through this process, the CIS unit 11 reads one row of the reading object along the main scanning direction.
[0044] The reciprocating motion mechanism 12 reciprocates the CIS unit 11 in the sub-scanning direction orthogonal to the main scanning direction. The reciprocating motion mechanism 12 is provided with a carriage 24 that supports the CIS unit 11, a stepping motor 25 that can rotate in the forward and reverse directions, a drive pulley 26 that is driven by the stepping motor 25 to rotate, a driven pulley 27 paired with the drive pulley 26, and a belt 28 wound around the drive pulley 26 and the driven pulley 27. The drive pulley 26 is disposed inside the housing 2 near the right side of the housing, and its rotation axis is aligned in the front-rear direction. The driven pulley 27 is disposed inside the housing 2 near the left side of the housing, and its rotation axis is aligned with the rotation axis of the drive pulley 26 at the same height in the front-rear direction. The carriage 24 is attached to the belt 28 and moves together with the belt 28 when the belt 28 circulates due to the rotation of the drive pulley 26. At this time, the carriage 24 is guided along a guiding mechanism (not shown) so as to reciprocate in the sub-scanning direction (i.e., the left-right direction).
[0045] To read an original document, the user rotates the lid 3 to the open position and places the original document in the original document placement area of the platen glass 5. Once the original document is located on the platen glass 5, the user closes the lid 3 so that the lid 3 covers the back surface of the original document from above. As Figure 3 shown, the original document holder 29 is elastically supported on the inner surface of the lid 3. The original document holder 29 is formed of a white sheet-like resin material. The original document holder 29 has a rectangular shape that is slightly smaller in size than the opening 4. When the lid 3 is closed, the original document holder 29 does not abut against the upper part of the periphery of the opening 4 formed in the housing 2, but is located within the opening 4 with a gap therebetween, and presses the original document against the platen glass 5, and the gap separates the edge of the original document holder 29 from the periphery of the opening 4 (the periphery of the original document placement area).
[0046] After arranging the original document on the platen glass 5, the user inputs a command into the reading device 1 to start the reading operation. In response, the reciprocating motion mechanism 12 starts to move the CIS unit 11 from the left side to the right side along the sub-scanning direction, and while the CIS unit 11 reads one line from the original document synchronously with this movement.
[0047] <Electrical Structure of the Reading Device>
[0048] As Figure 4 shown, the reading device 1 is provided with a central processing unit (CPU) 31, a non-volatile memory 32 such as a flash memory or an E 2 PROM in which data can be written, and a volatile memory 33 such as an SDRAM. The CPU 31, the non-volatile memory 32, and the volatile memory 33 are interconnected via a bus 34 that allows data communication.
[0049] The CPU 31 (an example of the controller of the present invention) controls components of the reading device 1 including the CIS unit 11 and the reciprocating movement mechanism 12 by executing programs to perform various processes. The non-volatile memory 32 stores programs, various data, etc. executed by the CPU 31. The volatile memory 33 serves as a work area when the CPU 31 executes programs.
[0050] The reading device 1 is also provided with a communication interface 35 for communicating with an external terminal ET (such as a personal computer (PC)). The communication interface 35 is also connected to the bus 34. The communication interface 35 can be configured to communicate with the external terminal ET via a wire such as a universal serial bus (USB) cable or a local area network (LAN) cable, or can be configured to communicate wirelessly with the external terminal ET via radio waves or the like.
[0051] <ID Card Reading Process>
[0052] The reading device 1 has an ID card reading function. When the original to be read is an ID card CA (such as a driver's license or a health insurance card), the ID card reading function is used to read the front and back of the ID card CA and output image data of each of the front and back. For example, options for using the ID card reading function can be selected and set by operating the external terminal ET. In addition, the reading device 1 can be provided with a user interface, and options for using the ID card reading function can be selected and set by operations on the user interface. Alternatively, if a command to read the original is received and the original is the size of an ID card, even if no option for using the ID card reading function is selected, the reading device 1 can determine that the target original is the ID card CA, and can read both the front and back, and output image data of each surface.
[0053] To read the ID card CA on the reading device 1, the user places the ID card CA on the platen glass 5, closes the lid 3, and then issues a command to perform a reading operation on the original (ID card CA). At this time, the reading device 1 starts the reading process shown in Figure 5A and 5B In S11, at the start of the reading process, the CPU 31 controls the CIS unit 11 and the reciprocating movement mechanism 12 to read the first surface of the ID card CA. Here, the first surface is the surface (front) of the ID card CA that contacts the platen glass 5.
[0054] In S12, the CPU 31 detects the original size and skew of the first surface based on the image data obtained by reading the first surface.
[0055] To find the original document size, the CPU 31 processes the image data using a Sobel filter to extract the edge information of the first surface, extracts the information of the front edge and the rear edge (the relative edges in the main scanning direction) from this edge information, and determines the size of the first surface in the main scanning direction from the edge information of the front edge and the rear edge. Similarly, the CPU 31 extracts the information of the left edge and the right edge (the relative edges in the sub-scanning direction) from the edge information of the first surface, and determines the size of the first surface in the sub-scanning direction from the edge information of the left edge and the right edge.
[0056] To detect skewness, the CPU 31 processes the image data using, for example, a Sobel filter to extract the edge information of the first surface, and also extracts the information of the straight line segment of the left edge (the edge on the upstream side in the sub-scanning direction) from this edge information. Then, the CPU 31 finds the acute angle formed by the straight line segment and the main scanning direction from the information extracted for the straight line segment, and detects this acute angle as the skewness in the first surface.
[0057] In S13, the CPU 31 determines whether the ID card reading function has been enabled.
[0058] If the ID card reading function is not enabled (S13: No), then in S14, the CPU 31 determines whether the size of the original document (the size of the original document in the main scanning direction and the sub-scanning direction) is the size of an ID card. In this embodiment, a size range is preset and stored in the non-volatile memory 32 as the ID card size range. If the size of the original document falls within the ID card size range, then in S14, the CPU 31 determines that the size of the original document matches the size of the ID card (S14: Yes). Note that multiple ranges can be set as the ID card size range. In this case, when the size of the original document falls within any one of the ranges stored in the non-volatile memory 32, the CPU 31 determines that the size of the original document matches the size of the ID card.
[0059] When the size of the original document is not the size of an ID card (S14: No), in S25, the CPU 31 outputs the image data of the first surface, and then ends the reading process. Here, the output of the image data in S25 and S24 described later can be a process of transmitting the image data to an external terminal ET, or a process of printing the image data on a printing device when the reading device 1 is integrally provided with the printing device.
[0060] On the other hand, if the ID card reading function has been enabled (S13: Yes), or if the ID card reading function has not been enabled (S13: No) but the size of the original is the same as the size of the ID card (S14: Yes), then in S15, the CPU 31 detects the skew in the first surface, crops the first surface of the ID card CA from the image data, and corrects the rotation of the cropped image data according to the detected skew angle in the first surface.
[0061] In S16, the CPU 31 performs a corner shape estimation process. When the ID card CA has four rounded corners, the corner shape estimation process is performed to estimate the shape (rounded shape) of the fourth corner C4 of the first surface of the ID card CA. As Figure 2 shown, the fourth corner C4 of the first surface is the corner diagonally opposite to the first corner C1 of the ID card CA. When the first surface is read, the first corner C1 is aligned with the left rear corner 7 of the original placement area. The fourth corner C4 of the first surface is an example of the first original corner of the present invention, and the first corner C1 of the first surface is an example of the second original corner of the present invention.
[0062] Figure 6 The steps in the corner shape estimation process are shown.
[0063] In S161 of the corner shape estimation process, the CPU 31 obtains the edge information of the fourth corner C4 from the image data of the first surface of the ID card CA. The image data of the first surface includes the image data of the corner area that contains the fourth corner C4. This corner area includes the original image area read from the fourth corner C4 and the area read from the original holder 29. The area enclosed between the circular contour of the fourth corner C4 and the imaginary lines extending from both sides (in this example, the front side and the rear side) of the ID card CA in this corner area and intersecting at right angles can be assumed to be the area read from the original holder 29. Therefore, the edge information for the fourth corner C4 is determined as the information of the boundary between the fourth corner C4 and the original holder 29.
[0064] In S162, the CPU 31 performs a Hough transform process on the edge information of the fourth corner C4 in order to find the center coordinates (Xc, Yc) of the circle that includes the rounded corner shape of the fourth corner C4. As Figure 7As shown, the main scanning direction constitutes the X-axis, and the sub-scanning direction constitutes the Y-axis. The direction from the rear side towards the front side in the main scanning direction is the positive direction of the X-axis, and the direction from the left side towards the right side in the sub-scanning direction is the positive direction of the Y-axis. Additionally, in S162, the CPU 31 finds the rounded corner radius X_len along the X-axis from the center coordinates (Xc, Yc) to the edge of the fourth corner C4 and the rounded corner radius Y_len along the Y-axis from the center coordinates (Xc, Yc) to the edge of the fourth corner C4.
[0065] In S163, the CPU 31 compares the rounded corner radius X_len along the X-axis and the rounded corner radius Y_len along the Y-axis, and determines whether the ratio of the rounded corner radius X_len to the rounded corner radius Y_len falls within a specified ratio range. In this embodiment, the specified ratio range is set to the range from 0.67 to 1.5. When the ratio of the rounded corner radius X_len to the rounded corner radius Y_len is within the specified range (i.e., greater than or equal to 0.67 and less than or equal to 1.5) (S163: Yes), in S164, the CPU 31 estimates that the circular shape of the fourth corner C4 follows a perfect circle shape, and then ends the circular corner shape estimation process. However, if the ratio of the rounded corner radius X_len to the rounded corner radius Y_len is outside the specified range (i.e., less than 0.67 or greater than 1.5) (S163: No), then in S165, the CPU 31 estimates that the circular shape of the fourth corner C4 follows an elliptical shape, and then ends the corner shape estimation process. After completing the corner shape estimation process, the CPU 31 returns to Figure 5A the reading process in
[0066] After estimating the circular shape of the fourth corner C4, in S17, the CPU 31 determines whether the circular shape of the fourth corner C4 is a perfect circle shape.
[0067] When the CPU 31 estimates that the circular shape of the fourth corner C4 follows a perfect circle shape (S17: Yes), in S18, the CPU 31 divides the corner area including the fourth corner C4 (a rectangular area having two sides formed by extension line segments that extend from two sides defining the fourth corner C4 to the intersection point of the extension lines) into two regions on either side of the circular contour of the fourth corner, as Figure 8As shown. In these two regions, the CPU 31 determines that the region of the fourth corner C4 closest to the side on which the first corner C1, which is diagonal to the fourth corner C4, is located is a region inside the original image region, and determines that the region on the opposite side is a region outside the original image region corresponding to the original holder 29. In addition, the CPU 31 applies the circular contour of the fourth corner C4 to estimate that the circular shape of each of the first corner C1, the second corner C2, and the third corner C3 follows a perfect circular shape. Here, the CPU 31 divides the corner area including the first corner C1 in the image data of the first surface into two regions by applying the circular shape of the fourth corner C4, determines that the region of the first corner C1 on the side closest to the fourth corner C4 is a region inside the original image region, and determines that the region on the opposite side of the first corner C1 is a region outside the original image region. The CPU 31 performs similar processing on the corner area including the second corner C2 and the corner area including the third corner C3 to divide the corner area into a region inside the original image region and a region outside the original image region. Then, the CPU 31 replaces the image data of the region outside the original image region in each corner area with white data.
[0068] Note that in Figure 8 the regions outside the original image region are indicated by shading.
[0069] On the other hand, if the CPU 31 does not estimate that the circular shape of the fourth corner C4 follows a perfect circle (S17: No), that is, when the CPU 31 estimates that the circular shape of the fourth corner C4 follows an elliptical shape, the CPU 31 skips S18 and does not perform the process of dividing each corner area into a region inside the original image region and a region outside the original image region and replacing the image data of the region outside the original image region with white data.
[0070] Thereafter, if the ID card reading function has been enabled or the size of the original read above is the size of an ID card, the CPU 31 displays a message on the display screen of the external terminal ET that prompts the user to set the next original. Specifically, the CPU 31 displays a guidance screen that includes a message instructing the user to flip the ID card CA and reposition the ID card CA on the platen glass 5 and input a command to perform a scan of the back of the ID card CA.
[0071] When a command to perform a scan is issued, in Figure 5B S19 of, the CPU 31 controls the CIS unit 11 and the reciprocating mechanism 12 to perform a reading operation on the second surface (back) of the ID card CA in contact with the platen glass 5.
[0072] In S20, the CPU 31 detects the skew of the second surface and the dimensions of the original document from the image data obtained when reading the second surface. The method for detecting the skew in the second surface is the same as the method for detecting the skew in the first surface. The method for detecting the dimensions of the original document is also the same method as described previously.
[0073] In S21, the CPU 31 crops the second surface of the ID card CA from the image data and corrects the rotation of the cropped image data according to the skew angle of the second surface.
[0074] In S22, the CPU 31 determines whether the circular shape of the fourth corner C4 in the first surface is estimated to follow the shape of a perfect circle in the corner shape estimation process performed previously.
[0075] If it is estimated that the circular shape of the fourth corner C4 follows a perfect circle (S22: Yes), in S23, the CPU 31 applies the circular shape of the fourth corner C4 to estimate the circular shape of each of the four corners of the second surface in the image data of the second surface of the ID card CA, and estimates that all the circular corners of the second surface follow a perfect circle. In the image data of the second surface, the CPU 31 divides each corner area including a single corner into two areas divided by the circular shape of the corner included in the corresponding corner area, determines that the area on the side of the corner closest to the opposite corner is the area inside the original document image area, and determines that the area on the opposite side is the area outside the original document image area. Then, the CPU 31 replaces the image data of the area outside the original document image area in each corner area with white data.
[0076] In S24, the CPU 31 outputs the image data of the first and second surfaces and then ends the reading process.
[0077] In addition, if the CPU 31 determines in S22 that the circular shape of the fourth corner of the first surface does not follow a perfect circle (S22: No), that is, when the CPU 31 estimates that the circular shape of the fourth corner C4 follows an elliptical shape, the CPU 31 skips S23 and does not perform the process of dividing each corner area into the area inside the original document image area and the area outside the original document image area and replacing the image data of the area outside the original document image area with white data. After that, in S24, the CPU 31 outputs the image data of the first surface and the second surface and then ends the reading process.
[0078] In the above processing, the user operates on the external terminal ET to indicate whether to enable the ID card reading function and issue a command to execute the reading operation. However, if the reading device 1 is provided with an operation unit such as a touch screen, etc., the user can perform these settings or commands by operating the operation unit.
[0079] <Effect of the embodiment>
[0080] As described above, if the CPU 31 determines that the ID card reading function has been enabled or the original is the size of an ID card when scanning the original, the CPU 31 estimates the circular shape of the fourth corner C4 of the first surface of the ID card CA assuming that the original being read is the ID card CA.
[0081] In the corner shape estimation process for estimating the circular shape of the corner, the CPU 31 obtains the edge information of the fourth corner C4 from the image data included in the first surface of the ID card CA and corresponding to the corner area including the fourth corner C4, and estimates the circular shape of the fourth corner C4 from the edge information. In the image data of the first surface, the corner area including the fourth corner C4 includes the original image area having the image data corresponding to the fourth corner C4 and the area corresponding to the original holder 29. The area surrounded between the lines extending from both sides of the ID card CA defining the fourth corner C4 of the first surface and the circular contour of the fourth corner C4 is the area corresponding to the original holder 29. Therefore, the reading device 1 can obtain the edge information of the fourth corner C4 from the image data of the first surface of the ID card CA, and can estimate the circular shape of the fourth corner C4 in the first surface from the edge information.
[0082] Also in the corner shape estimation process, the CPU 31 finds the center coordinates (Xc, Yc) of the circular shape of the fourth corner C4 in the first surface, the rounded corner radius X_len along the X-axis from the center coordinates (Xc, Yc) to the edge of the fourth corner C4, and the rounded corner radius Y_len along the Y-axis from the center coordinates (Xc, Yc) to the edge of the fourth corner C4. Subsequently, the CPU 31 compares the rounded corner radius X_len along the X-axis with the rounded corner radius Y_len along the Y-axis to determine whether the circular shape of the fourth corner C4 follows a perfect circle shape or an elliptical shape.
[0083] When the circular shape of the fourth corner C4 forms a part of a perfect circle, the CPU 31 applies the circular shape of the fourth corner C4 to the circular shapes of the second corner C2, the first corner C1, and the third corner C3 by rotating the shape in units of 90 degrees. Similarly, the CPU 31 applies the circular shape of the fourth corner C4 from the first surface to the circular shapes of the four corners in the second surface. In the image data of each of the first surface and the second surface, the CPU 31 divides the corner area including each individual corner into two regions by the circular corner contour of the corner included in the corresponding corner area, determines that the area on the side of the circular contour closest to the opposite corner in the corner is the area inside the original image area, and the area on the opposite side of the divided circular corner is the area outside the original image area.
[0084] Next, the CPU 31 replaces the image data in the area of each corner area outside the original image area with white data. In this way, even when reading the ID card CA whose first corner C1 is aligned with the left rear corner 7 of the original placement area, the reading device 1 can obtain a reading result without a black part in the corner.
[0085] In addition, if the CPU 31 determines that the circular shape of the fourth corner C4 in the first surface follows an elliptical shape rather than a perfect circle, the CPU 31 does not perform the process of dividing each corner area into the area inside the original image area and the area outside the original image area, or replacing the image data in the area outside the original image area with white data. In this way, when replacing part of the image data read from the original with white data, the reading device 1 can avoid loss of data representing the original.
[0086] <Variation of the embodiment>
[0087] Although it has been described in detail with reference to specific embodiments, it will be apparent to those skilled in the art that various changes and modifications can be made to it.
[0088] In the above embodiment, the reading device 1 uses a flatbed system to read the original placed on the platen glass 5. However, the reading device can be provided with a document tray and an automatic document feeder, and an automatic document feeder system can be used. In the automatic document feeder system, the originals are placed on the document tray in a stacked state and fed one by one from there onto the transport path. When being transported along the transport path, the originals pass by the contact glass. At this time, the CIS unit 11 placed under the contact glass reads the originals. Such a reading device is also provided with a sensor for detecting the size of each original placed on the document tray. The CPU 31 determines whether the size of the original matches the size of the ID card, and when it is determined that the original is an ID card, as Figure 5ARead the original document as shown in the steps after S15 in
[0089] When the document tray is set to the size of an ID card in a reading device equipped with an automatic document feeder, the reading range of the CIS unit 11 is substantially fixed. Therefore, when the document tray is set to the size of an ID card, or when the reading range of the CIS unit 11 corresponds to the size of an ID card, the CPU 31 reads the original document as Figure 5A shown in the steps after S15 in
[0090] The above document tray may be provided with a card placement area for placing an ID card, such as a card slot. In this case, when the original document is placed in the card placement area, the CPU 31 reads the original document as Figure 5A shown in the steps after S15 in
[0091] In the above embodiment, the CPU 31 performs all the processing. However, the reading device 1 may be provided with a plurality of CPU 31s that cooperate to perform these processes. In addition, if the ratio of the rounded corner radius X_len along the X-axis to the rounded corner radius Y_len along the Y-axis is close to 1 (one), then the average value rather than the actual shape can be applied to all corners as a shape processing with a simple radius R.
[0092] It will be apparent to those skilled in the art that many modifications and variations can be made to the above construction without departing from the scope defined by the appended claims.
Claims
1. A reading device, comprising: a reader configured to read both a sheet and a card as originals, the originals being placed on an original placement surface, a rectangular area being defined as an original placement area in the original placement surface, the reader being configured to read the originals while moving in a moving direction parallel to the original placement surface; an original holder configured to press the originals against the original placement surface; and a controller configured to perform a card reading function when the card having four original corners is set as the original: (a) reading the original with the reader to obtain original image data corresponding to an original image area having four corner areas, the four original corners including a first original corner and a second original corner diagonally opposite to the first original corner, the original being arranged in the original placement area, wherein the second original corner is aligned with an area corner of the original placement area; and (b) obtaining edge information of the first original corner from the original image data to estimate a circular shape of the first original corner using the edge information; wherein, while the original holder is pressing the original, the (a) reads the original to obtain the original image data corresponding to the original placement area.
2. The reading device according to claim 1, wherein The controller is further configured to perform: (c) selecting whether to enable or disable the card reading function, and wherein, in response to enabling the card reading function in the selection in (c), the (a) and the (b) are performed.
3. The reading device according to claim 2, wherein The controller is further configured to perform: (d) determining whether the original is the card based on the size of the original, wherein, in response to determining in (d) that the original is the card, the (c) selects to enable the card reading function.
4. The reading device according to claim 3, wherein, when the size of the original falls within a predetermined range of the card size, the (d) determines that the original is the card.
5. The reading device according to claim 2, wherein, The controller is further configured to perform: (e) receiving an instruction to enable the card reading function, and wherein, in response to receiving the selection of the card reading function in (e), the (c) selects to enable the card reading function.
6. The reading device according to any one of claims 1 to 5, further comprising: a platen having the original placement surface, the reader being disposed on the opposite side of the original placement surface with respect to the platen; and the original holder being disposed on the same side as the original placement surface with respect to the platen.
7. The reading device according to claim 1, wherein The four corner areas of the original image area include a first corner area including the first original corner and a second corner area including the second original corner, and the original image data includes corner image data corresponding to the first corner area, and wherein, the (b) includes: (b1) Divide the first corner area into an inner area and an outer area by a boundary, where the inner area is on the same side of the second corner area with respect to the boundary between the inner area and the outer area, and the outer area is on the opposite side of the second corner area with respect to the boundary; (b2) Obtain the edge information for indicating the shape of the boundary; and (b3) Use the obtained edge information to estimate the circular shape of the first original corner.
8. The reading device according to claim 1, wherein, The (b) includes: (b4) Use the edge information to calculate the fillet radius of the circular shape of the first original corner; and (b5) Estimate the circular shape of the first original corner based on the fillet radius.
9. The reading device according to claim 1, wherein The controller is configured to further perform: (f) Determine the original area where the original exists based on the circular shape of the first original corner.
10. The reading device according to claim 9, wherein, Among the four original corners in the original, there are also a third original corner and a fourth original corner, and the fourth original corner is diagonally opposite to the third original corner, and wherein, the (f) includes: (f1) Apply the circular shape of the first original corner to estimate the circular shape of each of the second original corner, the third original corner, and the fourth original corner; and (f2) Determine the original area based on the circular shape of each of the first original corner, the second original corner, the third original corner, and the fourth original corner.
11. The reading device according to claim 10, wherein, Each of the four corner areas of the original image area contains a separate original corner, wherein, in the (f1), divide each of the four corner areas into an inner area and an outer area by a boundary having the circular shape of the first original corner. The inner area in one corner area contains an original corner, and this original corner is on the same side of the boundary as another original corner, and the other original corner is positioned diagonally opposite to this original corner. The outer area in one corner area is on the opposite side of the other original corner with respect to the boundary, and wherein, in the (f2), determine the original area by including the inner area determined for each of the four corner areas and excluding the outer area determined for each of the four corner areas.
12. The reading device according to claim 11, wherein, The four corner areas include a first corner area containing the first original corner, a second corner area containing the second original corner, a third corner area containing the third original corner, and a fourth corner area containing the fourth original corner, wherein, in the (f1), divide each of the first corner area, the second corner area, the third corner area, and the fourth corner area into the inner area and the outer area by the boundary having the circular shape of the first original corner. The inner region of the first corner region is on the same side of the second corner region with respect to the boundary, and the outer region of the first corner region is on the opposite side of the second corner region with respect to the boundary. The inner region of the second corner region is on the same side of the first corner region with respect to the boundary, and the outer region of the second corner region is on the opposite side of the first corner region with respect to the boundary. The inner region of the third corner region is on the same side of the fourth corner region with respect to the boundary, and the outer region of the third corner region is on the opposite side of the fourth corner region with respect to the boundary. The inner region of the fourth corner region is on the same side of the third corner region with respect to the boundary, and the outer region of the fourth corner region is on the opposite side of the third corner region with respect to the boundary, and wherein, the (f2) determines the original area by including the inner regions determined for each of the first corner region, the second corner region, the third corner region, and the fourth corner region and excluding the outer regions determined for each of the first corner region, the second corner region, the third corner region, and the fourth corner region.
13. The reading device according to claim 11 or 12, wherein, The controller is configured to further perform: (g) Replace the image data corresponding to the outer region determined for each of the four corner regions with white data.
14. The reading device according to claim 10, wherein The four corner regions of the original image area include a first corner region including the first original corner, a second corner region including the second original corner, a third corner region including the third original corner, and a fourth corner region including the fourth original corner, and wherein, when the (b) estimates that the circular shape of the first original corner follows an elliptical shape, the (f) determines the original area including the first corner region, the second corner region, the third corner region, and the fourth corner region.
15. The reading device according to claim 9, wherein, when the (a) reads the first surface of the original and then reads the second surface of the original, both the (b) and the (f) are performed in response to reading the first surface, and the (b) is skipped and the (f) is performed in response to reading the second surface.
Citation Information
Patent Citations
Image processing to detect a rectangular object
US10331966B1
Image reading apparatus
US20170155792A1