Off-line signature image pen sequence restoration method and device and storage medium

Through the binarization and skeletalization of offline signed images, combined with deep neural network, the writing order of signed images is restored, which solves the problem of difficult to determine the writing order in offline signed images and improves the accuracy of handwriting identification.

CN120356266APending Publication Date: 2025-07-22CHONGQING WESTERN HANDWRITING BIG DATA RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311814710.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The prior art cannot effectively restore the signer's writing order in offline signed images, affecting the accuracy of handwriting identification.

Method used

By converting offline signed images into binarized images and skeletalized them, key points are extracted, stroke dot matrix diagram is constructed, grayscale images are predicted using deep neural networks, the direction and order of stroke segments are determined, and the order of signature writing is restored.

Benefits of technology

Directly restore the signer's writing order from the signed image, assisting handwriting identification to improve accuracy, and not relying on additional video information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120356266A_ABST
    Figure CN120356266A_ABST
Patent Text Reader

Abstract

The invention discloses a stroke sequence restoration method for an off-line signature image, and the method comprises the steps: obtaining an electronic signature image in an off-line manner, converting the electronic signature image into an electronic signature binary image and a gray image, carrying out the skeletization of the binary image, extracting key points, constructing a stroke lattice diagram according to the key points, obtaining strokes, and obtaining stroke segments in the electronic signature image, the stroke segments are sorted, the directions of the stroke segments are determined according to the gray level image, the stroke writing sequence of the electronic signature is obtained, and the stroke sequence of the electronic signature is restored. According to the technical scheme, the signature writing sequence of the signer can be directly recovered through the signature image, other information such as videos in the signing process is not needed, the obtained writing sequence can assist an identifier in handwriting identification, and the accuracy of handwriting identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of digital image processing and handwritten electronic handwriting identification, and specifically relates to a method for restoring the pen order of a signature image. Background Art

[0002] In electronic signature authentication, common methods include comparing offline signature images and comparing online electronic signature data sequences. Among them, the signature in the form of an electronic sequence can reflect the writing order of the signer during signing, while the offline signature image cannot reflect the writing order of the writer, which may indirectly reduce the accuracy of handwriting appraisers in signature authentication. Restoring the writing order of the signer from the signature picture can effectively assist handwriting appraisers in improving the accuracy of authentication.

[0003] In the published patent with the publication number CN110222660B and the name "A Signature Forgery Detection Method and System Based on the Fusion of Dynamic and Static Features", the dynamic features and static features of the signature are respectively extracted by using the signature video and the binary image of the signature. However, this method must simultaneously use the signature video containing dynamic features and the signature image containing static features, and it is impossible to obtain the writing order of the signature when there is only an offline signature image. Summary of the Invention

[0004] In view of this, the present invention proposes a method for restoring the pen order of an offline signature image, which restores the writing order of the writer from a static signature image to support the authentication of static signatures by appraisers.

[0005] It includes: obtaining an electronic signature image offline, converting it into a binary image and a grayscale image of the electronic signature, skeletonizing the binary image and then extracting key points, constructing a stroke dot matrix diagram based on the key points, obtaining strokes to get stroke segments in the electronic signature image, sorting the stroke segments, determining the direction of the stroke segments according to the grayscale image, obtaining the writing order of the electronic signature strokes, and restoring the writing stroke order of the electronic signature.

[0006] Further preferably, the extraction of key points includes: skeletonizing the electronic signature image to obtain a series of discrete points, iteratively deleting the pixels around the center point on the stroke to obtain a skeleton image; dividing the points in the skeleton image into end points, connection points, and intersection points according to the number of neighbor points of the points in the skeleton image.

[0007] Further preferably, the number of neighbor points of the points in the skeleton image is calculated through image filtering, specifically including: convolving the skeleton image with a mean filter, that is, calling the formula: for convolution, that is, calling the formula:

[0008] to calculate the number of neighbors s of each point in the skeleton image, where Indicates a convolution operation.

[0009] Further preferably, obtaining the stroke segments in the electronic signature image from the obtained strokes includes calculating the distance between any two key points according to the position coordinates of the extracted key points, constructing an adjacency matrix of key points, and forming a stroke point graph based on the adjacency matrix. When the distance between any two key points in the stroke point graph is less than a threshold, it is considered that there is a connection relationship between the key points. When the distance between two key points exceeds the set threshold, it is considered that there is no connection relationship, and the neighbor point is not connected.

