Graphic Processing Method, Apparatus, Electronic Device, and Storage Medium

By using graphics processing methods in drawing tools such as electronic whiteboards, the trained graphics processing model is called to correct the graphics hand-drawn by users, which solves the problem of inconvenient operation of traditional drawing tools and improves the operability of drawing tools.

CN114119430BActive Publication Date: 2025-06-03SHENZHEN HUASHENG SOFTWARE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111283710.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2025-06-03
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

Traditional drawing tools such as electronic whiteboards draw graphics by touching the box point report method. The poor user operation level leads to a large deviation of the drawn geometric figures, making it difficult to draw standard and beautiful figures at one time, resulting in poor operability.

Method used

By using the graphics processing method, the targeted coordinate points set of to be processed for the to be processed figure is obtained, the trained graphics processing model is called to correct the coordinate points, and the processed target coordinate points are obtained, and the standard graphics are output to be displayed in the display module.

Benefits of technology

It realizes automatic correction of user-drawn graphics, improves the operability of drawing tools, and makes it easier for users to draw standard and beautiful graphics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119430B_ABST
    Figure CN114119430B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a graphics processing method, apparatus, electronic device, and storage medium. The method first obtains a set of target coordinates to be processed of a graphics to be processed, then calls a trained graphics processing model, and corrects the coordinates in the set of target coordinates to be processed through the trained graphics processing model to obtain a set of processed target coordinates. Finally, according to the target coordinates in the set of processed target coordinates, a target graphics is output; the target graphics is sent to the display module to display the target graphics. The graphics processing method of the present application can automatically correct the graphics to be processed hand-drawn by the user on the drawing tool into a standard graphics, improving the operability of the drawing tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of graphic correction, and particularly to a graphic processing method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development of society and the acceleration of people's living rhythm, intelligent products that can bring users a comfortable and convenient experience are increasingly favored by consumers. Currently, intelligent products have begun to cover various fields, such as the home appliance field, the automotive field, the office field, etc.

[0003] In the office field, drawing tools such as electronic whiteboards are an indispensable office tool. However, traditional electronic whiteboards completely use the method of touch frame reporting points for graphic drawing. Differences in user operation levels can lead to large deviations in the geometric graphics drawn by users, and it is difficult for users to draw standard and beautiful graphics at one time. Therefore, the operability of traditional drawing tools is not strong. Summary of the Invention

[0004] Embodiments of this application provide a graphic processing method, apparatus, electronic device, and storage medium to improve the operability of drawing tools.

[0005] On the one hand, this application provides a graphic processing method. The graphic processing method is used for a graphic correction system. The graphic correction system includes a display module and a processing module. The graphic processing method is applied to the processing module. The graphic processing method includes:

[0006] Obtain a set of target coordinates of the to-be-processed graphic to be processed;

[0007] Invoke the trained graphic processing model;

[0008] Perform correction processing on the coordinates in the set of target coordinates of the to-be-processed graphic to be processed through the trained graphic processing model to obtain a set of processed target coordinates;

[0009] Output a target graphic according to the target coordinates in the set of processed target coordinates;

[0010] Send the target graphic to the display module to display the target graphic.

[0011] Optionally, in some possible implementation manners of this application, the step of obtaining a set of target coordinates of the to-be-processed graphic to be processed includes:

[0012] Obtain a set of initial coordinates of the to-be-processed graphic to be processed;

[0013] Invoke the screening model;

[0014] Filter the coordinate points in the initial set of coordinate points to be processed based on the filtering model to obtain a target set of coordinate points to be processed.

[0015] Optionally, in some possible implementation manners of the present application, the graphics processing model includes an input layer, an intermediate layer, and an output layer. The input layer is used to extract the first features in the graphics to be processed, the intermediate layer is used to extract the second features from the first features, and the output layer is used to integrate and map the second features into a feature vector.

[0016] Optionally, in some possible implementation manners of the present application, the graphics processing model includes an input layer, an intermediate layer, and an output layer. The input layer is used to extract the first features in the graphics to be processed, the intermediate layer is used to extract the second features from the first features, and the output layer is used to integrate and map the second features into a feature vector.

