CN111461960B - Multi-layer matrix transformation method and device - Google Patents

Multi-layer matrix transformation method and device Download PDF

Info

Publication number
CN111461960B
CN111461960B CN202010196367.0A CN202010196367A CN111461960B CN 111461960 B CN111461960 B CN 111461960B CN 202010196367 A CN202010196367 A CN 202010196367A CN 111461960 B CN111461960 B CN 111461960B
Authority
CN
China
Prior art keywords
matrix
layer
camera
transformation
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010196367.0A
Other languages
Chinese (zh)
Other versions
CN111461960A (en
Inventor
陈竞郴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN202010196367.0A priority Critical patent/CN111461960B/en
Publication of CN111461960A publication Critical patent/CN111461960A/en
Application granted granted Critical
Publication of CN111461960B publication Critical patent/CN111461960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Apparatus Associated With Microorganisms And Enzymes (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)
  • Ropes Or Cables (AREA)

Abstract

The invention discloses a method, a medium, equipment and a device for multi-layer matrix transformation, wherein the method comprises the following steps: the method comprises the steps of obtaining a material, judging whether the material contains a plurality of first virtual layers, and calculating a first layer model matrix corresponding to each first virtual layer when the material contains the plurality of first virtual layers; obtaining sequencing information of a plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information; acquiring an original model matrix of a material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix; the method and the device can meet the transformation requirements of multiple layers when the material transformation relates to multiple layers, and the material transformation is suitable for a multi-layer complex reference system.

Description

Multi-layer matrix transformation method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method for transforming a multi-layer matrix, a computer-readable storage medium, a computer device, and a device for transforming a multi-layer matrix.
Background
In the related art, when a material is transformed, only a model view projection matrix is used for transforming the material. When the material transformation relates to a plurality of layers, the standard transformation matrix is difficult to meet the requirement of the material transformation; furthermore, it is difficult to add a plurality of dynamic reference objects, and the system cannot be adapted to a multi-layer complex reference system.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide a multi-layer matrix transformation method, which can satisfy the transformation requirements of multiple layers when the material transformation involves multiple layers, and make the material transformation suitable for a multi-layer complex reference system.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
A fourth object of the present invention is to provide a multilayer matrix converting apparatus.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for multi-layer matrix transformation, including the following steps: the method comprises the steps of obtaining materials, judging whether the materials contain a plurality of first virtual layers or not, and calculating a first layer model matrix corresponding to each first virtual layer when the materials contain the plurality of first virtual layers; obtaining sequencing information of a plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information; the method comprises the steps of obtaining an original model matrix of a material, generating a final model matrix of the material according to the original model matrix and a first layer model matrix after superposition, and transforming the material according to the final model matrix.
According to the multi-layer matrix transformation method, firstly, a material is obtained, whether the material comprises a plurality of first virtual layers or not is judged, and when the material comprises the plurality of first virtual layers, a first layer model matrix corresponding to each first virtual layer is calculated; then, obtaining sequencing information of the plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information; then, acquiring an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In addition, the multi-layer matrix transformation method proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, the method further comprises: acquiring camera parameters, and calculating a base vector of a camera according to the camera parameters; judging whether the camera comprises a plurality of second virtual layers or not, and calculating a second layer model matrix corresponding to each second virtual layer when the camera comprises the plurality of second virtual layers; and calculating a transformation matrix of the camera according to the base vector and the superposed second layer model matrix so as to transform the material according to the transformation matrix.
Optionally, the camera parameters include: camera position information, target position information, orientation information, and rotation values.
Optionally, calculating a base vector of the camera according to the camera parameters includes: calculating an orientation vector according to the camera position information and the target position information, and calculating a base vector according to the orientation vector; and updating the basis vectors according to the orientation information and the rotation values respectively.
Optionally, calculating a transformation matrix of the camera according to the basis vector and the superimposed second layer model matrix, including: updating the base vector and the camera position information according to the overlapped second layer model matrix, and calculating a view matrix of the camera according to the updated camera position information, the orientation vector and an up vector in the updated base vector; acquiring camera included angle information and camera depth information, and calculating a projection matrix of a camera according to the camera included angle information and the camera depth information; calculating a transformation matrix of the camera from the view matrix and the projection matrix.
To achieve the above object, a second aspect of the present invention provides a computer-readable storage medium, on which a multi-layer matrix transformation program is stored, which when executed by a processor implements the multi-layer matrix transformation method as described above.
According to the computer-readable storage medium of the embodiment of the present invention, a multi-layer matrix transformation program is stored, so that a processor implements the multi-layer matrix transformation method as described above when executing the multi-layer matrix transformation program; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
To achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the multi-layer matrix transformation method as described above.
According to the computer device of the embodiment of the present invention, the multi-layer matrix transformation program is stored by the memory, so that the processor implements the multi-layer matrix transformation method as described above when executing the multi-layer matrix transformation program stored on the memory; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In order to achieve the above object, a fourth aspect of the present invention provides a multi-layer matrix transformation apparatus, including: the acquisition module is used for acquiring materials; the judging module is used for judging whether the material contains a plurality of first virtual layers; the calculation module is used for calculating a first layer model matrix corresponding to each first virtual layer when the material contains a plurality of first virtual layers; the obtaining module is further configured to obtain ordering information of the plurality of first virtual image layers; the calculation module is further configured to sequentially superimpose the first layer model matrix according to the sorting information; the transformation module is used for obtaining an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix.
According to the multi-layer matrix transformation device provided by the embodiment of the invention, the acquisition module is arranged for acquiring materials; the judging module is used for judging whether the material contains a plurality of first virtual layers; the calculation module is used for calculating a first layer model matrix corresponding to each first virtual layer when the material comprises a plurality of first virtual layers; the obtaining module is further configured to obtain ordering information of the plurality of first virtual layers; the calculation module is also used for sequentially superposing the first layer model matrix according to the sequencing information; the transformation module is used for acquiring an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In addition, the multi-layer matrix transformation apparatus proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, the acquiring module is further configured to acquire a camera parameter; the calculation module is further used for calculating a base vector of the camera according to the camera parameters; the judging module is further used for judging whether the camera comprises a plurality of second virtual layers; the calculation module is further configured to calculate a second layer model matrix corresponding to each second virtual layer when the camera includes a plurality of second virtual layers; the obtaining module is further configured to obtain ordering information of the plurality of second virtual layers; the transformation module is further used for sequentially superposing the second layer model matrix according to the sequencing information of the second virtual layer, calculating a transformation matrix of the camera according to the base vector and the superposed second layer model matrix, and transforming the material according to the transformation matrix.
Optionally, the acquiring module is further configured to acquire a camera parameter;
the calculation module is further used for calculating a base vector of the camera according to the camera parameters;
the judging module is further used for judging whether the camera comprises a plurality of second virtual layers;
the calculation module is further configured to calculate a second layer model matrix corresponding to each second virtual layer when the camera includes a plurality of second virtual layers;
the obtaining module is further configured to obtain ordering information of the plurality of second virtual layers;
the transformation module is further used for sequentially superposing the second layer model matrix according to the sequencing information of the second virtual layer, calculating a transformation matrix of the camera according to the base vector and the superposed second layer model matrix, and transforming the material according to the transformation matrix.
Drawings
FIG. 1 is a flowchart illustrating a multi-layer matrix transformation method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a multi-layer matrix transformation method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a multi-layer matrix transformation method according to another embodiment of the present invention;
fig. 4 is a block diagram of a multi-layer matrix transformation apparatus according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the related art, when material transformation relates to a plurality of layers, a standard transformation matrix is difficult to meet the requirement of material transformation; moreover, a plurality of dynamic reference objects are difficult to add, and the method cannot adapt to a multi-layer complex reference system; according to the multi-layer matrix transformation method, firstly, a material is obtained, whether the material comprises a plurality of first virtual layers or not is judged, and when the material comprises the plurality of first virtual layers, a first layer model matrix corresponding to each first virtual layer is calculated; then, obtaining sequencing information of the plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information; then, acquiring an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Fig. 1 is a schematic flowchart of a multi-layer matrix transformation method according to an embodiment of the present invention, and as shown in fig. 1, the multi-layer matrix transformation method includes the following steps:
s101, obtaining a material, judging whether the material contains a plurality of first virtual layers, and calculating a first layer model matrix corresponding to each first virtual layer when the material contains the plurality of first virtual layers.
That is, a material (for example, a picture, or a video segment, etc.) to be processed is first obtained, where the material may further include virtual layer information corresponding to the material; furthermore, whether the material contains a plurality of first virtual layers can be judged according to the virtual layer information contained in the material, and if the material contains a plurality of first virtual layers, a first layer model matrix corresponding to each first virtual layer is calculated one by one; and if the material only has one virtual layer, directly calculating a layer model matrix of the virtual layer.
It should be noted that, a plurality of virtual layers are added, the plurality of virtual layers may form a top-down chain system, each virtual layer may be added with different attributes, and the types of the attributes may be various. For example: translation, rotation, zoom, orientation adjustment, anchor point adjustment, and the like. Therefore, a plurality of dynamic reference objects can be added to the material through the virtual layer, so that the transformation process is suitable for a multi-layer complex reference system.
S102, obtaining the sequencing information of the plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information.
That is to say, in the plurality of first virtual layers, each virtual layer has corresponding sequencing information, so that the first layer model matrices can be superimposed in sequence according to the sequencing of the plurality of first virtual layers, so as to obtain the layer model matrices of the plurality of virtual layers.
S103, an original model matrix of the material is obtained, a final model matrix of the material is generated according to the original model matrix and the superposed first layer model matrix, and the material is transformed according to the final model matrix.
That is to say, in this embodiment, the virtual layer has a corresponding material adjustment attribute, and the material itself may also have a corresponding adjustment attribute; and further, an original model matrix of the material is further obtained, a final model matrix of the material is calculated according to the original model matrix and the layer model matrixes of the plurality of virtual layers after superposition, and the material is transformed according to the final model matrix.
In some embodiments, in order to further improve the applicability of the multi-layer matrix transformation method provided in the embodiment of the present invention, as shown in fig. 2, the multi-layer matrix transformation method further includes:
s201, camera parameters are obtained, and a base vector of the camera is calculated according to the camera parameters.
S202, judging whether the camera comprises a plurality of second virtual layers or not, and calculating a second layer model matrix corresponding to each second virtual layer when the camera comprises the plurality of second virtual layers.
S203, obtaining the sequencing information of the plurality of second virtual layers, sequentially superposing the second layer model matrixes according to the sequencing information of the second virtual layers, and calculating a transformation matrix of the camera according to the base vector and the superposed second layer model matrixes so as to transform the materials according to the transformation matrix.
That is to say, the camera may be correspondingly provided with a plurality of virtual layers, and when it is determined that the camera includes a plurality of virtual layers, first, a second layer model matrix corresponding to each second virtual layer is calculated, and the calculated second layer model matrices are sequentially superimposed according to the sequence of the plurality of second virtual layers, so as to obtain layer model matrices corresponding to the plurality of virtual layers corresponding to the camera, and then, a transformation matrix of the camera is generated according to the calculation result. Therefore, the camera can add a plurality of dynamic reference objects to be suitable for the multilayer reference system.
The camera parameters may include various data.
As an example, the camera parameters include: camera position information, target position information, orientation information, and rotation values.
There are many ways to calculate the base vector of the camera according to the camera parameters.
As an example, computing a base vector for a camera from camera parameters includes: calculating an orientation vector according to the camera position information and the target position information, and calculating a base vector according to the orientation vector; and updating the base vectors according to the orientation information and the rotation values respectively.
In some embodiments, calculating a transformation matrix of the camera according to the basis vectors and the superimposed second layer model matrix includes:
updating the base vector and the camera position information according to the superposed second layer model matrix, and calculating a view matrix of the camera according to the updated camera position information, the orientation vector and an up vector in the updated base vector;
acquiring camera included angle information and camera depth information, and calculating a projection matrix of the camera according to the camera included angle information and the camera depth information;
a transformation matrix for the camera is calculated from the view matrix and the projection matrix.
In an embodiment of the present invention, as shown in fig. 3, a method for transforming a multi-layer matrix according to an embodiment of the present invention includes the following steps:
s301, acquiring the material.
S302, judging whether the material contains a plurality of first virtual layers; if so, step S303 is performed.
S303, calculating a first layer model matrix corresponding to each first virtual layer.
S304, obtaining the sequencing information of the plurality of first virtual layers.
S305, sequentially superposing the first layer model matrix according to the sequencing information.
And S306, acquiring an original model matrix of the material.
And S307, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix.
S308, calculating an orientation vector according to the camera position information and the target position information, and calculating a base vector according to the orientation vector.
S309, the basis vectors are updated according to the orientation information and the rotation value.
S310, judging whether the camera comprises a plurality of second virtual layers; if so, step S311 is performed.
S311, calculating a second layer model matrix corresponding to each second virtual layer.
S312, obtaining the sequencing information of the plurality of second virtual layers.
And S313, sequentially superposing the second layer model matrix according to the sequencing information of the second virtual layer.
And S314, updating the base vector and the camera position information according to the overlapped second layer model matrix.
And S315, calculating a view matrix of the camera according to the updated camera position information, the orientation vector and the up vector in the updated base vector.
And S316, acquiring the camera angle information and the camera depth information, and calculating a projection matrix of the camera according to the camera angle information and the camera depth information.
And S317, calculating a transformation matrix of the camera according to the view matrix and the projection matrix.
And S318, transforming the material according to the final model matrix and the transformation matrix.
In summary, according to the method for converting a multi-layer matrix in an embodiment of the present invention, first, a material is obtained, whether the material includes a plurality of first virtual layers is determined, and when the material includes a plurality of first virtual layers, a first layer model matrix corresponding to each first virtual layer is calculated; then, obtaining sequencing information of the plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information; then, acquiring an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In order to implement the foregoing embodiments, an embodiment of the present invention further provides a computer-readable storage medium, on which a multi-layer matrix transformation program is stored, and the multi-layer matrix transformation program, when executed by a processor, implements the multi-layer matrix transformation method as described above.
According to the computer-readable storage medium of the embodiment of the present invention, a multi-layer matrix transformation program is stored, so that a processor implements the multi-layer matrix transformation method as described above when executing the multi-layer matrix transformation program; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In order to implement the foregoing embodiment, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the multi-layer matrix transformation method as described above is implemented.
According to the computer device of the embodiment of the invention, the multi-layer matrix transformation program is stored through the memory, so that the processor can realize the multi-layer matrix transformation method when executing the multi-layer matrix transformation program stored on the memory; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
In order to implement the foregoing embodiment, an embodiment of the present invention further provides a multi-layer matrix transformation apparatus, as shown in fig. 4, where the multi-layer matrix transformation apparatus includes: the device comprises an acquisition module 10, a judgment module 20, a calculation module 30 and a transformation module 40.
The obtaining module 10 is used for obtaining materials;
the judging module 20 is configured to judge whether the material includes a plurality of first virtual layers;
the calculating module 30 is configured to calculate a first layer model matrix corresponding to each first virtual layer when the material includes a plurality of first virtual layers;
the obtaining module 10 is further configured to obtain ordering information of the plurality of first virtual layers;
the calculation module 30 is further configured to sequentially superimpose the first layer model matrix according to the sorting information;
the transformation module 40 is configured to obtain an original model matrix of the material, generate a final model matrix of the material according to the original model matrix and the superimposed first layer model matrix, and transform the material according to the final model matrix.
In some embodiments, the acquisition module 10 is further configured to acquire camera parameters;
the calculation module 30 is further configured to calculate a base vector of the camera according to the camera parameters;
the determining module 20 is further configured to determine whether the camera includes a plurality of second virtual layers;
the calculating module 30 is further configured to calculate a second layer model matrix corresponding to each second virtual layer when the camera includes a plurality of second virtual layers;
the obtaining module 10 is further configured to obtain ordering information of a plurality of second virtual layers;
the transformation module 40 is further configured to sequentially superimpose the second layer model matrix according to the sorting information of the second virtual layer, calculate a transformation matrix of the camera according to the basis vector and the superimposed second layer model matrix, and transform the material according to the transformation matrix.
In some embodiments, the camera parameters include: camera position information, target position information, orientation information, and rotation values.
It should be noted that the above description about the multi-layer matrix transformation method in fig. 1 is also applicable to the multi-layer matrix transformation apparatus, and is not repeated herein.
In summary, according to the multi-layer matrix transformation apparatus in the embodiment of the present invention, the obtaining module is configured to obtain the material; the judging module is used for judging whether the material contains a plurality of first virtual layers; the calculation module is used for calculating a first layer model matrix corresponding to each first virtual layer when the material comprises a plurality of first virtual layers; the obtaining module is further configured to obtain ordering information of the plurality of first virtual layers; the calculation module is also used for sequentially superposing the first layer model matrix according to the sequencing information; the transformation module is used for acquiring an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix; therefore, when the material transformation relates to a plurality of layers, the transformation requirements of the plurality of layers are met, and the material transformation is suitable for a multi-layer complex reference system.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "above," and "over" a second feature may be directly on or obliquely above the second feature, or simply mean that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present invention, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A multi-layer matrix transformation method is characterized by comprising the following steps;
the method comprises the steps of obtaining a material, judging whether the material contains a plurality of first virtual layers, and calculating a first layer model matrix corresponding to each first virtual layer when the material contains the plurality of first virtual layers;
obtaining sequencing information of a plurality of first virtual layers, and sequentially superposing the first layer model matrixes according to the sequencing information;
the method comprises the steps of obtaining an original model matrix of a material, generating a final model matrix of the material according to the original model matrix and a first layer model matrix after superposition, and transforming the material according to the final model matrix.
2. The method for multilayer matrix transformation according to claim 1, further comprising:
acquiring camera parameters, and calculating a base vector of a camera according to the camera parameters;
judging whether the camera comprises a plurality of second virtual layers or not, and calculating a second layer model matrix corresponding to each second virtual layer when the camera comprises the plurality of second virtual layers;
and obtaining sequencing information of a plurality of second virtual layers, sequentially superposing the second layer model matrixes according to the sequencing information of the second virtual layers, and calculating a transformation matrix of the camera according to the base vector and the superposed second layer model matrixes so as to transform the material according to the transformation matrix.
3. The method of multilayer matrixing of claim 2 wherein the camera parameters include: camera position information, target position information, orientation information, and rotation values.
4. The method for multilayer matrix transformation according to claim 3, wherein calculating a base vector of a camera based on the camera parameters comprises:
calculating an orientation vector according to the camera position information and the target position information, and calculating a base vector according to the orientation vector;
and updating the basis vectors according to the orientation information and the rotation values respectively.
5. The method according to claim 4, wherein calculating a transformation matrix of the camera according to the basis vectors and the superimposed second layer model matrix comprises:
updating the base vector and the camera position information according to the superposed second layer model matrix, and calculating a view matrix of the camera according to the updated camera position information, the orientation vector and an up vector in the updated base vector;
acquiring camera included angle information and camera depth information, and calculating a projection matrix of a camera according to the camera included angle information and the camera depth information;
calculating a transformation matrix of the camera from the view matrix and the projection matrix.
6. A computer-readable storage medium, having stored thereon a multi-layer matrixing program, which when executed by a processor implements a multi-layer matrixing method according to any one of claims 1-5.
7. Computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements a multi-layer matrix transformation method according to any of claims 1-5.
8. A multi-layer matrix transform apparatus, comprising:
the acquisition module is used for acquiring materials;
the judging module is used for judging whether the material contains a plurality of first virtual layers;
the calculation module is used for calculating a first layer model matrix corresponding to each first virtual layer when the material contains a plurality of first virtual layers;
the obtaining module is further configured to obtain ordering information of the plurality of first virtual image layers;
the calculation module is further used for sequentially superposing the first layer model matrix according to the sequencing information;
the transformation module is used for obtaining an original model matrix of the material, generating a final model matrix of the material according to the original model matrix and the superposed first layer model matrix, and transforming the material according to the final model matrix.
9. Multi-layer matrix transformation means according to claim 8,
the acquisition module is also used for acquiring camera parameters;
the calculation module is further used for calculating a base vector of the camera according to the camera parameters;
the judging module is further configured to judge whether the camera includes a plurality of second virtual layers;
the calculation module is further configured to calculate a second layer model matrix corresponding to each second virtual layer when the camera includes a plurality of second virtual layers;
the obtaining module is further configured to obtain ordering information of the plurality of second virtual layers;
the transformation module is further used for sequentially superposing the second layer model matrix according to the sequencing information of the second virtual layer, calculating a transformation matrix of the camera according to the base vector and the superposed second layer model matrix, and transforming the material according to the transformation matrix.
10. The multilayer matrixing apparatus of claim 9, wherein the camera parameters include: camera position information, target position information, orientation information, and rotation values.
CN202010196367.0A 2020-03-19 2020-03-19 Multi-layer matrix transformation method and device Active CN111461960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010196367.0A CN111461960B (en) 2020-03-19 2020-03-19 Multi-layer matrix transformation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010196367.0A CN111461960B (en) 2020-03-19 2020-03-19 Multi-layer matrix transformation method and device

Publications (2)

Publication Number Publication Date
CN111461960A CN111461960A (en) 2020-07-28
CN111461960B true CN111461960B (en) 2022-08-16

Family

ID=71679046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010196367.0A Active CN111461960B (en) 2020-03-19 2020-03-19 Multi-layer matrix transformation method and device

Country Status (1)

Country Link
CN (1) CN111461960B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1762980B1 (en) * 2000-12-15 2008-09-17 Sony Corporation Layered image based rendering
TWI285837B (en) * 2005-09-21 2007-08-21 Quanta Comp Inc Display controller capable of reducing cache memory and frame adjusting method thereof
CN101299328B (en) * 2008-06-19 2010-06-02 华为技术有限公司 Image display method and apparatus
RU2418316C1 (en) * 2009-09-07 2011-05-10 Алексей Анатольевич Терпиловский Method of creating virtual model of biological object and device for realising said method
JP2011129001A (en) * 2009-12-19 2011-06-30 Cocone Corp Avatar in virtual space and avatar creation system
CN102768761B (en) * 2012-06-06 2015-01-14 清华大学 Three-dimension video drawing method based on perspective transformation
CN103677828B (en) * 2013-12-10 2017-02-22 华为技术有限公司 Coverage drawing method, drawing engine and terminal equipment
US20170154469A1 (en) * 2015-12-01 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method and Device for Model Rendering
CN106600658B (en) * 2016-12-14 2019-08-13 西安电子科技大学 Optics figure layer decomposition method based on space transform models

Also Published As

Publication number Publication date
CN111461960A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN112669429A (en) Image distortion rendering method and device
CN106846497B (en) Method and device for presenting three-dimensional map applied to terminal
CN109635639B (en) Method, device, equipment and storage medium for detecting position of traffic sign
CN112004078A (en) Virtual reality video quality evaluation method and system based on generation countermeasure network
JP2006023940A5 (en)
CN111476893A (en) Three-dimensional live-action modeling method and device based on offshore oil and gas field equipment facility
CN106303497A (en) Virtual reality content generation method and device
CN110363837B (en) Method and device for processing texture image in game, electronic equipment and storage medium
CN106780610B (en) Position positioning method and device
CN111062902B (en) Image deformation method, medium, device and apparatus
CN112233080A (en) Three-dimensional model reconstruction method and device, electronic device and storage medium
CN111461960B (en) Multi-layer matrix transformation method and device
US10893252B2 (en) Image processing apparatus and 2D image generation program
CN114119748A (en) Method and device for determining installation pose of vehicle-mounted all-around camera
CN111462292B (en) Layering rendering method, medium, equipment and device
CN111311724B (en) Shadow adding method, medium, device and apparatus for 3D characters
CN110378948B (en) 3D model reconstruction method and device and electronic equipment
CN112862936B (en) Expression model processing method and device, electronic equipment and storage medium
CN111833395A (en) Direction-finding system single target positioning method and device based on neural network model
CN112700526B (en) Concave-convex material image rendering method and device
CN113205579B (en) Three-dimensional reconstruction method, device, equipment and storage medium
CN115457206A (en) Three-dimensional model generation method, device, equipment and storage medium
CN114820755A (en) Depth map estimation method and system
GB2594249A (en) Method for creating a virtual environment reconstruction of an actual location
CN110766807B (en) 3D graph rotation method, medium, device and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant