Method and system for mapping three-dimensional model based on artificial intelligence

By obtaining the two-dimensional image set and focal length information of the three-dimensional model, we perform focus stack processing and projection plane determination, and use semantic labels for mapping, which solves the tedious problem of texture mapping for the three-dimensional model, realizes automated and diversified mapping, and improves the accuracy of mapping. Efficiency and precision.

CN118628627APending Publication Date: 2024-09-10SICHUAN JIANSHAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310219147.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-08
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing 3D model texture mapping process is cumbersome and requires UV expansion processing first, and it is difficult to achieve automation and diversified mapping.

Method used

By obtaining the 2D image set of the 3D model under the preset perspective, the focal length information is obtained, focus stack processing is performed, the simulated projection surface and virtual projection camera are determined, and mapping semantic labels are used for mapping without UV expansion, realizing automated and diversified mapping.

Benefits of technology

It simplifies the texture mapping process, improves the automation and accuracy of mapping, can achieve a variety of texture mapping effects through different mapping semantic tags, and improves the efficiency and quality of mapping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628627A
    Figure CN118628627A
Patent Text Reader

Abstract

The invention provides a method and a system for mapping a three-dimensional model based on artificial intelligence. The method comprises the steps that a two-dimensional image set of a target three-dimensional model under a preset view angle is acquired, and the two-dimensional image set comprises a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model; acquiring focal section information corresponding to each two-dimensional image; carrying out focus stack processing on a plurality of two-dimensional images with the same focal length in each two-dimensional image set to obtain a refocusing image; wherein the two-dimensional images with the same focal length comprise two-dimensional images with the same focal length information; determining a simulated projection surface of the target three-dimensional model under a current display view angle; determining a mapping semantic label corresponding to each simulation projection surface; determining a virtual projection camera corresponding to each simulation projection surface; and mapping the simulated projection surface of the target three-dimensional model according to the visual cone data of the virtual projection camera, the mapping semantic tag and the simulated projection surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, electronic device and storage medium for mapping a three-dimensional model. Background Art

[0002] Texture mapping is a technology that maps a bitmap to the surface of a rendered object. Using texture mapping can give the model surface rich details to achieve a very realistic rendering effect.

[0003] At present, most 3D model texture mapping is done by first using model making software to perform UV unfolding on the target 3D model, that is, creating a 2D unfolded view of the target 3D model, obtaining corresponding data on the relationship between the vertices in the 3D space and the 2D unfolded view space, and then inputting the 2D unfolded view, the target 3D model and the preset texture map into the texture drawing software, which then mixes the preset texture map into the 2D unfolded view of the target 3D model, and finally uses the mixed 2D unfolded view to perform texture mapping on the target 3D model.

[0004] This texture mapping method requires first UV unfolding the target three-dimensional model through model making software, and then mixing the preset texture map into the two-dimensional unfolded image of the target three-dimensional model in the mapping software. The mapping process is cumbersome. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a method, system, electronic device and storage medium for mapping a three-dimensional model, so as to simplify the mapping process of the target three-dimensional model.

[0006] To achieve the above objectives, this application provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for automatically mapping a three-dimensional model, the method comprising the following process:

[0008] Acquire a two-dimensional image set of a target three-dimensional model at a preset viewing angle, wherein the two-dimensional image set includes a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model;

[0009] Obtaining focal length information corresponding to each of the two-dimensional images;

[0010] Performing focus stacking processing on a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image, wherein the two-dimensional images with the same focal length include two-dimensional images with the same focal length information;

[0011] Determining a simulated projection surface of the target three-dimensional model at a current display viewing angle;

[0012] Determine a map semantic label corresponding to each of the simulated projection surfaces;

[0013] Determine a virtual projection camera corresponding to each of the simulated projection surfaces;

[0014] Mapping is performed on the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label, and the simulated projection surface.

[0015] In the above scheme, a set of two-dimensional images of the target three-dimensional model under a preset viewing angle is obtained; the focal length information corresponding to each two-dimensional image is obtained; a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets are subjected to focus stacking processing to obtain a refocused image; the simulated projection surface of the target three-dimensional model under the current display viewing angle is determined; the mapping semantic label corresponding to each of the simulated projection surfaces is determined; the virtual projection camera corresponding to each of the simulated projection surfaces is determined; and the simulated projection surface of the target three-dimensional model is mapped according to the cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface. This method of mapping a three-dimensional model does not require UV unfolding of the target three-dimensional model, simplifies the texture mapping process, and can realize multiple texture mapping of the target three-dimensional model through different mapping semantic labels; while solving the technical problem of the cumbersome texture mapping process existing in the prior art, it realizes the automation and diversification of mapping of the target three-dimensional model.

