Graph processing method and device, storage medium and electronic equipment

By parameterizing the curved closed graph and Fourier series expansion, Fourier coefficients are extracted as features for hashing operations, solving the problems of high complexity and poor stability of the curved closed graph in the prior art, and achieving more efficient and stable hash value generation.

CN119992118AActive Publication Date: 2025-05-13HUAXINCHENG (HANGZHOU) TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510483666.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-05-13
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

When processing curved closed graphics, the existing graph hash algorithm has high computational complexity, the hash value is susceptible to parameter selection, and needs to be recalculated after graphics mirroring, resulting in reduced efficiency and possible error introduction.

Method used

By parameterizing the boundaries of the curved edge closed figure, the curved edge function is generated, and the curved edge function is expanded Fourier series, the Fourier coefficient of the preset series is extracted as the target feature, and a standard hash algorithm is used to generate a unique hash value.

Benefits of technology

This method improves the stability of the hash value of curved closed graphics, reduces the computational complexity, avoids recalculation caused by mirroring, and enhances the processing efficiency and uniqueness of hash value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992118A_ABST
    Figure CN119992118A_ABST
Patent Text Reader

Abstract

The invention discloses a graph processing method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining a to-be-processed curved-edge closed graph; parameterizing the boundary of the curved-edge closed graph to generate a curved-edge function; performing Fourier series expansion on the curved edge function to generate Fourier series of the curved edge closed graph; selecting a Fourier coefficient of a preset series from the Fourier series as a first target feature of the curved edge closed graph; and performing Hash operation on the first target feature by adopting a standard Hash algorithm to generate a unique Hash value of the curved-edge closed graph. According to the scheme, the stability of the hash value of the curved edge closed graph can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of graphics processing technology, and specifically to a graphics processing method, device, storage medium and electronic device. Background Art

[0002] In the fields of computer vision, pattern recognition, and information security, how to efficiently and stably represent curved-edge closed graphs and calculate their unique hash values ​​is an important technical issue.

[0003] When processing curved closed graphs, existing graph hashing algorithms mainly rely on boundary point sampling, shape feature extraction or Fourier descriptors, which have high computational complexity and the hash value is easily affected by parameter selection. Especially after the curved closed graph is mirrored, the traditional graph hashing algorithm needs to recalculate the points on the graph boundary, which increases the computational complexity, reduces the processing efficiency and may introduce errors. Summary of the invention

[0004] The embodiments of the present application provide a graphics processing method, device, storage medium and electronic device, which can improve the stability of the hash value of a curved edge closed graph.

[0005] In a first aspect, an embodiment of the present application provides a graphics processing method, including: Get the curved edge closed figure to be processed; Parameterizing the boundary of the curved-edge closed figure to generate a curved-edge function; Performing Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure; Selecting a preset series of Fourier coefficients from the Fourier series as a first target feature of the curved edge closed figure; A standard hash algorithm is used to perform a hash operation on the first target feature to generate a unique hash value for the curved-edge closed figure.

[0006] In the graphics processing method provided in the embodiment of the present application, the Fourier series expansion of the curved edge function to generate the Fourier series of the curved edge closed figure includes: Calculate the Fourier coefficients of the curved edge function by Fourier transform; The curved edge function is expanded in Fourier series based on the Fourier coefficients of the curved edge function to obtain the Fourier series of the curved edge closed figure.

[0007] The graphics processing method provided in the embodiment of the present application also includes: Based on the Fourier coefficient of the curved edge function, obtaining a second target feature of a mirror image of the curved edge closed figure; A standard hash algorithm is used to perform a hash operation on the second target feature to generate a unique hash value of the mirror image of the curved-edge closed figure.

[0008] In the graphics processing method provided in the embodiment of the present application, the obtaining of the second target feature of the mirror image of the curved edge closed figure based on the Fourier coefficient of the curved edge function includes: Obtaining a mirror image relationship between the curved-edge closed figure and its mirror image figure; A second target feature of the mirror image is calculated based on the Fourier coefficient of the curved edge function and the mirror relationship.

[0009] In the graphics processing method provided in the embodiment of the present application, the calculating the second target feature of the mirror image according to the Fourier coefficient of the curved edge function and the mirror relationship includes: According to the mirror image relationship, determining a linear transformation relationship between the Fourier coefficients of the curved edge function and the Fourier coefficients of the mirror image; Calculating the Fourier coefficients of the mirror image according to the linear transformation relationship and the Fourier coefficients of the curved edge function; A second target feature is generated based on the Fourier coefficients of the mirror image.