[0017] Optionally, in some possible implementation manners of the present application, the input layer is composed of 1 convolutional layer and 1 max pooling layer; the intermediate layer is composed of 8 residual units, and each residual unit is composed of 2 identical convolutional blocks connected by a short connection. Among them, each convolutional block is composed of 1 convolutional layer connected to a BN layer and an activation function.

[0018] Optionally, in some possible implementation manners of the present application, before the step of calling the trained graphics processing model, it further includes

[0019] Process the first coordinate points in the first coordinate point set in the training sample set through the graphics processing model to be trained to obtain the second coordinate points corresponding to each first coordinate point to establish a second coordinate point set;

[0020] Perform parameter training on the graphics processing model to be trained according to a preset loss target, loss function, the second coordinate point set, and the target coordinate point set corresponding to the first coordinate point set to obtain target parameters;

[0021] Obtain the trained graphics processing model according to the target parameters.

[0022] Optionally, in some possible implementation manners of the present application, the step of performing parameter training on the graphics processing model to be trained includes:

[0023] Perform parameter training on the graphics processing model to be trained according to the coordinate data in the set composed of the target coordinate point set and the second coordinate point set.

[0024] Optionally, in some possible implementation manners of this application, the step of training the parameters of the to-be-trained graphics processing model according to the coordinate data in the set pair composed of the target coordinate point set and the second coordinate point set includes:

[0025] Based on the loss function, obtain the loss data corresponding to the set pair according to the coordinate data in the set pair composed of the second coordinate point set and the target coordinate point set;

[0026] Adjust the parameters in the to-be-trained graphics processing model according to the loss data until the loss data is equal to the preset loss target.

[0027] On the one hand, this application provides an image processing device. The graphics processing device is used for a graphics correction system. The graphics correction system includes a display module and a processing module. The graphics processing device is arranged in the processing module. The graphics processing device includes:

[0028] An acquisition module, configured to acquire a target to-be-processed coordinate point set of the to-be-processed graphics;

[0029] An invocation module, configured to invoke the trained graphics processing model;

[0030] A processing module, configured to perform correction processing on the coordinate points in the target to-be-processed coordinate point set through the trained graphics processing model to obtain a processed coordinate point set;

[0031] An output module, configured to output a target graphic according to the target coordinate points in the processed target coordinate point set;

[0032] A display module, configured to send the target graphic to the display module to display the target graphic.

[0033] On the one hand, an embodiment of this application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. Wherein, when the processor executes the program, it implements the steps of the above method.

[0034] On the one hand, this application provides a computer-readable storage medium. Multiple instructions are stored in the computer-readable storage medium. The instructions are suitable for being loaded by a processor to execute the steps in the above method.

[0035] An embodiment of the present application provides a graphic processing method, apparatus, electronic device, and storage medium. The method first obtains a set of target coordinate points to be processed for a graphic to be processed, then calls a trained graphic processing model, and corrects the coordinate points in the set of target coordinate points to be processed through the trained graphic processing model to obtain a set of processed target coordinate points. Finally, based on the target coordinate points in the set of processed target coordinate points, a target graphic is output; the target graphic is sent to the display module to display the target graphic. The graphic processing method of the present application can automatically correct a graphic to be processed hand-drawn by a user on a drawing tool such as an electronic whiteboard into a standard graphic, improving the operability of the drawing tool. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0037] Figure 1 It is a schematic diagram of the scenario of the graphic processing system provided by the embodiment of the present application.

[0038] Figure 2 It is a schematic flowchart of the graphic processing method provided by the embodiment of the present application.

[0039] Figure 3a It is a schematic diagram of the graphic to be processed provided by the embodiment of the present application.

[0040] Figure 3b It is a schematic diagram of coordinate point screening provided by the embodiment of the present application.

[0041] Figure 4 It is a schematic diagram of the structure of the graphic processing model provided by the embodiment of the present application.

[0042] Figure 5 It is a schematic diagram of the structure of the graphic processing apparatus provided by the embodiment of the present application.

[0043] Figure 6 It is a schematic diagram of the structure of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0045] The graphics processing model in this application is essentially a neural model. A neural network is a large-scale, multi-parameter optimization tool. Relying on a large number of training databases, a neural network can learn hidden features that are difficult to summarize in the data, thereby completing multiple complex tasks, such as: image semantic segmentation, object detection, motion tracking, natural language translation, image recognition, etc. In this application, the graphics processing model is responsible for correcting the coordinate points in the set of coordinate points of the graphics to be processed, and obtaining the set of processed coordinate points.

[0046] A neural network, also known as an artificial neural network (ANNs), is an algorithmic mathematical model that mimics the behavioral characteristics of a biological neural network, consisting of neurons, connections between nodes. A classic neural network model consists of an input layer, a hidden layer, and an output layer. In neural networks, the convolutional neural network (CNN) is the most widely used. A convolutional neural network consists of an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer.

[0047] In this application, the image to be processed is a graph hand-drawn by the user on a drawing tool, and the drawing tool includes but is not limited to an electronic whiteboard.

[0048] In this application, the target graph is a graph that conforms to the national drawing standard. For example, standard graphs such as straight lines, triangles, circles, semi-circles, etc.

[0049] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the scenario of the graphics processing system provided by the embodiment of this application. The system may include a display module 101 and a processing module 102, where:

[0050] The display module 101 and the processing module 102 may be integrated in the same drawing tool, or only the display module 101 may be integrated in the drawing tool, and the processing module 102 is placed separately outside the drawing tool. The processing module 102 includes but is not limited to a server, and the server includes a local server and an online server.

[0051] The user hand-draws a graph on the display module 101. The module 101 obtains the set of coordinate points of the graph drawn by the user through an acquisition module. This set is the target coordinate point set of the graph to be processed. Among them, the acquisition module can be a pressure sensor or other modules that can acquire graph coordinate points. After the display module 101 obtains the target coordinate point set to be processed, it sends the target coordinate point set to be processed to the processing module 102. After the processing module 102 obtains the coordinate point set sent by the display module 101, it calls the trained graph processing model, and corrects the coordinate points in the target coordinate point set to be processed through the trained graph processing model to obtain the processed target coordinate point set. According to the target coordinate points in the processed target coordinate point set, the target graph is output, and then the target graph is sent to the display module to display the target graph. The graph processing method of this application can automatically correct the graph to be processed hand-drawn by the user on a drawing tool such as an electronic whiteboard into a standard graph, improving the operability of the drawing tool.

[0052] It should be noted that Figure 1 The scene schematic diagram of the shown graph processing system is only an example. The display module and the processing module described in the embodiments of this application are for more clearly explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those of ordinary skill in the art know that with the evolution of the system and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems. The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0053] Please refer to Figure 2 , Figure 2 which is the first process schematic diagram of the graph processing method provided by the embodiment of this application, applied to the above server. This image processing method includes:

[0054] Step 201: Obtain the target coordinate point set to be processed of the graph to be processed.

[0055] In this application, the graph to be processed is a non-standard graph hand-drawn by the user on a drawing tool such as an electronic whiteboard. Since the graph drawn on a drawing tool such as an electronic whiteboard can be regarded as being formed by multiple coordinate points with a time sequence relationship and arranged closely, therefore, all the coordinate points of the graph to be processed can be obtained, or a part of the coordinate points that can express the graph features can be obtained.

[0056] In one embodiment, the step of obtaining the target coordinate point set to be processed of the graph to be processed includes: obtaining the initial coordinate point set to be processed of the graph to be processed; calling the screening model; screening the coordinate points in the initial coordinate point set to be processed based on the screening model to obtain the target coordinate point set to be processed.

