Signature recognition method, device, medium and equipment based on regional division
Through the signature recognition method based on area division, character area images in handwritten signatures are divided and recognized, which solves the problem of difficulty in handwritten signature recognition in the prior art, and realizes the effect of automatic recognition and efficient organization.
Patent Information
- Application Number
- CN202210692173.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-06-17
AI Technical Summary
It is difficult for the existing technology to effectively identify and organize handwritten signatures, especially when the signature forms are diverse, sloppy or artistic, which makes it difficult for banks and other financial institutions to organize signatures.
The signature recognition method based on area division is adopted. By obtaining the image to be processed, identifying the character position, segmenting the signature area image, further segmenting it into the character area image, and inputting it into the trained character recognition model for recognition, and finally combining it to obtain the signature recognition result.
It realizes automatic recognition of handwritten signatures, improves the efficiency and accuracy of signature recognition, and solves the problem of identification of diversity in signature forms.
Smart Images

Figure CN115083024B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a signature recognition method, device, storage medium and electronic device based on area division. Background Art
[0002] With the rapid development of information technology, effectively identifying a person's identity is very important in the field of information security. Handwritten signatures are a feature with strong personal characteristics and an important means of personal identity authentication. However, these signatures are varied and often difficult to recognize. Summary of the invention
[0003] The embodiments of the present application provide a signature recognition method, device, storage medium and electronic device based on area division, which can automatically recognize signatures.
[0004] The present application embodiment provides a signature recognition method based on region division, including:
[0005] Get the image to be processed;
[0006] Identify the character positions in the image to be processed, and segment a plurality of signature area images from the image to be identified according to the character positions and the preset number of character bits;
[0007] According to the positions of the characters in the signature area image, the signature area image is segmented into a plurality of character area images;
[0008] Input each character region image into the trained character recognition model to obtain a character recognition result for each character region image;
[0009] A signature recognition result of the signature area image is obtained according to the character recognition results of the plurality of character area images.
[0010] The embodiment of the present application further provides a signature recognition device based on area division, including:
[0011] A first acquisition module, used for acquiring an image to be processed;
[0012] A recognition module, used to recognize the character positions in the image to be processed, and to segment a plurality of signature area images from the image to be recognized according to the character positions and the preset number of character bits;
[0013] A segmentation module, used for segmenting the signature region image into a plurality of character region images according to the positions of the characters in the signature region image;
[0014] An input module, used to input each character region image into a trained character recognition model to obtain a character recognition result for each character region image;
[0015] The second acquisition module is used to obtain the signature recognition result of the signature area image according to the character recognition results of the multiple character area images.
[0016] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the steps in the above-mentioned signature recognition method based on area division.
[0017] An embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the steps in the above-mentioned signature recognition method based on area division.
[0018] In an embodiment of the present application, an image to be processed is obtained; the character positions in the image to be processed are identified, and multiple signature area images are segmented from the image to be identified according to the character positions and the preset number of character bits; the signature area image is segmented into multiple character area images according to the character positions in the signature area image; each character area image is input into a trained character recognition model to obtain a character recognition result for each character area image; and a signature recognition result of the signature area image is obtained according to the character recognition results of the multiple character area images. In an embodiment of the present application, the signature is broken up into characters, and after the characters are separately identified by the model, the recognition result of the signature can be obtained according to the recognition results of each character, thereby realizing automatic recognition of the signature. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0020] Figure 1 A schematic diagram of a scenario of a signature recognition method based on area division provided in an embodiment of the present application.
[0021] Figure 2 A first flow chart of a signature recognition method based on area division provided in an embodiment of the present application.
[0022] Figure 3 A second flow chart of the signature recognition method based on area division provided in an embodiment of the present application.
[0023] Figure 4 A first structural diagram of a signature recognition device based on area division provided in an embodiment of the present application.
[0024] Figure 5A second structural diagram of the region division-based signature recognition device provided in an embodiment of the present application.
[0025] Figure 6 A first structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0026] Figure 7 This is a second structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0028] The terms "first", "second", "third", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects described in this way can be interchanged where appropriate. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method comprising a series of steps, or a device, terminal, or system comprising a series of modules or units is not necessarily limited to those steps or modules and units clearly listed, and may also include steps or modules or units that are not clearly listed, and may also include other steps or modules or units inherent to these processes, methods, devices, terminals, or systems.
[0029] Handwritten signatures can be used as an important means of personal identity authentication because they have distinct personal characteristics. In the financial field, when users handle business at banks, they often need handwritten signatures. For example, after processing a transfer, the user signs the transfer receipt to confirm it, or confirms the card opening. The bank retains these business documents containing the customer's handwritten signature to facilitate business verification.
[0030] In order to verify the business, banks need to sort out the handwritten signatures when they keep files on these business documents. However, since handwritten signatures generally have very distinct personal characteristics, these handwritten signatures are often varied. Some signatures are well-shaped and easy to recognize, while some users are accustomed to writing in cursive and their signatures are sloppy. Sometimes there are even customized artistic signatures that are difficult to recognize, which makes it difficult for banks to sort out signatures.
[0031] Based on this, the embodiment of the present application provides a signature recognition method based on regional division, and the execution subject of the signature recognition method based on regional division can be the signature recognition device based on regional division provided in the embodiment of the present application, or it can be an electronic device. Among them, the signature recognition device based on regional division can be integrated in an electronic device. The electronic device can be a computer device, and the computer device can be a terminal device such as a smart phone, a tablet computer, a personal computer, or a server. The following is a specific analysis and explanation.
[0032] See also Figure 1 , Figure 1 A scene diagram of the signature recognition method based on region division provided in the embodiment of the present application. Among them, a signature recognition device based on region division is integrated in the server 100. The signature recognition device based on region division executes the signature recognition method based on region division provided in the embodiment of the present application, firstly obtains the image to be processed, identifies the character position in the image to be processed, and divides the signature region image from the image to be processed according to the character position. Then, according to the character position in the signature region image, the signature region image is divided into multiple ( Figure 1 The character region images are taken as an example. Each character region image is input into the trained character recognition model to obtain the character recognition results of each character image. Then, according to the character recognition results of multiple character region images, the signature recognition results of the signature region image are obtained to realize automatic recognition of the signature, effectively solving the problem of difficult signature recognition.
[0033] See also Figure 2 , Figure 2 A first flow chart of a signature recognition method based on region division provided in an embodiment of the present application. The signature recognition method based on region division may include:
[0034] 110. Obtain an image to be processed.
[0035] In an embodiment of the present application, an image to be processed is obtained for signature recognition, wherein the image to be processed contains a handwritten signature to be recognized.
[0036] The embodiment of the present application does not limit the source of the image to be processed. For example, the image to be processed may be a scanned image obtained by scanning a paper containing a handwritten signature, or an electronic signature photo, or an image obtained by a user's handwritten signature on an electronic device when collecting user information, etc.
[0037] In one embodiment, the original signature image can be obtained from various sources, and then the original signature image is preprocessed to obtain the image to be processed. Image preprocessing is a prior step in the recognition process, which can improve the efficiency and accuracy of subsequent signature recognition.
[0038] Among them, data enhancement processing is a preprocessing method to strengthen data. For images, images processed by data enhancement are clearer and easier to process.
[0039] In one embodiment, data enhancement processing may be performed on the original signature image to obtain an image to be processed. The data enhancement processing may include at least one of grayscale processing, noise reduction processing, and binarization processing:
[0040] (1) Grayscale processing
[0041] The color of an image is determined by three color components: R (Red), G (Green), and B (Blue). For the device, the value range of each color component is [0,255]. The image has a total of 256 colors. 3 The grayscale processing is to make R = G = B, and the grayscale value of the image has 256 possible values. 3 The number of types is changed to 256, which can greatly reduce the amount of calculation in the image processing process.
[0042] In the embodiment of the present application, since the color of the image has little effect on the recognition result, the amount of calculation in the image processing process can be reduced and the entire image recognition process can be accelerated by performing grayscale processing on the original signature image.
[0043] (2) Noise reduction processing
[0044] Image noise reduction refers to the process of reducing noise in an image, sometimes also called image denoising.
[0045] Since the original signature images come from various sources, their quality may vary. Therefore, in order to obtain high-quality digital images, the images can be subjected to noise reduction processing to maintain the integrity of the signature information (i.e., signature features) as much as possible while removing useless information in the original signature image.
[0046] (3) Binarization
[0047] Continuing with the previous description of grayscale values, binarization is the process of setting the grayscale values of pixels on the image to 0 or 255, which is the process of making the entire image appear obviously black and white.
[0048] Taking the original signature image in RGB format as an example, the original signature image has 256 pixels. 3If grayscale processing is performed, the grayscale value has 256 possible values, and if binarization is performed, the grayscale value of each pixel has only 2 possible values, namely 0 or 256. Compared with grayscale processing, binarization further reduces the amount of calculation in the image processing process.
[0049] In addition to the data preprocessing methods listed above, those skilled in the art may also use other data preprocessing methods not listed in this application to preprocess the original signature image to obtain an image to be processed.
[0050] It should be noted that the steps of image preprocessing are not strictly fixed according to the process. The steps can be adjusted according to different recognition requirements. Generally, the preprocessing required for scanned PDF, WORD files, etc. is relatively simple, while for images with complex environments, more complicated steps are required.
[0051] 120. Identify character positions in the image to be processed, and segment a plurality of signature area images from the image to be identified according to the character positions and a preset number of character bits.
[0052] The image to be processed may contain both handwritten text and printed text, and may also contain blank areas without any text. The characters referred to in this application are characters of handwritten text.
[0053] In order to accurately identify the signature that may exist in the image to be processed, after obtaining the image to be processed, the character position in the image to be processed can be first identified. The character position may include the character coordinates and the character spacing of different characters. Specifically, the character position of the image to be processed can be identified by identifying the font of each text in the image to be processed.
[0054] For example, the entire image to be processed may contain some terms that the bank informs the user, and the customer's handwritten signature may be in the lower middle position. By identifying the fonts of each text in the image to be processed, it can be known that the area where the terms are located is printed text, and the area where the handwritten signature is located is handwritten text. Therefore, it can be identified that the character position of the image to be processed is in the lower middle position.
[0055] It is understandable that, since the character position contains handwritten text, the character position can be determined as the area where the signature to be recognized is located. After the character position in the image to be processed is identified, the signature area image can be segmented from the image to be processed according to the character position, so as to recognize the signature to be recognized.
[0056] In one embodiment, the image to be processed may contain multiple signatures to be identified. When segmenting the signature area image, a signature area image can be segmented for each signature to be identified, so that each segmented signature area image contains a signature to be identified.
[0057] In one embodiment, multiple signature area images can be segmented from the image to be processed according to the positions of the characters recognized in the image to be processed. Among the recognized characters, some characters may be close to each other, some characters may be far apart, or even have large blank areas between them. According to the distance relationship of the recognized characters, characters that are close to each other (such as the distance between characters is less than or equal to the preset distance) can be classified as characters of the same signature to be recognized, and characters that are far apart (such as the distance between characters is greater than the preset distance) can be classified as characters of different signatures to be recognized, so that the positions of different signatures to be recognized can be determined according to the recognized character positions.
[0058] In one embodiment, a plurality of signature region images may be segmented from the image to be processed according to a preset number of character digits. The preset number of character digits is the number of character digits that may be included in a preset signature. For example, the preset number of character digits may be set to 3, and then, according to the character positions from left to right, every 3 characters may be segmented into a signature region, thereby segmenting a plurality of signature regions in the image to be processed, and segmenting each signature region from the image to be processed into a signature region image, thereby obtaining a plurality of signature region images.
[0059] In one embodiment, the signature area can be divided according to the character position and the preset number of character bits, and a plurality of signature area images can be segmented from the image to be processed according to the character position and the preset number of character bits.
[0060] Optionally, multiple to-be-recognized regions may be first divided in the image to be processed according to the character positions. For example, the region where continuous characters with a character spacing less than or equal to a preset distance are located is determined as one to-be-recognized region, and characters with a character spacing greater than the preset distance are divided into different to-be-recognized regions.
[0061] The characters in each area to be recognized are relatively close to each other. However, the number of characters in each area to be recognized may not meet the preset number of characters. For example, the number of characters in a Chinese signature is generally 2 to 4, but when the signatures to be recognized in the image to be processed are relatively close to each other, there may be a situation where the area to be recognized contains more than one signature to be recognized.
[0062] Therefore, further, a signature area can be divided from the area to be recognized according to a preset number of character digits. For example, when the number of characters in the area to be recognized is 9, which is greater than the preset number of character digits 3, the 9 characters in the area to be recognized can be divided into one signature area for every 3 consecutive characters, so as to divide the area to be recognized into 3 signature areas.
[0063] In one embodiment, to reduce the amount of data involved in subsequent signature recognition and improve the recognition efficiency, the shape of the signature area can be the smallest rectangular frame containing the corresponding characters. That is, when dividing consecutive characters into a signature area, make the area contain as little other content as possible.
[0064] 130. Divide the signature area image into multiple character area images according to the character positions in the signature area image.
[0065] Each signature area image contains a signature to be recognized, and each signature to be recognized contains multiple characters. After obtaining the signature area image, divide the signature area into multiple character areas according to the character positions in the signature area image, where each character area contains one character. Thus, the signature area image is divided into multiple character area images, and each character area image contains one character. The number of character area images segmented from the signature area image is equal to the number of characters contained in the signature area image.
[0066] 140. Input each character area image into the trained character recognition model respectively to obtain the character recognition result of each character area image.
[0067] In one embodiment, the embodiment of the present application provides a character recognition model, which can be used to recognize a character area image and obtain the character recognition result of each character area image.
[0068] Among them, the character recognition model can be trained in advance with a character training set to obtain a trained character training model. In the character training set used to train the character recognition model, multiple pairs of corresponding handwritten character samples and standard recognition results of the character samples can be included.
[0069] Optionally, the character samples can include not only complete handwritten characters, but also handwritten radicals. For example, in the character samples used to train the character recognition model, characters of the complete character "Mu" can be included, and characters of the radical "Shui" and the radical "Mu" can also be included. Thus, the trained character recognition model can recognize not only complete characters but also radicals.
[0070] After the character recognition model is trained, each character region image is input into the trained character recognition model, and each character is recognized separately to obtain the character recognition result of each character region image.
[0071] In one embodiment, the character recognition result of the character region image includes standard text converted from the character region image.
[0072] In one embodiment, the trained character recognition model provided in the embodiment of the present application can convert the character region image into standard text according to the character features of the character region image. The character recognition model can include a feature extraction module and a recognition conversion module. The steps of inputting each character region image into the trained character recognition model and obtaining the character recognition result of each character region image can include:
[0073] Inputting the character region image into a feature extraction module to obtain character features of the character region image;
[0074] The character features of the character region image are input into the recognition conversion module to obtain the standard text converted from the character region image.
[0075] The character features of the character region image may be the radical, component, stroke direction, etc. of the character therein.
[0076] 150. Obtain a signature recognition result of the signature area image according to the character recognition results of the plurality of character area images.
[0077] After character recognition results of a plurality of character region images are obtained according to the trained character recognition model, a signature recognition result of the signature region image can be obtained according to the character recognition results of the plurality of character region images.
[0078] Since the signature region image is segmented into a plurality of character region images, the character recognition results of all the character region images segmented from the signature region image are the character recognition results of all the characters in the signature region image. Based on the character recognition results of each character and in combination with the position of each character, the signature recognition result of the signature region image can be combined.
[0079] It can be understood that if multiple signature area images are segmented from the image to be processed, the signature recognition result of the signature area image can be obtained based on all the character area images segmented from each signature area image. Thus, multiple signature recognition results can be obtained based on the multiple signature area images, and multiple signatures can be recognized from the image to be processed.
[0080] The present application also provides a signature recognition method based on regional division. Figure 3 , Figure 3A second flow chart of a signature recognition method based on area division provided in an embodiment of the present application. The signature recognition method based on area division may include:
[0081] 201. Obtain bank business receipt.
[0082] The bank transaction slip obtained by this application contains a handwritten signature.
[0083] In the financial field, when banks handle business, there are often many scenarios that require users' handwritten signatures. For example, a bank business order can be a transfer receipt, and the user signs the transfer receipt to confirm and leave a handwritten signature on the transfer receipt; for example, a bank business order can also be an electronic bill, and the user directly signs the electronic bill using a stylus on the screen of an electronic device; and so on.
[0084] 202. Capture an initial signature image containing handwritten text from a bank transaction form.
[0085] These bank business slips contain handwritten signatures, from which an initial signature image containing handwritten text can be captured.
[0086] 203. Perform data enhancement processing on the initial signature image to obtain an image to be processed, where the data enhancement processing includes at least one of grayscale processing, noise reduction processing, and binarization processing.
[0087] In one embodiment, the original signature image may be subjected to data enhancement processing to obtain an image to be processed. Data enhancement processing is a preprocessing method for strengthening data. For an image, an image subjected to data enhancement processing is clearer and easier to process.
[0088] The data enhancement processing may include at least one of grayscale processing, noise reduction processing, and binarization processing.
[0089] In addition to the data preprocessing methods listed above, those skilled in the art may also use other data preprocessing methods not listed in this application to preprocess the original signature image to obtain an image to be processed.
[0090] It should be noted that the steps of image preprocessing are not strictly fixed according to the process. The steps can be adjusted according to different recognition requirements. Generally, the preprocessing required for scanned PDF, WORD files, etc. is relatively simple, while for images with complex environments, more complicated steps are required.
[0091] 204. Identify the character positions in the image to be processed, and segment a plurality of signature area images from the image to be identified according to the character positions and the preset character bit number.
[0092] The image to be processed may contain both handwritten text and printed text, and may also contain blank areas without any text. The characters referred to in this application are characters of handwritten text.
[0093] In order to accurately identify the signature that may exist in the image to be processed, after obtaining the image to be processed, the character position in the image to be processed can be first identified. The character position may include the character coordinates and the character spacing of different characters. Specifically, the character position of the image to be processed can be identified by identifying the font of each text in the image to be processed.
[0094] For example, the entire image to be processed may contain some terms that the bank informs the user, and the customer's handwritten signature may be in the lower middle position. By identifying the fonts of each text in the image to be processed, it can be known that the area where the terms are located is printed text, and the area where the handwritten signature is located is handwritten text. Therefore, it can be identified that the character position of the image to be processed is in the lower middle position.
[0095] When the image to be processed contains multiple signatures to be identified, when segmenting the signature area image, a signature area image can be segmented for each signature to be identified, so that each segmented signature area image contains a signature to be identified.
[0096] Optionally, multiple to-be-recognized regions may be first divided in the image to be processed according to the character positions. For example, the region where continuous characters with a character spacing less than or equal to a preset distance are located is determined as one to-be-recognized region, and characters with a character spacing greater than the preset distance are divided into different to-be-recognized regions.
[0097] The characters in each area to be recognized are relatively close to each other. However, the number of characters in each area to be recognized may not meet the preset number of characters. For example, the number of characters in a Chinese signature is generally 2 to 4, but when the signatures to be recognized in the image to be processed are relatively close to each other, there may be a situation where the area to be recognized contains more than one signature to be recognized.
[0098] Therefore, further, the signature area can be divided from the area to be recognized according to the preset number of character digits. For example, when the number of character digits in the area to be recognized is 9, which is greater than the preset number of character digits 3, the 9 characters in the area to be recognized can be divided into one signature area for every 3 consecutive characters, thereby dividing the area to be recognized into 3 signature areas.
[0099] 205. Segment the signature area image into a plurality of character area images according to the character positions in the signature area image.
[0100] Each signature region image contains a signature to be identified, and each signature to be identified contains multiple characters. After the signature region image is obtained, the signature region is divided into multiple character regions according to the character positions in the signature region image, wherein each character region contains one character, thereby segmenting the signature region image into multiple character region images, each character region image contains one character. The number of character region images segmented from the signature region image is equal to the number of characters contained in the signature region image.
[0101] 206. Input each character region image into the trained character recognition model to obtain a character recognition result for each character region image.
[0102] An embodiment of the present application provides a character recognition model, which can be used to recognize character area images and obtain character recognition results for each character area image.
[0103] The trained character recognition model provided in the embodiment of the present application can convert the character area image into a character recognition result according to the character features of the character area image.
[0104] The character recognition model may include a feature extraction module, wherein the feature extraction module is used to extract character features according to an image. After the character region image is input into the feature extraction module, the character features of the character region image can be obtained.
[0105] In addition to the feature extraction module, the character recognition model may also include a recognition conversion module that can convert character features into character recognition results. By inputting the character features of the character region image into the recognition conversion module of the character recognition model, the character recognition result converted from the character region image can be obtained.
[0106] The character recognition result may be standard text.
[0107] 207. Match the first character recognition result with the surname in the surname library.
[0108] In the obtained character recognition results, the character recognition results recognized by all the character area images of each signature area image are grouped together, and each group of character recognition results can be divided into the first character recognition result and the non-first character recognition result. For example, if three character recognition results are grouped together, the first character recognition result is the first character recognition result, and the second and third character recognition results are the non-first character recognition results.
[0109] In one embodiment, after obtaining the character recognition result, the character recognition result may be calibrated to verify whether the characters in the character region image are correctly recognized, thereby improving the accuracy of character recognition.
[0110] Optionally, when calibrating the first character recognition result, the first character recognition result can be matched with a surname in a surname library. The surname library is pre-stored in the electronic device and contains various surnames. For example, the "Hundred Family Surnames" can be downloaded from the Internet in advance, a surname library can be established based on the Chinese surnames in the "Hundred Family Surnames", and the surname library can be stored in the electronic device.
[0111] 208. Determine whether a surname matching the first character recognition result is matched. If yes, proceed to step 209; if not, proceed to step 211.
[0112] Each set of character recognition results corresponds to a signature to be recognized, and the first character recognition result of each set of character recognition results can be considered as the surname of the signature to be recognized. After matching the first character recognition result with the form in the surname library, if a surname matching the first character recognition result is matched, it means that the first character recognition result recognized by the first character area image of the signature to be recognized is exactly a surname, and it can be considered that the recognition is correct; if a form matching the first character recognition result is not matched, it means that the first character recognition result recognized may not be a surname, and the possibility of recognition error is high, and further analysis or calibration is required.
[0113] 209. Output prompt information indicating successful recognition.
[0114] Optionally, if a surname matching the first character recognition result is matched, a prompt message indicating successful recognition may be output to prompt the user that the group of character recognition results recognized is accurate and can form a correct signature.
[0115] 210. Determine the surname with the highest matching degree with the first character recognition result as the surname to be verified, and obtain the matching degree between the first character recognition result and the surname to be verified.
[0116] If no surname matching the first character recognition result is found, the first character recognition result is further verified.
[0117] First, although no surname matching the first character recognition result is found, the surname with the highest degree of matching with the first character recognition result in the surname database can be obtained based on the matching between the first character recognition result and each surname. The surname with the highest degree of matching is determined as the surname to be verified, and the degree of matching between the first character recognition result and the surname to be verified is obtained.
[0118] 211. Determine whether the matching degree between the first character recognition result and the surname to be verified is higher than a preset matching degree. If yes, proceed to step 212; otherwise, proceed to step 214.
[0119] The matching degree between the first character recognition result and the surname to be verified is judged to determine whether it is higher than a preset matching degree. The preset matching degree can be set according to the requirements. Specifically, if the accuracy requirement is high, the preset matching degree can be set higher, and if the accuracy requirement is not so high, the preset matching degree can also be set lower.
[0120] The process of determining whether the matching degree between the first character recognition result and the surname to be verified is higher than a preset matching degree, that is, the process of determining the similarity between the first character recognition result and the surname to be verified.
[0121] 212. The first character area image is truncated according to the stroke direction of the characters in the first character area image, and the truncated first character area image is input into the trained character recognition model to obtain the character recognition result of the first character area image again.
[0122] If it is determined that the matching degree between the first character recognition result and the surname to be verified is higher than the preset matching degree, it means that although the first character recognition result does not match the corresponding surname from the surname library, there is at least a surname with a similar glyph, which may not be accurately matched in the surname library due to inaccurate recognition. Therefore, the first character area image can be further processed and then re-recognized.
[0123] Optionally, the first character area image can be truncated according to the stroke direction of the characters in the first character area image, and the truncated first character area image is input into a trained character recognition model to obtain the character recognition result of the first character area image again.
[0124] 213. Obtain a signature recognition result of the signature area image according to the character recognition results of the multiple character area images.
[0125] The character recognition result of the first character area image obtained again is combined with the character recognition result of the non-first character area image of the signature area image to obtain the signature recognition result of the signature area image. Specifically, the corresponding character recognition results can be combined in sequence from front to back according to the character positions of the characters in each character area image of the signature area image to obtain the signature recognition result of the signature area image.
[0126] 214. Output a prompt message indicating recognition failure.
[0127] If it is determined that the matching degree between the first character recognition result and the surname to be verified is not higher than the preset matching degree, it means that the first character recognition result not only fails to match the corresponding surname from the surname library, but also fails to match a surname with a similar glyph, and the first character recognition result is incorrect. A recognition failure prompt message may be output to prompt the user that the set of character recognition results is inaccurate.
[0128] As can be seen from the above, the signature recognition method based on area division provided in the embodiment of the present application first obtains the image to be processed; then identifies the character position in the image to be processed, and divides multiple signature area images from the image to be recognized according to the character position and the preset character bit number; divides the signature area image into multiple character area images according to the character position in the signature area image; and then inputs each character area image into a trained character recognition model to obtain the character recognition result of each character area image; obtains the signature recognition result of the signature area image according to the character recognition results of the multiple character area images. The embodiment of the present application breaks up the signature into characters, and after the characters are recognized separately by the model, the recognition result of the signature can be obtained according to the recognition result of each character, thereby realizing automatic recognition of the signature.
[0129] See also Figure 4 , Figure 4 The first structural diagram of the region-division-based signature recognition device 300 provided in the embodiment of the present application. The region-division-based signature recognition device 300 comprises a first acquisition module 301, an identification module 302, a segmentation module 303, an input module 304 and a second acquisition module 305:
[0130] A first acquisition module 301 is used to acquire an image to be processed;
[0131] The recognition module 302 is used to recognize the character positions in the image to be processed, and to segment a plurality of signature area images from the image to be recognized according to the character positions and the preset character bit number;
[0132] A segmentation module 303, for segmenting the signature region image into a plurality of character region images according to the character positions in the signature region image;
[0133] An input module 304 is used to input each character region image into a trained character recognition model to obtain a character recognition result of each character region image;
[0134] The second acquisition module 305 is used to obtain a signature recognition result of the signature area image according to the character recognition results of the plurality of character area images.
[0135] In one embodiment, when acquiring the image to be processed, the first acquisition module 301 is specifically used to:
[0136] Obtaining an initial signature image;
[0137] The initial signature image is subjected to data enhancement processing to obtain the image to be processed.
[0138] In one embodiment, the data enhancement process includes at least one of grayscale processing, noise reduction processing, and binarization processing. In one embodiment, when acquiring the initial signature image, the first acquisition module 301 is specifically used to:
[0139] Obtain bank statements;
[0140] Capture an image of the initial signature including handwritten text from a banking slip.
[0141] See also Figure 5 , Figure 5 A second structural diagram of a signature recognition device based on region division provided in an embodiment of the present application. In one embodiment, the signature recognition device based on region division 300 further includes a matching module 306. Before obtaining a signature recognition result of a signature region image based on character recognition results of a plurality of character region images, the matching module 306 is specifically used to:
[0142] Match the first character recognition result with the surname in the surname database;
[0143] The second acquisition module 305 is specifically used for:
[0144] If a surname matching the first character recognition result is matched, a signature recognition result of the signature area image is obtained based on the character recognition results of the plurality of character area images.
[0145] Please continue reading Figure 5 In one embodiment, the signature recognition device 300 based on region division further includes a re-recognition module 307. In one embodiment, after matching the first character recognition result with the surname in the surname library, the re-recognition module 307 is specifically used to:
[0146] If no surname matching the first character recognition result is found, the surname with the highest matching degree with the first character recognition result is determined as the surname to be verified, and the matching degree between the first character recognition result and the surname to be verified is obtained;
[0147] When the matching degree between the first character recognition result and the surname to be verified is higher than the preset matching degree, the first character area image is truncated according to the stroke direction of the characters in the first character area image, and the truncated first character area image is input into the trained character recognition model to obtain the character recognition result of the first character area image again.
[0148] In one embodiment, the character recognition result of the character region image includes a standard text converted from the character region image, and the character recognition model includes a feature extraction module and a recognition conversion module. When each character region image is input into the trained character recognition model to obtain the character recognition result of each character region image, the input module 304 is specifically used to:
[0149] Inputting the character region image into a feature extraction module to obtain character features of the character region image;
[0150] The character features of the character region image are input into the recognition conversion module to obtain the standard text converted from the character region image.
[0151] As can be seen from the above, the embodiment of the present application provides a signature recognition device 300 based on region division, wherein the first acquisition module 301 first acquires the image to be processed; then the recognition module 302 identifies the character position in the image to be processed, and segments multiple signature region images from the image to be recognized according to the character position and the preset character bit number; the segmentation module 303 segments the signature region image into multiple character region images according to the character position in the signature region image; then the input module 304 inputs each character region image into a trained character recognition model respectively to obtain the character recognition result of each character region image; the second acquisition module 305 obtains the signature recognition result of the signature region image according to the character recognition results of the multiple character region images. The embodiment of the present application breaks up the signature into characters, and after the characters are separately recognized by the model, the recognition result of the signature can be obtained according to the recognition result of each character, thereby realizing automatic recognition of the signature.
[0152] The present application embodiment also provides an electronic device 400. Figure 6 , Figure 6 The first structural diagram of the electronic device provided in the embodiment of the present application is as follows: The electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
[0153] The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 400 and processes data by running or loading computer programs stored in the memory 402, as well as data stored in the memory 402, thereby monitoring the electronic device 400 as a whole.
[0154] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0155] In the embodiment of the present application, the processor 401 in the electronic device 400 stores the computer program executable on the processor 401 in the memory 402 according to the following steps, and the processor 401 executes the computer program stored in the memory 402, thereby realizing various functions, as follows:
[0156] Get the image to be processed;
[0157] Identify the character positions in the image to be processed, and segment a plurality of signature area images from the image to be identified according to the character positions and the preset number of character bits;
[0158] According to the positions of the characters in the signature area image, the signature area image is segmented into a plurality of character area images;
[0159] Input each character region image into the trained character recognition model to obtain a character recognition result for each character region image;
[0160] A signature recognition result of the signature area image is obtained according to the character recognition results of the plurality of character area images.
[0161] Please also read Figure 7 , Figure 7 A second structural diagram of an electronic device provided in an embodiment of the present application. In some embodiments, the electronic device 400 may further include: a display screen 403, a radio frequency circuit 404, an audio circuit 405, and a power supply 406. The display screen 403, the radio frequency circuit 404, the audio circuit 405, and the power supply 406 are electrically connected to the processor 401, respectively.
[0162] The display screen 403 may be used to display information input by a user or information provided to a user and various graphical user interfaces, which may be composed of graphics, text, icons, videos, and any combination thereof. The display screen 403 may include a display panel, and in some embodiments, the display panel may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
[0163] The radio frequency circuit 404 can be used to send and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals between the network device or other electronic devices.
[0164] The audio circuit 405 can be used to provide an audio interface between a user and an electronic device through a speaker and a microphone.
[0165] The power supply 406 can be used to supply power to various components of the electronic device 400. In some embodiments, the power supply 406 can be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0166] although Figure 6 and Figure 7 Not shown, the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0167] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the signature recognition method based on area division in any of the above embodiments, such as: obtaining an image to be processed; identifying the character positions in the image to be processed, and segmenting a plurality of signature area images from the image to be recognized according to the character positions and the preset number of character bits; segmenting the signature area image into a plurality of character area images according to the character positions in the signature area image; inputting each character area image into a trained character recognition model respectively to obtain a character recognition result for each character area image; and obtaining a signature recognition result of the signature area image according to the character recognition results of the plurality of character area images.
[0168] In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0169] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0170] It should be noted that, for the signature recognition method based on regional division in the embodiment of the present application, ordinary testers in the field can understand that all or part of the process of implementing the signature recognition method based on regional division in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include the process of the embodiment of the signature recognition method based on regional division. Among them, the computer-readable storage medium can be a disk, an optical disk, a read-only memory, a random access memory, etc.
[0171] For the signature recognition device based on regional division in the embodiment of the present application, its various functional modules can be integrated into one processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.
[0172] The term "module" used herein can be regarded as a software object executed on the computing system. The different components, modules, engines and services described herein can be regarded as implementation objects on the computing system. The devices and methods described herein are preferably implemented in software, but can also be implemented in hardware, all within the scope of protection of this application.
[0173] The above is a detailed introduction to a signature recognition method, device, storage medium and electronic device based on area division provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A signature recognition method based on region division, characterized in that: include: Get the image to be processed; Identifying character positions of handwritten text in the image to be processed, wherein the character positions include character coordinates and character spacing; The continuous characters corresponding to the character coordinates whose character spacing is less than or equal to the preset distance are divided into one area to be recognized, and the continuous characters corresponding to the character coordinates whose character spacing is greater than the preset distance are divided into different areas to be recognized; Segmenting a plurality of signature area images from the area to be recognized according to a preset number of character bits; According to the character positions in the signature area image, the signature area image is segmented into a plurality of character area images; Input each character region image into the trained character recognition model to obtain a character recognition result for each character region image; Match the first character recognition result with the surname in the surname database; If a surname matching the first character recognition result is matched, obtaining a signature recognition result of the signature area image based on the character recognition results of the plurality of character area images; If no surname matching the first character recognition result is found, the surname with the highest matching degree with the first character recognition result is determined as the surname to be verified, and the matching degree between the first character recognition result and the surname to be verified is obtained; When the matching degree between the first character recognition result and the surname to be verified is higher than a preset matching degree, the first character region image is truncated according to the stroke direction of the characters in the first character region image, and the truncated first character region image is input into the trained character recognition model to obtain the character recognition result of the first character region image again; The signature recognition result of the signature area image is obtained according to the character recognition results of the multiple character area images.
2. The method for signature recognition based on region division according to claim 1, characterized in that: The obtaining of the image to be processed comprises: Obtaining an initial signature image; The initial signature image is subjected to data enhancement processing to obtain the image to be processed.
3. The signature recognition method based on region division according to claim 2 is characterized in that: The data enhancement processing includes at least one of grayscale processing, noise reduction processing, and binarization processing.
4. The signature recognition method based on region division according to claim 2 is characterized in that: The obtaining of the initial signature image comprises: Obtain bank statements; An initial signature image including handwritten text is captured from the banking slip.
5. The method for signature recognition based on area division according to any one of claims 1 to 4, characterized in that: The character recognition result of the character region image includes the standard text converted from the character region image, the character recognition model includes a feature extraction module and a recognition conversion module, and each character region image is input into the trained character recognition model to obtain the character recognition result of each character region image, including: Inputting the character region image into the feature extraction module to obtain character features of the character region image; The character features of the character region image are input into the recognition conversion module to obtain standard text converted from the character region image.
6. A signature recognition device based on area division, characterized in that: include: A first acquisition module, used for acquiring an image to be processed; A recognition module is used to recognize the character positions of the handwritten text in the image to be processed, wherein the character positions include character coordinates and character spacing; divide the continuous characters corresponding to the character coordinates whose character spacing is less than or equal to a preset distance into one area to be recognized, divide the continuous characters corresponding to the character coordinates whose character spacing is greater than the preset distance into different areas to be recognized, and segment a plurality of signature area images from the area to be recognized according to the preset number of character bits; A segmentation module, used for segmenting the signature area image into a plurality of character area images according to the character positions in the signature area image; An input module, used to input each character region image into a trained character recognition model to obtain a character recognition result for each character region image; A matching module, used for matching the first character recognition result with the surname in the surname library; A second acquisition module, configured to obtain a signature recognition result of the signature area image according to the character recognition results of the plurality of character area images if a surname matching the first character recognition result is matched; a re-identification module, configured to determine the surname with the highest matching degree with the first character recognition result as the surname to be verified if no surname matching the first character recognition result is matched, and obtain the matching degree between the first character recognition result and the surname to be verified; The second acquisition module is further used to obtain a signature recognition result of the signature area image according to the character recognition results of the multiple character area images.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the signature recognition method based on area division as described in any one of claims 1 to 5.
8. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the steps in the signature recognition method based on area division as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Character cutting and recognizing method
CN104616009A
Signature identification method and equipment
CN111368632A
Text identification method, device and system of intelligent text robot
CN113554033A