[0016] Optionally, determining the simulated projection surface of the target three-dimensional model at the current display viewing angle may include: performing feature extraction on the two-dimensional images to obtain contour feature data of the target three-dimensional model contained in each of the two-dimensional images; determining the spatial position function of the target three-dimensional model based on the contour feature data; acquiring posture data and scale data of the target three-dimensional model in the refocused image; and determining the simulated projection surface of the target three-dimensional model at the current display viewing angle based on the posture data, the scale data and the spatial position function.

[0017] Optionally, before mapping the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface, the method may also include: acquiring the posture data and scale data of the target three-dimensional model in the refocused image; and determining the viewing cone data of the corresponding virtual camera based on the refocused image, the posture data and the scale data.

[0018] Based on this limited scheme, a refocused image can be obtained through the focus stacking method, the depth of field of the target 3D model can be expanded, noise and unnecessary content can be eliminated, and the quality of the obtained refocused image can be improved. Therefore, the refocused image is clearer, and the frustum data determined based on the refocusing projection is more accurate, thereby improving the accuracy of automatic mapping.

[0019] Optionally, determining the viewing cone data of the corresponding virtual camera based on the refocused image, the posture data and the scale data may include: performing a reprojection operation based on the refocused image, the posture data and the scale data to determine the charge coupled device parameters, field viewing angle and physical focal length of the corresponding virtual camera; determining the viewing cone data of the virtual camera according to the charge coupled device parameters, field viewing angle and physical focal length of the virtual camera.

[0020] Optionally, after determining the viewing cone data of the virtual camera according to the charge coupled device parameters, field viewing angle and physical focal length of the virtual camera, the method may further include: determining a mapping relationship between the physical focal length and the viewing cone data.

[0021] Based on this limiting scheme, by determining the mapping relationship between the physical focal length and the visual cone data, the visual cone data corresponding to any physical focal length can be obtained according to the mapping relationship, which facilitates the subsequent interpolation calculation of the visual cone data.

[0022] Optionally, before determining the map semantic label corresponding to each of the simulated projection surfaces, the method may further include: determining image features contained in the two-dimensional image, and image semantic labels corresponding to the image features; based on the image features and the image semantic labels, training a label determination model to be trained to obtain a trained label determination model, wherein the trained label determination model is used to determine the semantic label corresponding to the input image features.

[0023] Based on this limitation scheme, the label determination model to be trained can be trained by the image features contained in the two-dimensional image and the image semantic labels corresponding to the image features; so as to obtain the trained label determination model, which is used to determine the mapping semantic labels included in the simulated projection area, improve the accuracy of the obtained mapping semantic labels, and then improve the accuracy of the obtained two-dimensional mapping image to ensure the final mapping effect.

[0024] Optionally, determining the map semantic label corresponding to each of the simulated projection surfaces may include: determining the model projection area in the target three-dimensional model corresponding to each of the simulated projection surfaces; inputting the regional image features of the model projection area into the trained label determination model; and obtaining the map semantic label output by the label determination model.

[0025] Based on this limiting scheme, the regional image features of the model projection area can be input into the trained label determination model to obtain the map semantic labels output by the model. Through the trained label determination model, the map semantic labels corresponding to the simulated projection surface under different viewing angles can be quickly determined to improve the generation efficiency of the two-dimensional map images of the target three-dimensional model under different viewing angles.

[0026] In a second aspect, an embodiment of the present application provides a system for mapping a three-dimensional model, and the system may include:

[0027] An image acquisition module, used to acquire a set of two-dimensional images of a target three-dimensional model at a preset viewing angle; wherein the set of two-dimensional images includes a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model;

[0028] A focal length information acquisition module, used to acquire the focal length information corresponding to each of the two-dimensional images;

[0029] A focus stack processing module, used for performing focus stack processing on a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image, wherein the two-dimensional images with the same focal length include two-dimensional images with the same focal length information;

[0030] A first determination module is used to determine a simulated projection surface of the target three-dimensional model at a current display viewing angle;

[0031] A second determination module is used to determine the map semantic label corresponding to each of the simulated projection surfaces;