[0057] The initial coordinate points to be processed in the initial set of coordinate points to be processed are all the coordinate points with temporal relationships that make up the figure to be processed. For example Figure 3a As shown in the figure provided by the embodiment of the present application, the figure to be processed is a hand-drawn ΔABC, where A, B, and C are three vertices, and point D is a point on side AB. Side AB is composed of many coordinate points. Taking the screening process of the coordinate points of this small segment AD as an example, when screening the coordinate points on side AD, assuming that the first coordinate point starts from point A, according to the chronological order of the formation of the coordinate points, point D is the 6th coordinate point. First, draw a circle with point A as the center and radius R, and remove other coordinate points that fall on or inside the circle, and retain coordinate point 1, that is, as Figure 3b shown in removing coordinate point 2 and retaining coordinate point 1; then use the first coordinate point outside the circle as the center, that is, use coordinate point 3 as the center, and draw a circle with radius R to remove other coordinate points that fall on or inside the circle, and retain coordinate point 3, and so on. Part of the coordinate points are screened out from the coordinate points in the initial set of coordinate points to be processed to obtain the target set of coordinate points to be processed. Among them, the value of the radius R is set according to needs. This is not limited here. In the actual scenario, there are many coordinate points in the figure to be processed. Here, only a part of the coordinate points are selected for convenience of explanation.

[0058] Step 202: Invoke the trained graphics processing model.

[0059] In the present application, the graphics processing is a neural network model that can correct the coordinate points in the target set of coordinate points to be processed. The structure of the graphics processing model is as shown in Figure 4. The layers of the entire residual neural network include three parts, consisting of an input layer, an intermediate layer, and an output layer. The input layer extracts low-level features, and the low-level features include edges and lines. The subsequent convolutional layers extract more complex features iteratively from the previous layers. The final output layer is a fully connected layer, which integrates and maps the features extracted in the convolutional layer into a feature vector; among them, the input layer is composed of a convolutional layer and a MaxPool (maximum pooling layer). The size of the convolutional kernel is 7×7, and the number is 64. Among them, the convolutional kernel is when processing graphics. Given the set of coordinate points corresponding to the input graphics, the coordinate points in a small area of the input graphics are weighted and averaged to become each corresponding coordinate in the output graphics. The weights are defined by a function, and this function is called the convolutional kernel. The role of the convolutional layer is to extract the local features of the coordinate points in the set of coordinate points in the target set of coordinate points to be processed. Since the features obtained from the previous convolutional layer are multi-dimensional and the data volume is large, the role of the maximum pooling layer is to reduce the dimension while retaining the corresponding features while reducing the size of the convolutional kernel.

[0060] The second layer to the 16th layer are intermediate layers. The intermediate layer consists of 8 residual units, and each residual unit is composed of two identical convolutional blocks and a short connection. Each convolutional block contains a convolutional layer followed by a BN layer and a rectified linear activation function ReLU. The convolutional kernels of the convolutional layers of the first and second residual units have a size of 3×3 and a number of 64; the convolutional kernels of the convolutional layers of the third and fourth residual units have a size of 3×3 and a number of 128; the convolutional kernels of the convolutional layers of the fifth and sixth residual units have a size of 3×3 and a number of 256; the convolutional kernels of the convolutional layers of the seventh and eighth residual units have a size of 3×3 and a number of 512. Among them, the main function of the BN layer is to accelerate the training and convergence speed of the graphics processing model, control gradient explosion, prevent gradient disappearance, prevent overfitting, and the activation function. The main function of the activation function is to complete the non-linear transformation of data and solve the problem of insufficient expression and classification ability of the linear model.

[0061] Finally, the input and output of each residual unit are directly connected through a shortcut. Through the activation function Softmax, the probabilities of multiple sets of coordinate points are output, and the set with the largest probability in the set of coordinate points is determined as the target set of coordinate points.

[0062] In one embodiment, before the step of calling the trained graphics processing model, it further includes: processing the first coordinate points in the first set of coordinate points in the training sample set through the graphics processing model to be trained to obtain the second coordinate points corresponding to each first coordinate point to establish a second set of coordinate points; according to the preset loss target, loss function, the second set of coordinate points, and the target set of coordinate points corresponding to the first set of coordinate points, training the parameters of the graphics processing model to be trained to obtain target parameters; and obtaining the trained graphics processing model according to the target parameters.

[0063] When performing model training, for the set of first coordinate points corresponding to the non-standard graphics in the training sample set, the set of first coordinate points is input into the graphics processing model, and after being processed by the graphics processing model, a set of second coordinate points is output.

