Skeleton extraction method and device, equipment, storage medium and program product
By extracting image skeletons in image recognition, the dependence problem of the prior art on image clarity and contrast is solved, and the resistance to image noise and recognition effect are improved.
Patent Information
- Application Number
- CN202411782468.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art relies too much on the image clarity and contrast of the image in the image recognition process, resulting in sensitivity to image edge noise and lack of robustness.
By determining the image profile and internal area of the image to be identified, the acquisition point sequence and identification points are determined, the thermonuclear function is determined based on these points, the minimum value of the electric potential field is calculated, and the image skeleton is extracted.
This method can better handle blur, distortion and other interference in the image, accurately capture the core geometric features of the image, reduce noise interference, and improve image recognition accuracy.
Smart Images

Figure CN119723619A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biometrics, and in particular to a skeleton extraction method, electronic equipment, storage medium and program product. Background Art
[0002] In various businesses, electronic signatures and electronic seals are gradually replacing traditional handwritten signatures and seals, which requires image recognition of electronic signatures and seals.
[0003] Existing technical methods rely on image processing techniques, such as edge detection, template matching, and machine learning algorithms. Although the existing image processing and machine learning methods have met business needs to a certain extent, with the increase in demand and the development of technology, these methods have also exposed some shortcomings and limitations. In practical applications, images may have various defects due to uneven lighting, scanning equipment quality, etc., which affect the recognition effect. Complex image preprocessing steps are often required, such as denoising, binarization, contrast enhancement, etc. These steps often require parameter adjustment for different images, which increases the complexity of the system and maintenance costs.
[0004] The main problem of existing technologies is that they are too dependent on the clarity and contrast of images, and are very sensitive to noise, blur, or distortion in images. At the same time, existing image recognition is too dependent on manually designed features, such as edges, shapes, textures, etc. These features may not cover the diversity and complexity of all signatures and seals, resulting in poor recognition results when processing deformation, rotation, scaling, etc. Summary of the invention
[0005] The present application provides a skeleton extraction method, device, equipment, storage medium and product to solve the problem that the prior art is too dependent on image clarity and contrast, resulting in sensitivity to image edge noise and lack of robustness during the image recognition process.
[0006] In a first aspect, the present application provides a skeleton extraction method, comprising:
[0007] Determine an image contour and an internal area of an image to be recognized, and determine a collection point sequence and a plurality of recognition points corresponding to the image contour and the internal area, wherein the collection point sequence includes a plurality of collection points on the image contour, and the recognition points are determined based on the internal area;
[0008] Determining a corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points;
[0009] Determine the electric potential field corresponding to the internal area of the image to be recognized based on the heat kernel function, and extract multiple minimum values corresponding to the electric potential field;
[0010] An image skeleton of the image to be recognized is determined according to the multiple minimum values.
[0011] In a second aspect, the present application provides a method for identifying an authentication object, comprising:
[0012] Acquire an object to be authenticated, and use the skeleton extraction method according to any one of claims 1 to 5 to determine the image skeleton of the object to be authenticated;
[0013] Extracting skeleton features of the image skeleton;
[0014] Based on the skeleton feature, a corresponding database classification is determined, and based on the database classification, a standard image skeleton corresponding to the skeleton feature is obtained from a database, where the standard image skeleton is a recognition image skeleton entered into the database for the first time;
[0015] It is determined whether the skeleton feature matches the standard image skeleton. If so, it is determined that the authentication of the object to be authenticated is successful.
[0016] In a third aspect, the present application provides a skeleton extraction device, comprising:
[0017] A determination module, used to determine an image contour and an internal area of an image to be identified, and to determine a collection point sequence and a plurality of identification points corresponding to the image contour and the internal area, wherein the collection point sequence includes a plurality of collection points on the image contour, and the identification points are determined based on the internal area;
[0018] The determination module is further used to determine a corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points;
[0019] The determination module is further used to determine the electric potential field corresponding to the internal area of the image to be identified based on the heat kernel function;
[0020] An extraction module, used for extracting a plurality of minimum values corresponding to the electric potential field;
[0021] The determination module is further used to determine the image skeleton of the image to be identified based on the multiple minimum values;
[0022] Optionally, the device further includes: a processing module;
[0023] The processing module is used to perform triangulation processing on the internal area of the image to be identified;
[0024] The determination module is further used to determine a plurality of triangle vertices based on the processed internal area;
[0025] The determination module is further used to determine the plurality of triangle vertices as a plurality of identification points;
[0026] Optionally, the extraction module is further used to adopt uniform sampling to obtain a preset number of sampling points from the acquisition point sequence, and group the preset number of sampling points to obtain multiple anchor points;
[0027] Alternatively, the acquisition point sequence is analyzed and processed to determine influence coefficients of multiple acquisition points in the acquisition point sequence, where the influence coefficient is used to represent the influence of deleting a certain acquisition point on the recognition result of the entire image to be recognized, and based on the influence coefficient, a discrete curve is used to evolve and select a preset number of sampling points from the acquisition point sequence as anchor points;
[0028] The determination module is further used to determine a heat kernel function between the anchor point and the plurality of identification points;
[0029] Optionally, the processing module is further used to use a unit positive charge to perform value assignment processing on multiple acquisition points on the acquisition point sequence, and the unit positive charge is used to generate an electric potential field inside the image to be recognized;
[0030] Optionally, the determination module is further used to determine the heat kernel geodesic distances between the plurality of identification points and the plurality of anchor points based on a heat kernel function;
[0031] The determination module is further used to determine the electric potential field of the internal area of the image to be identified according to the thermonuclear geodesic distance and the unit positive charges of the plurality of anchor points;
[0032] Optionally, the determination module is further used to determine the basic skeleton of the image to be identified by connecting a plurality of the minimum values to obtain a ridge line of the electric potential field;
[0033] The determination module is further used to determine the gradient field corresponding to the electric potential field;
[0034] The determination module is further used to determine the relevant skeleton fragments by using the steepest gradient descent method based on the basic skeleton and the gradient field;
[0035] The processing module is further used to optimize the basic skeleton to obtain the image skeleton of the image to be recognized.
[0036] In a fourth aspect, a device for identifying an authentication object includes:
[0037] The acquisition module is used to obtain the object to be authenticated;
[0038] A determination module, configured to determine the image skeleton of the object to be authenticated by using the skeleton extraction method according to any one of claims 1 to 5;
[0039] An extraction module, used for extracting skeleton features of the image skeleton;
[0040] The determination module is further used to determine a corresponding database classification based on the skeleton features;
[0041] The acquisition module is further used to acquire a standard image skeleton corresponding to the skeleton feature from a database based on the database classification, wherein the standard image skeleton is a recognition image skeleton entered into the database for the first time;
[0042] The judgment module is used to judge whether the skeleton feature matches the standard image skeleton. If they match, it is determined that the authentication of the object to be authenticated is passed.
[0043] In a fifth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0044] The memory stores computer-executable instructions;
[0045] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or the first aspect and the second aspect and / or various possible implementations of the second aspect.
[0046] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement various possible implementations of the first aspect and / or the first aspect and the second aspect and / or the second aspect as described above.
[0047] In the seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or the first aspect and the second aspect and / or various possible implementations of the second aspect.
[0048] The skeleton extraction method provided by the present application determines the image contour and internal area of the image to be identified, and determines the acquisition point sequence and multiple identification points corresponding to the image contour and the internal area, wherein the acquisition point sequence includes multiple acquisition points on the image contour, and the identification points are determined based on the internal area; determines the corresponding heat kernel function according to the acquisition point sequence and the multiple identification points; determines the electric potential field corresponding to the internal area of the image to be identified based on the heat kernel function, and extracts multiple minimum values corresponding to the electric potential field; determines the image skeleton of the image to be identified according to the multiple minimum values. By determining the electric potential field corresponding to the internal area of the image to be identified, extracting the ridge line of the electric potential field to obtain the image skeleton of the image to be identified, blur, distortion, and other interference generated in the acquisition of the image can be better handled, the core geometric features of the image can be captured more accurately, the interference of image noise can be reduced, and the topological structure of the shape can be maintained, thereby improving the accuracy of image recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] Figure 1 A schematic diagram of skeleton extraction of the skeleton extraction method provided in an embodiment of the present application;
[0051] Figure 2 Schematic diagram of the skeleton extraction method provided in the embodiment of the present application Figure 1 ;
[0052] Figure 3 Schematic diagram of the skeleton extraction method provided in the embodiment of the present application Figure 2 ;
[0053] Figure 4 A schematic diagram of a flow chart of a method for identifying an authentication object provided in an embodiment of the present application;
[0054] Figure 5 A schematic diagram of the structure of a skeleton extraction device provided in an embodiment of the present application;
[0055] Figure 6 A schematic diagram of the structure of an identification device for an authentication object provided in an embodiment of the present application;
[0056] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0057] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0059] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0060] In addition, this application involves conducting big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and using artificial intelligence technology to make automated decisions, and making technical solutions that have a significant impact on personal rights and interests based on the results of automated decisions. The application provides users with corresponding operation entrances for them to choose to agree or reject the results of automated decisions; if the user chooses to reject, the expert decision-making process will be entered.
[0061] It should be noted that the skeleton extraction method, device, equipment, storage medium and product provided in this application can be used in the field of biometrics, and can also be used in any field other than biometrics. The application field of the skeleton extraction method, device, equipment, storage medium and product in this application is not limited.
[0062] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.
[0063] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0064] First, the terms involved in this application are explained:
[0065] Skeleton extraction: Skeleton extraction is a technique in image processing or computer vision that is used to extract the centerline or outline of an object from a binary image, often called a "skeleton" or "thinned image". This technique is mainly used to simplify shape representation while retaining the topological structure of the object. Skeleton extraction can be regarded as the skeleton of an object, which has the characteristic of extending along the length of the object. It can be used for feature extraction and target topology representation, and is widely used in image processing, computer vision and other fields.
[0066] Potential field: In mathematics and physics, a potential field is a scalar field whose value represents some form of potential energy.
[0067] Heat kernel function: The heat kernel function is a mathematical tool for approximating geodesic distances. Through the heat kernel function, we can calculate a smoother distance distribution inside the shape, thereby improving the robustness of skeleton extraction.
[0068] Geodesic distance: Geodesic distance refers to the shortest path distance along the surface of a shape. It is different from Euclidean distance and can more accurately reflect the real distance relationship inside the shape.
[0069] Two-dimensional shape: A two-dimensional shape refers to any closed contour or area defined in two-dimensional space. This includes handwritten signatures, seal patterns, etc., which appear on paper or on the screen.
[0070] Gradient Field: A vector field obtained from a scalar field, whose definition is independent of the choice of coordinate system. Gradient fields play an important role in differential calculus, integral calculus, and the definition of operators.
[0071] Hessian Matrix: Also translated as Hessian matrix, Hessian matrix, Hessian matrix, etc., is a square matrix composed of the second-order partial derivatives of a multivariate function, which describes the local curvature of the function.
[0072] Gradient Descent: is a first-order optimization algorithm used to find the local minimum of a function. This method iteratively searches and moves a certain step in the opposite direction of the gradient corresponding to the current point of the function, gradually approaching the minimum point of the function.
[0073] In various businesses, electronic signatures and electronic seals are gradually replacing traditional handwritten signatures and seals. The recognition of signatures or seals involves image recognition technology, such as edge detection, template matching, and machine learning algorithms. Although the existing image processing and machine learning methods have met business needs to a certain extent, with the increase in demand and the development of technology, these methods have also exposed some shortcomings and limitations.
[0074] In practical applications, images may have various defects due to uneven lighting, scanning equipment quality, etc., which may affect the recognition effect, causing image recognition technology to be overly dependent on image clarity and contrast, and to be very sensitive to noise, blur, or distortion in the image. It has problems such as complex calculations, lack of robustness, and limited adaptability.
[0075] The skeleton extraction method provided by the present application is intended to solve the above technical problems of the prior art. The skeleton extraction method provided by the embodiment of the present application determines the electric potential field corresponding to the internal area of the image to be identified, extracts the ridge line of the electric potential field to obtain the image skeleton of the image to be identified, so as to deal with the blur, distortion, and other interference generated in the acquired image, more accurately capture the core geometric features of the image, reduce the interference of image noise, and improve the accuracy of image recognition.
[0076] Figure 1 This is a schematic diagram of skeleton extraction of the skeleton extraction method provided in the embodiment of the present application. Figure 1 As shown in the figure, after obtaining the image to be identified, the image to be identified is processed as follows to obtain the image contour and internal area of the image to be identified, as shown in (a); then the internal area of the image is processed in the form of triangulation to obtain the corresponding identification points, as shown in (b); multiple sampling points on the image contour are selected to determine multiple suitable anchor points to simplify the image processing process, as shown in (c); based on the anchor points and the identification points, the heat kernel function between them is determined, and according to the heat kernel geodesic distance between the anchor points and the identification points, the electric potential field inside the image is approximately calculated, as shown in (d) As shown; According to the obtained electric potential field, the lighter the color, the smaller the generalized electric potential value. It can be determined that the skeleton of the image is the ridge line of the negative electric potential field. At this time, based on the electric potential field, the gradient field of the electric potential field is determined, and the ridge line of the electric potential field is extracted, as shown in (e). The detailed diagram of the ridge line extraction is shown in (f); After obtaining the preliminary extracted ridge line, as shown in (g), the formed image skeleton may be incomplete. At this time, the gradient descent method can be used to track the remaining skeleton fragments along the direction of gradient descent to optimize the preliminary skeleton and obtain the final image skeleton, as shown in (h).
[0077] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0078] Figure 2 Schematic diagram of the skeleton extraction method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the skeleton extraction method shown in this embodiment includes:
[0079] S101, determining an image contour and an internal area of an image to be recognized, and determining a collection point sequence and a plurality of recognition points corresponding to the image contour and the internal area.
[0080] After obtaining the image to be identified, the image to be identified can be preprocessed first, the image can be thresholded or edge detected, converted into a binary image, and then an available contour detection algorithm is selected to extract the contour of the image. Based on the extracted contour, the internal area of the image can be determined, that is, the internal area is the area surrounded by the contour.
[0081] It is understandable that the points on the contour can be directly used as a collection point sequence. These points are arranged in the order of the contour to represent the shape and characteristics of the contour. The internal area can be set as a point set, and the point set can be screened to determine the corresponding identification points. For example, key point detection algorithms (such as SIFT, SURF, etc.) can be used to detect points with significant features as identification points.
[0082] Specifically, assume that the image to be identified is O, the boundary contour of its corresponding two-dimensional shape is recorded as S, and the sequence of acquisition points is recorded as , the internal point set is denoted as , at this time, the boundary point of the two-dimensional shape at i can be recorded as , the internal point of the two-dimensional shape at position j can be recorded as Correspondingly, the Euclidean distance between two points can be written as .
[0083] S102: Determine a corresponding heat kernel function according to the collection point sequence and the multiple identification points.
[0084] Among them, the heat kernel function usually appears in related mathematical physics fields such as heat conduction equations, as well as application scenarios such as image processing and geometric analysis. In mathematical form, the heat kernel function is used to describe the law of heat propagation and diffusion over time in a certain space, which can be compared to the image plane space in image processing. In the two-dimensional image space, the heat kernel function is often used in combination with the Laplace operator, etc., to reflect the diffusion of information such as image features between regional blocks.
[0085] It should be noted that in the process of determining the heat kernel function, it involves calculating the spatial distance between the collection point and the identification point. If the Euclidean distance is used to calculate it at this time, it will lead to high complexity. Therefore, this application is designed to use the heat kernel geodesic distance to optimize its calculation process.
[0086] S103, determining the electric potential field corresponding to the internal area of the image to be identified based on the heat kernel function, and extracting multiple minimum values corresponding to the electric potential field.
[0087] Among them, the heat diffusion process described by the heat kernel function is similar to the diffusion of the electric potential field.
[0088] It can be understood that for the internal area of the image to be identified, and the acquisition point sequence and identification point have been determined, combined with the corresponding heat kernel function, the internal area can be discretized into area blocks, and for each area block, the potential contribution value generated by the area block and other related points through the heat kernel function is calculated, and then these contribution values are accumulated to obtain the potential value at the area block.
[0089] Specifically, in the constructed electric potential field, the local minimum may refer to a point within its neighborhood, such as an eight-neighborhood or a four-neighborhood, that is, a range consisting of area blocks adjacent to an area block. The potential value of this point is lower than the potential values of all its neighboring points. This can be judged by point-by-point comparison, or by calculating the gradient of the potential field and finding the position where the gradient is zero and the surrounding potential values are greater than or equal to the point, or by using other optimization algorithms, such as simulated annealing, genetic algorithms, etc., to find global or local minimum points.
[0090] S104: Determine the image skeleton of the image to be recognized according to the multiple minimum values.
[0091] The image skeleton is also called the central axis, central axis, etc. It is a simplified representation of the shape of an object in an image. It can retain the topological structure and main morphological features of the object while removing some redundant detail information. Intuitively, the image skeleton can be seen as a linear structure located inside the object that can "support" the shape of the object, and it has a specific geometric relationship with the object boundary.
[0092] It can be understood that the skeleton of the image to be identified is the ridge line of the negative electric potential field, that is, the line connecting the minimum values of the electric potential field. Graph theory or path planning algorithms (such as Dijkstra algorithm, A* algorithm, etc.) can be used to connect the extracted minimum points to form an initial skeleton candidate path. The specific connection method is not limited in this scheme.
[0093] Optionally, after obtaining the initial skeleton, the initial skeleton may be refined to remove redundant points so as to make the path closer to the skeleton of the image.
[0094] The skeleton extraction method provided in this embodiment determines the electric potential field corresponding to the internal area of the image to be identified through the heat kernel function between the acquisition point and the recognition point, extracts the ridge line of the electric potential field to obtain the image skeleton of the image to be identified, so as to deal with the blur, distortion, and other interference generated in the acquired image, accurately capture the core geometric features of the image, reduce the interference of image noise, maintain the topological structure of the shape, and thus improve the accuracy of image recognition.
[0095] Figure 3 This is a schematic diagram of the skeleton extraction method provided in the embodiment of the present application. Figure 2 This embodiment is in Figure 2 Based on the embodiment, the skeleton extraction method is described in detail. Figure 3 As shown, the skeleton extraction method shown in this embodiment includes:
[0096] S201, determining an image contour and an internal area of an image to be recognized, and determining a collection point sequence corresponding to the image contour.
[0097] This step is similar to the above step S101 and will not be described in detail in this solution.
[0098] S202: Perform triangulation processing on the internal area of the image to be recognized, and determine a plurality of triangular vertices based on the processed internal area.
[0099] S203: Determine multiple triangle vertices as multiple identification points.
[0100] Among them, triangulation is the process of dividing the internal area of the image to be identified into a series of adjacent and non-overlapping triangles. Through triangulation, complex plane areas can be represented by relatively simple and regular triangle units, which is convenient for subsequent calculations, analysis, shape description and other operations. The triangulation method can be, for example, Delaunay triangulation or greedy algorithm triangulation, which can be selected according to actual image requirements, and this solution does not limit it here.
[0101] It is understandable that after completing the triangulation, the results obtained will clearly indicate the vertex coordinate information of each triangle, and the vertices of all triangles are extracted from the triangular mesh after triangulation, and these vertices will be used as subsequent identification points. This triangulation not only optimizes the quality of the triangle, but also provides a basis for the subsequent discretization of partial differential equations.
[0102] Optionally, in the process of extracting triangle vertices, some vertices may be shared by multiple triangles, resulting in duplicate records. In this case, the extracted vertex set can be deduplicated to ensure that each vertex is recorded only once. For example, the coordinate information of the vertices can be compared and a deduplication algorithm can be selected to obtain a unique set of triangle vertices.
[0103] S204: using a unit positive charge to perform value assignment processing on a plurality of collection points in the collection point sequence.
[0104] Among them, a unit positive charge is assigned to the collection point sequence. These charges generate an electric potential field inside the shape to simulate the distribution of potential energy and calculate the distribution of these charges on the internal point set. The sum of the electric potentials generated on the
[0105] S205: Determine a corresponding heat kernel function according to the collection point sequence and the multiple identification points.
[0106] Among them, the triangulation network is assumed to be , V represents the set of triangular vertices, that is, the identification points, whose number is smaller than the point set The number of , E represents the edge set.
[0107] It should be noted that even on the basis of triangulation, the calculation All vertices in and all collection points in The thermonuclear distance between Each point in is taken as a heat source point and calculated The heat core distance of all vertices in to the source point. This means that n solutions are required, and the computational complexity is , which is still not efficient enough when processing large-scale data.
[0108] Therefore, in a possible implementation, uniform sampling is used to obtain a preset number of sampling points from the acquisition point sequence, and the preset number of sampling points are grouped to obtain multiple anchor points; or, the acquisition point sequence is analyzed and processed to determine the influence coefficients of multiple acquisition points in the acquisition point sequence, the influence coefficient is used to represent the influence of deleting a certain acquisition point on the recognition result of the entire image to be recognized, and based on the influence coefficient, a discrete curve is used to evolve and select a preset number of sampling points from the acquisition point sequence as anchor points.
[0109] It can be understood that after determining the anchor point, determining the heat kernel function between the anchor point and multiple identification points can reduce the complexity of the calculation and save computing resources.
[0110] Among them, for uniform sampling, a preset number of anchor points can be set as k. The sampling strategy can be to use a step size of 1 between rounds and k within a round, and select k in each round. points. Thus, we get k sets of sampling points. Let the sampling point set be, and we can get .
[0111] Optionally, analysis and processing is performed on the acquisition point sequence to determine influence coefficients of multiple acquisition points in the acquisition point sequence, wherein the influence coefficient is used to indicate the influence of deleting a certain acquisition point on the recognition result of the entire image to be recognized.
[0112] It can be understood that the anchor points are usually located at positions where the local geometric changes of the shape are large, and the discrete curve evolution method can be used to select k acquisition points with large influence coefficients as anchor points.
[0113] S206. Determine the heat kernel geodesic distances between the multiple identification points and the multiple anchor points based on the heat kernel function.
[0114] S207 , determining the electric potential field of the inner region of the image to be recognized according to the thermonuclear geodesic distance and the unit positive charges of the plurality of anchor points.
[0115] There are different calculation methods corresponding to different anchor point determination methods.
[0116] For uniform sampling, we can select the first k charges with the smallest distance and discard the other charges with farther distance. , a set of sampling points can be selected , calculate the triangle vertices, that is, identify the points arrive The heat kernel geodesic distance of all anchor points in , and repeat the calculation for the sampling points of the remaining groups, and get To the collection point Grouping strategy The k closest distance values under ,in is an index set that stores the distance under the metric of heat kernel distance. The index of the k nearest contour points. Specifically, let , ideally the distance The indexes of the nearest k anchor points fall in the sampling point set in sequence Within the sampling groups of different k in .
[0117] Optionally, for the k anchor points determined according to the influence coefficient, let their anchor point set be A, and calculate The thermal core distances of all pairs of points between and , it can be determined that the time complexity at this time is ,in . At this time, you can Reconstruct the original distance matrix and through Keep the Frobenius norm error between the reconstructed distance and the true distance to a minimum.
[0118] In one possible implementation, Add constraints and iteratively optimize M and D. For example, the distance matrix between anchor points can be recorded as It can be determined The distance information in the middle part can be approximately estimated ,in, and for The former in the singular value decomposition The maximum eigenvalue and the corresponding eigenvector can generally be selected To prevent overfitting of M, we get .
[0119] Through the above method, the corresponding electric potential field calculation formula determined by the corresponding anchor point and identification point can be expressed as ,in, for and The thermonuclear distance between is the distance control factor. The influence of charges at different distances on the observation points can be better controlled when calculating the electric potential, which helps to emphasize the contour part that has a decisive influence on the position of the skeleton point, while reducing the interference of the contour area far away from the point on the skeleton extraction, thereby improving the overall skeleton extraction quality.
[0120] S208. Extract multiple minimum values corresponding to the electric potential field.
[0121] Specifically, based on Coulomb's law The force between two charges can be determined as a function of the distance between them and the magnitude of their charges, where is the magnitude of the force between the two charges, is the vacuum dielectric constant, and represents the size of the two charges, r is the distance between the two charges, is the distance r from the observation point to The unit vector of , then we know that the electric field strength at the observation point is .
[0122] As can be seen from the above, for the collection point sequence and the internal point set Since there are unit positive charges distributed on the sampling points, for the sampling points The electric field generated by the position at a distance r around the charge is .
[0123] Based on Coulomb's law, the electric field at any observation point in space is the superposition of the electric fields of each charge on the shape, and the internal point The electric potential value is From the above formula, we can see that the electric potential is relatively large near the contour boundary and gradually decreases as it moves toward the inside of the shape, that is, the skeleton of the image is in the ridge area of the negative potential field surface.
[0124] S209: Determine the basic skeleton of the image to be recognized by connecting multiple minimum values to obtain the ridge line of the electric potential field.
[0125] Among them, the extracted skeleton part is the local singular position of the potential value, which can correspond to Figure 1 The lighter colored position shown in the figure is the ridge line formed by connecting ridge points in the negative potential field surface. The minimum value of the negative potential field can be extracted by the Hessian matrix to obtain the ridge line.
[0126] It can be understood that the eigenvalues and eigenvectors of the Hessian matrix can be analyzed, and the ridge line can be extracted by detecting and calculating the matrix.
[0127] Specifically, the Hessian matrix can be expressed as ,in , , and Indicate point The second-order derivative in the x and y directions. After obtaining the Hessian matrix, the corresponding curvature information and curvature direction information can be determined by calculating the eigenvalues and eigenvectors. Based on the above information, a threshold can be selected for the eigenvalues to finally determine which eigenvalues are the ridge points to be extracted, and finally the ridge lines can be extracted.
[0128] S210, determining the gradient field corresponding to the electric potential field.
[0129] S211 , based on the basic skeleton and the gradient field, using the gradient steepest descent method to determine the relevant skeleton segments, and optimizing the basic skeleton to obtain the image skeleton of the image to be recognized.
[0130] Among them, since the threshold selection of the Hessian matrix is difficult to control, for some complex images, the proposed ridges are often not complete shape skeletons, but some skeleton fragments. Therefore, it is often necessary to repair these skeleton fragments and connect them to retain the structural characteristics and topological integrity of the original shape.
[0131] It can be understood that the gradient represents the direction in which the image intensity changes fastest. Gradient calculation can be performed to obtain the gradient information of each sampling point in the potential field, and the gradient field can be calculated.
[0132] Specifically, let the image , the gradient of any point on its potential field surface is , the position pointing to the image skeleton is the gradient descent direction, and the remaining skeleton fragments can be tracked along the direction of the fastest gradient descent. First, by scanning the captured ridges, find the location of the breakpoint and determine the exact fragment. At this time, the end point is generally the end point of the ridge. You can choose the end of a broken ridge fragment to be connected as the starting point, so as to ensure the continuity of the skeleton.
[0133] It should be noted that the gradient can be calculated based on the position of the starting point to obtain the direction of change, that is, the gradient direction information. From the current position, a suitable step size is selected along the direction of the fastest gradient descent to take a step forward for tracking. At this time, the new position is used as the update position, and then it is detected whether the updated position touches other skeleton fragments. If so, the points on the path are connected to obtain a new skeleton fragment. This is iterated until all connection points are judged to meet the conditions, and finally a complete and continuous skeleton fragment is obtained.
[0134] The skeleton extraction method provided in this application determines the heat kernel geodesic distance between the identification point and the acquisition point through the heat kernel function, instead of the Euclidean distance between the two points, reduces the complexity of the calculation process, calculates the electric potential field of the internal area of the image, and determines the skeleton inside the image based on the ridge line of the electric potential field. The gradient descent method is used for the basic skeleton, and the skeleton fragments are iteratively obtained to completely optimize the skeleton to obtain an accurate image skeleton. The above-mentioned skeleton extraction method can form a simplified shape representation but retain key features, reducing the noise interference caused by image recognition.
[0135] Figure 4 Schematic diagram of the process of identifying the authentication object provided in the embodiment of the present application. Figure 2 and Figure 3 Based on the embodiment, the identification method of the authentication object is described in detail. Figure 4 As shown, the identification method of the authentication object shown in this embodiment includes:
[0136] S301: Obtain the object to be authenticated.
[0137] The object to be authenticated may be an electronic signature, seal, or other identification image that can be used for biometric authentication, and this solution does not limit this.
[0138] It can be understood that signature and seal images can be obtained through a high-resolution scanner or camera, and the image quality can be improved by applying binarization, noise removal, contrast enhancement and other technologies.
[0139] S302: Using a skeleton extraction method, determine the image skeleton of the object to be authenticated.
[0140] Among them, this step is similar to the skeleton extraction method described in the above-mentioned step S201 to extract the skeleton features of the image skeleton-step S211, and this solution will not be repeated here.
[0141] S303: Extract skeleton features of the image skeleton.
[0142] Based on the extracted image skeleton, the corresponding skeleton features may be determined. The skeleton features may include, for example, the total number of branch points in the image skeleton, connection characteristics of branch points in different regions, and structural features.
[0143] It can be understood that, taking the authentication object as a signature, the number of characters in the signature can correspond to a skeleton feature. For another example, for a cursive signature and a casual signature, the branch points corresponding to the skeleton are different, and their corresponding skeleton features are distinguished.
[0144] S304: Determine the corresponding database classification based on the skeleton features.
[0145] Among them, according to different skeleton features, they can be searched by different database classifications to enhance the accuracy of the search.
[0146] It is understandable that the image skeleton can be classified according to the topological structure features presented by the image skeleton. Specifically, skeletons of different topological types such as ring structure, tree structure, chain structure, etc. can be classified into different categories for storage.
[0147] S305 . Obtain a standard image skeleton corresponding to the skeleton feature from a database based on database classification.
[0148] Among them, the standard image skeleton is the recognition image skeleton entered into the database for the first time.
[0149] It is understandable that the corresponding standard image skeleton can be queried in the database according to certain features of the image to be matched.
[0150] It should be noted that if the authentication object is entered for the first time, the matching step will not be performed. The operation and maintenance personnel can select the basic entry program, enter the authentication object, and analyze the corresponding skeleton features. Based on the skeleton features, they are stored in the corresponding database classification so that the skeleton features are the standard image skeleton corresponding to the authentication object. In the subsequent authentication process, the relevant authentication process is repeated. At this time, the object skeleton features are no longer stored, but the matching judgment is performed directly.
[0151] S306, determine whether the skeleton feature matches the standard image skeleton; if so, execute step S307; if not, execute step S308.
[0152] S307: Determine whether the authentication of the object to be authenticated is successful.
[0153] S308: Determine whether the authentication of the object to be authenticated fails.
[0154] Among them, the information related to the standard image skeleton obtained from the database can be parsed to extract the skeleton features of the same dimension and type so that they can be compared with the skeleton features to be judged under the same standard. The skeleton features of the image to be matched can be compared with the skeleton features of the standard image retrieved from the database, for example, by calculating the similarity or distance between the features, such as using Euclidean distance, Manhattan distance, cosine similarity, etc. According to the result of feature matching, it is determined by threshold judgment whether the skeleton of the image to be matched matches the skeleton of the standard image. If the similarity between the features exceeds a certain threshold, they are considered to be matched, that is, the authentication is passed.
[0155] It is understandable that if the match fails, other operations can be performed, such as marking the image to be matched as unknown, conducting further analysis, etc., and introducing manual review to support operation and maintenance personnel to determine it to ensure the accuracy of recognition.
[0156] It should be noted that in the above process, in actual use, the detection results can be obtained through multiple rounds of detection. Based on the detection results, the calculation parameters and model learning can be optimized according to the actual situation to timely determine the recognition accuracy, robustness and calculation response speed of the system.
[0157] The identification method of the authentication object provided in the embodiment of the present application extracts the image skeleton of the authentication object through the above-mentioned skeleton extraction method, determines the standard image skeleton from the corresponding database based on the skeleton features corresponding to the image skeleton, and performs matching judgment between the two. Skeleton extraction can reduce the dependence on the clarity and contrast of the image, simplify the feature extraction process, improve the recognition speed, reduce the noise interference of image recognition, and enhance the accuracy of image recognition.
[0158] Figure 5 This is a schematic diagram of the structure of the skeleton extraction device provided in this application. Figure 5 As shown, the skeleton extraction device 400 provided in this embodiment includes:
[0159] A determination module 401 is used to determine an image contour and an internal area of an image to be identified, and to determine a collection point sequence and a plurality of identification points corresponding to the image contour and the internal area, wherein the collection point sequence includes a plurality of collection points on the image contour, and the identification points are determined based on the internal area;
[0160] The determination module 401 is further used to determine a corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points;
[0161] The determination module 401 is further used to determine the electric potential field corresponding to the internal area of the image to be identified based on the heat kernel function;
[0162] An extraction module 402, used to extract a plurality of minimum values corresponding to the electric potential field;
[0163] The determination module 401 is further configured to determine the image skeleton of the image to be identified based on the multiple minimum values;
[0164] Optionally, the device further includes: a processing module 403;
[0165] The processing module 403 is used to perform triangulation processing on the internal area of the image to be identified;
[0166] The determination module 401 is further used to determine a plurality of triangle vertices based on the processed internal area;
[0167] The determination module 401 is further configured to determine the plurality of triangle vertices as a plurality of identification points;
[0168] Optionally, the extraction module 402 is further configured to adopt uniform sampling to obtain a preset number of sampling points from the acquisition point sequence, and group the preset number of sampling points to obtain a plurality of anchor points;
[0169] Alternatively, the acquisition point sequence is analyzed and processed to determine influence coefficients of multiple acquisition points in the acquisition point sequence, where the influence coefficient is used to represent the influence of deleting a certain acquisition point on the recognition result of the entire image to be recognized, and based on the influence coefficient, a discrete curve is used to evolve and select a preset number of sampling points from the acquisition point sequence as anchor points;
[0170] The determination module 401 is further used to determine a heat kernel function between the anchor point and the plurality of identification points;
[0171] Optionally, the processing module 403 is further used to use a unit positive charge to perform value assignment processing on multiple acquisition points on the acquisition point sequence, and the unit positive charge is used to generate an electric potential field inside the image to be recognized;
[0172] Optionally, the determination module 401 is further configured to determine the heat kernel geodesic distances between the plurality of identification points and the plurality of anchor points based on a heat kernel function;
[0173] The determination module 401 is further used to determine the electric potential field of the internal area of the image to be identified according to the thermonuclear geodesic distance and the unit positive charges of the plurality of anchor points;
[0174] Optionally, the determination module 401 is further configured to determine the basic skeleton of the image to be identified by connecting a plurality of the minimum values to obtain a ridge line of the electric potential field;
[0175] The determination module 401 is further used to determine the gradient field corresponding to the electric potential field;
[0176] The determination module 401 is further used to determine the relevant skeleton segments by using the steepest gradient descent method based on the basic skeleton and the gradient field;
[0177] The processing module 403 is further used to optimize the basic skeleton to obtain an image skeleton of the image to be recognized.
[0178] The skeleton extraction device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0179] Figure 6 This is a schematic diagram of the structure of the identification device for the authentication object provided in this application. Figure 6 As shown, the identification device 500 of the authentication object provided in this embodiment includes:
[0180] The acquisition module 501 is used to acquire the object to be authenticated;
[0181] A determination module 502, configured to determine the image skeleton of the object to be authenticated by using the skeleton extraction method according to any one of claims 1 to 5;
[0182] An extraction module 503, used to extract skeleton features of the image skeleton;
[0183] The determination module 502 is further used to determine a corresponding database classification based on the skeleton features;
[0184] The acquisition module 501 is further used to acquire a standard image skeleton corresponding to the skeleton feature from a database based on the database classification, wherein the standard image skeleton is a recognition image skeleton entered into the database for the first time;
[0185] The judgment module 504 is used to judge whether the skeleton feature matches the standard image skeleton. If so, it is determined that the authentication of the object to be authenticated is successful.
[0186] The identification device for the authentication object provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0187] Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 7 As shown, the electronic device 600 provided in this embodiment includes: at least one processor 601 and a memory 602 .
[0188] Optionally, the device 600 further includes a communication component 603 . The processor 601 , the memory 602 and the communication component 603 are connected via a bus 604 .
[0189] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.
[0190] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0191] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0192] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0193] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0194] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0195] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory (RRAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), an enhanced dynamic random access memory (EDRAM), a high-bandwidth memory (HBM), a hybrid memory cube (HMC), etc.
[0196] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0197] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0198] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0199] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A skeleton extraction method, characterized in that: The method comprises: Determine an image contour and an internal area of an image to be recognized, and determine a collection point sequence and a plurality of recognition points corresponding to the image contour and the internal area, wherein the collection point sequence includes a plurality of collection points on the image contour, and the recognition points are determined based on the internal area; Determining a corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points; Determine the electric potential field corresponding to the internal area of the image to be recognized based on the heat kernel function, and extract multiple minimum values corresponding to the electric potential field; The image skeleton of the image to be recognized is determined according to the multiple minimum values.
2. The method according to claim 1, characterized in that The determining of the plurality of identification points corresponding to the internal area comprises: Performing triangulation processing on the internal area of the image to be recognized, and determining a plurality of triangular vertices based on the processed internal area; A plurality of the triangle vertices are determined as a plurality of identification points.
3. The method according to claim 2, characterized in that The step of determining a corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points comprises: uniform sampling is adopted to obtain a preset number of sampling points from the acquisition point sequence, and the preset number of sampling points are grouped to obtain a plurality of anchor points; Alternatively, the acquisition point sequence is analyzed and processed to determine influence coefficients of multiple acquisition points in the acquisition point sequence, where the influence coefficient is used to represent the influence of deleting a certain acquisition point on the recognition result of the entire image to be recognized, and based on the influence coefficient, a discrete curve is used to evolve and select a preset number of sampling points from the acquisition point sequence as anchor points; A heat kernel function between the anchor point and a plurality of the identification points is determined.
4. The method according to claim 3, characterized in that: Before determining the corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points, the method further includes: A unit positive charge is used to perform value assignment processing on a plurality of acquisition points on the acquisition point sequence, and the unit positive charge is used to generate an electric potential field inside the image to be recognized.
5. The method according to claim 4, characterized in that The determining, based on the heat kernel function, the electric potential field corresponding to the internal area of the image to be identified comprises: Determining the heat kernel geodesic distances between the plurality of identification points and the plurality of anchor points based on a heat kernel function; The electric potential field of the inner area of the image to be recognized is determined according to the thermal nuclear geodesic distance and the unit positive charges of the plurality of anchor points.
6. The method according to claim 1, characterized in that The step of determining the image skeleton of the image to be recognized according to the plurality of minimum values comprises: Determine the basic skeleton of the image to be recognized by connecting a plurality of the minimum values to obtain the ridge line of the electric potential field; determining a gradient field corresponding to the electric potential field; Based on the basic skeleton and the gradient field, the steepest gradient descent method is used to determine relevant skeleton segments, and the basic skeleton is optimized to obtain an image skeleton of the image to be recognized.
7. A method for identifying an authentication object, characterized in that: The method comprises: Acquire an object to be authenticated, and use the skeleton extraction method according to any one of claims 1 to 5 to determine the image skeleton of the object to be authenticated; Extracting skeleton features of the image skeleton; Based on the skeleton feature, a corresponding database classification is determined, and based on the database classification, a standard image skeleton corresponding to the skeleton feature is obtained from a database, where the standard image skeleton is a recognition image skeleton entered into the database for the first time; It is determined whether the skeleton feature matches the standard image skeleton. If so, it is determined that the authentication of the object to be authenticated is successful.
8. A skeleton extraction device, characterized in that: The device comprises: A determination module, used to determine an image contour and an internal area of an image to be identified, and to determine a collection point sequence and a plurality of identification points corresponding to the image contour and the internal area, wherein the collection point sequence includes a plurality of collection points on the image contour, and the identification points are determined based on the internal area; The determination module is further used to determine a corresponding heat kernel function according to the acquisition point sequence and the plurality of identification points; The determination module is further used to determine the electric potential field corresponding to the internal area of the image to be identified based on the heat kernel function; An extraction module, used for extracting a plurality of minimum values corresponding to the electric potential field; The determination module is further used to determine the image skeleton of the image to be identified based on the multiple minimum values.
9. An identification device for an authentication object, characterized in that: The device comprises: The acquisition module is used to obtain the object to be authenticated; A determination module, configured to determine the image skeleton of the object to be authenticated by using the skeleton extraction method according to any one of claims 1 to 5; An extraction module, used for extracting skeleton features of the image skeleton; The determination module is further used to determine a corresponding database classification based on the skeleton features; The acquisition module is further used to acquire a standard image skeleton corresponding to the skeleton feature from a database based on the database classification, wherein the standard image skeleton is a recognition image skeleton entered into the database for the first time; The judgment module is used to judge whether the skeleton feature matches the standard image skeleton. If they match, it is determined that the authentication of the object to be authenticated is passed.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.