[0032] A third determination module is used to determine a virtual projection camera corresponding to each of the simulated projection surfaces;

[0033] A mapping module is used to map the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface.

[0034] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for mapping a three-dimensional model as described in the first aspect above.

[0035] In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0036] a memory having a computer program stored thereon;

[0037] A processor is used to execute the computer program in the memory to implement the method for mapping a three-dimensional model as described in the first aspect above.

[0038] In summary, the present application provides a method, system, electronic device and storage medium for mapping a three-dimensional model, which obtains a set of two-dimensional images of a target three-dimensional model at a preset viewing angle; obtains the focal length information corresponding to each two-dimensional image; performs focus stacking processing on multiple two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image; determines the simulated projection surface of the target three-dimensional model at the current display viewing angle; determines the mapping semantic label corresponding to each of the simulated projection surfaces; determines the virtual projection camera corresponding to each of the simulated projection surfaces; maps the simulated projection surface of the target three-dimensional model according to the visual cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface. This method for mapping a three-dimensional model does not require UV unfolding of the target three-dimensional model, simplifies the texture mapping process, and can achieve multiple texture mapping of the target three-dimensional model through different mapping semantic labels; while solving the technical problem of the cumbersome texture mapping process in the prior art, it realizes automated and diversified mapping of the target three-dimensional model.

[0039] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic diagram of a flow chart drawn according to one embodiment of a method for mapping a three-dimensional model according to the present application;

[0042] Figure 2 A schematic diagram of the division of a simulated projection surface for a method for automatically generating a texture according to one embodiment of the present application;

[0043] Figure 3 A schematic diagram of a flow chart of a method for determining a simulated projection surface according to one embodiment of the present application;

[0044] Figure 4 A schematic diagram of a flowchart of a method for obtaining a semantic label of an image according to one embodiment of the present application;

[0045] Figure 5A schematic diagram of the structure of one embodiment of a system for mapping a three-dimensional model according to the present application; and

[0046] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0048] The terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0049] The terms "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and should not be understood as indicating or implying relative importance, nor should they be understood as requiring or implying any such actual relationship or order between these entities or operations.

[0050] The illustrations provided in this embodiment are only used to illustrate the basic concept of the present invention in a schematic manner. Although the illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation, the shape, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the component layout may also be more complicated.

[0051] In view of the deficiencies in the prior art, embodiments of the present application provide a method, system, electronic device and storage medium for mapping a three-dimensional model, which are used to simplify the mapping process of a target three-dimensional model.

[0052] Please refer to Figure 1 , Figure 1 A schematic flow chart of an automatic mapping method for a three-dimensional model provided in an embodiment of the present application, the automatic mapping method for a three-dimensional model includes the following process:

[0053] S101, acquiring a two-dimensional image set of a target three-dimensional model at a preset viewing angle, wherein the two-dimensional image set includes a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model;

[0054] S102, obtaining focal length information corresponding to each of the two-dimensional images;

[0055] S103, performing focus stacking processing on a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image, wherein the two-dimensional images with the same focal length include two-dimensional images with the same focal length information;

[0056] S104, determining a simulated projection surface of the target three-dimensional model at the current display viewing angle;

[0057] S105, determining a map semantic label corresponding to each of the simulated projection surfaces;

[0058] S106, determining a virtual projection camera corresponding to each of the simulated projection surfaces;

[0059] S107 , mapping the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label, and the simulated projection surface.

[0060] In some embodiments, the two-dimensional image set can be determined by acquiring video data containing the target three-dimensional model acquired by an image acquisition device and determining the two-dimensional image set based on the video data. The two-dimensional image set can also be determined by using single image data containing the target three-dimensional model that is not continuous in time and acquired multiple times by an image acquisition device. The method for mapping a three-dimensional model protected by this application does not limit the way in which the two-dimensional image is acquired.

[0061] In some embodiments, the image acquisition device may be a video camera, a camera, a scanner, or other devices with a camera function, such as a mobile phone or a tablet computer. The focal length information refers to the segmentation of the lens focal length. Video cameras, digital cameras, etc. all have focal lengths divided relative to their own frames.