[0010] In the graphics processing method provided in the embodiment of the present application, parameterizing the boundary of the curved-edge closed figure to generate a curved-edge function includes: According to a preset method, a parameterized starting point is selected on the boundary of the curved edge closed figure; Starting from the parameterization starting point, parameterization is performed along the boundary in an arc length accumulation manner, and a normalized arc length parameter of each point on the boundary is calculated; Interpolation processing is performed based on the normalized arc length parameter to generate a curved edge function.

[0011] In the graphics processing method provided in the embodiment of the present application, selecting a parameterized starting point on the boundary of the curved closed figure according to a preset method includes: Calculating the centroid of the curved-edge closed figure; The boundary point closest to the centroid is selected as the parameterization starting point.

[0012] In a second aspect, an embodiment of the present application provides a graphics processing device, including: A graphics acquisition unit, used for acquiring a curved edge closed graphics to be processed; A first generating unit, configured to parameterize the boundary of the curved-edge closed figure to generate a curved-edge function; A second generating unit, configured to perform Fourier series expansion on the curved edge function to generate a Fourier series of the curved edge closed figure; A feature acquisition unit, configured to select a preset series of Fourier coefficients from the Fourier series as a first target feature of the curved edge closed figure; A hash operation unit is used to perform a hash operation on the first target feature using a standard hash algorithm to generate a unique hash value of the curved-edge closed figure.

[0013] In a third aspect, the present application provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute any of the above-mentioned graphics processing methods.

[0014] In a fourth aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned graphics processing methods when executing the computer program.

[0015] In summary, the graphics processing method provided by the embodiment of the present application includes obtaining a closed curved-edge figure to be processed; parameterizing the boundary of the closed curved-edge figure to generate a curved-edge function; performing Fourier series expansion on the curved-edge function to generate a Fourier series of the closed curved-edge figure; selecting Fourier coefficients of a preset series from the Fourier series as the first target feature of the closed curved-edge figure; and performing a hash operation on the first target feature using a standard hash algorithm to generate a unique hash value of the closed curved-edge figure. This scheme uses the Fourier series to characterize a closed curved-edge figure as a series of Fourier coefficients, so that the main features of the closed curved-edge figure can be stably represented, and the stability of the hash value can be guaranteed even in the presence of small noise interference. That is, this scheme can improve the stability of the hash value of the closed curved-edge figure. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 It is a schematic diagram of an application scenario of the graphics processing method provided in an embodiment of the present application.

[0018] Figure 2 It is a flowchart of the graphics processing method provided in an embodiment of the present application.

[0019] Figure 3 It is a schematic diagram of the structure of the graphics processing device provided in an embodiment of the present application.

[0020] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] 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.

[0022] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0023] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0024] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0025] In the description of the present application, it should be noted that the terms "upper", "lower", "left", "right", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, terms such as "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0026] When processing curved closed graphs, existing graph hashing algorithms mainly rely on boundary point sampling, shape feature extraction or Fourier descriptors, which have high computational complexity and the hash value is easily affected by parameter selection. Especially after the curved closed graph is mirrored, the traditional graph hashing algorithm needs to recalculate the points on the graph boundary, which increases the computational complexity, reduces the processing efficiency and may introduce errors.

[0027] Based on this, the embodiments of the present application provide a graphics processing method, device, storage medium and electronic device. Specifically, the graphics processing device can be integrated in an electronic device, and the electronic device can be a server or a terminal. Among them, the terminal can include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, and a personal computer (PC), etc.; the server can be a single server or a server cluster composed of multiple servers, and can be a physical server or a virtual server.

[0028] For example, Figure 1 As shown, after obtaining the curved-edge closed figure to be processed, the electronic device can parameterize the boundary of the curved-edge closed figure to generate a curved-edge function; then perform Fourier series expansion on the curved-edge function to generate a Fourier series of the curved-edge closed figure; then select Fourier coefficients of a preset series from the Fourier series as the first target feature of the curved-edge closed figure; finally, use a standard hash algorithm to perform a hash operation on the first target feature to generate a unique hash value of the curved-edge closed figure.