[0010] Further preferably, first merge the endpoint and the connection point until there is no single point, and then merge the intersection points. For the current stroke point with two neighbor points, directly connect the key points to the neighbor points before and after the key point. When a key point has multiple neighbor points, first merge the endpoint and the connection point to form a stroke segment, calculate the angle between the current stroke segment and all candidate stroke segments, and select the one with the smallest angle for merging until there are no neighbor points available for merging for the current key point, or the angle between the current key point and all its neighbors is greater than 90 degrees, then the current stroke merging is completed.

[0011] Further preferably, the electronic signature data obtained by acquisition is respectively echoed as a binary signature image and a corresponding grayscale image, and the network is trained using the binary image and the corresponding grayscale image until the network converges to obtain a prediction model. The prediction model predicts the grayscale image according to the offline obtained electronic signature image, and sorts the stroke segments according to the grayscale values of the stroke segments in the grayscale image and determines the stroke segment direction.

[0012] Further preferably, echoing as a binary signature image and a corresponding grayscale image includes: connecting the points of the collected electronic signature image pairwise to obtain the echoed binary signature, and determining the writing sequence according to whether the grayscale value of the pixel points increases or decreases monotonically with the writing order; using the binary image and the corresponding grayscale image to train the network includes: constructing a training data pair using the echoed binary image and grayscale image, using the binary image as the network input and the grayscale image as the predicted output result, and training the network until convergence.

[0013] Further preferably, if the average grayscale value of the starting part points of the current stroke is greater than that of the ending part, directly reverse the stroke, and sequentially extract the abscissa and ordinate of the points in the stroke starting from the first stroke to obtain the writing sequence of the signature.

[0014] Based on another aspect of the present invention, an electronic device is proposed, including: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to execute the method for restoring the pen order of the offline signature image described above.

[0015] On the other hand of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method for restoring the stroke order of the offline signature image described above.

[0016] In view of the problem in the prior art that the stroke order of the signature cannot be clearly determined by means of an image during the ex post authentication of an electronic signature, the present invention proposes a method for obtaining signature stroke order information from an offline signature image to solve the problem that the writing order cannot be determined for an offline signature image, thereby assisting handwriting appraisers to improve the accuracy of authentication. Specifically, an electronic signature image is obtained offline, converted into a binary image of the electronic signature, key points are extracted after skeletonizing the binary image, stroke segments in the signature image are obtained based on the key points, the stroke segments are sorted, and the direction of the strokes is determined to obtain the sequence of writing of the signature.

[0017] Since only the contour information of the signature can be obtained from the signature image, directly extracting the timing information of writing from the image is a highly ill-posed inverse problem. The present invention reduces the ill-posedness of the problem by converting the signature image into a grayscale image containing timing information and using the grayscale image containing timing information as prior information. Thereby, the signature timing information is extracted, and the deficiencies in the binary echo method, such as the loss of image information and the inability to obtain more valuable information from the image for handwriting recognition, authentication, etc., are solved.

[0018] The present invention can directly restore the sequence of writing of the signer's signature from the signature image, and does not require other information such as videos during the signing process. The obtained writing order can assist appraisers in handwriting authentication and improve the accuracy of handwriting authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 The flowchart of the method for restoring the stroke order of the signature image in this exemplary embodiment;

[0020] Figure 2 The schematic diagram showing the calculation of the number of neighbors of each point in the skeleton image through convolution in this example;

[0021] Figure 3 The schematic diagram of the stroke extraction process in this exemplary embodiment;

[0022] Figure 4 The block diagram of the exemplary electronic device capable of implementing the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not used to limit the protection scope of the present application.

[0024] It should be understood that the various steps recited in the method embodiments of the present application can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this regard.

[0025] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions performed by these devices, modules or units or the interdependent relationship.

[0026] It should be noted that the modifications of "one" and "plural" mentioned in the present application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0028] The present invention provides a method for restoring the pen order of a signature image. An electronic signature image is obtained offline, converted into a binary image of the electronic signature, key points are extracted after skeletonizing the binary image, and stroke segments in the signature image are obtained according to the relationship between the points; then a deep neural network is used to sort the strokes based on the predicted grayscale image, and the order of strokes is obtained by combining the grayscale image containing temporal information, the stroke segments are sorted, and the direction of the strokes is determined to obtain the writing order of the signature.

[0029] Figure 1The following is a flowchart of the method for restoring the pen order of a signature image in this exemplary embodiment. It includes obtaining an electronic signature image, obtaining a binary image of the electronic signature, extracting key points after skeletonizing the binary image, and at the same time converting the binary image into a grayscale image. A graph with pixel points as nodes is constructed based on the key points, and then stroke segments are extracted from the graph. Finally, the stroke segments are sorted in combination with the grayscale image, and the direction of the strokes is determined, and finally the order of signature writing is obtained.

