A contract image recognition method and system
By dividing and repairing the contract image into regions, the problem of reflective and dark areas affecting OCR recognition was solved, enabling accurate confirmation of important clauses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO LTD
- Filing Date
- 2022-12-14
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, reflective or dark areas in contract images affect OCR recognition performance, leading to inaccurate confirmation of important terms.
By acquiring grayscale and saturation data of the contract image, the image is divided into text, reflective, and dark areas. The reflective and dark areas are repaired, and then OCR recognition is performed to determine whether any confidentiality agreement clauses are missing.
It improves the accuracy of contract image recognition, ensures accurate confirmation of important terms, and eliminates the effects of reflective and dark areas.
Smart Images

Figure CN115984867B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology, and specifically relates to a contract image recognition method and system. Background Technology
[0002] In recent years, with the continuous evolution of business models, various types of contracts have emerged. Both parties, whether trusting or distrustful, establish trust and then cooperate by signing a contract. Currently, the contract signing process mainly relies on manual review. However, contracts often contain a vast amount of text, making it difficult for people to review them word by word. This leads some partners to deliberately add or delete important clauses, seriously harming the interests of the contract signatories. Existing technology exists that uses OCR recognition to identify missing clauses in contract images. However, when contract images are captured using different devices in different environments, they often contain reflective or dark areas, affecting the OCR recognition results and thus the accuracy of confirming important clauses. Summary of the Invention
[0003] To address the technical problem that existing technologies suffer from reflective or dark areas in contract images, which affect OCR recognition performance and consequently the accuracy of confirming important clauses, this invention provides a contract image recognition method and system.
[0004] First aspect
[0005] This invention provides a contract image recognition method, applied to a contract image recognition system, comprising:
[0006] S101: Obtain the original contract image;
[0007] S102: Divide the original contract image into a text area and a stamp area;
[0008] S103: Obtain the grayscale and saturation data of the original contract image;
[0009] S104: Based on grayscale and saturation data, the text area is divided into normal area, reflective area and dark area;
[0010] S105: Repair the reflective and dark areas to obtain the repaired image;
[0011] S106: Perform OCR text recognition processing on the text area in the repaired image to convert image information into text information;
[0012] S107: Identify whether textual information contains confidentiality agreement clauses;
[0013] S108: Issue an alert if no confidentiality agreement clause is identified.
[0014] Second aspect
[0015] This invention provides a contract image recognition system, comprising:
[0016] The first acquisition module is used to acquire the original contract image;
[0017] The first segmentation module is used to divide the original contract image into a text area and a stamp area;
[0018] The second acquisition module is used to acquire the grayscale data and saturation data of the original contract image;
[0019] The second segmentation module is used to divide the text area into normal area, reflective area and dark area based on grayscale data and saturation data.
[0020] The repair module is used to repair reflective and dark areas to obtain a repaired image;
[0021] The conversion module is used to perform OCR text recognition processing on the text areas in the restored image, converting image information into text information.
[0022] The identification module is used to identify whether text information contains confidentiality agreement clauses.
[0023] The first alert module is used to issue an alert if no confidentiality agreement clause is identified.
[0024] Compared with the prior art, the present invention has at least the following beneficial effects:
[0025] In this invention, reflective and dark areas are repaired, and OCR recognition is performed on the repaired image to determine whether confidentiality agreement clauses are missing. This eliminates the impact of reflective and dark areas on image recognition and improves the accuracy of contract image recognition. Attached Figure Description
[0026] The preferred embodiments will now be described in a clear and easy-to-understand manner, in conjunction with the accompanying drawings, to further explain the above-mentioned characteristics, technical features, advantages, and implementation methods of the present invention.
[0027] Figure 1 This is a flowchart illustrating a contract image recognition method provided by the present invention;
[0028] Figure 2 This is a schematic diagram of the structure of a contract image recognition system provided by the present invention. Detailed Implementation
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0030] To keep the drawings concise, each figure only schematically shows the parts relevant to the invention, and these do not represent the actual structure of the product. Furthermore, to facilitate understanding, in some figures, only one of components with the same structure or function is schematically depicted, or only one is labeled. In this document, "one" not only means "only one," but can also mean "more than one."
[0031] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0032] In this document, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0033] Furthermore, in the description of this invention, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0034] In one embodiment, refer to the appendix to the specification. Figure 1 The present invention provides a schematic flowchart of a contract image recognition method.
[0035] This invention provides a contract image recognition method, applied to a contract image recognition system, comprising:
[0036] S101: Obtain the original contract image.
[0037] Optionally, the contract can be photographed using a mobile phone or camera to obtain the original contract image.
[0038] S102: Divide the original contract image into a text area and a stamp area.
[0039] The main text area represents the text portion, while the seal area represents the official seal portion.
[0040] It's important to note that dividing the original contract image into a text area and a stamp area allows for processing only the text area during text processing, avoiding interference from the stamp area. Conversely, when processing the stamp, only the stamp area is processed, avoiding interference from the text area. This improves the accuracy of both text and stamp processing.
[0041] In one possible implementation, S102 specifically includes:
[0042] S1021: Determine the circular outline in the original contract image.
[0043] Among them, the circular outline includes a perfect circle outline and an elliptical outline.
[0044] It should be noted that the circular outline at this time can be understood as the suspected official seal area, and then it can be confirmed from these circular outlines whether it is the official seal area.
[0045] S1022: Convert the original contract image to the RGB color space and detect the R channel component intensity value of the image within the circular contour area.
[0046] The R channel component intensity value represents the red intensity value.
[0047] In practical applications, the original contract image can also be converted to the CMYK or LAB color space. In this case, it is also necessary to detect the intensity value of the red channel component.
[0048] S1023: If the intensity value of the R channel component of the image within the circular contour area is greater than the first preset value, the corresponding R channel component concentration area is determined.
[0049] Those skilled in the art can select the size of the first preset value according to the actual situation, and the present invention does not limit the specific size of the first preset value.
[0050] It should be noted that the concentrated area of the R channel components (red concentrated area) can be approximately equal to the stamp area.
[0051] S1024: Determine the minimum and maximum values between any two points in the R channel component set region.
[0052] S1025: When the difference between the maximum and minimum values is less than the second preset value, the R channel component concentration area is fitted with a perfect circle using the maximum value as the diameter to obtain the stamp area.
[0053] Those skilled in the art can select the size of the second preset value according to the actual situation, and the present invention does not limit the specific size of the second preset value.
[0054] It should be noted that if the difference between the maximum and minimum values is less than the second preset value, it means that the stamp is a perfect circle. In this case, using a perfect circle to fit the stamp area can improve the accuracy of the stamp area fitting.
[0055] S1026: When the difference between the maximum and minimum values is greater than or equal to the second preset value, use the maximum value as the major axis and the minimum value as the minor axis to perform elliptical fitting on the concentrated region of the R channel components to obtain the stamp region.
[0056] It should be noted that if the difference between the maximum and minimum values is greater than or equal to the second preset value, it means that the stamp is an elliptical stamp. In this case, using elliptical fitting to obtain the stamp area can improve the accuracy of the stamp area fitting.
[0057] S103: Obtain the grayscale and saturation data of the original contract image.
[0058] It should be noted that any image can be converted into a black-and-white image. In this case, black can be used as the base color, and different saturations of black can be used to represent the image. By analyzing the grayscale and saturation, it can be determined whether there are issues such as reflections or dark areas in the image.
[0059] S104: Based on grayscale and saturation data, the text area is divided into normal area, reflective area and dark area.
[0060] It should be noted that the normal area, reflective area, and dark area are independent of each other, and the three together constitute the entire original contract image.
[0061] S105: Repair the reflective and dark areas to obtain the repaired image.
[0062] In one possible implementation, S105 specifically includes:
[0063] S1051: Repair the reflective areas to obtain a reflective repair image.
[0064] It should be noted that the original contract image can be scanned from top to bottom and from left to right. If the scanned pixel coordinates are located in a reflective area, the scanned pixel is then filled in. Alternatively, the search area can be expanded outwards in a "U" shape, centered on the scanned pixel, and then the scanned pixel is filled in if its coordinates are located in a reflective area. This ultimately achieves the repair of reflective areas.
[0065] S1052: Convert the reflection restoration image and the template image to the RGB color space to obtain the component features of the reflection restoration image and the component features of the template image.
[0066] Among them, the component features include the R-channel component intensity value, the G-channel component intensity value, and the B-channel component intensity value.
[0067] Among them, the size of the specular reflection repair image is the same as that of the template image. The image resolution of the template image is higher than that of the specular reflection repair image.
[0068] S1053: Calculate the standard deviation and mean of the component features of the normal region in the specular reflection repair image, and calculate the standard deviation and mean of the component features of the normal region in the template image.
[0069] S1054: According to the standard deviation and mean of the specular reflection repair image and the standard deviation and mean of the template image, taking the template image as the standard, migrate the specular reflection repair image to the target domain corresponding to the template image to obtain a migrated image.
[0070] S1055: Repair the dark regions in the migrated image.
[0071] It should be noted that the dark regions can be repaired by scanning the migrated image from top to bottom and from left to right. When the scanned pixel point coordinates are in the dark regions, fill the scanned pixel points. It is also possible to scan around the pixel points as the center and expand the search area layer by layer in a "return" shape. Then, when the scanned pixel point coordinates are in the dark regions, fill the scanned pixel points. Finally, the repair of the dark regions is achieved.
[0072] S106: Perform OCR text recognition processing on the text regions in the repaired image to convert the image information into text information.
[0073] It should be noted that performing OCR recognition after repairing the specular reflection regions and dark regions can greatly improve the accuracy of OCR recognition.
[0074] S107: Identify whether there are confidentiality agreement clauses in the text information.
[0075] It should be noted that the confidentiality agreement clauses are mainly used to restrict both parties from keeping important secrets confidential, and they are important clauses in the contract.
[0076] In a possible implementation manner, S107 specifically includes:
[0077] S1071: Identify whether there are target vocabulary in the text information.
[0078] Among them, the target vocabulary can be words such as "confidential", "without permission", "disclose", "leak", etc.
[0079] S1072: Determine whether there are confidentiality agreement clauses in the text information by judging whether there are target vocabulary in the text information.
[0080] S108: Issue an alert if no confidentiality agreement clause is identified.
[0081] It should be noted that if a confidentiality agreement clause cannot be identified in the contract image, it should be determined that the contract poses a risk, and an alert should be issued promptly.
[0082] The alarm methods can include pop-up windows, voice broadcasts, etc.
[0083] In one possible implementation, the contract image recognition system is equipped with a seal library, which contains multiple storage units, with one storage unit corresponding to each contract subject.
[0084] It should be noted that the contracting parties are the parties to the contract. When Company A and Company B sign a contract, Company A and Company B are the contracting parties. In the contract image recognition system, a storage unit is configured for Company A and Company B respectively.
[0085] Contract image recognition methods also include:
[0086] S109: Identify the contract subject in the text information and extract the target seal image based on the seal area.
[0087] S110: If the image of the seal is not stored in the storage unit corresponding to the contract subject, store the target seal image in the storage unit corresponding to the contract subject.
[0088] It should be noted that if the storage unit corresponding to the contract subject does not store the seal image, it means that for the contract image recognition system, this contract subject is a new subject, and a new storage unit needs to be configured for this new contract subject and the seal image needs to be stored in it.
[0089] S111: If a seal image is already stored in the storage unit corresponding to the contract subject, compare the target seal image with the stored seal image.
[0090] S112: If the difference between the target stamp image and the stored stamp image is greater than a third preset value, an alarm is issued.
[0091] Those skilled in the art can select the size of the third preset value according to the actual situation, and the present invention does not limit the specific size of the first preset value.
[0092] It should be noted that if the difference between the target seal image and the stored seal image is greater than the third preset value, it means that there is a difference between the seal in this contract and the stored seal, and it is very likely that it is a fake official seal. In this case, the relevant contract should be judged to be at risk, and an alarm should be issued in time to remind the parties.
[0093] Compared with the prior art, the present invention has at least the following beneficial effects:
[0094] In this invention, reflective and dark areas are repaired, and OCR recognition is performed on the repaired image to determine whether confidentiality agreement clauses are missing. This eliminates the impact of reflective and dark areas on image recognition and improves the accuracy of contract image recognition.
[0095] Example 2
[0096] In one embodiment, refer to the appendix to the specification. Figure 2 The present invention provides a schematic diagram of the structure of a contract image recognition system.
[0097] The present invention provides a contract image recognition system 20, comprising:
[0098] The first acquisition module 201 is used to acquire the original contract image;
[0099] The first division module 202 is used to divide the original contract image into a text area and a stamp area;
[0100] The second acquisition module 203 is used to acquire the grayscale data and saturation data of the original contract image;
[0101] The second segmentation module 204 is used to divide the text area into normal area, reflective area and dark area according to grayscale data and saturation data.
[0102] Repair module 205 is used to repair reflective and dark areas to obtain a repaired image;
[0103] The conversion module 206 is used to perform OCR text recognition processing on the text area in the repaired image, converting image information into text information;
[0104] The identification module 207 is used to identify whether the text information contains confidentiality agreement clauses;
[0105] The first alarm module 208 is used to issue an alarm if no confidentiality agreement clause is identified.
[0106] In one possible implementation, the first partitioning module 202 specifically includes:
[0107] The first determining submodule is used to determine the circular outline in the original contract image, wherein the circular outline includes a perfect circle outline and an elliptical outline;
[0108] The first conversion submodule is used to convert the original contract image to the RGB color space and detect the R channel component intensity value of the image within the circular contour area;
[0109] The second determining submodule is used to determine the corresponding R-channel component concentration region when the R-channel component intensity value of the image within the circular contour region is greater than the first preset value.
[0110] The third determination submodule is used to determine the minimum and maximum values between any two points in the R channel component set region;
[0111] The first fitting submodule is used to perform circular fitting on the concentrated region of the R channel components with the maximum value as the diameter to obtain the stamp region when the difference between the maximum and minimum values is less than the second preset value.
[0112] The second fitting submodule is used to perform elliptical fitting on the concentrated region of the R channel components, with the maximum value as the major axis and the minimum value as the minor axis, to obtain the stamp region when the difference between the maximum and minimum values is greater than or equal to a second preset value.
[0113] In one possible implementation, the repair module 205 specifically includes:
[0114] The reflection repair submodule is used to repair reflective areas and obtain a reflection repair image;
[0115] The second conversion submodule is used to convert the reflection restoration image and the template image to the RGB color space to obtain the component features of the reflection restoration image and the component features of the template image. The component features include the R channel component intensity value, the G channel component intensity value and the B channel component intensity value. The reflection restoration image and the template image have the same size.
[0116] The calculation submodule is used to calculate the standard deviation and mean of each component feature of the normal region in the reflection restoration image, and to calculate the standard deviation and mean of each component feature of the normal region in the template image.
[0117] The migration submodule is used to migrate the reflection restoration image to the target domain corresponding to the template image, based on the standard deviation and mean of the reflection restoration image and the standard deviation and mean of the template image, using the template image as the standard, to obtain the migrated image;
[0118] The Dark Area Repair submodule is used to repair dark areas in migrated images.
[0119] In one possible implementation, the identification module 207 specifically includes:
[0120] The recognition submodule is used to identify whether the target words are present in the text information;
[0121] The determination submodule is used to determine whether text information contains confidentiality agreement clauses by judging whether the target words are present in the text information.
[0122] In one possible implementation, the contract image recognition system includes a stamp library with multiple storage units, one storage unit corresponding to each contract subject; the contract image recognition system 20 also includes:
[0123] The extraction module 209 is used to identify the contract subject in the text information and extract the target seal image based on the seal area;
[0124] Storage module 210 is used to store the target seal image in the storage unit corresponding to the contract subject when the seal image is not stored in the storage unit corresponding to the contract subject.
[0125] The comparison module 211 is used to compare the target seal image with the stored seal image when the seal image is already stored in the storage unit corresponding to the contract subject.
[0126] The second alarm module 212 is used to issue an alarm when the difference between the target stamp image and the stored stamp image is greater than a third preset value.
[0127] The contract image recognition system 20 provided by the present invention can implement the various processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0128] The virtual system provided by this invention can be a system, or a component, integrated circuit, or chip in a terminal.
[0129] Compared with the prior art, the present invention has at least the following beneficial effects:
[0130] In this invention, reflective and dark areas are repaired, and OCR recognition is performed on the repaired image to determine whether confidentiality agreement clauses are missing. This eliminates the impact of reflective and dark areas on image recognition and improves the accuracy of contract image recognition.
[0131] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0132] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A contract image recognition method, applied to a contract image recognition system, characterized in that, It includes: S101: Obtain the original contract image; S102: Divide the original contract image into a text area and a seal area; The S102 specifically includes: S1021: Determine the circular contours in the original contract image, where the circular contours include regular circular contours and elliptical contours; S1022: Convert the original contract image to the RGB color space and detect the intensity value of the R-channel component of the image within the circular contour area; S1023: When the intensity value of the R-channel component of the image within the circular contour area is greater than the first preset value, determine the corresponding concentrated area of the R-channel component; S1024: Determine the minimum value and the maximum value between any two points in the concentrated area of the R-channel component; S1025: When the difference between the maximum value and the minimum value is less than the second preset value, perform a regular circular fitting on the concentrated area of the R-channel component with the maximum value as the diameter to obtain the seal area; S1026: When the difference between the maximum value and the minimum value is greater than or equal to the second preset value, perform an elliptical fitting on the concentrated area of the R-channel component with the maximum value as the major axis and the minimum value as the minor axis to obtain the seal area; S103: Obtain the grayscale data and saturation data of the original contract image; S104: According to the grayscale data and the saturation data, divide the text area into a normal area, a reflective area, and a dark area; S105: Repair the reflective area and the dark area to obtain a repaired image; The S105 specifically includes: S1051: Repair the reflective area to obtain a reflectively repaired image. Taking the scanned pixel point as the center, perform a "backward" shaped layer-by-layer outward expansion search area. Then, when the coordinates of the scanned pixel point are in the reflective area, fill the scanned pixel point; S1052: Convert the reflectively repaired image and the template image to the RGB color space to obtain the component features of the reflectively repaired image and the component features of the template image. The component features include the intensity value of the R-channel component, the intensity value of the G-channel component, and the intensity value of the B-channel component. The reflectively repaired image and the template image have the same size; S1053: Calculate the standard deviation and mean of the component features of the normal area in the reflectively repaired image, and calculate the standard deviation and mean of the component features of the normal area in the template image; S1054: According to the standard deviation and mean of the reflectively repaired image, the standard deviation and mean of the template image, and using the template image as the standard, migrate the reflectively repaired image to the target domain corresponding to the template image to obtain a migrated image; S1055: Repair the dark area in the migrated image; S106: Perform OCR character recognition processing on the text area in the repaired image to convert the image information into text information; S107: Identify whether there is a confidentiality agreement clause in the text information; S108: When the confidentiality agreement clause is not recognized, issue an alarm; The contract image recognition system includes a seal library with multiple storage units, one for each contract subject; the contract image recognition method further includes: S109: Identify the contract subject in the text information and extract the target seal image based on the seal area; S110: If no seal image is stored in the storage unit corresponding to the contract subject, the target seal image is stored in the storage unit corresponding to the contract subject; S111: If a seal image is already stored in the storage unit corresponding to the contract subject, compare the target seal image with the stored seal image. S112: If the difference between the target stamp image and the stored stamp image is greater than a third preset value, an alarm is issued.
2. The contract image recognition method according to claim 1, characterized in that, Specifically, S107 includes: S1071: Identify whether the text information contains target words; S1072: By determining whether the target words are present in the text information, it is determined whether the confidentiality agreement clause is present in the text information.
3. A contract image recognition system, wherein the system implements the method as described in claim 1, characterized in that, include: The first acquisition module is used to acquire the original contract image; The first partitioning module is used to divide the original contract image into a text area and a stamp area; The second acquisition module is used to acquire the grayscale data and saturation data of the original contract image; The second segmentation module is used to divide the text area into a normal area, a reflective area, and a dark area based on the grayscale data and the saturation data. The repair module is used to repair the reflective area and the dark area to obtain a repaired image; The conversion module is used to perform OCR text recognition processing on the text area in the repaired image, converting image information into text information; The identification module is used to identify whether the text information contains confidentiality agreement clauses; The first alarm module is used to issue an alarm if the confidentiality agreement terms are not identified.
4. The contract image recognition system according to claim 3, characterized in that, The first partitioning module specifically includes: The first determining submodule is used to determine the circular outline in the original contract image, wherein the circular outline includes a perfect circle outline and an elliptical outline; The first conversion submodule is used to convert the original contract image to the RGB color space and detect the R channel component intensity value of the image within the circular contour area; The second determining submodule is used to determine the corresponding R-channel component concentration region when the R-channel component intensity value of the image within the circular contour region is greater than a first preset value. The third determining submodule is used to determine the minimum and maximum values between any two points in the R channel component set region; The first fitting submodule is used to perform circular fitting on the R channel component concentration region with the maximum value as the diameter to obtain the stamp region when the difference between the maximum value and the minimum value is less than a second preset value. The second fitting submodule is used to perform elliptical fitting on the R channel component concentration region to obtain the stamp region, with the maximum value as the major axis and the minimum value as the minor axis, when the difference between the maximum value and the minimum value is greater than or equal to the second preset value.
5. The contract image recognition system according to claim 4, characterized in that, The repair module specifically includes: The reflection repair submodule is used to repair the reflective area to obtain a reflection repair image; The second conversion submodule is used to convert the reflection restoration image and the template image to the RGB color space to obtain the component features of the reflection restoration image and the component features of the template image. The component features include the R channel component intensity value, the G channel component intensity value and the B channel component intensity value. The reflection restoration image and the template image have the same size. The calculation submodule is used to calculate the standard deviation and mean of each component feature of the normal region in the reflection restoration image, and to calculate the standard deviation and mean of each component feature of the normal region in the template image; The migration submodule is used to migrate the reflection restoration image to the target domain corresponding to the template image based on the standard deviation and mean of the reflection restoration image and the standard deviation and mean of the template image, using the template image as a standard, to obtain a migrated image; The dark area repair submodule is used to repair the dark areas in the migrated image.
6. The contract image recognition system according to claim 5, characterized in that, The identification module specifically includes: The recognition submodule is used to identify whether the text information contains the target words; The determination submodule is used to determine whether the text information contains the confidentiality agreement clause by judging whether the target vocabulary is present in the text information.
7. The contract image recognition system according to claim 6, characterized in that, The contract image recognition system is equipped with a stamp library, which contains multiple storage units, with each contract subject corresponding to one storage unit. The contract image recognition system also includes: The extraction module is used to identify the contract subject in the text information and extract the target seal image based on the seal area; A storage module is used to store the target seal image in the storage unit corresponding to the contract subject when the seal image is not stored in the storage unit corresponding to the contract subject. The comparison module is used to compare the target seal image with the stored seal image when the seal image is already stored in the storage unit corresponding to the contract subject. The second alarm module is used to issue an alarm when the difference between the target stamp image and the stored stamp image is greater than a third preset value.