Disclosure of Invention
In order to solve the above problems, the present invention provides a method, an apparatus and a computer device for displaying sprite reorganization.
The invention provides a method for displaying sprite reorganization, which comprises the following steps:
acquiring surface body structure data of an LED display screen, selecting all first target planes from the surface body structure data according to a node selection strategy in a preset graph structure relationship to serve as graph structure nodes, and acquiring connecting lines between the first target planes to serve as connecting edges of the graph structure nodes to form a first graph structure;
calculating a first weight value of the connecting edge between the graph structure nodes in the first graph structure according to a preset intensity function; performing weighted sum on the first weight value in the first graph structure to obtain a first total weight value corresponding to the first graph structure;
splitting each surface body structure of the LED display screen according to a preset surface body splitting strategy to obtain a plurality of second target planes, and acquiring display sub-pictures to be displayed on the LED display screen corresponding to the second target planes; converting a plurality of second target planes into a plurality of split graph structure nodes according to a preset graph structure relationship, acquiring connecting lines between the second target planes as connecting edges of the split graph structure nodes, and generating a plurality of second graph structures;
calculating a second weight value of the connecting edge between the nodes of the split graph structure in the second graph structure according to a preset intensity function; performing weighted sum on the second weight value in each second graph structure to obtain a second total weight value corresponding to each second graph structure;
comparing the first total weight value with each second total weight value one by one to obtain a loss value corresponding to the first graph structure and each second graph structure in the LED display screen, and selecting the second target plane corresponding to the second graph structure with the minimum loss value; and assembling the display sub-pictures corresponding to the selected second target plane into a complete display picture according to the second picture structure with the minimum loss value.
Optionally, the obtaining of each facet body structure data of the LED display screen includes:
receiving size data and resolution of each side in each side body of the LED display screen;
and converting each surface body of the LED display screen in an equal proportion according to the resolution and the size data of each side to obtain the structure data of each surface body.
Optionally, wherein the method further comprises:
when the weight values of the connecting edges between the nodes are calculated according to the intensity function, when a target plane is collinear and coplanar, a standard intensity function Y is preset to be F (X), wherein F (X) is a constant, and X is a collinear length;
when the target planes are collinear and not coplanar, the special-shaped intensity function is preset to be one tenth of the standard intensity function,
4. the method of claim 1, further comprising:
when the weighted values are weighted and the total weighted value of the surface body structure is obtained, the length of the connecting edge of each surface body structure is multiplied by the corresponding weighted value to obtain the multiplied value of the connecting edge;
and adding the multiplied values of all the connected edges to obtain a total weight value.
Optionally, wherein the method further comprises:
when each surface body structure of the LED display screen is split according to a preset surface body splitting strategy, randomly determining a vertex in the surface body structure as a splitting point;
and splitting each face of the face-body structure by the splitting point according to a face-body splitting strategy to obtain a target plane with collinear coplanarity.
In another aspect, the present invention further provides an apparatus for displaying a sprite reorganization, including: the device comprises a first target plan structure data acquisition module, a first total weight value calculation module, a second target plan structure data acquisition module, a second total weight value calculation module and a display sub-picture recombination module; wherein,
the first target plane graph structure data acquisition module acquires surface body structure data of the LED display screen, selects all first target planes from the surface body structure data as graph structure nodes according to a node selection strategy in a preset graph structure relationship, and acquires connecting lines between the first target planes as connecting edges of the graph structure nodes to form a first graph structure;
the first total weight value calculation module is connected with the first target plan structure data acquisition module and calculates a first weight value of the connecting edge between the graph structure nodes in the first graph structure according to a preset intensity function; carrying out weighted sum on the first weight values in the first graph structure to obtain a first total weight value corresponding to the first graph structure;
the second target plane graph structure data acquisition module is connected with the first total weight value calculation module, splits each surface body structure of the LED display screen according to a preset surface body splitting strategy to obtain a plurality of second target planes, and acquires display sub-pictures to be displayed on the LED display screen corresponding to the second target planes; converting the second target planes into a plurality of split graph structure nodes according to a preset graph structure relationship, acquiring connecting lines between the second target planes as connecting edges of the split graph structure nodes, and generating a plurality of second graph structures;
the second total weight value calculation module is connected with the second target plan structure data acquisition module and calculates a second weight value of the connecting edge between the split plan structure nodes in the second plan structure according to a preset intensity function; performing weighted sum on the second weight value in each second graph structure to obtain a second total weight value corresponding to each second graph structure;
the display sub-picture recombination module is connected with the first total weight value calculation module and the second total weight value calculation module, and is used for performing one-to-one comparison operation on the first total weight value and each second total weight value to obtain a loss value corresponding to the first graph structure and each second graph structure in the LED display screen, and selecting the second target plane corresponding to the second graph structure with the minimum loss value; and assembling the display sub-pictures corresponding to the selected second target plane into a complete display picture according to the second picture structure with the minimum loss value.
Optionally, the first target plan structure data obtaining module includes: the system comprises an LED display screen data acquisition unit and a target plan view structure data acquisition unit; wherein,
the LED display screen data acquisition unit receives the size data and the resolution of each side in each side body of the LED display screen;
and the target plan view structure data acquisition unit is connected with the LED display screen data acquisition unit, and each surface body of the LED display screen is converted in an equal proportion according to the resolution and the size data of each side to obtain the structure data of each surface body.
Optionally, wherein the apparatus further comprises: and the weighted value calculation module of the connecting edge is connected with the first weighted total value calculation module and the second weighted total value calculation module and is used for:
when the weight values of the connecting edges between the nodes are calculated according to the intensity function, when a target plane is collinear and coplanar, a standard intensity function Y is preset to be F (X), wherein F (X) is a constant, and X is a collinear length;
when the target planes are collinear and not coplanar, the special-shaped intensity function is preset to be one tenth of the standard intensity function,
optionally, wherein the apparatus further comprises: the total weight value weighting calculation module is connected with the first total weight value calculation module and the second total weight value calculation module and is used for:
when the weighted values are weighted and the total weighted value of the surface body structure is obtained, the length of the connecting edge of each surface body structure is multiplied by the corresponding weighted value to obtain the multiplied value of the connecting edge;
and adding the multiplied values of all the connected edges to obtain a total weight value.
In still another aspect, the present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for displaying sprite reorganization according to any one of claims 1 to 5 when executing the computer program.
The method, the device and the computer equipment for recombining the display sprites, provided by the invention, have the advantages that the polygon body is divided into a plurality of planes, each plane represents a node in the graph, an edge can be formed between every two nodes, and each edge is endowed with a weight value (strength). The graph structure with the minimum loss value is determined through the total weight value, namely the split picture determined by the loss value is determined, so that the sub-pictures displayed under the split scheme are automatically recombined into the display picture.
According to the graph structure designed by the proposal, the surfaces and lines in a polyhedral structure are replaced by nodes and connecting edges, so that the connection strength relation between pictures is expressed in a numerical value form, and further, in the picture recombination process, the situation that small difference exists between a reconstructed graph and an original image can be guaranteed to the maximum extent.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment of the present invention, as shown in fig. 1, a schematic flow chart of steps of a method for displaying a sprite reorganization in this embodiment is shown, where the method is applied in a terminal client display system, and the method includes the following steps:
step 101, obtaining surface body structure data of the LED display screen, selecting all first target planes from the surface body structure data according to a node selection strategy in a preset graph structure relationship to serve as graph structure nodes, and obtaining connecting lines between the first target planes to serve as connecting edges of the graph structure nodes to form a first graph structure.
102, calculating a first weight value of a connecting edge between graph structure nodes in a first graph structure according to a preset intensity function; and carrying out weighted sum on the first weight values in the first graph structure to obtain a first total weight value corresponding to the first graph structure.
103, splitting each surface body structure of the LED display screen according to a preset surface body splitting strategy to obtain a plurality of second target planes, and acquiring display sub-pictures to be displayed on the LED display screen corresponding to the second target planes; and converting the plurality of second target planes into a plurality of split graph structure nodes according to a preset graph structure relationship, acquiring connecting lines between the second target planes as connecting edges of the split graph structure nodes, and generating a plurality of second graph structures.
Step 104, calculating a second weight value of a connecting edge between nodes of a split graph structure in a second graph structure according to a preset intensity function; and carrying out weighted sum on the second weight values in each second graph structure to obtain a second total weight value corresponding to each second graph structure.
Step 105, performing one-to-one comparison operation on the first total weight value and each second total weight value to obtain loss values corresponding to the first graph structure and each second graph structure in the LED display screen, and selecting a second target plane corresponding to the second graph structure with the minimum loss value; and assembling the display sub-pictures corresponding to the selected second target plane into a complete display picture according to the second picture structure with the minimum loss value.
When the display screen is the special-shaped LED display screen, acquiring a polyhedral structure corresponding to the special-shaped LED display screen; the polyhedron structure is changed into the display interface of the user software in an equal proportion according to the resolution ratio of the actual special-shaped LED display screen, for example, a file which is specified by drawing software and is related to the special-shaped LED display screen is imported into the display interface of the user software, wherein the polyhedron structure can display the length of each edge after equal proportion conversion.
Each second target plane corresponds to one display sub-picture, and each display sub-picture is the content displayed in each display area of the special-shaped LED display screen; the preset splitting principle is that a vertex positioned in a polyhedron structure is randomly determined, the polyhedron is split by taking the vertex as a splitting point, and a plurality of second target planes (triangles) which are collinear and non-coplanar or collinear and coplanar or second target planes which exist in both are obtained. Each second target plane represents a node of the split graph structure, an edge can be formed between every two nodes, each edge is assigned with a weight value, a plurality of second graph structures are correspondingly obtained according to different split vertexes, second total weight values are correspondingly corresponded respectively, the second graph structure with the minimum loss value is determined through the first total weight value and the second total weight value, namely, the split picture with the minimum loss value is determined, so that the display sub-pictures under the split scheme are automatically recombined into a display picture containing all the display sub-pictures (the specific combination mode is that the connection conditions between the nodes of the second graph structure are combined, such as the nodes 1-2 of the second graph structure, the display sub-pictures corresponding to the nodes 1-2 are combined into the display sub-pictures corresponding to the nodes 1-2, and 2 of the display sub-pictures are explained herein, the method for reorganizing the image is uniformly referred to, therefore, the proposal is not influenced by the display picture of the source image, the accuracy of automatic reorganization can be improved, manual adjustment and combination are not needed, and the time spent in reorganization is reduced.
In the graph structure designed by the proposal, the surfaces and lines in a polyhedron structure are replaced by nodes and connecting edges, so that the connection strength relationship between the pictures is expressed in a numerical form, and further, in the picture recombination process, the small difference between the reconstructed graph and the original image can be maximally ensured.
In some optional embodiments, as shown in fig. 2, which is a schematic flow chart of steps of the second method for recombining display sub-frames in this embodiment, different from fig. 1, the method for obtaining each surface body structure data of an LED display screen includes:
step 201, receiving size data and resolution of each side in each side body of the LED display screen;
step 202, each face body of the LED display screen is converted in equal proportion according to the resolution and the size data of each side to obtain the structure data of each face body.
In some optional embodiments, as shown in fig. 3, which is a schematic flow chart of steps of a third method for displaying a sub-frame reorganization in this embodiment, different from that in fig. 1, the method further includes:
step 301, when calculating the weight values of the connecting edges between the nodes according to the intensity function, when the target plane is collinear and coplanar, presetting a standard intensity function Y as f (X), where f (X) is a constant, and X is a collinear length.
Step 302, when the target planes are collinear and not coplanar, presetting the special-shaped intensity function to be one tenth of the standard intensity function,
in some optional embodiments, as shown in fig. 4, a schematic flow chart of steps of a fourth method for displaying a sub-frame reorganization in this embodiment is shown, which is different from that in fig. 1, further includes:
step 401, when weighting the weight values and calculating the total weight value of the surface body structure, multiplying the length of the connecting edge of each surface body structure by the corresponding weight value to obtain the multiplied value of the connecting edge.
And step 402, adding the multiplication values of all the connection edges to obtain a total weight value.
In some optional embodiments, as shown in fig. 5, a schematic flow chart of steps of a fifth method for displaying a sub-frame reorganization in this embodiment is shown, which is different from that in fig. 1, further includes:
step 501, when each surface body structure of the LED display screen is split according to a preset surface body splitting strategy, randomly determining a vertex in the surface body structure as a splitting point.
And 502, splitting each surface of the surface body structure by a splitting point according to a surface body splitting strategy to obtain a target plane with collinear coplanarity.
In an embodiment, the length of the connecting edge between the nodes is adjusted according to the size of the weight value, so as to finally form a graph structure with adjustable length, wherein the longer the length of the connecting edge is, the stronger the strength (weight value) is, and at this time, the graph structure with the minimum loss value can be artificially and visually determined. When two or more polyhedron structures exist, loss values can be calculated respectively, and then the two or more loss values are added to obtain the loss value of an integral structure. In this embodiment, if a triangular pyramid polyhedron structure is used, 4 second diagram structures can be split according to a preset splitting rule, which are: (1) with 1 as the vertex, the second target plane includes triangles 142, 413, 432, 231, respectively; (2) with 2 as the vertex, the second object plane includes triangles 231, 324, 341, 142, respectively; (3) with 3 as the vertex, the second target plane includes triangles 324, 231, 214, 413; (4) with 4 as the vertex, the second target plane includes triangles 413, 142, 123, 324, respectively, as shown in fig. 6, which is the second diagram structure of the (4) th type.
In some optional embodiments, as shown in fig. 7, a schematic structural diagram of an apparatus 700 for displaying a sprite reorganization in this embodiment is used to implement the method for displaying a sprite reorganization, and specifically, the apparatus includes: a first target plan structure data acquisition module 701, a first total weight value calculation module 702, a second target plan structure data acquisition module 703, a second total weight value calculation module 704 and a display sub-screen reorganization module 705.
The first target plane graph structure data acquisition module 701 acquires the surface body structure data of the LED display screen, selects all the first target planes from the surface body structure data as graph structure nodes according to a node selection strategy in a preset graph structure relationship, and acquires connecting lines between the first target planes as connecting edges of the graph structure nodes to form a first graph structure.
A first total weight value calculation module 702, connected to the first target plan structure data acquisition module 701, for calculating a first weight value of a connection edge between graph structure nodes in the first graph structure according to a preset intensity function; and carrying out weighted sum on the first weight values in the first graph structure to obtain a first total weight value corresponding to the first graph structure.
The second target plane graph structure data acquisition module 703 is connected to the first total weight value calculation module 702, splits each surface body structure of the LED display screen according to a preset surface body splitting strategy to obtain a plurality of second target planes, and acquires display sub-pictures to be displayed on the LED display screen corresponding to the second target planes; and converting the second target planes into a plurality of split graph structure nodes according to a preset graph structure relationship, acquiring connecting lines between the second target planes as connecting edges of the split graph structure nodes, and generating a plurality of second graph structures.
A second total weight value calculating module 704, connected to the second target plan structure data obtaining module 702, for calculating a second weight value of a connecting edge between nodes of the split graph structure in the second graph structure according to a preset intensity function; and performing weighted sum on the second weight values in each second graph structure to obtain a second total weight value corresponding to each second graph structure.
A display sub-picture recombination module 705, connected to the first total weight value calculation module 702 and the second total weight value calculation module 704, for performing a one-to-one comparison operation on the first total weight value and each second total weight value to obtain a loss value corresponding to the first graph structure and each second graph structure in the LED display screen, and selecting a second target plane corresponding to the second graph structure with the smallest loss value; and assembling the display sub-pictures corresponding to the selected second target plane into a complete display picture according to the second picture structure with the minimum loss value.
In some optional embodiments, as shown in fig. 8, which is a schematic structural diagram of an apparatus 800 for displaying a sub-frame reorganization in the second embodiment, different from fig. 7, a first target plan view structural data obtaining module 701 includes: an LED display screen data acquisition unit 711, and a target plan view configuration data acquisition unit 712.
The LED display screen data obtaining unit 711 receives size data and resolution of each side of each surface body of the LED display screen.
And the target plan view structure data acquisition unit 712 is connected with the LED display screen data acquisition unit 711, and transforms each facet body of the LED display screen in equal proportion according to the resolution and the size data of each facet to obtain the structure data of each facet body.
In some optional embodiments, as shown in fig. 9, a schematic structural diagram of an apparatus 900 for recombining a third display sub-frame in this embodiment is different from that in fig. 7, further including: the weighted value calculating module 901 of the connecting edge is connected to the first weighted total value calculating module 702 and the second weighted total value calculating module 704, and is configured to:
when the weight values of the connecting edges between the nodes are calculated according to the intensity function, when the target plane is collinear and coplanar, a standard intensity function Y is preset to be F (X), wherein F (X) is a constant, and X is the collinear length.
When the target planes are collinear and not coplanar, the special-shaped intensity function is preset to be one tenth of the standard intensity function,
in some optional embodiments, as shown in fig. 10, a schematic structural diagram of an apparatus 1000 for recombining a fourth display sub-frame in this embodiment is different from that in fig. 7, further including: a total weight value weighting calculation module 1001, connected to the first total weight value calculation module 702 and the second total weight value calculation module 704, for:
and when the weighted values are weighted and the total weighted value of the surface body structure is obtained, multiplying the length of the connecting edge of each surface body structure by the corresponding weighted value to obtain the multiplied value of the connecting edge.
And adding the multiplication values of all the connected edges to obtain a total weight value.
In some optional embodiments, there is further provided a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for displaying sprite reorganization as above when executing the computer program.
The terms and expressions used in the specification of the present invention have been set forth for illustrative purposes only and are not meant to be limiting. It will be appreciated by those skilled in the art that changes could be made to the details of the above-described embodiments without departing from the underlying principles thereof. The scope of the invention is, therefore, indicated by the appended claims, in which all terms are intended to be interpreted in their broadest reasonable sense unless otherwise indicated.