[0062] In some embodiments, the simulated projection surface can be a plurality of parallel projection surfaces divided according to different spatial depths. By overlapping the projection surface mapping images corresponding to each simulated projection surface, a two-dimensional mapping image of the target three-dimensional model is obtained. This method of dividing the simulated projection surface is applicable to target three-dimensional models of regional types such as administrative planning areas and target three-dimensional models with relatively complex model structures. The simulated projection surface can also be obtained by dividing according to different surfaces of the target three-dimensional model. By connecting the adjacent edges of each simulated projection surface, a two-dimensional mapping image of the target three-dimensional model is obtained. This method of dividing the simulated projection surface is applicable to target three-dimensional models that are relatively single and have relatively simple structures, such as trees and single buildings. For target three-dimensional models with complex structures, the target three-dimensional model can be represented by a regular cube based on voxels, and the simulated projection surface of the target three-dimensional model is determined according to the projection surface of the regular cube used to represent the target three-dimensional model at the current viewing angle. Please refer to Figure 2 , Figure 2 Two different division schematic diagrams of the simulated projection surface provided in the embodiments of the present application, wherein voxels of the same spatial depth used to represent the target three-dimensional model can be regarded as a simulated projection surface.

[0063] In some embodiments, the map semantic label may include at least one target semantic label of the target three-dimensional model. Taking the target three-dimensional model as a tree as an example, the target semantic label may include: branches, trunks, leaves, and the leaves may be further divided into: veins, leaves, and petioles. Among them, the target semantic labels may be divided according to the colors of the corresponding parts of the target three-dimensional model. Since the veins, leaves, and petioles have different shades of color, this detailed division can improve the accuracy of the semantic expression of the map semantic label, thereby improving the accuracy of the obtained two-dimensional map image. In addition, taking the target three-dimensional model as a certain administrative planning area as an example, the target semantic labels may include: rivers, lakes, buildings, parks, green spaces, etc.; similarly, these target semantic labels are also divided according to the colors of the corresponding parts of the target three-dimensional model. The more detailed the semantic division, the higher the accuracy of the two-dimensional map image finally generated.

[0064] In some embodiments, the model projection area corresponding to each simulated projection surface in the target three-dimensional model can be determined; the regional image features of the model projection area can be input into a trained label determination model; and the texture semantic label output by the label determination model can be obtained. The texture semantic label corresponding to each simulated projection surface can also be determined based on a preset texture scheme of the target three-dimensional model.

[0065] In some embodiments, the camera that best matches the refocused image among the virtual cameras at the preset positions may be used as the corresponding virtual camera.

[0066] As can be seen from the above, the method for mapping a three-dimensional model provided in the present application can be achieved by obtaining a set of two-dimensional images of the target three-dimensional model under a preset viewing angle; obtaining the focal length information corresponding to each two-dimensional image; performing focus stacking processing on multiple two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image; determining the simulated projection surface of the target three-dimensional model under the current display viewing angle; determining the mapping semantic label corresponding to each of the simulated projection surfaces; determining the virtual projection camera corresponding to each of the simulated projection surfaces; mapping the simulated projection surface of the target three-dimensional model according to the visual cone data of the virtual projection camera, the mapping semantic label, and the simulated projection surface. This method for mapping a three-dimensional model does not require UV unfolding of the target three-dimensional model, simplifies the texture mapping process, and can achieve multiple texture mapping of the target three-dimensional model through different mapping semantic labels; while solving the technical problem of the cumbersome texture mapping process in the prior art, it achieves automated and diversified mapping of the target three-dimensional model.

[0067] Please refer to Figure 3 , Figure 3 A schematic diagram of the flow of a method for determining a simulated projection surface provided in an embodiment of the present application.

[0068] In an optional embodiment, S104, determining a simulated projection surface of the target three-dimensional model at the current display viewing angle, may include:

[0069] S1041, performing feature extraction on the two-dimensional images to obtain contour feature data of the target three-dimensional model contained in each of the two-dimensional images;

[0070] S1042, determining a spatial position function of the target three-dimensional model according to the contour feature data;

[0071] S1043, acquiring posture data and scale data of the target three-dimensional model in the refocused image;

[0072] S1044: Determine a simulated projection surface of the target three-dimensional model at a current display viewing angle according to the posture data, the scale data, and the spatial position function.