[0030] The present invention will be described in detail below through specific examples.

[0031] Detect key points of the image.

[0032] The purpose of detecting key points of the signature image is to extract different types of points from the binary signature image, and then further combine different types of points to obtain features such as strokes. The extracted electronic signature image contains the thickness of the writing strokes, while the restored writing order only needs to record the point position information in the signature image. Therefore, first, the input signature image is skeletonized to obtain the skeleton information after image thinning. The skeletonized image is actually a series of discrete points in the signature strokes, and the signature image can be regarded as composed of a series of discrete points. The skeletonization method can use a thinning algorithm to iteratively delete the pixels around the center point to obtain the skeleton image. Other existing technical means in this field can also be used.

[0033] The points in the skeleton image are divided into three types of points: endpoint, connection point, and intersection point.

[0034] This exemplary embodiment can specifically adopt the following method for detection, that is, calculate the number of neighbors of each point in the skeleton image through image filtering, and the process is as follows:

[0035] Assume that the binary signature image is x, and the skeleton image obtained by iteratively deleting the pixels around the center point using the thinning algorithm is denoted as For Perform convolution using a mean filter to obtain the number of neighbors s of each point in the skeleton image,

[0036]

[0037] Among them, represents the convolution operation, and s represents the number of neighbors of each point obtained after convolution. The 3×3 mean filter is 1 except for the central element. Therefore, through the convolution operation, the number of pixels with a value of 1 among the 8 neighbors around each point can be obtained, that is, the number of neighbors of this point.

[0038] For example, assume that the skeleton image is The number of neighbors of each pixel can be obtained through convolution. The calculation process is as Figure 2As shown, starting from the upper left corner of the skeleton image and performing convolution with a step size of 1, the number of non-zero pixels around each pixel point in the skeleton image can be obtained, that is, the number of neighbors.

[0039] As shown in the figure, the number of neighbors of each point can be obtained as 1, 3, 2, 2, 1, 3, 4, 4, 1, 3, 3, 2 respectively. After obtaining the number of neighbors of each point in the skeletonized image, the points in the skeleton image can be divided into end points (points with only 1 neighbor), connection points (points with 2 neighbors), and intersection points (points with 3 or more neighbors) according to the number of neighbors of the points.

[0040] Since a signature can be regarded as composed of a series of discrete points arranged, and the connection relationship between each point and others is determined. For example, an end point will only connect to another point, a connection point will connect to two other points, and an intersection point will connect to three or more other points. Therefore, these discrete points are organized by judging whether there is a connection relationship between two points.

[0041] First, calculate the distance between all pairs of points. The distance can be calculated using calculation methods such as Euclidean distance and norm distance.

[0042] Example 1, for any point p among the key points extracted i and point p j , according to their coordinates (p ix , p iy )(p jx , p jy ), call the Euclidean distance formula to calculate the distance between them.

[0043]

[0044] Among them, the coordinates of point p i are (p ix , p iy ), and the coordinates of point p j are (p jx , p jy ).

[0045] Example 2, the distance between any discrete points p i

[0046] j and point p ix ) = |p jx - p iy | + |p jy - p i |

[0047] can also be calculated according to the formula: i and point p j .

[0048] Construct key points into a graph according to the distance. After obtaining the distances between any two points, construct these points into a graph according to the magnitudes of the distances.

[0049] Specifically, when the distance between point p i and p j is less than the threshold thresh, it is considered that there is a connecting edge between the two points, that is, there is a connection relationship between the two points, that is, E ij = 1; otherwise, it is considered that there is no connection relationship between the two points and there is no edge, that is, E ij = 0. Set the threshold according to the density of points in the signature image. According to the accuracy of the acquisition device, the sampling rate, and the accuracy of signature recognition, in this exemplary embodiment, the threshold can optimally be set to 1.2 pixel distances. According to the above rules, the adjacency matrix E between any two points can be obtained. The connection relationship between point p i and p j can be expressed as:

[0050]

[0051] Thus, construct the key point adjacency matrix. According to the adjacency matrix, all the extracted key points can be formed into a stroke dot matrix graph.

[0052] Obtain strokes according to the stroke dot matrix graph.

[0053] Each Chinese character in the signature can be regarded as composed of a series of strokes, and a stroke can be regarded as composed of a series of points. Therefore, it is necessary to further integrate the points into strokes according to the relationship between points.