[0064] The above steps obtain the second set of coordinate points. Next, according to the coordinate data in the set pair composed of the target set of coordinate points and the second set of coordinate points, the parameters of the graphics processing model to be trained are trained.

[0065] In one embodiment, the step of training the parameters of the graphics processing model to be trained includes: training the parameters of the graphics processing model to be trained according to the coordinate data in the set pair composed of the target set of coordinate points and the second set of coordinate points.

[0066] Among them, the step of training the parameters of the to-be-trained graphics processing model according to the coordinate data in the set pair composed of the target coordinate point set and the second coordinate point set includes: based on the loss function, obtaining the loss data corresponding to the set pair according to the coordinate data in the set pair composed of the second coordinate point set and the target coordinate point set; adjusting the parameters in the to-be-trained graphics processing model according to the loss data until the loss data is equal to the preset loss target.

[0067] Substitute the coordinate data in the set pair composed of the second coordinate point set and the target coordinate point set into the loss function to obtain the loss data. Suppose the loss data calculated in the above steps is 0.5 and the preset loss target is 0.01. Since the loss data is greater than the preset loss target, therefore, the parameters in the graphics processing model need to be adjusted, and a new sample, that is, the set pair of coordinate points, is input again to train the graphics processing model, and new loss data is obtained. If the new loss data is greater than the preset loss target, the parameters in the graphics processing model are adjusted again, and a new sample is input for training again. Repeat such training thousands of times until the obtained loss data is less than or equal to the preset loss target, then stop training, and use the graphics processing model parameters corresponding to the preset loss target as the final model parameters of the graphics processing model, that is, the training of the graphics processing model is completed.

[0068] Step 203: Correct the coordinate points in the target coordinate points set to be processed through the trained graphics processing model to obtain the processed target coordinate points set.

[0069] Input the target coordinate points set to be processed into the trained graphics processing model. The graphics processing model corrects the target coordinate points to be processed, and finally inputs the processed target coordinate points.

[0070] Step 204: Output the target graphics according to the target coordinate points in the processed target coordinate points set.

[0071] Call the graphics generation module, input the target coordinate points into the graphics generation module, and the graphics processing model processes and automatically outputs the target graphics. The graphics generation module is not limited here as long as it can implement the function of generating graphics using coordinate points.

[0072] Step 205: Send the target graphics to the display module to display the target graphics.

[0073] In one embodiment, the processing module can send the target image to the display module by wireless or wired communication.

[0074] An embodiment of the present application provides a graphic processing method. The method first obtains a set of target coordinate points to be processed of the graphic to be processed, then calls a trained graphic processing model, and corrects the coordinate points in the set of target coordinate points to be processed through the trained graphic processing model to obtain a set of processed target coordinate points. Finally, according to the target coordinate points in the set of processed target coordinate points, a target graphic is output; the target graphic is sent to the display module to display the target graphic. The graphic processing method of the present application can automatically correct the graphic to be processed hand-drawn by the user on the drawing tool into a standard graphic, improving the operability of the drawing tool.

[0075] Based on the method described in the above embodiment, this embodiment will be further described from the perspective of a graphic processing device. Please refer to Figure 5 , Figure 5 which specifically describes the structural schematic diagram of the graphic processing device provided in the embodiment of the present application. It may include:

[0076] An acquisition module 501, configured to obtain a set of target coordinate points to be processed of the graphic to be processed;

[0077] A call module 502, configured to call a trained graphic processing model;

[0078] A processing module 503, configured to correct the coordinate points in the set of target coordinate points to be processed through the trained graphic processing model to obtain a set of processed target coordinate points;

[0079] An output module 504, configured to output a target graphic according to the target coordinate points in the set of processed target coordinate points;

[0080] A display module 505, configured to send the target graphic to the display module to display the target graphic.

[0081] In one embodiment, the acquisition module 501 includes:

[0082] A first acquisition sub-module, configured to obtain a set of initial coordinate points to be processed of the graphic to be processed;

[0083] A first call sub-module, configured to call a screening model;

[0084] A screening sub-module, configured to screen the coordinate points in the set of initial coordinate points to be processed based on the screening model to obtain a set of target coordinate points to be processed.