[0073] In some embodiments, the edge feature extraction of the two-dimensional image can be realized based on the Sobel operator, the Isotropic Sobel operator, the Roberts operator, the Laplacian operator or the Prewitt operator, so as to obtain the contour feature data of the target three-dimensional model. The three-dimensional coordinates of the target three-dimensional model can be restored according to the contour feature data, and the spatial coordinate function of the target three-dimensional model can be approximated based on the three-dimensional coordinates. The posture data of the target three-dimensional model may include a position vector and a rotation matrix. The posture data of the target three-dimensional model in the two-dimensional image can be calculated by the equivalent rotation vector method or the direction cosine matrix method.

[0074] In an optional embodiment, in S107, before mapping the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface, the automatic mapping method of the three-dimensional model may also include: acquiring the posture data and scale data of the target three-dimensional model in the refocused image; and determining the viewing cone data of the corresponding virtual camera based on the refocused image, the posture data and the scale data.

[0075] In some embodiments, the posture data and scale data of the target three-dimensional model in the refocused image can be obtained; and based on the refocused image, the posture data and the scale data, the charge coupled device parameters, the field viewing angle and the physical focal length of the corresponding virtual camera can be determined, and the frustum data of the corresponding virtual camera can be determined according to the charge coupled device parameters, the field viewing angle and the physical focal length of the corresponding virtual camera. The physical focal length of the corresponding virtual camera can also be determined according to the refocused image, and the frustum data of the corresponding virtual camera can be determined according to the physical focal length and the mapping relationship between the physical focal length and the frustum data.

[0076] In an optional embodiment, determining the viewing cone data of the corresponding virtual camera based on the refocused image, the posture data and the scale data includes: performing a reprojection operation based on the refocused image, the posture data and the scale data to determine the charge coupled device parameters, field of view and physical focal length of the corresponding virtual camera; determining the viewing cone data of the virtual camera according to the charge coupled device parameters, field of view and physical focal length of the virtual camera.

[0077] In an optional embodiment, after determining the viewing cone data of the virtual camera according to the charge coupled device parameters, field viewing angle and physical focal length of the virtual camera, the automatic mapping method of the three-dimensional model may also include: determining a mapping relationship between the physical focal length and the viewing cone data.

[0078] In some embodiments, the visual cone data corresponding to any physical focal length may be calculated based on the mapping relationship between the physical focal length and the visual cone data, so as to facilitate the subsequent interpolation calculation of the visual cone data.

[0079] In an optional embodiment, before S105, determining the map semantic label corresponding to each of the simulated projection surfaces, the method also includes: determining the image features contained in the two-dimensional image, and the image semantic labels corresponding to the image features; based on the image features and the image semantic labels, training the label determination model to be trained to obtain a trained label determination model, wherein the trained label determination model is used to determine the label corresponding to the input image feature.

[0080] In some embodiments, deep learning methods such as Convolution Neural Networks (CNN), Auto Encoder (AE), Sparse Coding (SC), and Recurrent Neural Network (RNN) can be used to train the model for determining the training label, and this application does not make specific restrictions on this. Among them, deep learning methods that support data enhancement such as CNN and SC can be used to reduce the workload of certain data collection and labeling by rotating the training data, thereby improving the efficiency of model training.

[0081] Please refer to Figure 4 , Figure 4 A flowchart of a method for acquiring semantic labels for an image provided in an embodiment of the present application.

[0082] In some optional embodiments, S105, determining the map semantic label corresponding to each of the simulated projection surfaces, may include: S1051, determining the model projection area corresponding to each of the simulated projection surfaces in the target three-dimensional model; S1052, inputting the regional image features of the model projection area into the trained label determination model; S1053, obtaining the map semantic label output by the label determination model.

[0083] In some embodiments, the regional image features corresponding to the model projection area can be determined based on the image features contained in the two-dimensional image determined by the above scheme; the regional image features of the model projection area are input into a trained label determination model to obtain the map semantic labels output by the model. The trained label determination model can quickly determine the map semantic labels corresponding to the simulated projection surface at different viewing angles, so as to improve the generation efficiency of the two-dimensional map images of the target three-dimensional model at different viewing angles.

[0084] Please refer to Figure 5, Figure 5 A schematic diagram of the structure of a system for mapping a three-dimensional model provided in an embodiment of the present application, wherein the system for mapping a three-dimensional model may include:

[0085] An image acquisition module 201 is used to acquire a set of two-dimensional images of a target three-dimensional model at a preset viewing angle; wherein the set of two-dimensional images includes a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model;

[0086] A focal length information acquisition module 202, used to acquire focal length information corresponding to each of the two-dimensional images;