[0029] The technical solutions shown in the present application will be described in detail below through specific embodiments. It should be noted that the description order of the following embodiments is not intended to limit the priority order of the embodiments.

[0030] See also Figure 2 , Figure 2 : is a flow chart of a graphics processing method provided by an embodiment of the present application. The specific flow of the graphics processing method may be as follows: 101. Obtain the curved edge closed figure to be processed.

[0031] Among them, a curved-edge closed figure refers to a closed shape whose boundary is composed of smooth curves.

[0032] In practical applications, the curved edge closed figure can be extracted from an image, imported from a CAD or vector graphics file, or generated through a mathematical formula or curve fitting.

[0033] For example, image processing techniques such as edge detection and contour extraction can be used to extract curved edge closed graphics from digital images. For CAD design files (such as DXF or SVG), the path data in the file can be directly parsed to obtain curved edge closed graphics. If there is no ready-made graphic data, a curve can be generated by a mathematical function (such as a Bezier curve, a spline curve, etc.) to create a curved edge closed graphic, or a curved edge closed graphic can be generated by fitting and simulation according to actual needs.

[0034] 102. Parameterize the boundary of the curved edge closed figure and generate the curved edge function.

[0035] A curved edge closed figure in a two-dimensional plane can be represented as a parameterized curved edge function f(t) on the complex plane, where t∈[0,1] represents the normalized arc length parameter. Specifically, the closed curved edge figure can be parameterized by sampling arc-length parameterization (Arc-LengthParameterization), so that the boundary points of the curved edge closed figure can be uniquely represented by a normalized arc length parameter t∈[0,1], thereby ensuring the consistency and stability of the Fourier transform calculation.

[0036] In some embodiments, a parameterized starting point can be selected on the boundary of a curved edge closed figure according to a preset method; then starting from the parameterized starting point, parameterization is performed along the boundary according to the arc length accumulation method, and the normalized arc length parameters of each point on the boundary are calculated; finally, interpolation processing is performed based on the normalized arc length parameters to generate a curved edge function.

[0037] For example, suppose the boundary of a closed curved figure consists of M discrete points P 0 , P 1 , ..., P M−1 Composition, among which, P M =P 0 , P i =(x i ,y i ) represents the boundary point. The coordinates of the boundary point can be obtained by edge detection or contour extraction methods (such as Canny algorithm or contour tracking).

[0038] Then, the Euclidean distance d between adjacent boundary points is calculated i : , where i=1, 2, ..., M.

[0039] Then, based on the Euclidean distance d between adjacent boundary points i The arc length L of the entire curved edge can be calculated: .

[0040] Then, we can calculate the parameterization starting point P0 To point P i The cumulative arc length s i : .

[0041] Therefore, according to the cumulative arc length s i Calculate the normalized arc length parameter t of each point i : , where t i ∈[0,1].

[0042] Thus, each point P i Each corresponds to a unique normalized arc length parameter t i , which is the parameterized representation of a closed curved edge graph: P(t)=(x(t), y(t)), t∈[0, 1].

[0043] Since the discrete sampling points may be uneven, in order to ensure the smoothness of the Fourier transform calculation, it is necessary to use interpolation methods (such as spline interpolation or Lagrange interpolation) to reconstruct the continuous functions x(t) and y(t). That is, through {t i , x i} and {t i ,y i} to interpolate and obtain a continuous function: x(t)=S x (t), y(t)=S y (t), t∈[0,1]. Thus, we can obtain a parameterized curved edge function f(t) that can be input into Fourier transform: f(t)=x(t)+iy(t), t∈[0,1].

[0044] In some embodiments, the boundary point closest to the centroid may be selected as the parameterization starting point. That is, the step of "selecting the parameterization starting point on the boundary of the curved closed figure according to a preset method" may be: calculating the centroid of the curved closed figure; selecting the boundary point closest to the centroid as the parameterization starting point.

[0045] The method for calculating the centroid and the method for selecting the boundary point closest to the centroid can refer to the common knowledge in the art and will not be described in detail here.

[0046] 103. Perform Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure.

[0047] Specifically, the Fourier coefficient C of the curved edge function can be calculated by Fourier transform k : .

[0048] The Fourier coefficients can fully express the geometric characteristics of curved closed figures, so the obtained hash value has high uniqueness and stability.

