Seal image processing method and system
Patent Information
- Application Number
- TW114113698
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2045-04-10
AI Technical Summary
Manual verification of seals for personal identification is prone to errors and forgery, lacking efficiency and consistency in financial transactions.
A seal image processing method and system using image processing technology to automatically verify the authenticity of seals by comparing them with registered images, involving preprocessing, detection, correction, binarization, and logical verification.
Provides accurate and efficient automatic verification of seals, reducing errors and enhancing operational efficiency in financial transactions.
Smart Images

Figure TWG2TA001080267_001 
Figure TWG2TA001080267_002 
Figure TWG2TA001080267_003
Abstract
Description
[Technical Field]
[0001] The specification discloses a method for verifying seals, specifically a seal image processing method and system for verifying various images used to indicate identity or origin. [Previous Technology]
[0002] Using seals as identification marks to prove personal identity is common in financial institutions. For example, seals are used as the basis for establishing personal financial accounts and are required as the basis for future transactions such as remittances, transfers, cash withdrawals, and loan applications.
[0003] However, seals used as personal identification may be forged, and the traditional method of manually verifying the authenticity of seals may be prone to errors because it relies on the expertise of the personnel handling the seals. [Summary of the Invention]
[0004] In view of the shortcomings of the current method of manually verifying seals, the specification proposes a seal image processing method and system, wherein the seal represents a graphic used on various documents to indicate identity or origin, such as a stamp. The proposed method is to use image processing technology to automatically verify whether the seal is consistent with the registered seal image.
[0005] According to an embodiment of the stamp image processing system, the system is in a computer host, the computer host includes a processor, for executing a program set stored in a computer-readable medium to process stamp images on a document to be processed, wherein the steps include: first determining the verification area in the document to be processed and detecting the stamp image in the verification area; after obtaining the stamp image, comparing it with a registered stamp image; obtaining the similarity based on the comparison result between the stamp image and the registered stamp image; and then verifying the stamp image based on the similarity.
[0006] Furthermore, when the document to be processed is obtained, the registered stamp image will be included together for correction and comparison of the stamp image on the document to be processed.
[0007] Further, after obtaining the document to be processed, the image features of the document can be obtained, thereby identifying the verification area including the stamp image. Then, in the verification area, the stamp image can be cut out, and the cut-out stamp image can be adjusted to match the geometric size of the registered stamp image, and then used to compare with the registered stamp image.
[0008] In the method of comparing stamp images and registered stamp images, the stamp image can be binarized first, then the back of the stamp image can be removed, and it can be superimposed with the registered stamp image to form an overlay image. The similarity can then be obtained based on the colors presented in the overlay image.
[0009] Further, in the step of verifying the stamp image, a logical verification process is also performed, including obtaining the pixel color values of multiple locations in the registered stamp image used for verification, and obtaining the pixel color values of the corresponding multiple locations in the registered stamp image to be verified in the stamp image, and then comparing the pixel colors of the multiple locations in the registered stamp image with the pixel color values of the to be verified in the stamp image, so that the stamp image can be verified based on the comparison results.
[0010] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention.
Implementation Method
[0011] The following describes the implementation of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. In addition, the accompanying drawings of the present invention are only simple illustrations and are not depictions based on actual dimensions, as stated in advance. The following embodiments will further describe the relevant technical content of the present invention in detail, but the disclosed content is not intended to limit the scope of protection of the present invention.
[0012] It should be understood that although terms such as “first,” “second,” and “third” may be used herein to describe various components or signals, these components or signals should not be limited by these terms. These terms are primarily used to distinguish one component from another, or one signal from another. In addition, the term “or” as used herein may include, as appropriate, any combination of any one or more of the associated listed items.
[0013] The specification proposes a method and system for processing stamp images. One of the technical objectives is to efficiently and automatically identify stamp images included in documents to identify individuals or organizations, and to verify the authenticity of the stamps in the documents. The stamps can broadly include various items that can print graphics indicating identity or origin, such as seals, stamps, company seals, etc., and are not limited to the examples listed herein.
[0014] Figure 1 shows a schematic diagram of an embodiment of the stamp image processing system. The figure shows a computer host 100, which includes a processor 101 and a memory 103 electrically connected to each other, thereby running the computer system to implement the stamp image processing method. The memory 103 can be implemented as a computer-readable medium to store a set of programs running on the computer system, including a set of programs that execute the stamp image processing method. This set of programs is executed by the processor 101 to process the stamp image on the document to be processed. The system can store pre-registered stamp images 120, such as seal images, in a database implemented through a storage device. The registered stamp images 120 are brought into the image processing system along with the document to be processed (such as a first type document 111, a second type document 112, and a third type document 113) to verify the stamp image in the document to be processed.
[0015] According to the illustrated embodiment, the processor 101 is connected to a stamp image processing module 105 implemented through hardware such as the processor 101 and memory 103, and software programs executed in the computer system. Depending on the functions executed in the stamp image processing module 105, it may include a preprocessing unit 151, a stamp detection unit 152, a stamp correction unit 153, a stamp image processing unit 154, a stamp comparison unit 155, and a stamp verification unit 156. Furthermore, the stamp image processing module 105 is implemented in the computer host through hardware and software collaboration.
[0016] The system architecture is described based on Figure 1, and the steps of operation can be referred to the flowchart of the embodiment of the stamp image processing method shown in Figure 2.
[0017] The stamp image processing system provides users with the ability to execute stamp processing programs via a computer host 100. As shown in the embodiment example, the computer host 100 is located in an enterprise or organization, providing various departments (such as business departments 110) with documents to be processed via specific transmission methods. The stamp image processing system provides verification services for the stamps in the documents. The enterprise or organization can transmit the documents to be processed to the computer host 100 via specific file transmission methods (such as email, instant messaging software, specific file transmission protocols, etc.), and according to the embodiment, the registered stamp image 120 corresponding to the stamp image in the document to be processed can be included when transmitting the document to be processed (step S201).
[0018] According to the illustration, various types of documents are generated by various departments and offices within an enterprise or organization, or by external units. In particular, documents with seals that can identify individuals or related units are referred to as first type document 111 (such as a check), second type document 112 (such as a remittance slip), and third type document 113 (such as an application document, which has two seals of different sizes in this figure). The actual application is not limited to the examples shown in the figure.
[0019] After a specific file to be processed is submitted to the computer host 100, the preprocessing unit 151 performs image processing, mainly preprocessing various types of files to be processed that have been digitized, as illustrated in the figure: first type file 111, second type file 112, and third type file 113, as well as the registration stamp image 120 brought into the computer host 100 at the same time as the file to be processed. This provides subsequent steps with the ability to effectively determine the verification area in the file to be processed based on image features, and preprocess the registration stamp image 120 into an image format that is easy to compare (step S203). For example, the entire digitized file image can be reduced to a reasonable size and processing range. If there are multiple pages of image files or multiple pages of specific format files (such as PDF format), they can be separated into different files page by page to facilitate the subsequent detection of the image images by the stamp detection unit 152.
[0020] According to the embodiment, each type of document to be processed reasonably has an area for providing a stamp. Therefore, the stamp detection unit 152 can determine the verification area including the stamp image based on the image features in the document to be processed. In addition to pre-setting the verification areas on various types of documents in the system, the method can also employ artificial intelligence technology, using machine learning algorithms to train a recognition model for identifying verification areas through a large number of document images of different types, and then using the recognition model to determine the verification areas in various documents to be processed. Furthermore, optical image recognition technology can be used to determine verification areas that may contain stamp images (e.g., blank areas in many texts, areas circled by lines, or text recognition methods) based on the image features of the document to be processed.
[0021] After determining the verification area, the stamp image with specific geometric features can be detected (step S205). Then, the area with the stamp image can be segmented using imaging technology. Since the stamp may not be stamped in the specified position or direction, the stamp image may have problems such as offset or deflection. In certain cases, the stamp correction unit 153 can correct the direction (or add size and position) according to the direction of the registered stamp image 120. The purpose is to make it consistent with the direction of the registered stamp image 120 registered in the system (step S207). According to the embodiment, when the stamp image is obtained, the stamp correction unit 153 can correct the stamp image according to the direction of the registered stamp image 120. That is, the stamp correction unit 153 can align the stamp image with the registered stamp image 120 according to the direction of the text or specific mark in the registered stamp image 120. Furthermore, if the registered stamp image 120 has a specific angle of skew, the stamp image will also be turned to be consistent with the direction of the registered stamp image 120.
[0022] Furthermore, according to one embodiment, in the verification area of the document to be processed, the stamp image can be cut out according to the image features, and then the cut-out stamp image can be adjusted to be consistent with the geometric size of the registered stamp image 120 before the subsequent comparison steps are performed.
[0023] Taking a seal as an example, the image of the seal registered in the system is a seal card. The seal correction unit 153 adjusts the seal image according to the direction or size of the seal image in the seal card, and aligns the seal size with the seal on the seal card.
[0024] Before performing stamp image comparison, in one embodiment, the segmented stamp image can be binarized and background removed by the stamp image processing unit 154. The binarization calculation involves designing a threshold based on edge features in the image, setting stamp images with specific colors and noise values exceeding the threshold to 1, and the rest to 0, to form a binary stamp image. Another method is clustering, which sets a color range based on pixel values in similar stamp images, setting values close to this range to 1, and the rest to 0, to form a binary stamp image. Binary stamp images are beneficial for background removal, as they can remove the background outside the stamp image, including but not limited to white.
[0025] According to the embodiment of processing stamp images in the stamp image processing system, the stamp image processing unit 154 in the stamp image processing module 105 can adjust the stamp image to facilitate the stamp comparison unit 155 to perform stamp comparison. The stamp image obtained by binarization and background removal algorithms can reduce the difficulty of verifying the stamp by image comparison, but the stamp can still be directly verified by comparing the features of the stamp image.
[0026] In one embodiment, after detecting the stamp image in the stamp area and obtaining the stamp image, the stamp comparison unit 155 uses image technology to overlay the stamp image with the registered stamp image 120 (which may be a pre-processed image) and then compares them (step S209) to obtain the similarity between the stamp image and the registered stamp image 120, thereby verifying the authenticity of the stamp image (step S211).
[0027] One method for calculating the similarity between two images is to use a structural similarity index (SSIM index) to determine the degree of similarity between two digital images. This structural similarity index considers the brightness, contrast, and structural information of the images simultaneously. The method for calculating the structural similarity index includes dividing the image into multiple blocks, scanning each block using a moving window, calculating the difference in pixel values (such as red, green, and blue color values) between the two images within this moving window after each window movement, calculating the average difference in pixel values within each block to obtain the structural similarity index of the block, and then averaging the structural similarity indices of the two images to obtain the similarity.
[0028] According to one of the methods, in the step of comparing stamp images, a scale-invariant feature transform (SIFT) method can be used to compare the local features of the stamp image and the registered stamp image 120, obtain the difference features of position, scale and angle between the stamp image and the registered stamp image 120, and correct and verify the stamp image accordingly.
[0029] Next, in the step of verifying the stamp image, a logical verification process (step S213) can be further executed by the stamp verification unit 156. According to the embodiment, the logical verification process includes first obtaining the pixel color values of multiple locations in the registered stamp image 120 used for verification, and also obtaining the pixel color values of the corresponding multiple locations in the stamp image to be verified. Then, the pixel colors of the multiple locations in the registered stamp image 120 are compared with the pixel color values of the pixels to be verified in the stamp image, and the stamp image is verified based on the comparison results.
[0030] In addition to the above-mentioned logical check based on the pixel color values in the stamp image, in another embodiment, the logical check process may further include checking whether the geometric features of the stamp image and the registered stamp image 120 are consistent, such as checking the length and width ratio and size between the two images. For stamp images of circular or non-square stamps, the ratio between the axes of symmetry in their geometric shapes can be compared. Furthermore, the logical check process may also include determining whether the color proportions of the blocks in the overlay image formed by superimposing the stamp image and the registered stamp image 120 are consistent.
[0031] After the stamp is verified by the stamp comparison unit 155 and the stamp inspection unit 156, it can be determined whether the stamp image on the document to be processed matches the registered stamp image 120 (step S215). The verification result can then be submitted to the business department 110.
[0032] In the stamp image processing method, the digitized file to be processed is first obtained. The file to be processed covers various types of files. For example, Figure 3 shows a schematic diagram of one of the file types with stamp images.
[0033] Figure 3 shows an application document 30 for a specific project. A verification area 300 is designed in a specific location in the application document 30 to allow users to affix their stamps. After the entire application document 30 is digitized, a stamp image 310 is formed in the verification area 300.
[0034] When the stamp image processing method is executed by the computer system, the verification area 300 in the image of the digitized application document 30 is first determined. One method is to determine the verification area 300 based on image features. For example, obvious blank spaces outside the text of the application document 30 or areas framed by lines can be determined as the verification area 300. Another method is that this type of application document 30 can be in a fixed format, so the verification area 300 can be directly obtained based on the location where the seal is to be retained. After the verification area 300 is determined, the stamp image 310 is then detected. Another method is to use the recognition model trained by the above-mentioned machine learning algorithm to determine the verification area 300 in the application document 30.
[0035] Figure 4 shows an implementation example of another document type with a stamp image. This example shows a check 40. In addition to the text that a check 40 should have, the verification area 400 requiring the issuer's signature can be determined based on the features of the image obtained by scanning the check 40, and then the stamp image 410 can be detected. Then, the stamp image 410 can be compared with the registered stamp image based on the features of the stamp image 410 to obtain the similarity between the two, and then the stamp image can be verified based on the similarity (which can be compared against a preset threshold).
[0036] Figure 5 then shows a schematic diagram of an embodiment of the stamp image correction method in the stamp image processing method. This example shows a document 50 to be processed, such as a check. As described in the above embodiment, in addition to the text, the verification area 500 can be identified, and the stamp image 510 is obtained. However, based on the image characteristics of the stamp image and the registered stamp image, it can be determined whether image correction needs to be performed. This example shows that the stamp image 510 and the registered stamp image have an angular deviation in direction, so it needs to be corrected through image processing to obtain the corrected stamp image 520.
[0037] According to an embodiment, in the step of comparing a stamp image with a registered stamp image in the stamp image processing method, one of the comparison methods is to remove the back of the stamp image, adjust the size or angle of the stamp image to match the registered stamp image, and then, referring to the embodiment of comparing stamp images shown in FIG6, the two images are superimposed to form an overlay image, and the stamp image is checked based on the color presented by the overlay image.
[0038] In the schematic diagram of the embodiment shown in Figure 6, the system obtains the original image 601 of the stamp to be processed, which includes the background image of the document to be processed. After binarization, background removal processing is performed to obtain the processed stamp image 603. On the other hand, the system can obtain the registered stamp image 605 from the database. The illustration shows that the registered stamp image 605 is an image that has been background removed or has a solid color background. Then, image processing technology can be used to overlay the processed stamp image 603 and the registered stamp image 605 to form an overlaid image 607. The overlaid image 607 can be used to determine the result of comparing the two stamp images.
[0039] Furthermore, the stamp image and the registered stamp image do not need to be binarized but present the original stamp image. The stamp image can be checked based on the color information of the overlaid image 607. As shown in the example in Table 1 below, if some parts of the two overlaid images are yellow, it means that the registered stamp image has red ink and the stamp image has red ink; if some parts of the two overlaid images are green, it means that the registered stamp image does not have red ink and the stamp image has red ink; if some parts of the two overlaid images are red, it means that the registered stamp image has red ink and the stamp image does not have red ink.
[0040] Table 1: Overlay image colors yellow Image of the registration stamp: with red ink. Image of the stamp: with red ink. green Registration stamp image: No red ink. Image of the stamp: with red ink. red Image of the registration stamp: with red ink. Image of the stamp: No red ink.
[0041] Thus, referring to the schematic diagram of the detailed comparison of stamp images in the stamp image processing method shown in Figure 7, the figure shows that the above-mentioned overlaid image 607 is placed in a check grid 70, and the stamp image can be further checked according to the color features shown in Table 1. Through the logical check process executed by the check grid 70, it is possible to check whether the geometric relationship between the registered stamp image and the stamp image is consistent (the error range can be set), and to determine the proportion of each color in the details, and thereby determine whether they are the same stamp.
[0042] Further, when performing color feature or proportion checks, the overlay image 607 is divided into multiple blocks by the check grid 70, and the overlay pixel status is checked in each segmented block to determine whether the details of the stamps are similar. If the logical check passes, the stamp verification result is output; otherwise, the verification result is output.
[0043] In summary, the stamp image processing method and system described in the above embodiments are applicable to applications that require automatic and accurate identification of stamps with identifiable identities in various types of documents, such as applications in the financial industry. The daily operations of the financial industry are closely related to the stamps of individuals, enterprises or organizations. Taking the seal as an example, for account opening, check transactions, loan applications, etc., it is necessary to retain the seal or determine the validity through seal comparison. The method avoids the problem that errors may occur when manually verifying the seal, and proposes a solution that can effectively improve operational efficiency and provide a consistent standard.
[0044] The content disclosed above is only a preferred and feasible embodiment of the present invention, and is not intended to limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention specification and drawings are included in the scope of the patent application of the present invention. [Simplified Explanation of the Diagram]
[0045] Figure 1 shows a schematic diagram of an embodiment of the stamp image processing system;
[0046] Figure 2 shows a flowchart of an embodiment of the stamp image processing method;
[0047] Figure 3 shows a schematic diagram of an implementation example of a document type with a stamp image;
[0048] Figure 4 shows a schematic diagram of an implementation example of a document type with a stamp image;
[0049] Figure 5 shows a schematic diagram of an embodiment of the stamp image correction method;
[0050] Figure 6 shows a schematic diagram of an embodiment of the stamp image processing method for processing and comparing stamp images; and
[0051] Figure 7 shows a schematic diagram of an embodiment of the detail comparison stamp image in the stamp image processing method.
Claims
1. A stamp image processing method, executed in a computer system, comprising: After obtaining a digitized document to be processed, a verification area in the document is identified based on its image features; a stamp image is detected within the verification area; the stamp image is cut out from the verification area and adjusted to match the geometric size of a registered stamp image; after obtaining the stamp image, it is binarized and then background removed; the background-removed stamp image is compared with the registered stamp image, wherein the background-removed stamp image and the registered stamp image are overlaid to form an overlay image, and a similarity between the stamp image and the registered stamp image is determined based on the colors presented in the overlay image; and the stamp image is verified based on the similarity.
2. The stamp image processing method as described in claim 1, wherein, When the computer system obtains the file to be processed, it also includes the registered stamp image, which is used to correct and compare the stamp image on the file to be processed.
3. The stamp image processing method as described in claim 2, wherein, Having obtained the stamp image, the stamp image is turned according to its direction to align with the registered stamp image.
4. The stamp image processing method as described in any one of claims 1 to 3, wherein, In the step of verifying the stamp image, a logical verification process is also performed, including: obtaining the pixel color values of multiple locations in the registered stamp image for verification; obtaining the pixel color values of the locations to be verified in the stamp image; and comparing the pixel colors of the multiple locations in the registered stamp image with the pixel color values of the locations to be verified in the stamp image, and verifying the stamp image based on the comparison results.
5. The stamp image processing method as described in claim 4, wherein, The step of verifying the stamp image also includes checking whether the geometric features of the stamp image are consistent with those of the registered stamp image.
6. A stamp image processing system, comprising: A computer host, including a processor, is configured to execute a program set stored in a computer-readable medium to process a stamp image on a document to be processed, wherein the steps include: identifying a verification area in the document to be processed based on image features of the document to be processed; detecting the stamp image in the verification area; cutting out the stamp image in the verification area and adjusting the cut-out stamp image to be geometrically consistent with a registered stamp image; after obtaining the stamp image, performing binarization and background removal on the stamp image; comparing the background-removed stamp image with the registered stamp image, wherein the background-removed stamp image and the registered stamp image are overlaid to form an overlay image, and determining a similarity between the stamp image and the registered stamp image based on the colors presented in the overlay image; and verifying the stamp image based on the similarity.