[0054] As Figure 3 shown is the schematic diagram of the stroke extraction process in this exemplary embodiment.

[0055] Determine stroke endpoints, connection points, and intersection points according to the number of neighbor points of the current point. A point with only 1 neighbor is a stroke endpoint, a point with 2 neighbors is a stroke connection point, and a point with more than 3 neighbors is a stroke intersection point.

[0056] In this exemplary embodiment, the following implementation method can be specifically adopted: Start from any endpoint (a point with only 1 neighbor) of the graph obtained above, and find the points that have a connection relationship with this point.

[0057] When the current point is a connection point, the points are connected into stroke segments according to the front-back relationship of the stroke points. For the current stroke point with two neighbor points, since the front-back connection relationship is relatively clear, the front and back points can be directly connected. For the connection of intersection points, the most matching connection point needs to be selected from multiple candidate points. To reduce the difficulty of selecting candidate points, in this example, the end points and connection points are first merged until there are no single points left, and then the intersection points are merged. In the merging of intersection points, since the intersection points include multiple merging methods, the most reasonable method needs to be selected from multiple possible methods. The specific process can be as follows:

[0058] Since the end points and connection points have been merged, each node is already a small stroke segment, and the merging of nodes is transformed into the merging of stroke segments. When merging, calculate the angle between the current stroke segment and all candidate stroke segments. Generally, it is considered that the angle between stroke segments belonging to the same stroke is relatively small, and the stroke segments with too large an angle belong to other strokes. Therefore, select the one with the smallest angle from multiple candidate merging objects for merging until there are no neighbors available for the current node to merge, or when the angle between the current node and all its neighbors is greater than 90 degrees, it is considered that the current stroke has been merged.

[0059] Then start looking for the next stroke from the next end point until all points have been visited.

[0060] Stroke sorting.

[0061] All strokes in the signature image can be obtained through the above, but the order and direction between strokes cannot be obtained. Therefore, it is necessary to further determine the writing order of these strokes.

[0062] The specific implementation method of this exemplary embodiment includes:

[0063] First, construct a prediction network from a binary image to a grayscale image. The structure of the network can use UNet or other neural networks suitable for image processing. Input the binary signature image into the prediction network and output the grayscale image to be predicted.

[0064] Collect and obtain the electronic signature data and display it back as a binary signature image and the corresponding grayscale image respectively. The display method of the binary signature image is: connect the points collected by the electronic signature pairwise to obtain the displayed binary signature; the display method of the grayscale image is: on the basis of the display of the binary image, according to the writing order, the grayscale value of the pixel points increases or decreases monotonically with the writing order.

[0065] Suppose N electronic signature data are collected. Each piece of electronic data can be displayed back as a binary signature image and a grayscale signature image. Use the displayed binary image and grayscale image to construct training data pairs, denoted as where x i represents a binarized signature image, and y i represents a grayscale signature image. The binarized image is used as the network input, while the grayscale image is used as the output result of the final network prediction. The network is trained until convergence. In this way, the trained network has the ability to predict the grayscale image from the binarized image. Since the task of directly predicting the grayscale image from the binarized image is relatively complex, the trained network can only obtain the approximate order and direction of strokes, and cannot determine the writing order at the point dimension. Therefore, in this application, the strokes obtained previously are sorted according to the predicted grayscale image to obtain the writing order of the signature, and then the direction of the strokes is determined according to the grayscale values.

[0066] After obtaining the writing order of the strokes, it is necessary to determine the writing direction of the extracted strokes. A stroke has two endpoints, and the writing direction of the stroke can only be from one endpoint to the other endpoint. If the average grayscale value of the starting part of the current stroke is greater than that of the ending part, the stroke is directly reversed.

[0067] After determining the writing order and direction of the strokes, the abscissa and ordinate of the midpoints of the strokes are sequentially extracted starting from the first stroke, and finally the writing order of the signature can be obtained.

[0068] As Figure 4 shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 302 or the computer program loaded from the storage unit 308 into the random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. The input / output (I / O) interface 305 is also connected to the bus 304.