[0049] Then, based on the Fourier coefficients of the curved edge function, the Fourier series expansion of the curved edge function is performed to obtain the Fourier series of the curved edge closed figure: .

[0050] After Fourier series expansion, the main features of the curved closed figure can be stably represented, and the stability of the hash value can be guaranteed even in the presence of small noise interference.

[0051] 104. Select a preset series of Fourier coefficients from the Fourier series as the first target feature of the curved edge closed figure.

[0052] Due to the limitation of calculation accuracy, only the first N+1 Fourier coefficients can be retained as the first target features of the curved edge closed figure. For example, the first 10 Fourier coefficients can be retained as the first target features of the curved edge closed figure.

[0053] That is, the first target feature f t It can be as follows: .

[0054] Through this embodiment, only a limited number of Fourier coefficients need to be stored to describe the curved edge graph, which greatly reduces the calculation and storage requirements. In addition, by retaining the first N levels of Fourier coefficients, the uniqueness of the hash value can be improved while ensuring the calculation efficiency, so that the hash values ​​of different curved edge closed graphs are not easy to collide.

[0055] 105. Use a standard hash algorithm to perform a hash operation on the first target feature to generate a unique hash value for the curved edge closed figure.

[0056] The standard hash algorithm may be SHA-256, MD5, or Boost::hash. The first target feature may be represented as {C −N , C −N+1 , …, C 0 , …, C N−1 , C N The unique hash value of the curved edge closed graph can be directly calculated based on the first target feature.

[0057] It can be understood that the Fourier coefficient C k It can also be expressed as: . where i is the imaginary unit, Corresponding to the cosine component (representing the symmetric component of the curved edge function), Corresponding to the sine component (representing the antisymmetric component of the curved edge function).

[0058] In some embodiments, when it is necessary to calculate the unique hash value of the mirror image of the curved closed curve, the second target feature of the mirror image of the curved closed curve can be obtained based on the Fourier coefficients of the curved closed curve; then a standard hash algorithm is used to perform a hash operation on the second target feature to generate a unique hash value of the mirror image of the curved closed curve.

[0059] Among them, based on the mathematical characteristics of Fourier series, when the curved edge closed figure is mirrored, there is a linear transformation relationship between the Fourier coefficients of the curved edge closed figure and the Fourier coefficients of its mirror image. Therefore, when it is necessary to calculate the unique hash value of the mirror image, it can be directly calculated based on the Fourier coefficients of the curved edge closed figure without resampling or complex calculations.

[0060] It can be understood that the mirror relationship includes X-axis mirror, Y-axis mirror and origin mirror. Different mirror relationships correspond to different linear transformation relationships. Therefore, in the specific implementation process, the step of "obtaining the second target feature of the mirror image of the curved edge closed figure based on the Fourier coefficient of the curved edge function" can be to obtain the mirror relationship between the curved edge closed figure and its mirror image; calculate the second target feature of the mirror image according to the Fourier coefficient and the mirror relationship of the curved edge closed figure.

[0061] Among them, the step of "calculating the second target feature of the mirror image based on the Fourier coefficients of the curved-edge closed figure and the mirror relationship" can be determined according to the mirror relationship. The linear transformation relationship between the Fourier coefficients of the curved-edge closed figure and the Fourier coefficients of the mirror image; calculating the Fourier coefficients of the mirror image based on the linear transformation relationship and the Fourier coefficients of the curved-edge closed figure; and generating the second target feature based on the Fourier coefficients of the mirror image.

[0062] For example, when the curved closed figure and the mirror image are mirrored about the X-axis, according to the Fourier transform properties, the Fourier coefficients of the mirror image are It can be expressed as: . Therefore, the second target feature is: .

[0063] When the curved closed figure and the mirror image are mirrored about the Y axis, according to the Fourier transform properties, the Fourier coefficients of the mirror image It can be expressed as: . Therefore, the second target feature is: .

[0064] When the curved closed figure and the mirror image are mirrored about the Y axis, according to the Fourier transform properties, the Fourier coefficients of the mirror image It can be expressed as: . Therefore, the second target feature is: .

[0065] After obtaining the second target feature, a hash algorithm used in calculating a unique hash value of a curved-edge closed graph may be used to perform a hash operation on the second target feature to generate a unique hash value of the mirrored graph.

[0066] In summary, the graphics processing method provided in the embodiment of the present application includes obtaining a curved-edge closed figure to be processed; parameterizing the boundary of the curved-edge closed figure to generate a curved-edge function; performing Fourier series expansion on the curved-edge function to generate a Fourier series of the curved-edge closed figure; selecting Fourier coefficients of a preset series from the Fourier series as the first target feature of the curved-edge closed figure; and using a standard hash algorithm to perform a hash operation on the first target feature to generate a unique hash value of the curved-edge closed figure.

[0067] This scheme uses Fourier series to represent closed curved edge figures as a series of Fourier coefficients, so that the main features of the curved edge closed figure can be stably represented, and the stability of the hash value can be guaranteed even in the presence of small noise interference. That is, this scheme can improve the stability of the hash value of the curved edge closed figure.

[0068] This scheme optimizes the hash calculation method of curved edge closed figures through Fourier transform and normalized arc length parameterization. When calculating the hash value of a mirrored figure, the traditional method needs to re-execute the Fourier transform, which has high computational complexity and is sensitive to the starting point and noise, resulting in unstable hash values. This scheme uses Fourier series expansion to extract low-order Fourier coefficients, and uses the linear transformation relationship of Fourier coefficients so that the Fourier coefficients of the mirrored figure can be directly calculated from the Fourier coefficients of the original curved edge closed figure, thereby reducing computational overhead and improving the consistency and stability of the hash value.

[0069] In order to better implement the graphics processing method provided in the embodiment of the present application, the embodiment of the present application also provides a graphics processing device, wherein the meanings of the terms are the same as those in the above-mentioned graphics processing method, and the specific implementation details can refer to the description in the method embodiment.

[0070] See also Figure 3 , Figure 3 2 is a schematic diagram of the structure of the graphics processing device provided in the embodiment of the present application. The graphics processing device may include a graphics acquisition unit 201, a first generation unit 202, a second generation unit 203, a feature acquisition unit 204 and a hash operation unit 205. A graphics acquisition unit 201 is used to acquire a curved edge closed graphics to be processed; A first generating unit 202 is used to parameterize the boundary of the curved edge closed figure to generate a curved edge function; The second generating unit 203 is used to perform Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure; A feature acquisition unit 204 is used to select a preset series of Fourier coefficients from the Fourier series as a first target feature of the curved edge closed figure; The hash operation unit 205 is used to perform a hash operation on the first target feature using a standard hash algorithm to generate a unique hash value of the curved edge closed graph.

[0071] The specific implementation of each of the above units can refer to the above-mentioned embodiment of the graphics processing method, which will not be described one by one here.

[0072] In summary, the graphics processing device provided by the embodiment of the present application obtains the curved edge closed figure to be processed by the graphics acquisition unit 201; the first generation unit 202 parameterizes the boundary of the curved edge closed figure to generate a curved edge function; the second generation unit 203 performs Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure; the feature acquisition unit 204 selects the Fourier coefficients of a preset series from the Fourier series as the first target feature of the curved edge closed figure; the hash operation unit 205 uses a standard hash algorithm to perform a hash operation on the first target feature to generate a unique hash value of the curved edge closed figure. This scheme uses the Fourier series to characterize the closed curved edge figure as a series of Fourier coefficients, so that the main features of the curved edge closed figure can be stably represented, and the stability of the hash value can be guaranteed even if there is a small amount of noise interference. That is, this scheme can improve the stability of the hash value of the curved edge closed figure.

[0073] The present application also provides an electronic device, in which the graphics processing device of the present application can be integrated, such as Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically: The electronic device may include one or more processors 301 of processing cores and one or more computer-readable storage media memories 302 and other components. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. The processor 301 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing the software program and / or the present application stored in the memory 302, and calling the data stored in the memory 302, so as to monitor the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operation storage medium, user interface and application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.

[0074] The memory 302 can be used to store software programs and the present application. The processor 301 executes various functional applications and data processing by running the software programs and the present application stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating storage medium, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0075] Although not shown, the electronic device may further include a display unit, an input unit, a power supply, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302, thereby realizing various functions, as follows: Get the curved edge closed figure to be processed; Parameterize the boundary of the curved edge closed figure to generate the curved edge function; Perform Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure; Selecting a preset series of Fourier coefficients from the Fourier series as the first target feature of the curved edge closed figure; A standard hash algorithm is used to perform a hash operation on the first target feature to generate a unique hash value for the curved edge closed graph.

