Single character alignment method and system in handwriting identification and storage medium
By calculating the spatial distribution of signature words and aligning electronic signatures using font library standards, the problem of single word alignment in cross-modal signature recognition is solved, and the recognition accuracy is improved. The method is simple and efficient.
Patent Information
- Application Number
- CN202310635179.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art fails to effectively realize the alignment of signature list words in cross-modal signature recognition, resulting in difficulty in identification and insufficient accuracy.
By calculating the single-word spatial distribution of each modal signature, using the single-word in the font library as a reference standard, the electronic signature is adjusted to make it aligned spatially with the paper signature, and the K-means clustering algorithm is used for single-word clustering, and the center of mass position and width and height of the electronic signature are adjusted to match the paper signature.
It realizes finer-grained single-word spatial alignment, improves the accuracy of cross-modal handwriting identification, and does not rely on labeled data or model training. The method is simple and fast and robust.
Smart Images

Figure CN120299056A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of artificial intelligence biometric feature recognition, in particular to a single-word alignment method in handwriting identification. Background Art
[0002] With the popularization of mobile electronic devices such as mobile phones and the widespread use of electronic documents and electronic signatures, it is necessary to verify whether the electronic signature and the paper signature are signed by the same person. In signature handwriting identification, the sample signatures often exist in the form of paper pictures in large quantities, and the signatures to be verified are often electronic signatures.
[0003] When performing cross-modal handwriting identification on paper signatures and electronic signatures, it is necessary to compare and identify the paper handwriting imaging results and handwritten electronic handwriting, but the existing technology has difficulties and problems in cross-modal text comparison and recognition. Because the writing space size of written paper and touch screens such as mobile phones is very different, there are often huge differences in the spatial distribution of signatures signed on paper and on touch screens. Due to the different storage media for signature handwriting, the signature information obtained from paper signatures and electronic signatures is different. When performing cross-modal comparison and recognition, it is first necessary to unify the differences in word spacing and word width and height of the two modal signature texts, so as to lay the foundation for the subsequent cross-modal recognition and comparison of signature handwriting. However, there is still little research in this area in the existing technology. Publication No. CN 115482541 A, the name "Class Collaborative Training Method Based on Cross-modal Handwriting, Handwriting Comparison System, Equipment and Medium" is to align the signature as a whole, and does not achieve alignment of single word granularity, and this method cannot restore the adjusted electronic signature sequence, but its imaged image. Publication No. CN 114612649 A, titled "Adaptive Electronic Signature Rotation Method, Electronic Device and Storage Medium", also aligns the entire signature and does not support the alignment of individual signature words in cross-modal scenarios. Since the individual signature words in cross-modal scenarios are not aligned, it will increase the difficulty of identifying and comparing cross-modal signature handwriting in subsequent handwriting identification, as well as the accuracy of the comparison results.
[0004] Therefore, when performing cross-modal signature handwriting identification on signed documents, contracts, etc., it is very necessary to study the problem of signature single-word alignment in cross-modal scenarios in order to eliminate the negative impact of differences in character spacing and character width and height in the subsequent identification process. Summary of the invention
[0005] In view of this, the present application aims to address the problems that the prior art does not fully consider the alignment of each word in the signature in the trans-membrane signature recognition comparison, the difficulty in trans-membrane handwriting recognition and identification, and the low accuracy. The present application proposes a method of calculating the spatial distribution of words in each modal signature through word clustering, and adjusting the electronic signature according to the spatial distribution to align it spatially with the words in the paper signature.
[0006] According to one aspect of the present application, a single-character alignment method in handwriting authentication is proposed, characterized in that a signature acquisition unit acquires various types of signatures, calculates the overall spatial distribution of each signature respectively, extracts the surname and single characters corresponding to the signature from a character library, calculates the average spatio-temporal distribution parameters of the single characters in the character library, and determines the initial spatio-temporal distribution of the single characters of the signature according to the average spatio-temporal distribution parameters; based on the initial spatio-temporal distribution of the single characters, various types of signatures are clustered respectively, the pixel points corresponding to the single characters in the clustered signatures are extracted, the spatio-temporal distribution or spatial distribution of the single characters of the signature is predicted, and the single characters of the signature are aligned according to the spatial distribution to obtain the aligned electronic signature.
[0007] Further preferably, for an electronically signed document with equal-time sampling, the estimated standard deviation of a single character in the time dimension is proportional to the writing duration of the single character in the character library and the estimated mean value of a single character in the time dimension is proportional to the cumulative writing duration of the single character, and the estimated standard deviation of a single character in the spatial dimension is proportional to the width and height of the single character.
[0008] Further preferably, the calculation of the average spatio-temporal distribution parameters of each single character in the character library further includes: collecting signatures of different signers using different writing devices, different writing methods, and different calligraphy styles, constructing a character library with single characters, searching the character library, extracting the single characters in the character library corresponding to the signature for preprocessing, calculating the average spatio-temporal distribution parameters of the single characters, and according to the point position sequences of the horizontal and vertical coordinates and time of the single characters in the character library call the formula:
[0009]
[0010]
[0011]
[0012] Obtain the writing duration of the single character in the character library The standard deviation of the horizontal coordinate The standard deviation of the vertical coordinate Thus, determine the average writing duration t of each single character c in the character library c , the average standard deviation of the horizontal coordinate The average standard deviation of the vertical coordinate
[0013] Further preferably, for single-character clustering of an electronically signed document, determine the initial centroid and standard deviation of each single character in the electronically signed document. The single-character clustering of the electronically signed document includes, according to a series of point position signals S=(X, Y, T) of the electronically signed document, calling the formula:
[0014] Calculate the writing duration t and the mean values μ of the horizontal and vertical coordinates in the spatio-temporal distribution parameters of the electronically signed documentx , μ y , the standard deviation σ of the horizontal and vertical coordinates x , σ y ; According to the writing duration of the single characters in the font library
[0015] Calculate the standard deviation of the time dimension of the electronic signature and the estimated mean value of single characters in the time dimension, and call the formula:
[0016]
[0017]
[0018] Calculate the estimated standard deviation of single characters in the spatial dimension Thus, call the formula: Calculate the estimated mean value of single characters in the time dimension Obtain the estimated standard deviation of single characters in the spatial dimension and the estimated mean value of single characters in the time dimension As the initialization parameters for single-character clustering, where represents the single character u in the font library i The standard deviation of the horizontal and vertical coordinates in the font library.
[0019] Furthermore, preferably, the initial centroid of each single character of the electronic signature is the spatio-temporal distribution mean of each single character Standard deviation represents the width and height of the single character, and calculate the Gaussian distance d between each point s=(x, y, t) in the electronic signature single character and the centroid i , and classify it into the single character with the closest distance, and call the formula: Determine the set of points {S i}={X i , Y i , T i} The Gaussian distance d between each point and the centroid i (s), according to the formula: Calculate the total signature distance D, and continuously update and iterate the mean and standard deviation of the spatio-temporal Gaussian distribution until the total distance D no longer decreases.
[0020] Furthermore, preferably, determine the centroid of the Gaussian circle of the single character according to the mean values of the horizontal and vertical coordinates of the single character, and determine the width and height of the Gaussian circle of the single character according to the standard deviation of the horizontal and vertical coordinates. Align the electronic signature by adjusting the centroid position, width and height of the Gaussian circle of the electronic signature single character to be consistent with the centroid position, width and height of the Gaussian circle of the paper signature single character.
[0021] On the other hand, based on the present application, a single-character alignment system in handwriting authentication is proposed. The signature acquisition unit obtains various types of signatures, calculates the overall spatial distribution of each signature respectively, extracts the surname and single characters corresponding to the signatures from the character library, calculates the average spatio-temporal distribution parameters of the single characters in the character library, and determines the initial spatio-temporal distribution of the signature single characters according to the average spatio-temporal distribution parameters; based on the initial spatio-temporal distribution of the single characters, various types of signatures are clustered respectively, the pixel points corresponding to the single characters in the clustered signatures are extracted, the spatio-temporal distribution or spatial distribution of the signature single characters is predicted, and the signature single characters are aligned according to the spatial distribution to obtain the aligned electronic signature.
[0022] Further preferably, the calculation of the average spatio-temporal distribution parameters of each single character in the character library further includes: collecting signatures, single characters of different signers using different writing devices, different writing styles and different calligraphy styles to construct a character library, searching the character library, extracting the single characters in the character library corresponding to the signatures for preprocessing, calculating the average spatio-temporal distribution parameters of the single characters, and according to the point position sequences of the horizontal and vertical coordinates and time of the single characters in the character library Calling the formula:
[0023]
[0024]
[0025]
[0026] Obtaining the writing duration of the single characters in the character library The standard deviation of the abscissa The standard deviation of the ordinate Thus, the average writing duration t of each single character c in the character library is determined c , the average standard deviation of the abscissa The average standard deviation of the ordinate
[0027] Further preferably, the centroid of the Gaussian circle of the single character is determined according to the mean values of the horizontal and vertical coordinates of the single character, and the width and height of the Gaussian circle of the single character are determined by the standard deviations of the horizontal and vertical coordinates. By adjusting the centroid position, width and height of the Gaussian circle of the electronic signature single character to be consistent with the centroid position, width and height of the Gaussian circle of the paper signature single character, the electronic signature is aligned. The initial centroid of each single character of the electronic signature is the spatio-temporal distribution mean value of each single character Standard deviation Indicates the width and height of the single character, calculates the Gaussian distance d between each point s=(x, y, t) in the electronic signature single character and the centroid i , and classifies it into the single character with the closest distance, calling the formula: Determine the set of points {S i}={X i , Y i , T iThe Gaussian distance d between each point in {} and the centroid i (s), according to the formula: Calculate the total signature distance D, and continuously update the mean and standard deviation of the spatio-temporal Gaussian distribution during iteration until the total distance D no longer decreases.
[0028] According to another aspect of the present application, 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 spatio-temporal distribution-based handwriting authentication alignment method described in any one of the above.
[0029] In the cross-modal signature recognition and comparison of the present application, single characters in each modality are extracted, and the single characters in the character library are used as the reference standard. The spatio-temporal parameters of single characters in various modalities are calculated, solving the problem of difficult to determine the comparison standard in cross-modal handwriting recognition and authentication. Further, single-character clustering is performed to calculate the single-character spatial distribution of each modality signature, and the electronic signature is adjusted according to this spatial distribution to align it with the single characters of the paper signature in space, improving the accuracy of cross-modal handwriting authentication. This application can achieve finer-grained single-character spatial alignment, does not rely on any labeled data, does not require any model training, and has the characteristics of simple, fast, easy to implement, strong robustness and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The figure shows a schematic flow chart of a cross-modal alignment method for handwriting authentication in an embodiment of the present application;
[0031] Figure 2 The figure shows a schematic diagram of a paper signature, an electronic signature, and the aligned electronic signature in an exemplary embodiment of the present application;
[0032] Figure 3 The figure shows a block diagram of an exemplary electronic device capable of implementing the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] 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. On the contrary, 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.
[0034] It should be understood that the steps recited in the method embodiments of the present application can be executed in a different order and / or 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.
[0035] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to". The term "based on" means "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", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0036] It should be noted that the modification of "one" and "a plurality of" mentioned in this application is 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".
[0037] The names of the messages or information exchanged between multiple devices in the embodiments of this application are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0038] Figure 1 The following shows a schematic flow diagram of a cross-modal alignment method for handwriting authentication in the embodiments of this application.
[0039] The signature acquisition unit acquires the electronic signature, name, paper signature, and the single characters corresponding to the signature in the font library. It calculates the overall spatial distribution of each signature respectively according to the distributions of the electronic signature and the paper signature, extracts the single characters of the name corresponding to the signature from the font library, calculates the average spatio-temporal distribution parameters of each single character, and determines the spatio-temporal distribution of the initial single characters of the name based on the average spatio-temporal distribution parameters. It performs clustering on various signatures respectively based on the spatio-temporal distribution of the initial single characters, extracts the pixel points corresponding to the single characters in the electronic signature and the paper signature, predicts the spatio-temporal distribution of the single characters in the electronic signature and the spatial distribution of the paper signature, aligns the single characters of the electronic signature and the paper signature according to the spatial distribution, and obtains the aligned electronic signature.
[0040] Specifically, it includes:
[0041] The acquisition part acquires the binary image I of the paper signature.
[0042] It acquires the horizontal and vertical coordinates X, Y of the point sequence of the electronic signature and the cumulative time stamp T of the point sequence, and obtains a series of point signals S=(X, Y, T) of the electronic signature.
[0043] Obtain the single-character signature characters u i , and construct the name signature U={u i |i = 1, 2,..., n}, where U represents the name character string of the signature, and u iRepresents one of the characters, that is, the i-th character in the name, where n is the number of single-character characters, and the string consists of n single-character characters.
[0044] Collect signatures, single characters of different signers using different writing devices, different writing methods, and different calligraphy styles to build a character library. Each character in the character library contains a large number of electronic signature data of the character (different signers, different signing devices, different signing styles, etc.). Among them, the single character in the character library is represented as c. Search the character library to obtain the i-th single-character electronic data of the single character c from the character library, which is represented as Among them, Respectively represent the point position sequences of the horizontal and vertical coordinates and time of the single character obtained from the character library. The character library C represents the set of all single Chinese characters in the character library. Assume that all single-character data in the character library are collected on a unified device with the same sampling rate and resolution.
[0045] Preprocess the single characters in the character library and calculate the relevant attributes of the single characters, including calculating the average spatio-temporal distribution parameters of each single character.
[0046] One exemplary embodiment of the present application includes calculating the average spatio-temporal distribution parameters of each single-character electronic data obtained from the character library. For example, for the i-th single-character data in the character library According to the point position sequences of the horizontal and vertical coordinates and time of the single character in the character library Call the formula:
[0047]
[0048]
[0049]
[0050] Obtain the writing duration of the i-th single character in the character library Standard deviation of the horizontal coordinate Standard deviation of the vertical coordinate Among them, max represents the maximum value, and stdev represents the standard deviation.
[0051] According to the writing duration, standard deviation of the horizontal coordinate, and standard deviation of the vertical coordinate of all single-character data corresponding to each single character in the character library corresponding to the signature, call the formula:
[0052]
[0053]
[0054]
[0055] For each single character c, calculate its average writing duration t c, Average standard deviation of the abscissa , Average standard deviation of the ordinate
[0056] Cluster the single characters of the electronic signature. Calculate the spatio-temporal distribution parameters for the obtained electronic signature. For the electronic signature S, according to a series of point signals S=(X, Y, T) of the collected electronic signature, call the formula:
[0057] t = max{T}
[0058] μ x = Mean{X}
[0059] μ y = Mean{Y}
[0060] σ x = Stdev{X}
[0061] σ y = Stdev{Y}
[0062] Calculate the writing duration t, the mean values μ of the horizontal and vertical coordinates in the spatio-temporal distribution parameters of the electronic signature x , μ y , the standard deviations σ of the horizontal and vertical coordinates x , σ y . Obtain the above writing duration, coordinate mean values, and standard deviations for later use in single-character segmentation using the K-means clustering algorithm.
[0063] Estimate the three-dimensional Gaussian distribution parameters in space and time for each single character of the signature name U of the electronic signature S. S represents all the point signals of the signature, so each signature can be uniquely identified.
[0064] Since the electronic device samples at equal time intervals, that is, the time is uniformly distributed, the estimated standard deviation of a single character in the time dimension is proportional to the writing duration of the single character in the font library . Therefore, based on the writing duration of the single character in the font library calculate the standard deviation in the time dimension of the electronic signature and the estimated mean value of a single character in the time dimension.
[0065] This exemplary embodiment can be obtained by the following method. According to
[0066] Call the formula: Calculate the estimated standard deviation of a single character
[0067] where represents the estimated standard deviation in the font library, represents the ratio of the writing duration of the electronic signature to that in the font library, and obtain the estimated standard deviation of a single character As the initialization parameter of the single-character clustering (K-means algorithm).
[0068] Furthermore, the estimated mean of single characters in the time dimension is proportional to the cumulative writing duration of the single character, and the formula is called: Calculate the estimated mean of single characters in the time dimension where i represents the i-th single character in the signature name, is the writing duration of the j-th single character in the font library, and the estimated standard deviation of single characters in the space dimension is proportional to the width and height of the single character.
[0069] One embodiment of the present invention can be obtained through the average standard deviation of single characters in the font library, and the formula is called:
[0070]
[0071]
[0072] Calculate the estimated standard deviation of single characters in the space dimension where represents the horizontal and vertical coordinate standard deviations of the single character u i in the font library.
[0073] Assume that the signatures are all horizontally arranged. The estimated horizontal coordinate mean of single characters in the space dimension is proportional to the cumulative width of the single character, and the vertical coordinate is independent of the position of the single character. According to the formula:
[0074]
[0075]
[0076] where σ x is equivalent to the width of the signature single character; σ y is equivalent to the height of the signature single character.
[0077] Vertical signatures are not accepted.
[0078] Perform single-character clustering on the electronic signature S. By performing single-character clustering on the electronic signature, the initial centroid and standard deviation of each single character in the electronic signature are determined. In the embodiments of the present application, the K-Means clustering algorithm can be used to perform single-character clustering on the electronic signature. The time dimension can effectively handle the situation where two characters are closely connected in space.
[0079] The initial centroid of each single character of the electronic signature is the spatio-temporal distribution mean of each single character Standard deviation represents the width and height of the single character.
[0080] In each iteration, calculate the Gaussian distance d between each point s=(x, y, y) in the electronic signature single character and the centroid i , and classify it into the single character with the closest distance. Call the formula:
[0081]
[0082] Determine the Gaussian distance d(s) between each point in the set of points {S i}={X i ,Y i ,T i} and the centroid, and continuously update the mean and standard deviation of its spatio-temporal Gaussian distribution. Thus, determine the total signature distance D. According to the formula: i (s), and continuously update the mean and standard deviation of its spatio-temporal Gaussian distribution. From this, determine the total signature distance D. According to the formula:
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089] Continuously update the mean and standard deviation of its spatio-temporal Gaussian distribution.
[0090] According to the formula:
[0091] Calculate the total signature distance D, and continuously update the mean and standard deviation of the spatio-temporal Gaussian distribution during iteration until the total distance D no longer decreases.
[0092] Perform single-character clustering on the paper signature image I. Extract the set of horizontal and vertical coordinates of the pixels in the signature part of the paper signature image,
[0093] X′,Y′={(x′,y′)|I(x′,y′)=1}
[0094] Since the paper signature image is independent of time, use the same clustering algorithm for the electronic signature above to perform single-character clustering on the single characters of the signature image. The only difference is that the dimension of time is reduced. Calculate the spatial distribution of each paper signature single character u′ i in the paper image
[0095] Align the electronic signature with the handwritten signature stroke by stroke. Keep the time unchanged and adjust the position sequence of each character of the electronic signature according to the spatial distribution of the characters of the handwritten signature. Specifically, the following method can be adopted. According to the formula:
[0096]
[0097]
[0098]
[0099] Re-integrate the position of each character of the electronic signature, and obtain the aligned entire electronic signature sequence according to the following formula
[0100]
[0101]
[0102]
[0103] Output the electronic signature aligned with the handwritten signature character by character Wherein, respectively represent the position sequences of the horizontal and vertical coordinates and time of the aligned electronic signature.
[0104] For other types of signature character alignment, a similar method is adopted.
[0105] Figure 2 The figure shows a schematic diagram of the handwritten signature, the electronic signature, and the aligned electronic signature in an exemplary embodiment of the present application. The gray Gaussian circles around the characters represent the Gaussian distributions of the respective characters. The centroid of the Gaussian circle of each character is determined according to the mean of the horizontal and vertical coordinates of the character, and the width and height of the Gaussian circle of each character are determined according to the standard deviation of the horizontal and vertical coordinates. For example, represents the centroid of the Gaussian circle of the i-th character, represents its width and height. Align the electronic signature by adjusting the centroid position, width, and height of the Gaussian circle of the electronic signature character to be consistent with the centroid position, width, and height of the Gaussian circle of the handwritten signature character. Figure 2 In, the upper figure is the extracted handwritten signature image, the middle figure is the electronic signature trajectory diagram, and the lower figure is the electronic signature aligned with the handwritten signature.
[0106] Reference Figure 3, a block diagram of an electronic device 300 that can be a server or a client of the present application will now be described. It is an example of a hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer devices, such as, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0107] As Figure 3 shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a 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 via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0108] 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 that can input information into the electronic device 300. The input unit 306 can receive input digital or character information, and generate key signal inputs related to the user settings and / or function controls of the electronic device. The output unit 307 can be any type of device that can present 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.
[0109] 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 based on the original trajectory of the signature stroke, and the decomposition of its logarithmic velocity curve, etc. can be implemented as a computer software program, which is tangibly contained 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).
[0110] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. These program codes can be provided to the 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 flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.
[0111] 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, 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 disk, 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.
[0112] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device that provides machine instructions and / or data to a programmable processor (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)), including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal that provides machine instructions and / or data to a programmable processor.
[0113] The systems and techniques described here can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end 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 here), or a computing system that includes any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0114] A computer system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A single-character alignment method in handwriting identification, characterized in that, The signature acquisition unit obtains various types of signatures, calculates the overall spatial distribution of each signature respectively, extracts the single characters of the names corresponding to the signatures from the character library, calculates the average spatio-temporal distribution parameters of the single characters in the character library, and determines the initial spatio-temporal distribution of the single characters of the signatures according to the average spatio-temporal distribution parameters; performs clustering on various types of signatures respectively based on the initial spatio-temporal distribution of the single characters, extracts the pixel points corresponding to the single characters in the clustered signatures, predicts the spatio-temporal distribution of the single characters of the signatures, aligns the single characters of the signatures according to the spatial distribution, and obtains the aligned electronic signature.
2. The method according to claim 1, characterized in that For an electronically signed document with equal-time sampling, the estimated standard deviation of a single character in the time dimension is proportional to the writing duration of a single character in the font library The estimated mean value of a single character in the time dimension is proportional to the cumulative writing duration of a single character. The estimated standard deviation of a single character in the space dimension is proportional to the width and height of the single character.
3. The method according to claim 1, characterized in that, The further steps of calculating the average spatio-temporal distribution parameters of each character in the font library include: collecting signatures of different signers using different writing devices, different writing styles, and different calligraphy styles, constructing a font library with single characters, searching the font library, extracting the single characters in the font library corresponding to the signature for preprocessing, calculating the average spatio-temporal distribution parameters of the single characters, and based on the point position sequences of the horizontal and vertical coordinates and time of the single characters in the font library Call the formula: Obtain the writing duration of a single character in the font library Standard deviation of the abscissa Standard deviation of the ordinate Thus, determine the average writing duration t of each single character c in the font library c , average standard deviation of the abscissa Average standard deviation of the ordinate 4. The method according to claim 1, wherein Perform single-character clustering on the electronic signature to determine the initial centroid and standard deviation of each single character in the electronic signature. The single-character clustering of the electronic signature includes, according to a series of point position signals S=(X, Y, T) of the electronic signature, calling the formula: Calculate the writing duration t and the mean values μ of the horizontal and vertical coordinates in the spatial distribution parameters of the electronic signature x , μ y , and the standard deviations σ of the horizontal and vertical coordinates x , σ y ; According to the writing duration of the single characters in the font library Calculate the standard deviation in the time dimension and the estimated mean value of the single character in the time dimension of the electronic signature, and call the formula: Estimated standard deviation of single characters for calculating spatial dimension Therefore, call the formula: Estimated mean of single characters for calculating time dimension Obtain the estimated standard deviation of single characters for spatial dimension and the estimated mean of single characters for time dimension As the initialization parameters for single-character clustering, where Represents the single character u in the character library i The standard deviation of the horizontal and vertical coordinates in the character library 5. The method according to any one of claims 1 to 4, characterized in that The initial centroid of each single character in the electronic signature is the mean of the spatio-temporal distribution of each single character Standard deviation Denote the width and height of the single character, and calculate the Gaussian distance d between each point s=(x, y, t) in the single character of the electronic signature and the centroid i , and classify it into the single character with the closest distance, and call the formula: Determine the set of points {S i}={X i , Y i , T i} for each point in the Gaussian distance d from the centroid i (s), according to the formula: Calculate the total signature distance D, and continuously update the mean and standard deviation of the spatio-temporal Gaussian distribution until the total distance D no longer decreases 6. The method according to any one of claims 1 to 4, characterized in that Determine the centroid of the Gaussian circle of the single character according to the mean values of the horizontal and vertical coordinates of the single character, and determine the width and height of the Gaussian circle of the single character according to the standard deviations of the horizontal and vertical coordinates. Align the electronic signature by adjusting the centroid position, width and height of the Gaussian circle of the single character in the electronic signature to be consistent with the centroid position, width and height of the Gaussian circle of the single character in the paper signature.
7. A single-character alignment system in handwriting identification, characterized in that, The signature acquisition unit obtains various types of signatures, calculates the overall spatial distribution of each signature respectively, extracts the single characters of the names corresponding to the signatures from the character library, calculates the average spatio-temporal distribution parameters of the single characters in the character library, and determines the initial spatio-temporal distribution of the single characters of the signatures according to the average spatio-temporal distribution parameters; performs clustering on various types of signatures respectively based on the initial spatio-temporal distribution of the single characters, extracts the pixel points corresponding to the single characters in the clustered signatures, predicts the spatio-temporal distribution of the single characters of the signatures, aligns the single characters of the signatures according to the spatial distribution, and obtains the aligned electronic signature.
8. The system according to claim 7, characterized in that, The further steps for calculating the average spatio-temporal distribution parameters of each character in the font library include: collecting signatures of different signers using different writing devices, different writing methods, and different calligraphy styles, constructing a font library with single characters, searching the font library, extracting the single characters in the font library corresponding to the signatures for preprocessing, calculating the average spatio-temporal distribution parameters of the single characters, and based on the point position sequences of the horizontal and vertical coordinates and time of the single characters in the font library Call the formula: Obtain the writing duration of a single character in the font library Standard deviation of the abscissa Standard deviation of the ordinate Thus, determine the average writing duration t of each single character c in the font library c , average standard deviation of the abscissa Average standard deviation of the ordinate 9. The system according to claim 7 or 8, characterized in that, Determine the centroid of the Gaussian circle of a single character based on the mean of the horizontal and vertical coordinates of the single character, and determine the width and height of the Gaussian circle of the single character based on the standard deviation of the horizontal and vertical coordinates. Align the electronic signature by adjusting the centroid position, width, and height of the Gaussian circle of each single character in the electronic signature to be consistent with the centroid position, width, and height of the Gaussian circle of the single character in the paper signature. The initial centroid of each single character in the electronic signature is the mean of the spatio-temporal distribution of each single character Standard deviation Represents the width and height of a single character, and calculate the Gaussian distance d between each point s=(x, y, t) in the single character of the electronic signature and the centroid i , and classify it into the single character with the closest distance, and call the formula: Determine the Gaussian distance d between each point in the set of the corresponding point positions {S i}={X i , Y i , T i} and the centroid i (s), and according to the formula: Calculate the total signature distance D, and continuously update and iterate the mean and standard deviation of the spatio-temporal Gaussian distribution until the total distance D no longer decreases.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the spatio-temporal distribution-based handwriting identification and alignment method according to any one of claims 1-6.
Citation Information
Patent Citations
Cross-modal handwriting-based class cooperative training method, handwriting comparison system, equipment and medium
CN115482541A