[0087] A focus stack processing module 203 is used to perform focus stack processing on a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image, wherein the two-dimensional images with the same focal length include two-dimensional images with the same focal length information;

[0088] A first determination module 204 is used to determine a simulated projection surface of the target three-dimensional model at a current display viewing angle;

[0089] A second determination module 205 is used to determine a map semantic label corresponding to each of the simulated projection surfaces;

[0090] A third determining module 203 is used to determine a virtual projection camera corresponding to each of the simulated projection surfaces;

[0091] The mapping module 207 is used to map the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface.

[0092] In some optional embodiments, the first determination module 204 can be specifically used to: perform feature extraction on the two-dimensional images to obtain contour feature data of the target three-dimensional model contained in each of the two-dimensional images; determine the spatial position function of the target three-dimensional model based on the contour feature data; obtain the posture data and scale data of the target three-dimensional model in the refocused image; and determine the simulated projection surface of the target three-dimensional model at the current display viewing angle based on the posture data, the scale data and the spatial position function.

[0093] In some optional embodiments, the system for mapping a three-dimensional model may further include: a data acquisition module, used to acquire the posture data and scale data of the target three-dimensional model in the refocused image; and a viewing cone data determination module, used to determine the viewing cone data of the corresponding virtual camera based on the refocused image, the posture data and the scale data.

[0094] In an optional embodiment, the viewing cone data determination module can be specifically used to: perform a reprojection operation based on the refocused image, the posture data and the scale data to determine the charge coupled device parameters, field viewing angle and physical focal length of the corresponding virtual camera; determine the viewing cone data of the virtual camera according to the charge coupled device parameters, field viewing angle and physical focal length of the virtual camera.

[0095] In an optional embodiment, the system for mapping a three-dimensional model may further include: a mapping relationship determination module, configured to determine a mapping relationship between the physical focal length and the visual cone data.

[0096] In some optional embodiments, the data determination module 202 can be specifically used to: perform scene classification on the two-dimensional image to obtain scene two-dimensional images under different scenes; input the scene two-dimensional image into a corresponding scene data extraction model to obtain the posture data and scale data of the target three-dimensional model output by the scene data extraction model.

[0097] In some optional embodiments, the image acquisition module 201 may be specifically configured to: acquire video data including a target three-dimensional model acquired by an image acquisition device; and determine the two-dimensional image set according to the video data.

[0098] In an optional embodiment, the system for mapping a three-dimensional model may also include: a fourth determination module, used to determine the image features contained in the two-dimensional image, and the image semantic labels corresponding to the image features; a model training module, used to train a label determination model to be trained based on the image features and the image semantic labels to obtain a trained label determination model, wherein the trained label determination model is used to determine the semantic labels corresponding to the input image features.

[0099] In an optional embodiment, the second determination module 205 can be specifically used to: determine the model projection area corresponding to each of the simulated projection surfaces in the target three-dimensional model; input the regional image features of the model projection area into the trained label determination model; and obtain the map semantic label output by the label determination model.

[0100] The embodiment of the present application provides a system for mapping a three-dimensional model. Its implementation principle and the technical effects produced have been introduced in the embodiment of the aforementioned method for mapping a three-dimensional model. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding content in the method embodiment.

[0101] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, referring to Figure 6The electronic device 30 includes: a processor 301 and a memory 302. These components are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown).

[0102] The memory 302 includes one or more (only one is shown in the figure), which may be, but not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The processor 301 and other possible components may access the memory 302 and read and / or write data therein.