[0076] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0077] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application. For example, the instructions can execute the following steps: Get the curved edge closed figure to be processed; Parameterize the boundary of the curved edge closed figure to generate the curved edge function; Perform Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure; Selecting a preset series of Fourier coefficients from the Fourier series as the first target feature of the curved edge closed figure; A standard hash algorithm is used to perform a hash operation on the first target feature to generate a unique hash value for the curved edge closed graph.

[0078] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0079] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0080] Since the instructions stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by any method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0081] The graphics processing method, device, storage medium and electronic device provided by the present application are respectively introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the core idea of ​​the present application. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A graphics processing method, characterized in that: include: Get the curved edge closed figure to be processed; Parameterizing the boundary of the curved-edge closed figure to generate a curved-edge function; Performing Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure; Selecting a preset series of Fourier coefficients from the Fourier series as a first target feature of the curved edge closed figure; A standard hash algorithm is used to perform a hash operation on the first target feature to generate a unique hash value for the curved-edge closed figure.

2. The graphics processing method according to claim 1, characterized in that: The step of performing Fourier series expansion on the curved edge function to generate the Fourier series of the curved edge closed figure includes: Calculate the Fourier coefficients of the curved edge function by Fourier transform; The curved edge function is expanded in Fourier series based on the Fourier coefficients of the curved edge function to obtain the Fourier series of the curved edge closed figure.