[0085] In specific implementation, each of the above modules and / or units can be implemented as an independent entity, or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of each of the above modules and / or units, reference can be made to the foregoing method embodiments. For the beneficial effects that can be specifically achieved, please also refer to the beneficial effects in the foregoing method embodiments, which will not be elaborated herein.

[0086] Correspondingly, an embodiment of the present application further provides an electronic device, such as Figure 6 shown. The electronic device may include a radio frequency circuit 601, a memory 602 including one or more computer-readable storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a WiFi module 607, a processor 608 including one or more processing cores, and a power supply 609 and other components. Those skilled in the art can understand that Figure 6 the structure of the electronic device shown in

[0087] does not limit the electronic device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. Among them:

[0088] The radio frequency circuit 601 can be used for receiving and sending signals during information reception or call processes. Specifically, after receiving the downlink information of the base station, it is handed over to one or more processors 608 for processing; in addition, data related to the uplink is sent to the base station. The memory 602 can be used for storing software programs and modules, and the processor 608 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The input unit 603 can be used for receiving input digital or character information, and generating keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0088] The display unit 604 can be used for displaying information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof.

[0089] The electronic device may further include at least one sensor 605, such as a light sensor, a motion sensor and other sensors. The audio circuit 606 includes a speaker, and the speaker can provide an audio interface between the user and the electronic device.

[0090] WiFi belongs to short-distance wireless transmission technology. The electronic device can help users receive and send emails, browse the web, and access streaming media through the WiFi module 607. It provides users with wireless broadband Internet access. Although Figure 6The WiFi module 607 is shown, but it can be understood that it does not belong to the essential components of the electronic device and can be completely omitted within the scope of not changing the essence of the application as needed.

[0091] The processor 608 is the control center of the electronic device, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 602, and by calling the data stored in the memory 602, it executes various functions of the electronic device and processes data, thereby monitoring the mobile phone as a whole.