[0103] The processor 301 includes one or more (only one is shown in the figure), which can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a microcontroller unit (MCU, NP) or other conventional processors. It can also be a dedicated processor, including a neural network processor (NPU), a graphics processor (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. In addition, when there are multiple processors 301, some of them can be general-purpose processors and the other part can be dedicated processors.

[0104] One or more computer program instructions may be stored in the memory 302 , and the processor 301 may read and execute these computer program instructions to implement the method for mapping a three-dimensional model provided in the embodiment of the present application.

[0105] Understandably, Figure 6 The structure shown is for illustration only. The electronic device 30 may also include Figure 6 More or fewer components as shown, or with Figure 6 Different structures are shown. Figure 6 Each component shown in the figure can be implemented by hardware, software or a combination thereof. The electronic device 30 may be a physical device, such as a PC, a laptop, a tablet computer, a mobile phone, a server, an embedded device, etc., or a virtual device, such as a virtual machine, a virtualized container, etc. Moreover, the electronic device 30 is not limited to a single device, but may also be a combination of multiple devices or a cluster consisting of a large number of devices.

[0106] In the embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some communication interfaces or modules, which can be electrical, mechanical or other forms.

[0107] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0108] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for mapping a three-dimensional model, characterized in that: The method comprises: Acquire a two-dimensional image set of a target three-dimensional model at a preset viewing angle, wherein the two-dimensional image set includes a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model; Obtaining focal length information corresponding to each of the two-dimensional images; Performing focus stacking processing on a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image, wherein the two-dimensional images with the same focal length include two-dimensional images with the same focal length information; Determining a simulated projection surface of the target three-dimensional model at a current display viewing angle; Determine a map semantic label corresponding to each of the simulated projection surfaces; Determine a virtual projection camera corresponding to each of the simulated projection surfaces; Mapping is performed on the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label, and the simulated projection surface.

2. The method according to claim 1, characterized in that: The determining of the simulated projection surface of the target three-dimensional model at the current display viewing angle includes: Performing feature extraction on the two-dimensional images to obtain contour feature data of the target three-dimensional model contained in each of the two-dimensional images; Determine the spatial position function of the target three-dimensional model according to the contour feature data; Acquire posture data and scale data of the target three-dimensional model in the refocused image; A simulated projection surface of the target three-dimensional model at a current display viewing angle is determined according to the posture data, the scale data and the spatial position function.

3. The method according to claim 1, characterized in that Before mapping the simulated projection surface of the target three-dimensional model according to the frustum data of the virtual projection camera, the mapping semantic label, and the simulated projection surface, the method further includes: Acquire posture data and scale data of the target three-dimensional model in the refocused image; Based on the refocused image, the pose data and the scale data, a viewing cone data of a corresponding virtual camera is determined.

4. The method according to claim 3, characterized in that The determining of the viewing cone data of the corresponding virtual camera based on the refocused image, the posture data and the scale data comprises: Perform a reprojection operation based on the refocused image, the posture data, and the scale data to determine a charge coupled device parameter, a field of view, and a physical focal length of a corresponding virtual camera; The viewing cone data of the virtual camera is determined according to the charge coupled device parameters, the field viewing angle and the physical focal length of the virtual camera.

5. The method according to claim 4, characterized in that After determining the visual cone data of the virtual camera according to the charge coupled device parameters, the field viewing angle and the physical focal length of the virtual camera, the method further includes: A mapping relationship between the physical focal length and the visual cone data is determined.

6. The method according to claim 1, characterized in that Before determining the map semantic label corresponding to each simulated projection surface, the method further includes: Determining image features contained in the two-dimensional image and image semantic labels corresponding to the image features; Based on the image features and the image semantic labels, the label determination model to be trained is trained to obtain a trained label determination model, wherein the trained label determination model is used to determine the semantic labels corresponding to the input image features.

7. The method according to claim 6, characterized in that The determining of the map semantic label corresponding to each of the simulated projection surfaces includes: Determining a model projection area corresponding to each of the simulated projection surfaces in the target three-dimensional model; Inputting the regional image features of the model projection area into the trained label determination model; The semantic label of the map output by the label determination model is obtained.

8. A system for mapping a three-dimensional model, characterized in that: The system comprises: An image acquisition module, used to acquire a set of two-dimensional images of a target three-dimensional model at a preset viewing angle; wherein the set of two-dimensional images includes a plurality of two-dimensional images containing objects corresponding to the target three-dimensional model; A focal length information acquisition module, used to acquire the focal length information corresponding to each of the two-dimensional images; A focus stack processing module, used for performing focus stack processing on a plurality of two-dimensional images with the same focal length in each of the two-dimensional image sets to obtain a refocused image, wherein the two-dimensional images with the same focal length include two-dimensional images with the same focal length information; A first determination module is used to determine a simulated projection surface of the target three-dimensional model at a current display viewing angle; A second determination module is used to determine the map semantic label corresponding to each of the simulated projection surfaces; A third determination module is used to determine a virtual projection camera corresponding to each of the simulated projection surfaces; A mapping module is used to map the simulated projection surface of the target three-dimensional model according to the viewing cone data of the virtual projection camera, the mapping semantic label and the simulated projection surface.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that The electronic device comprises: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the method described in any one of claims 1 to 7.