3. The graphics processing method according to claim 2, characterized in that: Also includes: Based on the Fourier coefficient of the curved edge function, obtaining a second target feature of a mirror image of the curved edge closed figure; A standard hash algorithm is used to perform a hash operation on the second target feature to generate a unique hash value of the mirror image of the curved-edge closed figure.

4. The graphics processing method according to claim 3, characterized in that: The step of obtaining a second target feature of a mirror image of the curved edge closed figure based on the Fourier coefficient of the curved edge function comprises: Obtaining a mirror image relationship between the curved-edge closed figure and its mirror image figure; A second target feature of the mirror image is calculated based on the Fourier coefficients of the curved edge function and the mirror relationship.

5. The graphics processing method according to claim 4, characterized in that: The calculating the second target feature of the mirror image according to the Fourier coefficient of the curved edge function and the mirror relationship comprises: According to the mirror image relationship, determining a linear transformation relationship between the Fourier coefficients of the curved edge function and the Fourier coefficients of the mirror image; Calculating the Fourier coefficients of the mirror image according to the linear transformation relationship and the Fourier coefficients of the curved edge function; A second target feature is generated based on the Fourier coefficients of the mirror image.

6. The graphics processing method according to claim 1, wherein: The parameterizing the boundary of the curved-edge closed figure to generate a curved-edge function comprises: According to a preset method, a parameterized starting point is selected on the boundary of the curved edge closed figure; Starting from the parameterization starting point, parameterization is performed along the boundary in an arc length accumulation manner, and a normalized arc length parameter of each point on the boundary is calculated; Interpolation processing is performed based on the normalized arc length parameter to generate a curved edge function.

7. The graphics processing method according to claim 6, characterized in that: The step of selecting a parameterized starting point on the boundary of the curved edge closed figure according to a preset method includes: Calculating the centroid of the curved-edge closed figure; The boundary point closest to the centroid is selected as the parameterization starting point.

8. A graphics processing device, characterized in that: include: A graphics acquisition unit, used for acquiring a curved edge closed graphics to be processed; A first generating unit, configured to parameterize the boundary of the curved-edge closed figure to generate a curved-edge function; A second generating unit, configured to perform Fourier series expansion on the curved edge function to generate a Fourier series of the curved edge closed figure; A feature acquisition unit, configured to select a preset series of Fourier coefficients from the Fourier series as a first target feature of the curved edge closed figure; A hash operation unit is used to perform a hash operation on the first target feature using a standard hash algorithm to generate a unique hash value of the curved-edge closed figure.

9. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the graphics processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the graphics processing method according to any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Label defect identification, cutting and collection method and system

    CN117773357A

  • Shape characterization with elliptic fourier descriptor for contact or any closed structures on the chip

    US20110079779A1

  • Method and apparatus for representing image data using polynomial approximation method and iterative transformation-reparametrization technique

    US5473742A

  • Smart card containing one-time password having iris image information

    WO2013035927A1