[0092] The electronic device also includes a power source 609 (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the processor 608 through a power management system, thereby realizing functions such as management of charging, discharging, and power consumption management through the power management system.

[0093] Although not shown, the electronic device may also include a camera, a Bluetooth module, etc., which will not be elaborated here. Specifically in this embodiment, the processor 608 in the electronic device will, according to the following instructions, load the executable files corresponding to the processes of one or more application programs into the memory 602, and the processor 608 will run the application programs stored in the memory 602 to achieve the following functions:

[0094] Obtain the set of target coordinates to be processed of the graphics to be processed;

[0095] Call the trained graphics processing model;

[0096] Perform correction processing on the coordinate points in the set of target coordinates to be processed through the trained graphics processing model to obtain the processed set of target coordinates;

[0097] Output the target graphics according to the target coordinates in the processed set of target coordinates;

[0098] Send the target graphics to the display module to display the target graphics.

[0099] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not elaborated in a certain embodiment, reference can be made to the detailed description above, which will not be elaborated here.

[0100] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by the processor.

[0101] To this end, an embodiment of the present application provides a storage medium, which stores multiple instructions that can be loaded by a processor to implement the following functions:

[0102] Obtain a set of target coordinates to be processed for a graphic to be processed;

[0103] Invoke a trained graphic processing model;

[0104] Perform correction processing on the coordinates in the set of target coordinates to be processed through the trained graphic processing model to obtain a set of processed target coordinates;

[0105] Output a target graphic according to the target coordinates in the set of processed target coordinates;

[0106] Send the target graphic to the display module to display the target graphic.

[0107] For the specific implementation of each of the above operations, reference may be made to the previous embodiments, which will not be elaborated here.

[0108] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk, an optical disc, etc.

[0109] Since the instructions stored in the storage medium can execute the steps in any of the methods provided by the embodiments of the present application, the beneficial effects that can be achieved by any of the methods provided by the embodiments of the present application can be realized. For details, refer to the previous embodiments, which will not be elaborated here.

[0110] The above has introduced in detail a graphic processing method, device, electronic device and storage medium provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application; those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A graphic processing method, characterized in that, the graphic processing method is used in a graphic correction system, the graphic correction system includes a display module and a processing module, the graphic processing method is applied to the processing module, and the graphic processing method includes: Obtaining a set of target coordinates to be processed for the graphic to be processed, including: screening the coordinates in the initial set of coordinates to be processed for the graphic to be processed to obtain the set of target coordinates to be processed; Invoking the trained graphic processing model; Performing correction processing on the coordinates in the set of target coordinates to be processed through the trained graphic processing model to obtain a set of processed target coordinates; Outputting a target graphic according to the target coordinates in the set of processed target coordinates; the target graphic includes: standard straight lines, triangles, circles, and semi - circles; Sending the target graphic to the display module to display the target graphic.

2. The graphic processing method according to claim 1, characterized in that, the step of obtaining the set of target coordinates to be processed for the graphic to be processed includes: Obtaining the initial set of coordinates to be processed for the graphic to be processed; Invoking the screening model; Based on the screening model, screening the coordinates in the initial set of coordinates to be processed to obtain the set of target coordinates to be processed.

3. The graphic processing method according to claim 1, characterized in that, the graphic processing model includes an input layer, an intermediate layer, and an output layer. The input layer is used to extract the first features in the graphic to be processed, the intermediate layer is used to extract the second features in the first features, and the output layer is used to integrate and map the second features into a feature vector.

4. The graphic processing method according to claim 3, characterized in that, the input layer is composed of 1 convolutional layer and 1 max - pooling layer; the intermediate layer is composed of 8 residual units, and each residual unit is composed of 2 identical convolutional blocks connected by a short connection. Among them, each convolutional block is composed of 1 convolutional layer connected to a BN layer and an activation function.

5. The graphic processing method according to claim 1, characterized in that, before the step of invoking the trained graphic processing model, it further includes: Processing the first coordinates in the first coordinate set in the training sample set through the graphic processing model to be trained to obtain the second coordinates corresponding to each first coordinate to establish a second coordinate set; Performing parameter training on the graphic processing model to be trained according to a preset loss target, loss function, the second coordinate set, and the set of target coordinates corresponding to the first coordinate set to obtain target parameters; Obtaining the trained graphic processing model according to the target parameters.

6. The graphic processing method according to claim 5, characterized in that, the step of performing parameter training on the graphic processing model to be trained includes: Performing parameter training on the graphic processing model to be trained according to the coordinate data in the set pair composed of the set of target coordinates and the second coordinate set.

7. The graphic processing method according to claim 6, characterized in that, The step of training the parameters of the to-be-trained graphics processing model according to the coordinate data in the set pair composed of the target coordinate point set and the second coordinate point set includes: Based on the loss function, obtaining loss data corresponding to the set pair according to the coordinate data in the set pair composed of the second coordinate point set and the target coordinate point set; Adjusting the parameters in the to-be-trained graphics processing model according to the loss data until the loss data is equal to the preset loss target.

8. A graphics processing device Characterized in that The graphics processing device is used for a graphics correction system, the graphics correction system includes a display module and a processing module, the graphics processing device is arranged in the processing module, and the graphics processing device includes: An acquisition module, configured to acquire a target to-be-processed coordinate point set of a to-be-processed graphics, including: screening the coordinate points in the initial to-be-processed coordinate point set of the to-be-processed graphics to obtain the target to-be-processed coordinate point set; A calling module, configured to call the trained graphics processing model; A processing module, configured to perform correction processing on the coordinate points in the target to-be-processed coordinate point set through the trained graphics processing model to obtain a processed coordinate point set; An output module, configured to output a target graphics according to the target coordinate points in the processed target coordinate point set; the target graphics include: standard straight lines, triangles, circles, and semi-circles; A display module, configured to send the target graphics to the display module to display the target graphics.

9. An electronic device Characterized in that The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements the operations in the graphics processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium Characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the graphics processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information identification method and device

    CN112083870A

  • Face key point number conversion method and system, electronic equipment and storage medium

    CN112560639A

  • Drawing method for automatically correcting circle or ellipse based on electronic whiteboard and application thereof

    CN112907697A