[0069] Multiple components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, an output unit 307, a storage unit 308, and a communication unit 309. The input unit 306 can be any type of device capable of inputting information into the electronic device 300. The input unit 306 can receive input digital or character information and generate key signal inputs related to user settings and / or function controls of the electronic device. The output unit 307 can be any type of device capable of presenting information and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 308 can include, but is not limited to, a magnetic disk, an optical disk. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0070] The computing unit 301 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 executes the various methods and processes described above. For example, in some embodiments, the reconstruction and decomposition of the muscle movement trajectory redrawn from the original trajectory of the signature stroke and the decomposition of its logarithmic velocity curve, etc., can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 300 via the ROM 302 and / or the communication unit 309. In some embodiments, the computing unit 301 can be configured to execute the signature handwriting dynamic acquisition implementation method by any other suitable means (e.g., by means of firmware).

[0071] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, executed as an independent software package partially on the machine and partially on a remote machine, or executed entirely on a remote machine or server.

[0072] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0073] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0074] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).

[0075] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0076] A computer system can include clients and servers. Clients and servers are generally far apart from each other and typically interact through a communication network. The client - server relationship is created by computer programs that run on the respective computers and have a client - server relationship with each other.

Claims

1. An off-line signature image pen order restoration method, characterized in that, Including: Obtain an electronic signature image offline, convert it into a binary electronic signature image and a grayscale image, skeletonize the binary image and then extract key points, construct a stroke dot matrix diagram based on the key points, obtain strokes to get stroke segments in the electronic signature image, sort the stroke segments, determine the directions of the stroke segments according to the grayscale image, obtain the sequential order of writing the electronic signature strokes, and restore the writing stroke order of the electronic signature.

2. The method according to claim 1, characterized in that The extraction of the key points includes: skeletonizing the electronic signature image to obtain a series of discrete points, and iteratively deleting the pixels around the center point on the stroke to obtain a skeleton image; dividing the points in the skeleton image into end points, connection points and intersection points according to the number of neighbor points of the points in the skeleton image.

3. The method according to claim 2, wherein Calculating the number of neighbor points of a point in the skeleton image through image filtering, specifically including: using a mean filter to convolve the skeleton image That is, calling the formula: Calculate the number of neighbors s of each point in the skeletal image, where, represents the convolution operation.

4. The method according to any one of claims 1 to 3, characterized in that Obtaining strokes to get stroke segments in the electronic signature image includes calculating the distance between any two key points according to the position coordinates of the extracted key points, constructing an adjacency matrix of key points, forming a stroke dot diagram according to the adjacency matrix. When the distance between any two key points in the stroke dot diagram is less than the threshold, connect the two key points. When the distance between the two key points exceeds the set threshold, there is no connection relationship.

5. The method according to claim 4, characterized in that First, merge the end points and connection points until there are no single points left, and then merge the intersection points; for the current key point with 2 neighbor points, directly connect the neighbor points before and after the key point through the key point. When a certain key point has multiple neighbor points, first merge the end points and connection points to form a stroke segment, calculate the angle between the current stroke segment and all candidate stroke segments, and select the one with the smallest angle for merging until there are no neighbor points available for the current key point to merge, or the angle between the current key point and all its neighbors is greater than 90 degrees, then the current stroke merging is completed.

6. The method according to any one of claims 1 to 3, characterized in that Echo the acquired electronic signature data as a binary signature image and a corresponding grayscale image respectively, use the binary image and the corresponding grayscale image to train the network until the network converges to obtain a prediction model. The prediction model predicts the grayscale image according to the offline acquired electronic signature image, and sorts the stroke segments according to the grayscale values of the stroke segments in the grayscale image and determines the directions of the stroke segments.

7. The method according to claim 6, characterized in that, Echoing as a binary signature image and a corresponding grayscale image includes: connecting the points of the acquired electronic signature image pairwise to obtain the echoed binary signature, and determining the sequential order of writing according to whether the grayscale value of the pixel points increases or decreases monotonically with the writing order; using the binary image and the corresponding grayscale image to train the network includes: constructing a training data pair with the echoed binary image and grayscale image, using the binary image as the input of the network and the grayscale image as the predicted output result, and training the network until it converges.

8. The method according to claim 6, characterized in that, If the average grayscale value of the starting part points of the current stroke is greater than that of the ending part, directly reverse the stroke, and sequentially extract the abscissa and ordinate of the points in the stroke starting from the first stroke to obtain the sequential order of signature writing.

9. An electronic device, comprising: A processor; And a memory storing a program, characterized in that the program includes instructions which, when executed by the processor, cause the processor to execute the method for restoring the stroke order of the offline signature image according to any one of claims 1-8.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, Wherein, The computer instructions are used to cause the computer to execute the method for restoring the pen order of the offline signature image according to any one of claims 1-8.

Citation Information

Patent Citations

  • A signature authentication method and system based on the fusion of dynamic and static features

    CN110222660B