Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a 3D graphics processing method, apparatus, processing method and electronic terminal, which are used to solve the problem that the prior art cannot efficiently and accurately convert 3D graphics into 2D graphics.
To achieve the above and other related objects, the present invention provides a 3D graphics processing method, comprising: receiving input of a 3D graphic; identifying the 3D graph according to a preset feature library; and forming a 2D graph corresponding to the 3D graph and current graph characteristics related to the 2D graph according to the identification result.
In an embodiment of the present invention, the feature library is configured to store preset feature patterns, and the 2D pattern includes a plurality of current feature patterns corresponding to the 3D pattern; wherein the method further comprises the step of modifying a preset feature pattern related to the 3D pattern according to the 3D pattern to obtain the current feature pattern related to the 3D pattern.
In an embodiment of the present invention, the current graphic feature is a plurality of features, and the method further includes a step of correcting the current graphic feature.
In an embodiment of the present invention, the step of correcting the current graphic feature includes: the specified current graphical feature is removed.
In an embodiment of the present invention, the method further includes a step of performing graph optimization on the received 3D graph, and recognizing the optimized 3D graph according to a preset feature library.
In an embodiment of the present invention, the step of performing graph optimization on the received 3D graph at least includes one of the following optimization modes: the patches approximate fit, eliminate facets, and remove redundancy.
In an embodiment of the invention, the method further comprises forming a supplementary feature related to the 2D graphics according to a selection operation on the provided specified operation interface.
In an embodiment of the invention, the step of forming the supplementary features related to the 2D graphics according to the selection operation of the provided specified operation interface comprises one or more of the following steps: selecting a stamping plane related to the 2D graph according to a provided stamping plane selection interface; selecting an X-axis direction related to the 2D graph according to a provided view X-axis selection interface; and selecting whether to display the boundary of the projection outline of the 2D graph or not according to the provided view projection mode selection interface.
In an embodiment of the invention, the method further includes recognizing the 3D graph by using a preset machine learning algorithm.
To achieve the above and other related objects, the present invention also provides a 3D graphic processing apparatus, comprising: the image receiving module is used for receiving the input of a 3D image; the pattern recognition module is used for recognizing the 3D pattern according to a preset feature library; and the graph conversion module is used for forming a 2D graph corresponding to the 3D graph and current graph characteristics related to the 2D graph according to the identification result.
In order to achieve the above and other related objects, the present invention further provides a processing method, in which the 3D graphics conversion method as described in any one of the above is applied to convert the received 3D graphics into 2D graphics, and obtain current graphics features related to the 2D graphics, and according to a preset matching relationship between the graphics features and the processing tools, the processing tools matched with the current graphics features related to the 2D graphics are selected to form a corresponding processing flow.
To achieve the above and other related objects, the present invention also provides an electronic terminal, comprising: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory so as to enable the electronic terminal to execute the 3D image processing method or the processing method.
As described above, the present invention provides a 3D graphics processing method, apparatus, processing method and electronic terminal, which mainly receives input of 3D graphics; identifying the 3D graph according to a preset feature library; and forming a 2D graph corresponding to the 3D graph and current graph characteristics related to the 2D graph according to the identification result. The invention can intelligently identify the 3D graph as the corresponding 2D graph according to the preset feature library and acquire the graph parameters related to the 3D graph. The efficiency and the accuracy of graph conversion are improved, and the processing efficiency, the accuracy and the processing quality of processing by utilizing the graph conversion are further improved.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Referring to fig. 1, fig. 1 is a flowchart illustrating a 3D graphics processing method according to an embodiment of the invention. The 3D graphics processing method comprises the following steps:
s11: receiving input of a 3D graphic;
s12: identifying the 3D graph according to a preset feature library;
s13: and forming a 2D graph corresponding to the 3D graph and current graph characteristics related to the 2D graph according to the identification result. In some embodiments, the processor is further configured to identify a secondary process based on the features to identify the 3D graphics as corresponding 2D graphics. The secondary feature recognition processing includes, for example, secondary feature distinguishing according to geometric topological rules, feature vector conversion operations, distance calculations, and coordinates, and performs feature recognition.
In an embodiment of the present invention, the feature library is configured to store preset feature patterns, and the 2D pattern includes a plurality of current feature patterns corresponding to the 3D pattern; wherein the method further comprises the step of modifying a preset feature pattern related to the 3D pattern according to the 3D pattern to obtain the current feature pattern related to the 3D pattern.
In an embodiment of the present invention, the current graphic feature is a plurality of features, and the method further includes a step of correcting the current graphic feature.
In some embodiments, the identification of the features can be regarded as a set of a series of geometric and topological relations between the geometries, and the parameter relations such as distances, positions, angles and the like between the single features are also considered for the combined features such as the double-head salad. The probability calculation of the combined information of the characteristics can be carried out by methods such as Markov chain, probability calculation and the like, and the characteristic can be classified into a certain characteristic when a certain probability is reached. The Markov chain can calculate the combined features and use the combined probability to carry out derivation.
In an embodiment of the present invention, the step of correcting the current graphic feature includes: the specified current graphical feature is removed. For example, the result of the feature search is checked and confirmed, that is, the searched feature can be retained or removed according to the actual conditions and requirements of the service, and if the searched feature is not removed, the feature is retained by default, so that the 2D graph related to the 3D graph is formed according to the feature.
In an embodiment of the present invention, the method further includes a step of performing graph optimization on the received 3D graph, and recognizing the optimized 3D graph according to a preset feature library.
In an embodiment of the present invention, the step of performing graph optimization on the received 3D graph at least includes one of the following optimization modes: the patches approximate fit, eliminate facets, and remove redundancy.
In an embodiment of the invention, the method further comprises forming a supplementary feature related to the 2D graphics according to a selection operation on the provided specified operation interface.
In an embodiment of the invention, the step of forming the supplementary features related to the 2D graphics according to the selection operation of the provided specified operation interface comprises one or more of the following steps:
selecting a stamping plane related to the 2D graph according to a provided stamping plane selection interface;
selecting an X-axis direction related to the 2D graph according to a provided view X-axis selection interface;
and selecting whether to display the boundary of the projection outline of the 2D graph or not according to the provided view projection mode selection interface. In some embodiments, a characteristic outer contour manually selected by a user can be reserved, so that an expansion function of a graph is automatically projected in the process of the graph.
In an embodiment of the invention, the method further includes recognizing the 3D graph by using a preset machine learning algorithm. The machine learning algorithm is, for example, a neural network algorithm.
In some embodiments, a processing method is further provided, in which a 3D graphics conversion method as described in fig. 1 is applied to convert a received 3D graphics into a 2D graphics, and a current graphics feature related to the 2D graphics is obtained, and according to a preset matching relationship between the graphics feature and a processing tool, a processing tool matching the current graphics feature related to the 2D graphics is selected to form a corresponding processing flow. For example, the machining method is a method of machining a metal plate.
Referring to fig. 2, fig. 2 is a schematic composition diagram of a 3D graphics processing apparatus according to an embodiment of the invention. The 3D graphics processing apparatus 1 includes: a graphics receiving module 11, a graphics recognition module 12, and a graphics conversion module 13.
The graphics receiving module 11 is configured to receive an input of a 3D graphics;
the pattern recognition module 12 is configured to recognize the 3D pattern according to a preset feature library;
the graph conversion module 13 is configured to form a 2D graph corresponding to the 3D graph and a current graph feature related to the 2D graph according to the recognition result. In some embodiments, the processor is further configured to identify a secondary process based on the features to identify the 3D graphics as corresponding 2D graphics. The secondary feature recognition processing includes, for example, secondary feature distinguishing according to geometric topological rules, feature vector conversion operations, distance calculations, and coordinates, and performs feature recognition.
In an embodiment of the present invention, the feature library is configured to store preset feature patterns, and the 2D pattern includes a plurality of current feature patterns corresponding to the 3D pattern; the 3D graphics processing apparatus 1 is further configured to modify a preset feature pattern related to the 3D graphics according to the 3D graphics to obtain the current feature pattern related to the 3D graphics.
In an embodiment of the invention, the current graphics feature is multiple, and the 3D graphics processing apparatus 1 is further configured to correct the current graphics feature.
In an embodiment of the present invention, the operation of correcting the current graphic feature includes: the specified current graphical feature is removed. For example, the result of the feature search is checked and confirmed, that is, the searched feature can be retained or removed according to the actual conditions and requirements of the service, and if the searched feature is not removed, the feature is retained by default, so that the 2D graph related to the 3D graph is formed according to the feature.
In an embodiment of the present invention, the 3D graphics processing apparatus 1 is further configured to perform graphics optimization on the received 3D graphics, and identify the optimized 3D graphics according to a preset feature library.
In an embodiment of the present invention, a method for performing graph optimization on the received 3D graph at least includes one of the following optimization methods: the patches approximate fit, eliminate facets, and remove redundancy.
In an embodiment of the invention, the method further comprises forming a supplementary feature related to the 2D graphics according to a selection operation on the provided specified operation interface.
In an embodiment of the present invention, the manner of forming the supplementary features related to the 2D graphics according to the selection operation of the provided specified operation interface includes one or more of the following:
selecting a stamping plane related to the 2D graph according to a provided stamping plane selection interface;
selecting an X-axis direction related to the 2D graph according to a provided view X-axis selection interface;
and selecting whether to display the boundary of the projection outline of the 2D graph or not according to the provided view projection mode selection interface. In some embodiments, a characteristic outer contour manually selected by a user can be reserved, so that an expansion function of a graph is automatically projected in the process of the graph.
In an embodiment of the invention, the method further includes recognizing the 3D graph by using a preset machine learning algorithm. The machine learning algorithm is, for example, a neural network algorithm.
Referring to fig. 3, fig. 3 is a schematic composition diagram of an electronic terminal according to an embodiment of the invention. The electronic terminal 2 is, for example, an intelligent data processing device such as a desktop computer or a notebook computer. It is characterized by comprising: a processor and a memory;
the memory 22 is used for storing a computer program, and the processor 21 is used for executing the computer program stored in the memory 22, so that the electronic terminal 2 executes the 3D graphics processing method and the processing method described above.
The memory 22 may comprise high speed random access memory and may also comprise non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid state storage devices. In certain embodiments, the memory 22 may also include memory 22 remote from the one or more processors 21, such as network-attached memory accessed via RF circuitry or external ports and a communication network, which may be the Internet, one or more intranets, Local Area Networks (LANs), wide area networks (WLANs), Storage Area Networks (SANs), and the like, or suitable combinations thereof. The memory controller may control access to the memory 22 by other components of the device, such as the CPU and peripheral interfaces.
The processor 21 is operatively coupled to a memory 22 and/or a non-volatile storage device. More specifically, the processor 21 may execute instructions stored in the memory 22 and/or the non-volatile storage device to perform operations in the computing device, such as generating and/or transmitting image data to an electronic display. As such, processor 21 may include one or more general purpose microprocessors, one or more application specific processors (ASICs), one or more field programmable logic arrays (FPGAs), or any combination thereof.
In summary, the present invention provides a 3D graphics processing method, apparatus, processing method and electronic terminal, which mainly receive input of 3D graphics; identifying the 3D graph according to a preset feature library; and forming a 2D graph corresponding to the 3D graph and current graph characteristics related to the 2D graph according to the identification result. The invention can intelligently identify the 3D graph as the corresponding 2D graph according to the preset feature library and acquire the graph parameters related to the 3D graph. The efficiency and the accuracy of graph conversion are improved, and the processing efficiency, the accuracy and the processing quality of processing by utilizing the graph conversion are further improved. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.