WO2024002064A1 - Method and apparatus for constructing three-dimensional model, and electronic device and storage medium - Google Patents

Method and apparatus for constructing three-dimensional model, and electronic device and storage medium Download PDF

Info

Publication number
WO2024002064A1
WO2024002064A1 PCT/CN2023/102728 CN2023102728W WO2024002064A1 WO 2024002064 A1 WO2024002064 A1 WO 2024002064A1 CN 2023102728 W CN2023102728 W CN 2023102728W WO 2024002064 A1 WO2024002064 A1 WO 2024002064A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
depth
sampling
value
target image
Prior art date
Application number
PCT/CN2023/102728
Other languages
French (fr)
Chinese (zh)
Inventor
潘超鹏
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2024002064A1 publication Critical patent/WO2024002064A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Abstract

The present application belongs to the technical field of images. Disclosed are a method and apparatus for constructing a three-dimensional model, and an electronic device and a storage medium. The method comprises: determining a mutation area of a target image; performing non-uniform sampling on the target image on the basis of the mutation area of the target image and a sampling step length updating strategy corresponding to the mutation area so as to obtain a set of non-uniform sampling vertexes; and constructing a three-dimensional model on the basis of the set of non-uniform sampling vertexes.

Description

三维模型构建方法、装置、电子设备及存储介质Three-dimensional model construction method, device, electronic equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请主张在2022年07月01日在中国提交的申请号为202210774950.4的中国专利的优先权,其全部内容通过引用包含于此。This application claims priority to the Chinese patent with application number 202210774950.4 filed in China on July 1, 2022, the entire content of which is incorporated herein by reference.
技术领域Technical field
本申请属于图像技术领域,具体涉及一种三维模型构建方法、装置、电子设备及存储介质。This application belongs to the field of image technology, and specifically relates to a three-dimensional model construction method, device, electronic equipment and storage medium.
背景技术Background technique
在短视频业务以及三维场景手游中,为呈现出场景或物体在运动过程中的三维视差效果,需要应用三维重建技术,将二维图像还原为三维空间中的具有三维物理结构和纹理信息的场景,然后再进行三维渲染。目前,现有的方法是采用深度图均匀采样的方式进行三维模型结构与纹理重建,即设定固定的采样步长,使采样点(即网格顶点)在深度图上呈均匀分布。In short video services and 3D scene mobile games, in order to present the 3D parallax effect of a scene or object during movement, 3D reconstruction technology needs to be applied to restore the 2D image to a 3D image with 3D physical structure and texture information in the 3D space. The scene is then rendered in 3D. Currently, the existing method is to use uniform sampling of the depth map to reconstruct the 3D model structure and texture, that is, setting a fixed sampling step so that the sampling points (i.e., grid vertices) are evenly distributed on the depth map.
然而,在这种方法中,由于设定了固定的采样步长,在采样时,若采样步长较小,那么网格顶点密集,模型顶点数和片面数较大,会影响电子设备的渲染性能,若采样步长较大,那么网格顶点数和片面数较少,难以反映模型细节构造,渲染效果难以保证。如此,采用深度图均匀采样的三维重建方法,无法保证三维模型重建的高效性和三维模型的渲染效果。However, in this method, since a fixed sampling step is set, during sampling, if the sampling step is small, the grid vertices will be dense, and the number of model vertices and faces will be large, which will affect the rendering of electronic devices. Performance, if the sampling step size is large, the number of mesh vertices and faces will be small, making it difficult to reflect the detailed structure of the model, and the rendering effect will be difficult to guarantee. In this way, the 3D reconstruction method using uniform sampling of the depth map cannot guarantee the efficiency of 3D model reconstruction and the rendering effect of the 3D model.
发明内容Contents of the invention
本申请实施例的目的是提供一种三维模型构建方法、装置、电子设备及存储介质,能够解决采用深度图均匀采样的三维重建方法,无法保证三维模型重建的高效性和三维模型的渲染效果的问题。The purpose of the embodiments of the present application is to provide a three-dimensional model construction method, device, electronic equipment and storage medium that can solve the problem that the three-dimensional reconstruction method using uniform sampling of the depth map cannot guarantee the efficiency of the three-dimensional model reconstruction and the rendering effect of the three-dimensional model. question.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种三维模型构建方法,该方法包括:确定目标图像的突变区域;基于目标图像的突变区域和与该突变区域对应的采样步长更新策略,对目标图像进行非均匀采样,得到非均匀采样顶点集合;基于所述非均匀采样顶点集合,构建三维模型。In the first aspect, embodiments of the present application provide a three-dimensional model construction method, which method includes: determining a mutation area of the target image; based on the mutation area of the target image and the sampling step update strategy corresponding to the mutation area, the target image is Non-uniform sampling is performed to obtain a non-uniform sampling vertex set; based on the non-uniform sampling vertex set, a three-dimensional model is constructed.
第二方面,本申请实施例提供了一种三维模型构建装置,该装置包括:确定模块、采样模块和构建模块。确定模块,用于确定目标图像的突变区域。采样模块,用于基于确定模块确定的目标图像的突变区域和与该突变区域对应的采样步长更新策略,对目标图像进行非均匀采样,得到非均匀采样顶点集合。构建模块,用于基于采 样模块采样得到的非均匀采样顶点集合,构建三维模型。In the second aspect, embodiments of the present application provide a three-dimensional model construction device, which includes: a determination module, a sampling module, and a construction module. The determination module is used to determine the mutation area of the target image. The sampling module is used to non-uniformly sample the target image based on the mutation area of the target image determined by the determination module and the sampling step update strategy corresponding to the mutation area, and obtain a non-uniform sampling vertex set. Building blocks for procurement-based The non-uniform sampling vertex set obtained by sampling module is used to construct a three-dimensional model.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device. The electronic device includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. The programs or instructions are processed by the processor. When the processor is executed, the steps of the method described in the first aspect are implemented.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented. .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the first aspect. the method described.
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
在本申请实施例中,电子设备可以基于目标图像的突变区域,采用采样步长更新策略,进行非均匀采样,以得到非均匀采样顶点集合,从而基于该集合进行三维模型的构建。本方案中,电子设备可以根据目标图像的突变区域,确定相应的采样步长更新策略,即在采样过程中,根据目标图像的突变区域,计算三维空间点的分布特征,以更新采样步长,自适应地采样深度图中的关键顶点,构建非均匀的顶点空间拓扑结构,从而使得三维模型在物体边缘区域生成更为密集的网格结构,保证模型渲染效果的真实性,而空间平坦区域生成更为稀疏的网格结构,以减少模型顶点数和片面数,提升网格模型在电子设备的渲染性能,最终得到能够三维模型渲染效果真实性和电子设备渲染性能的高效性俱佳的三维模型。In the embodiment of the present application, the electronic device can use the sampling step update strategy to perform non-uniform sampling based on the mutation area of the target image to obtain a non-uniform sampling vertex set, thereby constructing a three-dimensional model based on the set. In this solution, the electronic device can determine the corresponding sampling step update strategy based on the mutation area of the target image. That is, during the sampling process, based on the mutation area of the target image, the distribution characteristics of the three-dimensional space points are calculated to update the sampling step size. Adaptively samples key vertices in the depth map to construct a non-uniform vertex space topology, so that the 3D model generates a denser grid structure in the edge area of the object, ensuring the authenticity of the model rendering effect, while generating flat areas in space A sparser mesh structure is used to reduce the number of model vertices and sides, improve the rendering performance of the mesh model in electronic devices, and ultimately obtain a 3D model that can achieve both the authenticity of the 3D model rendering effect and the efficiency of the rendering performance of the electronic device. .
附图说明Description of drawings
图1是本申请实施例提供的一种深度图顶点采样的实例示意图;Figure 1 is a schematic diagram of an example of depth map vertex sampling provided by an embodiment of the present application;
图2是本申请实施例提供的一种三维模型构建方法的流程图之一;Figure 2 is one of the flow charts of a three-dimensional model construction method provided by an embodiment of the present application;
图3是本申请实施例提供的一种三维模型构建方法的流程图之二;Figure 3 is the second flow chart of a three-dimensional model construction method provided by an embodiment of the present application;
图4是本申请实施例提供的一种三维模型构建方法的流程图之三;Figure 4 is the third flow chart of a three-dimensional model construction method provided by an embodiment of the present application;
图5是本申请实施例提供的一种突变掩码值的实例示意图之一;Figure 5 is one of the schematic diagrams of an example of a mutation mask value provided by the embodiment of the present application;
图6是本申请实施例提供的一种突变掩码值的实例示意图之二;Figure 6 is a second schematic diagram of an example of a mutation mask value provided by an embodiment of the present application;
图7是本申请实施例提供的一种三维模型构建装置的结构示意图;Figure 7 is a schematic structural diagram of a three-dimensional model building device provided by an embodiment of the present application;
图8是本申请实施例提供的一种电子设备的硬件结构示意图之一;Figure 8 is one of the schematic diagrams of the hardware structure of an electronic device provided by an embodiment of the present application;
图9是本申请实施例提供的一种电子设备的硬件结构示意图之二。FIG. 9 is a second schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例, 都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts, All fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的三维模型构建方法进行详细地说明。The three-dimensional model construction method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
随着手机、个人电脑等电子设备的发展,视频或游戏中出现的具有三维视觉效果的场景或物体的越来越被广泛的使用。三维重建技术可以将二维图像还原为三维空间中的具有三维物理结构和纹理信息的场景,然后再进行三维渲染。在现有技术中,采用深度图均匀采样(设定固定的采样步长)的方式进行三维模型结构与纹理重建往往难以平衡移动端设备的渲染性能和重建效果的精细程度与渲染结果的真实感。With the development of electronic devices such as mobile phones and personal computers, scenes or objects with three-dimensional visual effects appearing in videos or games are increasingly used. Three-dimensional reconstruction technology can restore two-dimensional images to scenes with three-dimensional physical structure and texture information in three-dimensional space, and then perform three-dimensional rendering. In the existing technology, it is often difficult to balance the rendering performance of the mobile device and the sophistication of the reconstruction effect with the realism of the rendering result by using uniform sampling of the depth map (setting a fixed sampling step) for 3D model structure and texture reconstruction. .
在采用深度图均匀采样的方式进行三维模型结构与纹理重建时,通常会参照像素排列的方向,设定固定的采样步长,使采样点(即网格顶点)在深度图上呈均匀分布。当采样步长较大时,如图1中的(A)所示,可将网格模型顶点、片面数控制在较少的数量级,设备渲染性能良好,但较少的顶点和片面难以反映模型细节构造,渲染效果难以保证,人物手臂边缘出现扭曲和网格化现象。反之,当采样步长较小时,如图1中的(B)所示,网格顶点更加密集,片面更加精细,网格模型渲染效果较好,人物纹理细节清晰、真实,但模型顶点数和片面数较大,将严重影响移动端设备渲染性能,难以满足实时渲染需求。When using uniform sampling of the depth map to reconstruct the 3D model structure and texture, a fixed sampling step is usually set with reference to the direction of pixel arrangement so that the sampling points (i.e., grid vertices) are evenly distributed on the depth map. When the sampling step size is large, as shown in (A) in Figure 1, the number of vertices and sides of the mesh model can be controlled to a smaller order of magnitude, and the device rendering performance is good, but it is difficult to reflect the model with fewer vertices and sides. The detailed structure and rendering effect are difficult to guarantee, and the edges of the character's arms appear distorted and meshed. On the contrary, when the sampling step size is small, as shown in (B) in Figure 1, the grid vertices are denser, the surface is more refined, the grid model rendering effect is better, and the character texture details are clear and realistic, but the number of model vertices and A large number of partials will seriously affect the rendering performance of mobile devices and make it difficult to meet the needs of real-time rendering.
本申请提出了一种三维模型构建方法,如图1中的(C)所示,在物体边缘区域生成更为密集的网格结构,保证模型渲染效果的真实性,而空间平坦区域生成更为稀疏的网格结构,以减少模型顶点数和片面数,提升网格模型在移动端设备的渲染性能。This application proposes a three-dimensional model construction method. As shown in (C) in Figure 1, a denser grid structure is generated in the edge area of the object to ensure the authenticity of the model rendering effect, while the flat area in the space is generated more densely. Sparse mesh structure to reduce the number of model vertices and sides and improve the rendering performance of mesh models on mobile devices.
本申请实施例中,电子设备可以基于目标图像的突变区域,采用采样步长更新策略,进行非均匀采样,以得到非均匀采样顶点集合,从而基于该集合进行三维模型的构建。本方案中,电子设备可以根据目标图像的突变区域,确定相应的采样步长更新策略,即在采样过程中,根据目标图像的突变区域,计算三维空间点的分布特征,以更新采样步长,自适应地采样深度图中的关键顶点,构建非均匀的顶点空间拓扑结构,从而使得三维模型在物体边缘区域生成更为密集的网格结构,保证模型渲染效果的真实性,而空间平坦区域生成更为稀疏的网格结构,以减少模型顶点数和片面数,提升网格模型在电子设备的渲染性能,最终得到能够三维模型渲染效果真实性和电子设备渲染性能的高效性俱佳的三维模型。In the embodiment of the present application, the electronic device can use the sampling step update strategy to perform non-uniform sampling based on the mutation area of the target image to obtain a non-uniform sampling vertex set, thereby constructing a three-dimensional model based on the set. In this solution, the electronic device can determine the corresponding sampling step update strategy based on the mutation area of the target image. That is, during the sampling process, based on the mutation area of the target image, the distribution characteristics of the three-dimensional space points are calculated to update the sampling step size. Adaptively samples key vertices in the depth map to construct a non-uniform vertex space topology, so that the 3D model generates a denser grid structure in the edge area of the object, ensuring the authenticity of the model rendering effect, while generating flat areas in space A sparser mesh structure is used to reduce the number of model vertices and sides, improve the rendering performance of the mesh model in electronic devices, and ultimately obtain a 3D model that can achieve both the authenticity of the 3D model rendering effect and the efficiency of the rendering performance of the electronic device. .
需要说明的是,深度图可以理解为:图像中每个像素值表示场景中对应空间点与拍摄主体之间的距离。It should be noted that the depth map can be understood as: each pixel value in the image represents the distance between the corresponding spatial point in the scene and the subject.
三维重建可以理解为:通过多视角图像、点云数据或深度图等离散数据,重建出三维 空间中由网格构成的物体模型或场景。Three-dimensional reconstruction can be understood as: reconstructing three-dimensional images through discrete data such as multi-view images, point cloud data, or depth maps. An object model or scene made up of grids in space.
本申请实施例提供一种三维模型构建方法,图2示出了本申请实施例提供的一种三维模型构建方法的流程图。如图2所示,本申请实施例提供的三维模型构建方法可以包括下述的步骤201至步骤203。An embodiment of the present application provides a three-dimensional model construction method. FIG. 2 shows a flow chart of a three-dimensional model construction method provided by an embodiment of the present application. As shown in Figure 2, the three-dimensional model construction method provided by the embodiment of the present application may include the following steps 201 to 203.
步骤201、电子设备确定目标图像的突变区域。Step 201: The electronic device determines the mutation area of the target image.
本申请实施例中,电子设备可以获取目标图像,并对目标图像进行图像识别处理,以确定目标图像的突变区域,该突变区域可以用于指示目标图像中的像素点(即目标图像的深度图的空间点)的分布情况,从而电子设备可以基于突变区域进行深度图非均匀采样。In the embodiment of the present application, the electronic device can acquire the target image and perform image recognition processing on the target image to determine the mutation area of the target image. The mutation area can be used to indicate the pixels in the target image (ie, the depth map of the target image). distribution of spatial points), so that the electronic device can perform non-uniform sampling of the depth map based on the mutation area.
本申请实施例中,目标图像的突变区域可以采用突变掩码值表示,即突变掩码值用于指示目标图像的深度图的突变区域(也可以称为突变带区域)。In the embodiment of the present application, the mutation area of the target image can be represented by a mutation mask value, that is, the mutation mask value is used to indicate the mutation area of the depth map of the target image (which can also be called a mutation zone area).
需要说明的是,上述突变带区域可以理解为:若深度图中相邻像素点之间的深度信息的差值大于或等于一个阈值,则将这些相邻像素点所在的图像区域称为突变带区域。It should be noted that the above mutation zone area can be understood as: if the difference in depth information between adjacent pixels in the depth map is greater than or equal to a threshold, then the image area where these adjacent pixels are located is called a mutation zone. area.
可选地,本申请实施例中,上述目标图像可以为用户可以从电子设备(例如电子设备的相册应用程序)中选择的图像;或者,上述目标图像可以为电子设备通过电子设备的摄像头拍摄得到的图像;或者,上述目标图像可以为电子设备从其他电子设备接收到的图像。Optionally, in this embodiment of the present application, the above-mentioned target image may be an image that the user can select from an electronic device (such as a photo album application of the electronic device); or the above-mentioned target image may be captured by the electronic device through a camera of the electronic device. image; alternatively, the above-mentioned target image may be an image received by the electronic device from other electronic devices.
可选地,本申请实施例中,电子设备可以通过对目标图像进行图像识别处理,以确定目标图像的深度图,并确定该深度图的突变掩码值区域(即突变区域)。具体的,结合图2,如图3所示,上述步骤201具体可以通过下述的步骤201a至步骤201c实现。Optionally, in this embodiment of the present application, the electronic device can determine the depth map of the target image by performing image recognition processing on the target image, and determine the mutation mask value area (ie, mutation area) of the depth map. Specifically, with reference to Figure 2, as shown in Figure 3, the above step 201 can be implemented through the following steps 201a to 201c.
步骤201a、电子设备采用单帧深度估计网络,确定目标图像的深度图。Step 201a: The electronic device uses a single-frame depth estimation network to determine the depth map of the target image.
可选地,本申请实施例中,电子设备通过单帧深度估计网络,对目标图像进行图像分割,以得到多个图像块;电子设备分别选取绝对的深度特征和相对的深度特征,对应估计每个图像块的绝对深度和估计相邻块的相对深度(即深度差值);电子设备构建后端求解模型,并通过后端模型建立局部特征和深度之间的相关关系,以及不同图像块之间深度的相关关系;然后电子设备通过后端求解模型对多个图像块进行训练,得到多个图像块的模型预测深度,从而得到目标图像的深度图。Optionally, in the embodiment of the present application, the electronic device performs image segmentation on the target image through a single-frame depth estimation network to obtain multiple image blocks; the electronic device selects absolute depth features and relative depth features respectively, and estimates each corresponding depth feature. The absolute depth of each image block and the estimated relative depth of adjacent blocks (ie, the depth difference); the electronic device builds a back-end solution model, and establishes the correlation between local features and depth through the back-end model, as well as the relationship between different image blocks. Correlation between depths; then the electronic device trains multiple image blocks through the back-end solution model to obtain the model predicted depths of multiple image blocks, thereby obtaining the depth map of the target image.
可选地,本申请实施例中,电子设备还可以采用单目或多目图像深度估计等其他图像深度估计方法,确定目标图像的深度图。Optionally, in this embodiment of the present application, the electronic device may also use other image depth estimation methods such as single-eye or multi-eye image depth estimation to determine the depth map of the target image.
步骤201b、电子设备获取深度图的每个像素点的深度信息,并确定至少一个深度差值。Step 201b: The electronic device obtains the depth information of each pixel of the depth map and determines at least one depth difference value.
本申请实施例中,上述至少一个深度差值中的每个深度差值为深度图的一个像素点的深度信息与一个像素领域中的一个像素点的深度信息的差值,该一个像素领域包括与深度图的一个像素点相邻的所有像素点。In the embodiment of the present application, each of the above-mentioned at least one depth difference value is the difference between the depth information of a pixel in the depth map and the depth information of a pixel in a pixel area, and the pixel area includes All pixels adjacent to a pixel in the depth map.
本申请实施例中,电子设备可以针对深度图的每个像素点,计算每个像素点的深度信息与每个像素领域中的每个像素点的深度信息的差值,即计算每个像素点的深度信息与该每个像素点相邻的所有像素点的深度信息的差值。In the embodiment of the present application, the electronic device can, for each pixel of the depth map, calculate the difference between the depth information of each pixel and the depth information of each pixel in each pixel area, that is, calculate each pixel. The difference between the depth information of each pixel and the depth information of all pixels adjacent to each pixel.
具体的,针对深度图D中的任意像素点pi,j,其中i为像素点所在的行数,j为像素点所 在的列数,该任意像素点pi,j对应的像素领域B(pi,j)={qmn|i-1≤m≤i+1,j-1≤n≤j+1};电子设备分别计算像素点pi,j与像素领域B(pi,j)中的每个像素点的深度差值(即深度信息之间的差值)。Specifically, for any pixel point p i,j in the depth map D, where i is the number of rows where the pixel point is located, and j is the number of rows where the pixel point is located. In the number of columns, the pixel area B(p i,j ) corresponding to any pixel point p i ,j = {q mn |i-1≤m≤i+1,j-1≤n≤j+1}; The electronic device separately calculates the depth difference (ie, the difference between depth information) of the pixel point p i,j and each pixel point in the pixel area B(pi ,j ).
需要说明的是,与深度图的一个像素点相邻的所有像素点可以包括:与该一个像素点在同一行或同一列的相邻像素点、与该一个像素点在一个对角线上的相邻像素点。It should be noted that all pixels adjacent to a pixel in the depth map may include: adjacent pixels in the same row or column as the pixel, and pixels on a diagonal as the pixel. adjacent pixels.
示例性地,假设深度图包括8*8的像素点。电子设备可以计算第一个像素点(即像素点p1,1)的深度信息与像素点p1,1对应的像素领域B(p1,1)中的各个像素点的深度信息的差值,该像素领域B(p1,1)包括的像素点为像素点p1,2、像素点p2,1、像素点p2,2,即电子设备可以计算像素点p1,1的深度信息与像素点p1,2的深度信息的差值、像素点p1,1的深度信息与像素点p2,1的深度信息的差值、像素点p1,1的深度信息与像素点p2,2的深度信息的差值;电子设备可以计算第二个像素点(即像素点p1,2)的深度信息与像素点p1,2对应的像素领域B(p1,2)中的各个像素点的深度信息的差值,该像素领域B(p1,2)包括的像素点为像素点p1,1、像素点p1,3、像素点p2,1、像素点p2,2、像素点p2,3,即电子设备可以计算像素点p1,2的深度信息与像素点p1,1的深度信息的差值、像素点p1,2的深度信息与像素点p1,3的深度信息的差值、像素点p1,2的深度信息与像素点p2,1的深度信息的差值、像素点p1,2的深度信息与像素点p2,2的深度信息的差值、像素点p1,2的深度信息与像素点p2,3的深度信息的差值;以此类推,直至计算深度图的所有像素点的深度信息与像素领域的像素点的深度信息的差值。For example, assume that the depth map includes 8*8 pixels. The electronic device can calculate the difference between the depth information of the first pixel (i.e. pixel p 1,1 ) and the depth information of each pixel in the pixel area B (p 1,1 ) corresponding to the pixel p 1,1 , the pixels included in the pixel area B(p 1,1 ) are pixel point p 1,2 , pixel point p 2,1 , pixel point p 2,2 , that is, the electronic device can calculate the depth of pixel point p 1,1 The difference between the information and the depth information of pixel point p 1,2 , the difference between the depth information of pixel point p 1,1 and the depth information of pixel point p 2,1 , the difference between the depth information of pixel point p 1,1 and the depth information of pixel point p 1,1 The difference between the depth information of p 2,2 ; the electronic device can calculate the depth information of the second pixel point (i.e. pixel point p 1,2 ) and the pixel area B(p 1,2 ) corresponding to the pixel point p 1,2 The difference between the depth information of each pixel in p 2,2 , pixel point p 2,3 , that is, the electronic device can calculate the difference between the depth information of pixel point p 1,2 and the depth information of pixel point p 1,1 , and the difference between the depth information of pixel point p 1,2 and The difference between the depth information of pixel point p 1,3 , the difference between the depth information of pixel point p 1,2 and the depth information of pixel point p 2,1 , the difference between the depth information of pixel point p 1,2 and pixel point p 2 , the difference between the depth information of 2 , the difference between the depth information of pixel point p 1,2 and the depth information of pixel point p 2,3 ; and so on, until the depth information and pixel area of all pixels in the depth map are calculated The difference between the depth information of the pixels.
步骤201c、电子设备根据至少一个深度差值,确定目标图像的突变区域。Step 201c: The electronic device determines the mutation area of the target image based on at least one depth difference value.
本申请实施例中,深度图中的每个像素点对应了一个或多个深度差值,即每个深度差值能够表征每个像素点与该每个像素点相邻的像素点间的深度差异,电子设备可以根据每个像素点与该每个像素点相邻的所有像素点间的深度差异,来确定该每个像素点的突变掩码值(即下述的第一数值、第二数值),从而基于每个像素点的突变掩码值,确定目标图像的突变区域。In the embodiment of the present application, each pixel in the depth map corresponds to one or more depth difference values, that is, each depth difference value can represent the depth between each pixel and the pixels adjacent to each pixel. The electronic device can determine the mutation mask value of each pixel (i.e., the following first value, second value) based on the depth difference between each pixel and all pixels adjacent to the pixel. value), thereby determining the mutation area of the target image based on the mutation mask value of each pixel.
可选地,本申请实施例中,上述步骤201c具体可以通过下述的步骤201c11和步骤201c12实现。Optionally, in this embodiment of the present application, the above step 201c can be specifically implemented through the following steps 201c11 and 201c12.
步骤201c11、电子设备将至少一个深度差值中大于或等于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第一数值。Step 201c11: The electronic device determines the depth mutation mask value of a pixel corresponding to a depth difference value greater than or equal to the first threshold in at least one depth difference value as a first value.
可以理解,电子设备可以判断至少一个深度差值中每个深度差值与第一阈值的大小关系,并根据每个深度差值与第一阈值的大小关系,确定每个深度差值对应的像素点的深度突变掩码值。It can be understood that the electronic device can determine the size relationship between each depth difference value in the at least one depth difference value and the first threshold, and determine the pixel corresponding to each depth difference value based on the size relationship between each depth difference value and the first threshold value. The depth mutation mask value of the point.
步骤201c12、电子设备将至少一个深度差值中小于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第二数值。Step 201c12: The electronic device determines the depth mutation mask value of a pixel corresponding to a depth difference value smaller than the first threshold in at least one depth difference value as a second value.
本申请实施例中,上述第二数值小于所述第一数值。其中,目标图像的突变区域为由第一数值对应的像素点组成的图像区域。In the embodiment of the present application, the second numerical value is smaller than the first numerical value. Wherein, the mutation area of the target image is an image area composed of pixels corresponding to the first numerical value.
具体的,结合图3,如图4所示,在上述步骤201c之前,本申请实施例提供的三维模 型构建方法还包括下述的步骤204,并且上述步骤201c具体可以通过下述的步骤201c1或步骤201c2实现。Specifically, with reference to Figure 3, as shown in Figure 4, before the above step 201c, the three-dimensional model provided by the embodiment of the present application The model construction method also includes the following step 204, and the above step 201c can be specifically implemented through the following step 201c1 or step 201c2.
步骤204、针对深度图的每个像素点,电子设备判断一个像素点对应的深度差值中每个深度差值是否大于或等于第一阈值。Step 204: For each pixel of the depth map, the electronic device determines whether each of the depth differences corresponding to a pixel is greater than or equal to the first threshold.
本申请实施例中,上述一个像素点为深度图的任意一个像素点。In the embodiment of the present application, the above-mentioned one pixel is any pixel in the depth map.
步骤201c1、在一个像素点对应的深度差值中至少有一个深度差值大于或等于第一阈值的情况下,电子设备确定该一个像素点的突变掩码值为第一数值。Step 201c1: When at least one of the depth differences corresponding to a pixel is greater than or equal to the first threshold, the electronic device determines that the mutation mask value of the one pixel is the first value.
本申请实施例中,若像素点pi,j在任意方向上的深度差值大于或等于第一阈值,则像素点pi,j的突变掩码值M(pi,j)为第一数值(例如1)。具体的,计算公式如公式一所示:
In the embodiment of the present application, if the depth difference of the pixel point p i,j in any direction is greater than or equal to the first threshold, the mutation mask value M(p i,j ) of the pixel point p i ,j is the first A numerical value (e.g. 1). Specifically, the calculation formula is as shown in Formula 1:
需要说明的是,像素点pi,j在任意方向上的深度差值可以理解为:像素点pi,j与像素点pi,j对应的像素领域B(pi,j)中的所有像素点的深度差值中的任意深度差值。It should be noted that the depth difference of pixel point p i,j in any direction can be understood as: pixel point p i,j and all pixels in the pixel area B(p i,j ) corresponding to pixel point p i,j Any depth difference among the depth differences of pixels.
可选地,本申请实施例中,上述第一阈值可以为电子设备系统默认的或用户预先设置的,例如第一阈值可以为0.05;上述第一数值可以电子设备系统默认的或用户预先设置的,例如第一数值可以为1或01等表示形式。Optionally, in the embodiment of the present application, the above-mentioned first threshold may be the default of the electronic device system or preset by the user. For example, the first threshold may be 0.05; the above-mentioned first value may be the default of the electronic device system or preset by the user. , for example, the first value can be expressed in the form of 1 or 01.
示例性地,假设像素点p1,1的深度信息与像素点p1,2的深度信息的差值为a,像素点p1,1的深度信息与像素点p2,1的深度信息的差值为b,像素点p1,1的深度信息与像素点p2,2的深度信息的差值为c。若差值a小于第一阈值,差值b大于第一阈值,差值c大于第一阈值,那么电子设备可以确定像素点p1,1的突变掩码值为第一数值。For example, assuming that the difference between the depth information of pixel point p 1,1 and the depth information of pixel point p 1,2 is a, the difference between the depth information of pixel point p 1,1 and the depth information of pixel point p 2,1 The difference is b, and the difference between the depth information of pixel point p 1,1 and the depth information of pixel point p 2,2 is c. If the difference a is less than the first threshold, the difference b is greater than the first threshold, and the difference c is greater than the first threshold, then the electronic device can determine that the mutation mask value of the pixel point p 1,1 is the first value.
步骤201c2、在一个像素点对应的深度差值中的所有深度差值均小于第一阈值的情况下,电子设备确定该一个像素点的突变掩码值为第二数值,以得到目标图像的突变区域。Step 201c2: When all the depth differences in the depth differences corresponding to one pixel are less than the first threshold, the electronic device determines the mutation mask value of the one pixel as the second value to obtain the mutation of the target image. area.
可选地,本申请实施例中,上述第二数值可以电子设备系统默认的或用户预先设置的,例如第二数值可以为0或00等表示形式。Optionally, in this embodiment of the present application, the above-mentioned second numerical value may be defaulted by the electronic device system or preset by the user. For example, the second numerical value may be expressed in the form of 0 or 00.
需要说明的是,针对深度图的每个像素点,电子设备均可以通过执行上述步骤204、步骤201c1、步骤201c2,以确定每个像素点的突变掩码值,即电子设备可以遍历深度图的所有像素点,得到目标图像的突变区域。It should be noted that for each pixel of the depth map, the electronic device can determine the mutation mask value of each pixel by performing the above steps 204, 201c1, and 201c2. That is, the electronic device can traverse the depth map. For all pixels, the mutation area of the target image is obtained.
示例性地,如图5所示,电子设备可以遍历目标图像的深度图的所有像素点,以确定出所有像素点的突变掩码值,从而得到目标图像的突变掩码值,图5中以黑色的线条对突变掩码值为第一数值的像素点进行示意,其他图像区域(即白色填充区域)的像素点的突变掩码值为第二数值。For example, as shown in Figure 5, the electronic device can traverse all pixels of the depth map of the target image to determine the mutation mask values of all pixels, thereby obtaining the mutation mask value of the target image. In Figure 5, The black line illustrates the pixels whose mutation mask value is the first value, and the mutation mask value of the pixels in other image areas (ie, the white filled area) is the second value.
本申请实施例中,电子设备可以针对深度图的所有像素点,确定这些像素点的突变掩码值,从而得到目标图像的突变掩码值,即电子设备通过遍历所有像素点,以更加精确地确定出目标图像的突变掩码值,从而使得电子设备能够采用合适的采样步长更新策略更新采样步长,以自适应地采样深度图中的关键顶点,构建非均匀的顶点空间拓扑结构。In the embodiment of the present application, the electronic device can determine the mutation mask value of all pixels of the depth map, thereby obtaining the mutation mask value of the target image. That is, the electronic device traverses all pixels to more accurately determine the mutation mask value of the target image. The mutation mask value of the target image is determined, so that the electronic device can update the sampling step using an appropriate sampling step update strategy to adaptively sample key vertices in the depth map and construct a non-uniform vertex space topology.
步骤202、电子设备基于目标图像的突变区域和与突变区域对应的采样步长更新策略, 对目标图像进行非均匀采样,得到非均匀采样顶点集合。Step 202: The electronic device updates the strategy based on the mutation area of the target image and the sampling step size corresponding to the mutation area, Perform non-uniform sampling on the target image to obtain a non-uniform sampling vertex set.
本申请实施例中,电子设备可以基于突变掩码值和与突变掩码值对应的采样步长更新策略,进行深度图非均匀采样,得到非均匀采样顶点集合(也可以称为深度图非均匀采样顶点集合)。In the embodiment of the present application, the electronic device can perform non-uniform sampling of the depth map based on the mutation mask value and the sampling step update strategy corresponding to the mutation mask value, and obtain a non-uniform sampling vertex set (which can also be called non-uniform depth map). sample vertex collection).
本申请实施例中,电子设备在确定突变掩码值之后,可以根据目标图像的突变掩码值确定与突变掩码值对应的采样步长更新策略,即根据目标图像中的像素点(即目标图像的深度图的空间点)的分布情况,以确定更新采样步长的方式,即确定采用过程中需要使用的至少一个采样步长,从而基于该至少一个采样步长进行深度图非均匀采样。In the embodiment of the present application, after determining the mutation mask value, the electronic device can determine the sampling step update strategy corresponding to the mutation mask value according to the mutation mask value of the target image, that is, according to the pixel points in the target image (i.e., the target The distribution of spatial points of the depth map of the image) to determine the way to update the sampling step, that is, to determine at least one sampling step that needs to be used in the adoption process, so as to perform non-uniform sampling of the depth map based on the at least one sampling step.
需要说明的是,上述深度图非均匀采样可以理解为:电子设备在对深度图进行顶点采样(也可以理解为像素点采样)时,每采样一个顶点后,即电子设备在进行下一个顶点的采样前,电子设备会根据目标图像的突变掩码值(即下述实施例所述的深度突变掩码值之和以及顶点采样掩码值之和),确定是否需要更新采样步长,并在确定需要更新采样步长的情况下,采用更新后的采样步长进行下一个顶点的采样,直至完成深度图的顶点采样,得到深度图非均匀采样顶点集合(即包括对深度图进行顶点采样的所有采样顶点)。It should be noted that the above-mentioned non-uniform sampling of the depth map can be understood as: when the electronic device performs vertex sampling (which can also be understood as pixel sampling) on the depth map, after each vertex is sampled, the electronic device performs sampling of the next vertex. Before sampling, the electronic device will determine whether the sampling step size needs to be updated based on the mutation mask value of the target image (that is, the sum of the depth mutation mask values and the sum of the vertex sampling mask values described in the following embodiments), and then When it is determined that the sampling step needs to be updated, the updated sampling step is used to sample the next vertex until the vertex sampling of the depth map is completed, and a non-uniform sampling vertex set of the depth map (that is, including the vertex sampling of the depth map) is obtained. all sampled vertices).
可选地,本申请实施例中,上述步骤202具体可以通过下述的步骤202a至步骤202d实现。Optionally, in this embodiment of the present application, the above step 202 can be specifically implemented through the following steps 202a to 202d.
步骤202a、针对目标图像的深度图中的每个像素点,电子设备基于任意一个像素点的初始化采样步长和深度图的所有像素点的突变掩码值,确定第三数值,并根据该任意一个像素点的初始化采样步长和已采样的所有顶点采样掩码,确定第四数值。Step 202a: For each pixel in the depth map of the target image, the electronic device determines a third value based on the initialization sampling step of any pixel and the mutation mask value of all pixels in the depth map, and based on the arbitrary The initial sampling step size of a pixel and the sampling mask of all sampled vertices determine the fourth value.
本申请实施例中,上述第三数值为任意一个像素点对应的采样步长窗口内的深度突变掩码值之和,第四数值为任意一个像素点对应的采样步长窗口内的顶点采样掩码值之和。In the embodiment of the present application, the above-mentioned third value is the sum of the depth mutation mask values in the sampling step window corresponding to any pixel point, and the fourth value is the vertex sampling mask value in the sampling step window corresponding to any pixel point. The sum of code values.
本申请实施例中,针对深度图中的每个像素点,电子设备可以根据任意一个像素点的初始化采样步长,确定该任意一个像素点对应的采样步长窗口,并确定该采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和。In the embodiment of the present application, for each pixel in the depth map, the electronic device can determine the sampling step window corresponding to any pixel according to the initial sampling step of any pixel, and determine the sampling step window. The sum of depth mutation mask values and the sum of vertex sampling mask values within .
具体的,针对深度图D中的任意像素点pi,j,设定采样步长为s,令初始值(即初始化采样步长)s=10(也可以为其他预设的数值),且设定顶点采样掩码为R(pi,j),其中,R(pi,j)=0表示像素点pi,j未采样,R(pi,j)=1表示像素点pi,j已采样,令初始值(即初始化顶点采样掩码)R(pi,j)=0。Specifically, for any pixel point p i,j in the depth map D, set the sampling step to s, let the initial value (ie, initialization sampling step) s=10 (it can also be other preset values), and Set the vertex sampling mask to R(p i,j ), where R(p i,j )=0 indicates that the pixel point p i,j is not sampled, and R(p i,j )=1 indicates that the pixel point p i , j has been sampled, let the initial value (that is, initialize the vertex sampling mask) R (p i, j ) = 0.
电子设备采用当前采样步长s,获得采样像素点集合Pa(pi,j)={qmn|i-s≤m≤i+s,j-s≤n≤j+s},并计算像素点集合Pa(pi,j)内的所有像素点的深度突变掩码值之和Sa(pi,j),具体的,计算公式如公式二所示:
The electronic device uses the current sampling step size s to obtain the sampling pixel point set P a (p i, j ) = {q mn | is ≤ m ≤ i + s, js ≤ n ≤ j + s}, and calculates the pixel point set P The sum of the depth mutation mask values S a (p i,j ) of all pixels within a (p i,j ). Specifically, the calculation formula is as shown in Formula 2:
电子设备采用当前采样步长s,获得采样顶点像素点集合Pr(pi,j)={qmn|i≤m≤i+s-1,j≤n≤j+s-1},并计算采样顶点像素点集合Pr(pi,j)内的所有像素点的顶点采样掩码值之和Sr(pi,j),具体的,计算公式如公式三所示:
The electronic device uses the current sampling step size s to obtain the sampling vertex pixel point set P r (p i, j ) = {q mn |i≤m≤i+s-1,j≤n≤j+s-1}, and Calculate the sum of the vertex sampling mask values S r (p i,j ) of all pixels in the sampled vertex pixel set P r (p i,j ). Specifically, the calculation formula is as shown in Formula 3:
步骤202b、在第三数值或第四数值大于第二阈值的情况下,电子设备更新初始化采样步长,直至满足第一条件。Step 202b: If the third value or the fourth value is greater than the second threshold, the electronic device updates the initialization sampling step until the first condition is met.
本申请实施例中,上述第一条件为更新后的采样步长等于第三阈值,或者任意一个像素点对应的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和均等于第二阈值。In the embodiment of this application, the above-mentioned first condition is that the updated sampling step is equal to the third threshold, or the sum of the depth mutation mask values and the sum of the vertex sampling mask values within the sampling step window corresponding to any pixel point equal to the second threshold.
本申请实施例中,针对深度图中的每个像素点,电子设备可以判断每个像素点的第三数值或第四数值是否大于第二阈值,从而确定是否更新每个像素点的初始化采样步长。并且,在电子设备更新任意像素点的初始化采样步长的情况下,电子设备对该任意像素点进行顶点采样的采样步长发生改变,那么电子设备对该任意像素点的进行顶点采样的采样步长窗口也会随之发生改变,电子设备可以实时确定该任意像素点的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和,以判断该任意像素点的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和是否等于第二阈值。In the embodiment of the present application, for each pixel in the depth map, the electronic device can determine whether the third value or the fourth value of each pixel is greater than the second threshold, thereby determining whether to update the initial sampling step of each pixel. long. Moreover, when the electronic device updates the initial sampling step of any pixel point and the sampling step of the electronic device for vertex sampling of the arbitrary pixel changes, then the sampling step of the electronic device for vertex sampling of the arbitrary pixel changes. The long window will also change accordingly. The electronic device can determine the sum of the depth mutation mask values and the sum of the vertex sampling mask values within the sampling step window of the arbitrary pixel in real time to determine the sampling step of the arbitrary pixel. Whether the sum of depth mutation mask values and the sum of vertex sampling mask values within the long window is equal to the second threshold.
可选地,本申请实施例中,电子设备可以将像素点的初始化采样步长更新为目标采样步长,目标采样步长小于初始化采样步长,即电子设备可以缩小像素点的初始化采样步长为目标采样步长。具体的,电子设备可以计算像素点的初始化采样步长与一个预设数值的差值,以将该差值确定为目标采样步长。例如,若Sa>0或Sr>0,则目标采样步长s‘=s-1,s为像素点的初始化采样步长。Optionally, in the embodiment of the present application, the electronic device can update the initial sampling step size of the pixel point to the target sampling step size, and the target sampling step size is smaller than the initial sampling step size, that is, the electronic device can reduce the initial sampling step size of the pixel point. is the target sampling step size. Specifically, the electronic device can calculate the difference between the initial sampling step size of the pixel and a preset value to determine the difference as the target sampling step size. For example, if Sa>0 or Sr>0, then the target sampling step size s'=s-1, and s is the initial sampling step size of the pixel.
可以理解,在电子设备更新任意一个像素点的初始化采样步长之后,电子设备可以继续重复执行上述步骤202a和步骤202b,以继续确定该任意一个像素点的第三数值和第四数值,从而确定是否继续更新该任意一个像素点的采样步长,即确定更新该任意一个像素点的采样步长后是否满足第一条件,从而确定是否停止更新该任意一个像素点的采样步长。例如,若Sa=0且Sr=0,或s=1,则停止更新该任意一个像素点的采样步长。It can be understood that after the electronic device updates the initial sampling step size of any one pixel, the electronic device can continue to repeatedly perform the above steps 202a and 202b to continue to determine the third value and the fourth value of any one pixel, thereby determining Whether to continue updating the sampling step size of any pixel point is to determine whether the first condition is met after updating the sampling step size of any pixel point, thereby determining whether to stop updating the sampling step size of any pixel point. For example, if Sa=0 and Sr=0, or s=1, stop updating the sampling step size of any pixel.
可选地,本申请实施例中,在第三数值小于或等于第二阈值,或者,第四数值小于或等于第二阈值的情况下,电子设备不更新一个像素点的初始化采样步长,即采用一个像素点的初始化采样步长进行顶点采样。Optionally, in this embodiment of the present application, when the third value is less than or equal to the second threshold, or the fourth value is less than or equal to the second threshold, the electronic device does not update the initialization sampling step size of a pixel, that is, Use an initial sampling step of one pixel for vertex sampling.
步骤202c、电子设备根据更新后的采样步长,从任意一个像素点对应的采样步长窗口内确定目标采样顶点,并更新该任意一个像素点对应的采样步长窗口内的顶点采样掩码值,得到一个深度图采样顶点集合。Step 202c: The electronic device determines the target sampling vertex from the sampling step window corresponding to any pixel point according to the updated sampling step size, and updates the vertex sampling mask value in the sampling step window corresponding to any pixel point. , obtain a depth map sampling vertex set.
本申请实施例中,电子设备根据更新后的采样步长,确定任意一个像素点对应的采样步长窗口,然后将该采样步长窗口内的像素点确定为目标采样顶点。具体的,电子设备可以根据更新后的采样步长(例如目标采样步长s‘),对像素点pi,j确定目标采样顶点为{pi,j,pi+s,j,pi,j+s,pi+s,j+s}。In the embodiment of the present application, the electronic device determines the sampling step window corresponding to any pixel point based on the updated sampling step size, and then determines the pixel point within the sampling step window as the target sampling vertex. Specifically, the electronic device can determine the target sampling vertex for the pixel point p i,j as {p i,j ,pi +s,j , pi ,j+s ,p i+s,j+s }.
本申请实施例中,在电子设备更新任意一个像素点的采样步长后,该任意一个像素点的采样步长窗口会发生改变,那么该任意一个像素点对应的采样步长窗口内的顶点采样掩 码值也会发生变化,即电子设备会更新该任意一个像素点对应的采样步长窗口内的顶点采样掩码值。具体的,电子设备更新一个像素点(Pr(pi,j))对应的采样步长窗口内的顶点采样掩码值R(qmn∈Pr(pi,j))=1,Pr(pi,j)为采样顶点像素点集合。In the embodiment of the present application, after the electronic device updates the sampling step size of any pixel point, the sampling step size window of any pixel point will change, then the vertex sampling within the sampling step size window corresponding to any pixel point will be cover The code value will also change, that is, the electronic device will update the vertex sampling mask value within the sampling step window corresponding to any pixel point. Specifically, the electronic device updates the vertex sampling mask value R(q mn ∈P r (p i,j ))=1, P within the sampling step window corresponding to a pixel point ( P r (p i,j )) r (p i,j ) is the collection of sampling vertex pixel points.
本申请实施例中,针对任意一个像素点,该任意一个像素点的深度图采样顶点集合包括该任意一个像素点的目标采样顶点和更新该任意一个像素点对应的采样步长窗口内的顶点采样掩码值。In the embodiment of the present application, for any pixel point, the depth map sampling vertex set of the arbitrary pixel point includes the target sampling vertex of the arbitrary pixel point and the vertex sampling within the sampling step window corresponding to the arbitrary pixel point is updated. Mask value.
步骤202d、电子设备遍历目标图像的深度图的所有像素点,得到非均匀采样顶点集合。Step 202d: The electronic device traverses all pixels of the depth map of the target image to obtain a non-uniform sampling vertex set.
可以理解,针对目标图像的深度图中的每个像素点,一个像素点对应一个深度图采样顶点集合,由目标图像的深度图中的所有像素点对应的深度图采样顶点集合,可以得到深度图非均匀采样顶点集合。It can be understood that for each pixel in the depth map of the target image, one pixel corresponds to a depth map sampling vertex set, and the depth map can be obtained from the depth map sampling vertex set corresponding to all pixels in the depth map of the target image. Non-uniformly sampled vertex collections.
需要说明的是,针对目标图像的深度图中的每个像素点,电子设备可以通过执行上述步骤202a至步骤202d,以得到每个像素点对应的深度图采样顶点集合,从而得到深度图非均匀采样顶点集合。It should be noted that for each pixel in the depth map of the target image, the electronic device can obtain the depth map sampling vertex set corresponding to each pixel by performing the above steps 202a to 202d, thereby obtaining the depth map non-uniformity. Sample a collection of vertices.
本申请实施例中,电子设备在进行顶点采样时,可以针对每个像素点判断是否更新采样步长,并在确定更新采样步长后,以更新后的采样步长为参考进行顶点采样以及顶点采样掩码值的更新,以得到每个像素点的深度图采样顶点集合,从而得到深度图非均匀采样顶点集合;如此,可以保证采样步长能够适应场景的空间分布(即目标图像的深度图的空间点的分布情况),在平坦处采用更大的步长,减小模型顶点片面数,而在物体边缘处采用更小的步长,提升模型细节精细度。此外,保证模型各片面间不存在重叠,避免冗余顶点和片面。In the embodiment of the present application, when performing vertex sampling, the electronic device can determine whether to update the sampling step for each pixel point, and after determining to update the sampling step, use the updated sampling step as a reference to perform vertex sampling and vertex sampling. The sampling mask value is updated to obtain the depth map sampling vertex set of each pixel, thereby obtaining the depth map non-uniform sampling vertex set; in this way, it can be ensured that the sampling step size can adapt to the spatial distribution of the scene (i.e., the depth map of the target image (distribution of spatial points), using a larger step size in the flat area to reduce the number of vertices of the model, and using a smaller step size at the edge of the object to improve the fineness of model details. In addition, it is ensured that there is no overlap between the sides of the model and redundant vertices and sides are avoided.
步骤203、电子设备基于非均匀采样顶点集合,构建三维模型。Step 203: The electronic device constructs a three-dimensional model based on the non-uniform sampling vertex set.
本申请实施例中,电子设备可以针对非均匀采样顶点集合中的每个采样顶点,进行三维映射,得到每个采样顶点的三维空间点;并且,电子设备可以针对非均匀采样顶点集合中的采样顶点,进行顶点连接,得到非均匀采样顶点集合的三维片面;从而,电子设备根据每个采样顶点的三维空间点和非均匀采样顶点集合的三维片面,构建得到三维模型。In the embodiment of the present application, the electronic device can perform three-dimensional mapping on each sampling vertex in the non-uniform sampling vertex set to obtain the three-dimensional space point of each sampling vertex; and, the electronic device can perform three-dimensional mapping on each sampling vertex in the non-uniform sampling vertex set. Vertices are connected by vertices to obtain a three-dimensional slice of the non-uniformly sampled vertex set; thus, the electronic device constructs a three-dimensional model based on the three-dimensional space point of each sampled vertex and the three-dimensional slice of the non-uniformly sampled vertex set.
可选地,本申请实施例中,上述步骤203具体可以通过下述的步骤203a至步骤203c实现。Optionally, in this embodiment of the present application, the above step 203 can be specifically implemented through the following steps 203a to 203c.
步骤203a、电子设备将非均匀采样顶点集合映射为三维空间点集,以构建三维顶点。Step 203a: The electronic device maps the non-uniformly sampled vertex set into a three-dimensional space point set to construct three-dimensional vertices.
本申请实施例中,电子设备可以对非均匀采样顶点集合中的每个采样顶点分别进行映射,即将每个采样顶点分别映射为一个三维空间点,以得到非均匀采样顶点集合中的所有采样顶点的三维空间点,即三维空间点集,从而得到非均匀采样顶点集合的三维顶点。In the embodiment of the present application, the electronic device can separately map each sampling vertex in the non-uniform sampling vertex set, that is, map each sampling vertex into a three-dimensional space point to obtain all sampling vertices in the non-uniform sampling vertex set. The three-dimensional space points, that is, the three-dimensional space point set, thereby obtaining the three-dimensional vertices of the non-uniformly sampled vertex set.
具体的,针对非均匀采样顶点集合中的任意采样顶点pi,j,假设采样顶点pi,j对应的三维空间点的坐标为Pi,j={x,y,z};电子设备可以采用计算公式四,对采样顶点pi,j进行映射:
Specifically, for any sampling vertex p i,j in the non-uniform sampling vertex set, it is assumed that the coordinates of the three-dimensional space point corresponding to the sampling vertex p i,j are P i,j = {x, y, z}; the electronic device can Use calculation formula 4 to map the sampling vertices p i,j :
其中,W为目标图像的深度图的宽度,H为目标图像的深度图的高度,D为目标图像的深度图,f为映射超参数,例如设定f=500。Among them, W is the width of the depth map of the target image, H is the height of the depth map of the target image, D is the depth map of the target image, and f is the mapping hyperparameter, for example, set f=500.
步骤203b、电子设备构建非均匀采样顶点集合中的各个顶点之间的连接关系,以构建三维片面。Step 203b: The electronic device constructs a connection relationship between each vertex in the non-uniformly sampled vertex set to construct a three-dimensional surface.
可选地,本申请实施例中,电子设备可以对非均匀采样顶点集合中的所有采样顶点进行连接,即将非均匀采样顶点集合中的任意采样顶点分别与其他采样顶点进行连接,以得到三维片面。Optionally, in the embodiment of the present application, the electronic device can connect all sampling vertices in the non-uniform sampling vertex set, that is, connect any sampling vertex in the non-uniform sampling vertex set with other sampling vertices to obtain a three-dimensional one-sided .
可选地,本申请实施例中,针对每个像素点的深度图采样顶点集合,电子设备可以对一个像素点的深度图采样顶点集合中的第一非均匀采样顶点集合中的所有采样顶点进行连接,得到一个空间三角片面,并对该一个像素点的深度图采样顶点集合中的第二非均匀采样顶点集合中的所有采样顶点进行连接,得到另一个空间三角片面;电子设备遍历所有像素点的深度图采样顶点集合,可以得到每个像素点对应的空间三角片面,从而得到深度图非均匀采样顶点集合的三维片面。其中,电子设备以一个像素点的深度图采样顶点集合的一个对角线为分界线,将一个像素点的深度图采样顶点集合划分为第一非均匀采样顶点集合和第二非均匀采样顶点集合。Optionally, in the embodiment of the present application, for the depth map sampling vertex set of each pixel point, the electronic device can perform the sampling on all sampling vertices in the first non-uniform sampling vertex set in the depth map sampling vertex set of one pixel point. Connect to obtain a space triangle slice, and connect all the sampling vertices in the second non-uniform sampling vertex set of the depth map sampling vertex set of a pixel point to obtain another space triangle slice; the electronic device traverses all pixels By using the depth map sampling vertex set, the spatial triangular slice corresponding to each pixel point can be obtained, thereby obtaining the three-dimensional slice of the depth map non-uniformly sampling vertex set. Wherein, the electronic device uses a diagonal line of the depth map sampling vertex set of a pixel as a dividing line, and divides the depth map sampling vertex set of a pixel into a first non-uniform sampling vertex set and a second non-uniform sampling vertex set. .
示例性地,假设一个像素点的深度图采样顶点集合为{pi,j,pi+s,j,pi,j+s,pi+s,j+s},电子设备可以分别以第一非均匀采样顶点集合{pi,j,pi+s,j,pi+s,j+s}和第二非均匀采样顶点集合{pi,j,pi,j+s,pi+s,j+s}构建两个空间三角片面,即将第一非均匀采样顶点集合{pi,j,pi+s,j,pi+s,j+s}中的所有采样顶点进行连接,得到一个空间三角片面,并将第二非均匀采样顶点集合{pi,j,pi,j+s,pi+s,j+s}中的所有采样顶点进行连接,得到另一个空间三角片面。For example, assuming that the depth map sampling vertex set of a pixel is {pi ,j ,pi +s,j ,pi ,j+s , pi+s,j+s }, the electronic device can be The first non-uniform sampling vertex set {p i,j , p i+s,j , p i+s,j+s } and the second non-uniform sampling vertex set {p i,j ,p i,j+s , p i+s,j+s } Construct two spatial triangle faces, that is, all samples in the first non-uniform sampling vertex set {p i,j ,p i+s,j ,p i+s,j+s } The vertices are connected to obtain a space triangle surface, and all the sampling vertices in the second non-uniform sampling vertex set {p i,j , p i,j+s , p i+s,j+s } are connected to obtain Another space triangle.
步骤203c、电子设备基于三维顶点和三维片面,得到三维模型。Step 203c: The electronic device obtains a three-dimensional model based on the three-dimensional vertices and three-dimensional faces.
本申请实施例中,电子设备可以根据三维顶点和三维片面,进行模型构建,得到三维模型。具体的,电子设备可以将三维顶点和三维片面进行连接,得到三维模型。In the embodiments of the present application, the electronic device can construct a model based on the three-dimensional vertices and three-dimensional faces to obtain a three-dimensional model. Specifically, electronic equipment can connect three-dimensional vertices and three-dimensional faces to obtain a three-dimensional model.
可选地,本申请实施例中,针对每个像素点对应的两个空间三角片面,电子设备可以将深度图非均匀采样顶点集合中的一个顶点对应的三维顶点与该三维顶点对应的像素点所对应的两个空间三角片面进行连接,电子设备遍历所有像素点,以将所有像素点与各自对应的两个空间三角片面进行连接,得到三维模型。Optionally, in the embodiment of the present application, for the two spatial triangles corresponding to each pixel point, the electronic device can compare the three-dimensional vertex corresponding to one vertex in the depth map non-uniform sampling vertex set and the pixel point corresponding to the three-dimensional vertex. The corresponding two space triangles are connected, and the electronic device traverses all pixels to connect all pixels with the two corresponding space triangles to obtain a three-dimensional model.
本申请实施例提供一种三维模型构建方法,电子设备可以基于目标图像的突变区域,采用采样步长更新策略,进行非均匀采样,以得到非均匀采样顶点集合,从而基于该集合进行三维模型的构建。本方案中,电子设备可以根据目标图像的突变区域,确定相应的采样步长更新策略,即在采样过程中,根据目标图像的突变区域,计算三维空间点的分布特 征,以更新采样步长,自适应地采样深度图中的关键顶点,构建非均匀的顶点空间拓扑结构,从而使得三维模型在物体边缘区域生成更为密集的网格结构,保证模型渲染效果的真实性,而空间平坦区域生成更为稀疏的网格结构,以减少模型顶点数和片面数,提升网格模型在电子设备的渲染性能,最终得到能够三维模型渲染效果真实性和电子设备渲染性能的高效性俱佳的三维模型。Embodiments of the present application provide a three-dimensional model construction method. The electronic device can use the sampling step update strategy to perform non-uniform sampling based on the mutation area of the target image to obtain a non-uniform sampling vertex set, and then perform a three-dimensional model based on the set. Construct. In this solution, the electronic device can determine the corresponding sampling step update strategy based on the mutation area of the target image. That is, during the sampling process, the distribution characteristics of the three-dimensional space points are calculated based on the mutation area of the target image. feature to update the sampling step size, adaptively sample key vertices in the depth map, and construct a non-uniform vertex space topology, so that the 3D model generates a denser grid structure in the edge area of the object, ensuring the model rendering effect. Authenticity, while the flat area of space generates a sparser grid structure to reduce the number of model vertices and sides, improve the rendering performance of the grid model in electronic devices, and ultimately achieve the authenticity of the three-dimensional model rendering effect and the rendering performance of electronic devices A highly efficient 3D model.
可选地,本申请实施例中,电子设备可以对三维模型进行图像渲染,得到渲染后的图像。具体的,电子设备可以采用OpenGL等图形渲染引擎,加载三维模型的顶点和片面,以及相应的纹理,并调整相应的渲染参数,以得到三维场景的渲染图像。Optionally, in this embodiment of the present application, the electronic device can perform image rendering on the three-dimensional model to obtain a rendered image. Specifically, the electronic device can use a graphics rendering engine such as OpenGL to load the vertices and sides of the three-dimensional model, as well as the corresponding textures, and adjust the corresponding rendering parameters to obtain a rendered image of the three-dimensional scene.
可选地,本申请实施例中,上述步骤201具体可以通过下述的步骤301实现。Optionally, in this embodiment of the present application, the above step 201 can be specifically implemented through the following step 301.
步骤301、电子设备对目标图像的深度图进行中值滤波,并对中值滤波后的深度图中的边缘异常深度信息进行修正,以得到修正后的突变区域。Step 301: The electronic device performs median filtering on the depth map of the target image, and corrects the edge abnormal depth information in the median-filtered depth map to obtain a corrected mutation area.
本申请实施例中,电子设备可以先对目标图像的深度图进行中值滤波,然后对中值滤波后的深度图中存在异常的深度信息进行修正,电子设备再基于中值滤波和修正后的突变掩码值进行非均匀采样。In the embodiment of the present application, the electronic device can first perform median filtering on the depth map of the target image, and then correct abnormal depth information in the depth map after the median filtering. The electronic device can then perform median filtering and corrected depth information based on the median filtering and the corrected depth information. Mutation mask values are non-uniformly sampled.
可选地,本申请实施例中,由于单帧深度估计网络的深度有限,在物体边缘区域,即深度突变带区域存在大量深度异常值,将使物体边缘的渲染效果产生扭曲,因此电子设备可以对物体边缘异常深度值进行修正。Optionally, in the embodiment of the present application, due to the limited depth of the single-frame depth estimation network, there are a large number of depth outliers in the object edge area, that is, the depth mutation zone area, which will distort the rendering effect of the object edge, so the electronic device can Correct abnormal depth values at the edges of objects.
示例性地,结合图5,如图6所示,电子设备对目标图像的深度图进行中值滤波后,对目标图像的深度图中的边缘异常深度信息进行修正,图6中以黑色的线条对修正后的突变掩码值进行示意,即将图5中存在边缘异常深度信息的像素点的突变掩码值,从第一数值更改为第二数值。For example, in conjunction with Figure 5, as shown in Figure 6, after the electronic device performs median filtering on the depth map of the target image, the edge abnormal depth information in the depth map of the target image is corrected, as shown in black lines in Figure 6 The corrected mutation mask value is illustrated, that is, the mutation mask value of the pixels with edge abnormal depth information in Figure 5 is changed from the first value to the second value.
本申请实施例中,电子设备可以先对目标图像的深度图进行中值滤波,然后再对中值滤波后的深度图中的边缘异常深度信息进行修正,以通过中值滤波和修正这两个过程对深度图中边缘异常深度信息进行处理,从而提升深度图的深度信息的精确性。In the embodiment of the present application, the electronic device can first perform median filtering on the depth map of the target image, and then correct the edge abnormal depth information in the depth map after the median filtering, so as to pass the two methods of median filtering and correction. The process processes edge abnormal depth information in the depth map, thereby improving the accuracy of the depth information in the depth map.
可选地,本申请实施例中,上述步骤301具体可以通过下述的步骤301a至步骤301c实现。Optionally, in this embodiment of the present application, the above step 301 can be specifically implemented through the following steps 301a to 301c.
步骤301a、针对目标图像的深度图中的每个像素点,电子设备采用预设滤波窗口半径,确定任意一个像素点对应的滤波像素集合,并确定滤波像素集合中的所有像素点的权重值。Step 301a: For each pixel in the depth map of the target image, the electronic device uses a preset filter window radius to determine the filtered pixel set corresponding to any pixel, and determine the weight values of all pixels in the filtered pixel set.
本申请实施例中,针对目标图像的深度图D中任意像素点pi,j,滤波窗口半径为r(即预设滤波窗口半径为r),该任意像素点pi,j对应的滤波像素集合F(pi,j)={qmn|i-r≤e≤i+r,j-r≤n≤j+r},定义像素点q∈R(pi,j)的权重函数如公式五所示:
In the embodiment of this application, for any pixel point p i,j in the depth map D of the target image, the filter window radius is r (that is, the preset filter window radius is r), and the filter pixel corresponding to the arbitrary pixel point p i,j Set F(p i,j )={q mn |ir≤e≤i+r,jr≤n≤j+r}, and define the weight function of pixel point q∈R(p i,j ) as shown in Formula 5 :
其中,M为目标图像的突变掩码值,D(q)为像素点q的深度图特征值。Among them, M is the mutation mask value of the target image, and D(q) is the depth map feature value of pixel point q.
步骤301b、电子设备根据滤波像素集合中的所有像素点的权重值,将任意一个像素点的深度信息更新为目标深度信息。 Step 301b: The electronic device updates the depth information of any pixel to the target depth information based on the weight values of all pixels in the filtered pixel set.
本申请实施例中,上述目标深度信息为任意一个像素点的相邻像素点的深度信息的中值。In the embodiment of the present application, the above-mentioned target depth information is the median value of the depth information of adjacent pixels of any pixel.
本申请实施例中,电子设备可以将像素集合R(pi,j)按照权重值wpq进行排序(例如升序排序),并将像素点p的深度值D(p)更新为像素p*的深度值D(p*)(即目标深度信息),其中像素p*的计算公式如公式六所示:
In the embodiment of the present application, the electronic device can sort the pixel set R(pi ,j ) according to the weight value w pq (for example, in ascending order), and update the depth value D(p) of the pixel point p to the depth value D(p) of the pixel p * . Depth value D(p * ) (that is, target depth information), where the calculation formula of pixel p * is as shown in Formula 6:
步骤301c、电子设备遍历目标图像的深度图中的所有像素点,以得到修正后的突变区域。Step 301c: The electronic device traverses all pixels in the depth map of the target image to obtain the corrected mutation area.
本申请实施例中,电子设备对目标图像的深度图中的边缘异常深度信息进行修正,以得到修正后的突变掩码值(即修正后的突变区域)。In the embodiment of the present application, the electronic device corrects the edge abnormal depth information in the depth map of the target image to obtain the corrected mutation mask value (that is, the corrected mutation area).
可以理解,针对目标图像的深度图中的每个像素点,电子设备可以通过执行上述步骤301a和步骤301b,以实现对目标图像的深度图中的边缘异常深度信息进行修正。It can be understood that for each pixel in the depth map of the target image, the electronic device can correct the edge abnormal depth information in the depth map of the target image by performing the above steps 301a and 301b.
可选地,本申请实施例中,上述步骤301c中的“电子设备对目标图像的深度图进行中值滤波”具体可以通过下述的步骤301d和步骤301e实现。Optionally, in this embodiment of the present application, "the electronic device performs median filtering on the depth map of the target image" in the above-mentioned step 301c can be specifically implemented through the following steps 301d and 301e.
步骤301d、电子设备基于目标滤波窗口半径,对目标图像的深度图进行第一次的中值滤波,并更新目标滤波窗口半径。Step 301d: The electronic device performs the first median filtering on the depth map of the target image based on the target filter window radius, and updates the target filter window radius.
本申请实施例中,电子设备可以预先设定中值滤波的迭代次数,电子设备可以循环重复执行上述步骤301a至步骤301c,其中,在迭代过程中,中值滤波窗口半径依次减小。In this embodiment of the present application, the electronic device can preset the number of iterations of the median filter, and the electronic device can repeatedly perform the above steps 301a to 301c in a loop, wherein during the iteration process, the radius of the median filter window is successively reduced.
步骤301e、电子设备基于更新后的目标滤波窗口半径,对第一次中值滤波后的深度图进行下一次的中值滤波,并继续更新目标滤波窗口半径,直至完成预设次数的中值滤波,以对目标图像的深度图进行中值滤波。Step 301e: The electronic device performs the next median filtering on the depth map after the first median filtering based on the updated target filtering window radius, and continues to update the target filtering window radius until the preset number of median filterings is completed. , to perform median filtering on the depth map of the target image.
本申请实施例中,在每次迭代过程中,电子设备可以实时更新突变掩码值M与深度图D,经预设次数(例如5次)的迭代运算后,可以再次重复上述步骤201及相关方案,得到目标图像的最终突变掩码值。In the embodiment of the present application, during each iteration process, the electronic device can update the mutation mask value M and the depth map D in real time. After a preset number of iteration operations (for example, 5 times), the above step 201 and related steps can be repeated again. scheme to obtain the final mutation mask value of the target image.
本申请实施例中,电子设备经过多次基于突变掩码值的中值滤波运算,使得深度突变带的宽度大幅减小,有效修正了物体边缘深度异常值,提升深度图精度。In the embodiment of the present application, the electronic device undergoes multiple median filtering operations based on the mutation mask value, which greatly reduces the width of the depth mutation band, effectively corrects the depth outliers at the edge of the object, and improves the accuracy of the depth map.
需要说明的是,本申请实施例提供的三维模型构建方法,执行主体还可以为三维模型构建装置。本申请实施例中以三维模型构建装置执行三维模型构建方法为例,说明本申请实施例提供的三维模型构建装置。It should be noted that, for the three-dimensional model construction method provided by the embodiments of the present application, the execution subject may also be a three-dimensional model construction device. In the embodiment of the present application, a three-dimensional model construction device executing a three-dimensional model construction method is used as an example to illustrate the three-dimensional model construction device provided by the embodiment of the present application.
图7示出了本申请实施例中涉及的三维模型构建装置的一种可能的结构示意图。如图7所示,该三维模型构建装置70可以包括:确定模块71、采样模块72和构建模块73。Figure 7 shows a possible structural schematic diagram of the three-dimensional model building device involved in the embodiment of the present application. As shown in FIG. 7 , the three-dimensional model construction device 70 may include: a determination module 71 , a sampling module 72 and a construction module 73 .
其中,确定模块71,用于确定目标图像的突变区域。采样模块72,用于基于确定模块71确定的目标图像的突变区域和与该突变区域对应的采样步长更新策略,对目标图像进行非均匀采样,得到非均匀采样顶点集合。构建模块73,用于基于采样模块72采样得到的非均匀采样顶点集合,构建三维模型。Among them, the determination module 71 is used to determine the mutation area of the target image. The sampling module 72 is configured to non-uniformly sample the target image based on the mutation area of the target image determined by the determination module 71 and the sampling step update strategy corresponding to the mutation area, to obtain a non-uniform sampling vertex set. The construction module 73 is used to construct a three-dimensional model based on the non-uniform sampling vertex set sampled by the sampling module 72 .
在一种可能的实现方式中,上述确定模块71,具体用于采用单帧深度估计网络,确定目标图像的深度图;并获取深度图的每个像素点的深度信息,并确定至少一个深度差值, 每个深度差值为深度图的一个像素点的深度信息与一个像素领域中的一个像素点的深度信息的差值,该一个像素领域包括与深度图的一个像素点相邻的所有像素点;以及根据至少一个深度差值,确定目标图像的突变区域。In a possible implementation, the above-mentioned determination module 71 is specifically used to determine the depth map of the target image using a single-frame depth estimation network; and obtain the depth information of each pixel of the depth map, and determine at least one depth difference. value, Each depth difference value is the difference between the depth information of a pixel in the depth map and the depth information of a pixel in a pixel area. The pixel area includes all pixels adjacent to a pixel in the depth map; and determining a mutation area of the target image based on at least one depth difference value.
在一种可能的实现方式中,上述确定模块71,具体用于将至少一个深度差值中大于或等于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第一数值;并将至少一个深度差值中小于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第二数值,第二数值小于所述第一数值;其中,目标图像的突变区域为由第一数值对应的像素点组成的图像区域。In a possible implementation, the above-mentioned determination module 71 is specifically configured to determine the depth mutation mask value of a pixel corresponding to a depth difference value greater than or equal to the first threshold in at least one depth difference value as the first value; And determine the depth mutation mask value of the pixel corresponding to the depth difference value of at least one depth difference value that is smaller than the first threshold as a second value, and the second value is smaller than the first value; wherein, the mutation area of the target image is An image area composed of pixels corresponding to the first value.
在一种可能的实现方式中,上述采样模块72,具体用于:In a possible implementation, the above-mentioned sampling module 72 is specifically used to:
针对目标图像的深度图中的每个像素点,基于任意一个像素点的初始化采样步长和深度图的所有像素点的突变掩码值,确定第三数值,并根据该任意一个像素点的初始化采样步长和已采样的所有顶点采样掩码,确定第四数值,该第三数值为该任意一个像素点对应的采样步长窗口内的深度突变掩码值之和,该第四数值为该任意一个像素点对应的采样步长窗口内的顶点采样掩码值之和;For each pixel in the depth map of the target image, determine a third value based on the initialization sampling step of any pixel and the mutation mask value of all pixels in the depth map, and based on the initialization of any pixel The sampling step and the sampling mask of all the vertices that have been sampled determine the fourth value. The third value is the sum of the depth mutation mask values in the sampling step window corresponding to any pixel point. The fourth value is The sum of the vertex sampling mask values within the sampling step window corresponding to any pixel;
在第三数值或第四数值大于第二阈值的情况下,更新初始化采样步长,直至满足第一条件,该第一条件为更新后的采样步长等于第三阈值,或者任意一个像素点对应的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和均等于第二阈值;When the third value or the fourth value is greater than the second threshold, the initial sampling step is updated until the first condition is met. The first condition is that the updated sampling step is equal to the third threshold, or any pixel corresponds to The sum of the depth mutation mask values and the sum of the vertex sampling mask values within the sampling step window are both equal to the second threshold;
根据更新后的采样步长,从该任意一个像素点对应的采样步长窗口内确定目标采样顶点,并更新该任意一个像素点对应的采样步长窗口内的顶点采样掩码值,得到一个深度图采样顶点集合;According to the updated sampling step, determine the target sampling vertex from the sampling step window corresponding to any pixel point, and update the vertex sampling mask value in the sampling step window corresponding to any pixel point to obtain a depth Graph sampling vertex collection;
遍历目标图像的深度图的所有像素点,得到非均匀采样顶点集合。Traverse all pixels of the depth map of the target image to obtain a set of non-uniformly sampled vertices.
在一种可能的实现方式中,上述构建模块73,具体用于将非均匀采样顶点集合映射为三维空间点集,以构建三维顶点;并构建非均匀采样顶点集合中的各个顶点之间的连接关系,以构建三维片面;以及基于三维顶点和三维片面,得到三维模型。In a possible implementation, the above-mentioned building module 73 is specifically used to map the non-uniformly sampled vertex set into a three-dimensional space point set to construct three-dimensional vertices; and construct connections between each vertex in the non-uniformly sampled vertex set. relationship to construct a three-dimensional side; and based on the three-dimensional vertices and the three-dimensional side, obtain a three-dimensional model.
在一种可能的实现方式中,上述确定模块71,具体用于对目标图像的深度图进行中值滤波,并对中值滤波后的深度图中的边缘异常深度信息进行修正,以得到修正后的突变区域。In a possible implementation, the above-mentioned determination module 71 is specifically used to perform median filtering on the depth map of the target image, and correct the edge abnormal depth information in the median-filtered depth map to obtain the corrected mutation region.
在一种可能的实现方式中,上述确定模块71,具体用于针对目标图像的深度图中的每个像素点,采用预设滤波窗口半径,确定任意一个像素点对应的滤波像素集合,并确定滤波像素集合中的所有像素点的权重值;并根据滤波像素集合中的所有像素点的权重值,将该任意一个像素点的深度信息更新为目标深度信息,该目标深度信息为任意一个像素点的相邻像素点的深度信息的中值;以及遍历所述目标图像的深度图中的所有像素点,以得到修正后的突变区域。In a possible implementation, the above-mentioned determination module 71 is specifically configured to use a preset filter window radius for each pixel in the depth map of the target image to determine the set of filtered pixels corresponding to any pixel, and determine Filter the weight values of all pixels in the pixel set; and update the depth information of any pixel to the target depth information based on the weight value of all pixels in the filtered pixel set. The target depth information is any pixel. the median value of the depth information of adjacent pixels; and traverse all pixels in the depth map of the target image to obtain the corrected mutation area.
在一种可能的实现方式中,上述确定模块71,具体用于基于目标滤波窗口半径,对目标图像的深度图进行第一次的中值滤波,并更新目标滤波窗口半径;并基于更新后的目标滤波窗口半径,对第一次中值滤波后的深度图进行下一次的中值滤波,并继续更新目标滤波窗口半径,直至完成预设次数的中值滤波,以对目标图像的深度图进行中值滤波。 In a possible implementation, the above-mentioned determination module 71 is specifically used to perform the first median filtering on the depth map of the target image based on the target filter window radius, and update the target filter window radius; and based on the updated Target filter window radius, perform the next median filter on the depth map after the first median filter, and continue to update the target filter window radius until the preset number of median filters is completed to perform the next median filter on the depth map of the target image. Median filtering.
本申请实施例提供一种三维模型构建装置,三维模型构建装置可以根据目标图像的突变区域,确定相应的采样步长更新策略,即在采样过程中,根据目标图像的突变区域,计算三维空间点的分布特征,以更新采样步长,自适应地采样深度图中的关键顶点,构建非均匀的顶点空间拓扑结构,从而使得三维模型在物体边缘区域生成更为密集的网格结构,保证模型渲染效果的真实性,而空间平坦区域生成更为稀疏的网格结构,以减少模型顶点数和片面数,提升网格模型在电子设备的渲染性能,最终得到能够三维模型渲染效果真实性和电子设备渲染性能的高效性俱佳的三维模型。Embodiments of the present application provide a three-dimensional model construction device. The three-dimensional model construction device can determine the corresponding sampling step update strategy according to the mutation area of the target image, that is, during the sampling process, calculate the three-dimensional space points according to the mutation area of the target image. distribution characteristics to update the sampling step size, adaptively sample key vertices in the depth map, and construct a non-uniform vertex space topology, so that the 3D model generates a denser grid structure in the edge area of the object to ensure model rendering. The authenticity of the effect, while the flat area of the space generates a sparser grid structure to reduce the number of model vertices and faces, improve the rendering performance of the grid model in electronic devices, and finally obtain the authenticity of the three-dimensional model rendering effect and electronic devices Render 3D models with high efficiency and performance.
本申请实施例中的三维模型构建装置可以是装置,也可以是电子设备中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The three-dimensional model building device in the embodiment of the present application may be a device, or may be a component, integrated circuit, or chip in an electronic device. The device may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or an augmented reality (AR)/virtual reality (VR). VR) equipment, robots, wearable devices, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (personal digital assistants, PDA), etc., and can also be servers, network attached storage (Network Attached Storage) , NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.
本申请实施例中的三维模型构建装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The three-dimensional model building device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
本申请实施例提供的三维模型构建装置能够实现上述方法实施例实现的各个过程,为避免重复,这里不再赘述。The three-dimensional model construction device provided by the embodiments of the present application can implement various processes implemented by the above method embodiments. To avoid repetition, they will not be described again here.
可选地,如图8所示,本申请实施例还提供一种电子设备90,包括处理器91和存储器92,存储器92上存储有可在所述处理器91上运行的程序或指令,该程序或指令被处理器91执行时实现上述三维模型构建方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 8, this embodiment of the present application also provides an electronic device 90, including a processor 91 and a memory 92. The memory 92 stores programs or instructions that can be run on the processor 91. When the program or instruction is executed by the processor 91, each step of the above three-dimensional model construction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, the details will not be described here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图9为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、以及处理器110等部件。The electronic device 100 includes but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, etc. part.
本领域技术人员可以理解,电子设备100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图9中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 100 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions. The structure of the electronic device shown in Figure 9 does not constitute a limitation on the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
其中,处理器110,用于确定目标图像的突变区域;并基于目标图像的突变区域和与该突变区域对应的采样步长更新策略,对目标图像进行非均匀采样,得到非均匀采样顶点 集合;以及基于所述非均匀采样顶点集合,构建三维模型。Among them, the processor 110 is used to determine the mutation area of the target image; and based on the mutation area of the target image and the sampling step update strategy corresponding to the mutation area, perform non-uniform sampling on the target image to obtain non-uniform sampling vertices. a set; and constructing a three-dimensional model based on the non-uniformly sampled vertex set.
本申请实施例提供一种电子设备,电子设备可以根据目标图像的突变区域,确定相应的采样步长更新策略,即在采样过程中,根据目标图像的突变区域,计算三维空间点的分布特征,以更新采样步长,自适应地采样深度图中的关键顶点,构建非均匀的顶点空间拓扑结构,从而使得三维模型在物体边缘区域生成更为密集的网格结构,保证模型渲染效果的真实性,而空间平坦区域生成更为稀疏的网格结构,以减少模型顶点数和片面数,提升网格模型在电子设备的渲染性能,最终得到能够三维模型渲染效果真实性和电子设备渲染性能的高效性俱佳的三维模型。Embodiments of the present application provide an electronic device. The electronic device can determine a corresponding sampling step update strategy according to the mutation area of the target image. That is, during the sampling process, the distribution characteristics of the three-dimensional space points are calculated according to the mutation area of the target image. By updating the sampling step size, the key vertices in the depth map are adaptively sampled to construct a non-uniform vertex space topology, thereby allowing the 3D model to generate a denser grid structure in the edge area of the object, ensuring the authenticity of the model rendering effect. , and a sparser grid structure is generated in the flat area of the space to reduce the number of model vertices and sides, improve the rendering performance of the grid model in electronic devices, and ultimately obtain an efficient and effective solution that can achieve the authenticity of the three-dimensional model rendering effect and the rendering performance of electronic devices. Excellent 3D model.
可选地,处理器110,具体用于采用单帧深度估计网络,确定目标图像的深度图;并获取深度图的每个像素点的深度信息,并确定至少一个深度差值,每个深度差值为深度图的一个像素点的深度信息与一个像素领域中的一个像素点的深度信息的差值,该一个像素领域包括与深度图的一个像素点相邻的所有像素点;以及根据至少一个深度差值,确定目标图像的突变区域。Optionally, the processor 110 is specifically configured to use a single-frame depth estimation network to determine the depth map of the target image; and obtain the depth information of each pixel of the depth map, and determine at least one depth difference value, each depth difference value The value is the difference between the depth information of a pixel in the depth map and the depth information of a pixel in a pixel area, which includes all pixels adjacent to a pixel in the depth map; and according to at least one Depth difference determines the mutation area of the target image.
可选地,处理器110,具体用于将至少一个深度差值中大于或等于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第一数值;并将至少一个深度差值中小于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第二数值,第二数值小于所述第一数值;其中,目标图像的突变区域为由第一数值对应的像素点组成的图像区域。Optionally, the processor 110 is specifically configured to determine the depth mutation mask value of a pixel corresponding to a depth difference value greater than or equal to the first threshold in at least one depth difference value as a first value; and The depth mutation mask value of the pixel corresponding to the depth difference value smaller than the first threshold value is determined as a second value, and the second value is smaller than the first value; wherein, the mutation area of the target image is corresponding to the first value An image area composed of pixels.
可选地,处理器110,具体用于针对目标图像的深度图中的每个像素点,基于任意一个像素点的初始化采样步长和深度图的所有像素点的突变掩码值,确定第三数值,并根据该任意一个像素点的初始化采样步长和已采样的所有顶点采样掩码,确定第四数值,该第三数值为该任意一个像素点对应的采样步长窗口内的深度突变掩码值之和,该第四数值为该任意一个像素点对应的采样步长窗口内的顶点采样掩码值之和;在第三数值或第四数值大于第二阈值的情况下,更新初始化采样步长,直至满足第一条件,该第一条件为更新后的采样步长等于第三阈值,或者该任意一个像素点对应的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和均等于第二阈值;根据更新后的采样步长,从该任意一个像素点对应的采样步长窗口内确定目标采样顶点,并更新该任意一个像素点对应的采样步长窗口内的顶点采样掩码值,得到一个深度图采样顶点集合;遍历目标图像的深度图的所有像素点,得到非均匀采样顶点集合。Optionally, the processor 110 is specifically configured to, for each pixel in the depth map of the target image, determine the third step based on the initialization sampling step size of any pixel and the mutation mask values of all pixels in the depth map. value, and determine the fourth value based on the initial sampling step of any pixel point and the sampling mask of all sampled vertices. The third value is the depth mutation mask within the sampling step window corresponding to any pixel point. The sum of code values, the fourth value is the sum of the vertex sampling mask values in the sampling step window corresponding to any pixel point; when the third value or the fourth value is greater than the second threshold, the initialization sampling is updated step size until the first condition is met, which is that the updated sampling step size is equal to the third threshold, or the sum of the depth mutation mask value and the vertex sampling mask value in the sampling step size window corresponding to any pixel point The sum of code values is equal to the second threshold; according to the updated sampling step, determine the target sampling vertex from the sampling step window corresponding to any pixel point, and update the sampling step window corresponding to any pixel point The vertex sampling mask value is used to obtain a depth map sampling vertex set; traverse all pixels of the depth map of the target image to obtain a non-uniform sampling vertex set.
可选地,处理器110,具体用于将非均匀采样顶点集合映射为三维空间点集,以构建三维顶点;并构建非均匀采样顶点集合中的各个顶点之间的连接关系,以构建三维片面;以及基于三维顶点和三维片面,得到三维模型。Optionally, the processor 110 is specifically configured to map the non-uniformly sampled vertex set into a three-dimensional space point set to construct three-dimensional vertices; and construct a connection relationship between each vertex in the non-uniformly sampled vertex set to construct a three-dimensional one-sided ; and obtain a three-dimensional model based on three-dimensional vertices and three-dimensional faces.
可选地,处理器110,具体用于对目标图像的深度图进行中值滤波,并对中值滤波后的深度图中的边缘异常深度信息进行修正,以得到修正后的突变区域。Optionally, the processor 110 is specifically configured to perform median filtering on the depth map of the target image, and correct the edge abnormal depth information in the median filtered depth map to obtain a corrected mutation area.
可选地,处理器110,具体用于针对目标图像的深度图中的每个像素点,采用预设滤波窗口半径,确定任意一个像素点对应的滤波像素集合,并确定滤波像素集合中的所有像素点的权重值;根据滤波像素集合中的所有像素点的权重值,将该任意一个像素点的深度信息更新为目标深度信息,该目标深度信息为该任意一个像素点的相邻像素点的深度信息 的中值;遍历目标图像的深度图中的所有像素点,以得到修正后的突变区域。Optionally, the processor 110 is specifically configured to use a preset filter window radius for each pixel in the depth map of the target image, determine the filtered pixel set corresponding to any pixel, and determine all the filtered pixels in the filtered pixel set. The weight value of the pixel; according to the weight value of all pixels in the filtered pixel set, the depth information of any pixel is updated to the target depth information, and the target depth information is the depth information of the adjacent pixels of any pixel. Depth information The median value of; traverse all pixels in the depth map of the target image to obtain the corrected mutation area.
可选地,处理器110,具体用于基于目标滤波窗口半径,对目标图像的深度图进行第一次的中值滤波,并更新目标滤波窗口半径;并基于更新后的目标滤波窗口半径,对第一次中值滤波后的深度图进行下一次的中值滤波,并继续更新目标滤波窗口半径,直至完成预设次数的中值滤波,以对目标图像的深度图进行中值滤波。Optionally, the processor 110 is specifically configured to perform a first median filter on the depth map of the target image based on the target filter window radius, and update the target filter window radius; and based on the updated target filter window radius, perform The depth map after the first median filtering is subjected to the next median filtering, and the target filter window radius is continued to be updated until the preset number of median filtering is completed to perform median filtering on the depth map of the target image.
本申请实施例提供的电子设备能够实现上述方法实施例实现的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The electronic device provided by the embodiments of the present application can implement each process implemented by the above method embodiments, and can achieve the same technical effect. To avoid duplication, the details will not be described here.
本实施例中各种实现方式具有的有益效果具体可以参见上述方法实施例中相应实现方式所具有的有益效果,为避免重复,此处不再赘述。For specific beneficial effects of various implementation methods in this embodiment, please refer to the beneficial effects of corresponding implementation methods in the above method embodiments. To avoid duplication, they will not be described again here.
应理解的是,本申请实施例中,输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元106可包括显示面板1061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板1061。用户输入单元107包括触控面板1071以及其他输入设备1072中的至少一种。触控面板1071,也称为触摸屏。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. The graphics processor 1041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras). The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072 . Touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器109可以包括易失性存储器或非易失性存储器,或者,存储器109可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器109包括但不限于这些和任意其它适合类型的存储器。Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc. Additionally, memory 109 may include volatile memory or nonvolatile memory, or memory 109 may include both volatile and nonvolatile memory. Among them, non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). Memory 109 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
处理器110可包括一个或多个处理单元;可选的,处理器110集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 110 .
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述方法实施例的各个过程,且能达到相同的技术效果, 为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the above method embodiments is implemented and the same technology can be achieved. Effect, To avoid repetition, they will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement various processes of the above method embodiments. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述三维模型构建方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above three-dimensional model construction method embodiment, and can achieve the same technology. The effect will not be described here to avoid repetition.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (21)

  1. 一种三维模型构建方法,所述方法包括:A three-dimensional model construction method, the method includes:
    确定目标图像的突变区域;Determine the mutation area of the target image;
    基于所述目标图像的突变区域和与所述突变区域对应的采样步长更新策略,对所述目标图像进行非均匀采样,得到非均匀采样顶点集合;Based on the mutation area of the target image and the sampling step update strategy corresponding to the mutation area, perform non-uniform sampling on the target image to obtain a non-uniform sampling vertex set;
    基于所述非均匀采样顶点集合,构建三维模型。Based on the non-uniform sampling vertex set, a three-dimensional model is constructed.
  2. 根据权利要求1所述的方法,其中,所述确定目标图像的突变区域,包括:The method according to claim 1, wherein determining the mutation area of the target image includes:
    采用单帧深度估计网络,确定所述目标图像的深度图;Use a single-frame depth estimation network to determine the depth map of the target image;
    获取所述深度图的每个像素点的深度信息,并确定至少一个深度差值,每个深度差值为所述深度图的一个像素点的深度信息与一个像素领域中的一个像素点的深度信息的差值,所述一个像素领域包括与所述深度图的一个像素点相邻的所有像素点;Obtain the depth information of each pixel of the depth map and determine at least one depth difference. Each depth difference is the depth information of one pixel of the depth map and the depth of one pixel in a pixel area. The difference value of information, the one pixel area includes all pixels adjacent to one pixel of the depth map;
    根据所述至少一个深度差值,确定所述目标图像的突变区域。Based on the at least one depth difference value, a mutation area of the target image is determined.
  3. 根据权利要求2所述的方法,其中,所述根据所述至少一个深度差值,确定所述目标图像的突变区域,包括:The method according to claim 2, wherein determining the mutation area of the target image according to the at least one depth difference value includes:
    将所述至少一个深度差值中大于或等于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第一数值;Determine the depth mutation mask value of the pixel corresponding to the depth difference value greater than or equal to the first threshold in the at least one depth difference value as the first value;
    将所述至少一个深度差值中小于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第二数值,所述第二数值小于所述第一数值;Determine the depth mutation mask value of the pixel corresponding to the depth difference value of the at least one depth difference value that is smaller than the first threshold as a second value, where the second value is smaller than the first value;
    其中,所述目标图像的突变区域为由所述第一数值对应的像素点组成的图像区域。Wherein, the mutation area of the target image is an image area composed of pixels corresponding to the first numerical value.
  4. 根据权利要求1至3中任一项所述的方法,其中,所述基于所述目标图像的突变区域和与所述突变区域对应的采样步长更新策略,对所述目标图像进行非均匀采样,得到非均匀采样顶点集合,包括:The method according to any one of claims 1 to 3, wherein the target image is non-uniformly sampled based on a mutation area of the target image and a sampling step update strategy corresponding to the mutation area. , obtain a non-uniformly sampled vertex set, including:
    针对所述目标图像的深度图中的每个像素点,基于任意一个像素点的初始化采样步长和所述深度图的所有像素点的突变掩码值,确定第三数值,并根据所述任意一个像素点的初始化采样步长和已采样的所有顶点采样掩码,确定第四数值,所述第三数值为所述任意一个像素点对应的采样步长窗口内的深度突变掩码值之和,所述第四数值为所述任意一个像素点对应的采样步长窗口内的顶点采样掩码值之和;For each pixel in the depth map of the target image, a third value is determined based on the initialization sampling step of any pixel and the mutation mask value of all pixels in the depth map, and based on the arbitrary The initial sampling step of a pixel and the sampling mask of all sampled vertices determine the fourth value, and the third value is the sum of the depth mutation mask values within the sampling step window corresponding to any pixel. , the fourth value is the sum of the vertex sampling mask values within the sampling step window corresponding to any pixel point;
    在所述第三数值或所述第四数值大于第二阈值的情况下,更新所述初始化采样步长,直至满足第一条件,所述第一条件为更新后的采样步长等于第三阈值,或者所述任意一个像素点对应的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之 和均等于所述第二阈值;When the third value or the fourth value is greater than the second threshold, the initialization sampling step is updated until the first condition is met, and the first condition is that the updated sampling step is equal to the third threshold. , or the sum of the depth mutation mask values within the sampling step window corresponding to any pixel point and the sum of the vertex sampling mask values and are both equal to the second threshold;
    根据更新后的采样步长,从所述任意一个像素点对应的采样步长窗口内确定目标采样顶点,并更新所述任意一个像素点对应的采样步长窗口内的顶点采样掩码值,得到一个深度图采样顶点集合;According to the updated sampling step, determine the target sampling vertex from the sampling step window corresponding to any pixel point, and update the vertex sampling mask value in the sampling step window corresponding to any pixel point, and obtain A depth map sampling vertex collection;
    遍历所述目标图像的深度图的所有像素点,得到所述非均匀采样顶点集合。Traverse all pixels of the depth map of the target image to obtain the non-uniform sampling vertex set.
  5. 根据权利要求1所述的方法,其中,所述基于所述非均匀采样顶点集合,构建三维模型,包括:The method according to claim 1, wherein said constructing a three-dimensional model based on the non-uniformly sampled vertex set includes:
    将所述非均匀采样顶点集合映射为三维空间点集,以构建三维顶点;Map the non-uniformly sampled vertex set into a three-dimensional space point set to construct three-dimensional vertices;
    构建所述非均匀采样顶点集合中的各个顶点之间的连接关系,以构建三维片面;Construct a connection relationship between each vertex in the non-uniform sampling vertex set to construct a three-dimensional side;
    基于所述三维顶点和所述三维片面,得到所述三维模型。Based on the three-dimensional vertex and the three-dimensional facet, the three-dimensional model is obtained.
  6. 根据权利要求1所述的方法,其中,所述确定目标图像的突变区域,包括:The method according to claim 1, wherein determining the mutation area of the target image includes:
    对所述目标图像的深度图进行中值滤波,并对中值滤波后的所述深度图中的边缘异常深度信息进行修正,以得到修正后的所述突变区域。Perform median filtering on the depth map of the target image, and correct the edge abnormal depth information in the depth map after median filtering to obtain the corrected mutation area.
  7. 根据权利要求6所述的方法,其中,所述对所述目标图像的深度图进行中值滤波,并对中值滤波后的所述深度图中的边缘异常深度信息进行修正,以得到修正后的所述突变区域,包括:The method according to claim 6, wherein the depth map of the target image is subjected to median filtering, and the edge abnormal depth information in the depth map after median filtering is corrected to obtain the corrected The mutated regions include:
    针对所述目标图像的深度图中的每个像素点,采用预设滤波窗口半径,确定任意一个像素点对应的滤波像素集合,并确定所述滤波像素集合中的所有像素点的权重值;For each pixel in the depth map of the target image, use a preset filter window radius to determine a filtered pixel set corresponding to any pixel, and determine the weight values of all pixels in the filtered pixel set;
    根据所述滤波像素集合中的所有像素点的权重值,将所述任意一个像素点的深度信息更新为目标深度信息,所述目标深度信息为所述任意一个像素点的相邻像素点的深度信息的中值;According to the weight values of all pixels in the filtered pixel set, the depth information of any one pixel is updated to the target depth information, and the target depth information is the depth of the adjacent pixels of any one pixel. median of information;
    遍历所述目标图像的深度图中的所有像素点,以得到修正后的所述突变区域。Traverse all pixels in the depth map of the target image to obtain the corrected mutation area.
  8. 根据权利要求6或7所述的方法,其中,所述对所述目标图像的深度图进行中值滤波,包括:The method according to claim 6 or 7, wherein performing median filtering on the depth map of the target image includes:
    基于目标滤波窗口半径,对所述目标图像的深度图进行第一次的中值滤波,并更新所述目标滤波窗口半径;Based on the target filter window radius, perform the first median filtering on the depth map of the target image, and update the target filter window radius;
    基于更新后的所述目标滤波窗口半径,对第一次中值滤波后的所述深度图进行下一次的中值滤波,并继续更新所述目标滤波窗口半径,直至完成预设次数的中值滤波,以对所述目标图像的深度图进行中值滤波。Based on the updated target filter window radius, perform the next median filter on the depth map after the first median filter, and continue to update the target filter window radius until the median value of the preset number of times is completed. Filter to perform median filtering on the depth map of the target image.
  9. 一种三维模型构建装置,所述装置包括:确定模块、采样模块和构建模块;A three-dimensional model construction device, the device includes: a determination module, a sampling module and a construction module;
    所述确定模块,用于确定目标图像的突变区域; The determination module is used to determine the mutation area of the target image;
    所述采样模块,用于基于所述确定模块确定的所述目标图像的突变区域和与所述突变区域对应的采样步长更新策略,对所述目标图像进行非均匀采样,得到非均匀采样顶点集合;The sampling module is configured to non-uniformly sample the target image based on the mutation area of the target image determined by the determination module and the sampling step update strategy corresponding to the mutation area, and obtain non-uniform sampling vertices. gather;
    所述构建模块,用于基于所述采样模块采样得到的所述非均匀采样顶点集合,构建三维模型。The building module is used to build a three-dimensional model based on the non-uniform sampling vertex set sampled by the sampling module.
  10. 根据权利要求9所述的装置,其中,所述确定模块,具体用于采用单帧深度估计网络,确定所述目标图像的深度图;并获取所述深度图的每个像素点的深度信息,并确定至少一个深度差值,每个深度差值为所述深度图的一个像素点的深度信息与一个像素领域中的一个像素点的深度信息的差值,所述一个像素领域包括与所述深度图的一个像素点相邻的所有像素点;以及根据所述至少一个深度差值,确定所述目标图像的突变区域。The device according to claim 9, wherein the determination module is specifically configured to use a single-frame depth estimation network to determine the depth map of the target image; and obtain the depth information of each pixel of the depth map, And determine at least one depth difference value, each depth difference value is the difference between the depth information of a pixel point in the depth map and the depth information of a pixel point in a pixel field, the one pixel field includes and the All pixels adjacent to one pixel in the depth map; and determining the mutation area of the target image based on the at least one depth difference value.
  11. 根据权利要求10所述的装置,其中,所述确定模块,具体用于将所述至少一个深度差值中大于或等于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第一数值;并将所述至少一个深度差值中小于第一阈值的深度差值对应的像素点的深度突变掩码值确定为第二数值,所述第二数值小于所述第一数值;The device according to claim 10, wherein the determining module is specifically configured to determine the depth mutation mask value of a pixel corresponding to a depth difference value greater than or equal to a first threshold in the at least one depth difference value as a first numerical value; and determine the depth mutation mask value of a pixel corresponding to a depth difference value smaller than the first threshold in the at least one depth difference value as a second numerical value, where the second numerical value is smaller than the first numerical value;
    其中,所述目标图像的突变区域为由所述第一数值对应的像素点组成的图像区域。Wherein, the mutation area of the target image is an image area composed of pixels corresponding to the first numerical value.
  12. 根据权利要求9至11中任一项所述的装置,其中,所述采样模块,具体用于:The device according to any one of claims 9 to 11, wherein the sampling module is specifically used for:
    针对所述目标图像的深度图中的每个像素点,基于任意一个像素点的初始化采样步长和所述深度图的所有像素点的突变掩码值,确定第三数值,并根据所述任意一个像素点的初始化采样步长和已采样的所有顶点采样掩码,确定第四数值,所述第三数值为所述任意一个像素点对应的采样步长窗口内的深度突变掩码值之和,所述第四数值为所述任意一个像素点对应的采样步长窗口内的顶点采样掩码值之和;For each pixel in the depth map of the target image, a third value is determined based on the initialization sampling step of any pixel and the mutation mask value of all pixels in the depth map, and based on the arbitrary The initial sampling step of a pixel and the sampling mask of all sampled vertices determine the fourth value, and the third value is the sum of the depth mutation mask values within the sampling step window corresponding to any pixel. , the fourth value is the sum of the vertex sampling mask values within the sampling step window corresponding to any pixel point;
    在所述第三数值或所述第四数值大于第二阈值的情况下,更新所述初始化采样步长,直至满足第一条件,所述第一条件为更新后的采样步长等于第三阈值,或者所述任意一个像素点对应的采样步长窗口内的深度突变掩码值之和以及顶点采样掩码值之和均等于所述第二阈值;When the third value or the fourth value is greater than the second threshold, the initialization sampling step is updated until the first condition is met, and the first condition is that the updated sampling step is equal to the third threshold. , or the sum of the depth mutation mask values and the sum of the vertex sampling mask values within the sampling step window corresponding to any one pixel point are both equal to the second threshold;
    根据更新后的采样步长,从所述任意一个像素点对应的采样步长窗口内确定目标采样顶点,并更新所述任意一个像素点对应的采样步长窗口内的顶点采样掩码值,得到一个深度图采样顶点集合;According to the updated sampling step, determine the target sampling vertex from the sampling step window corresponding to any pixel point, and update the vertex sampling mask value in the sampling step window corresponding to any pixel point, and obtain A depth map sampling vertex collection;
    遍历所述目标图像的深度图的所有像素点,得到所述非均匀采样顶点集合。Traverse all pixels of the depth map of the target image to obtain the non-uniform sampling vertex set.
  13. 根据权利要求9所述的装置,其中,所述构建模块,具体用于将所述非均匀 采样顶点集合映射为三维空间点集,以构建三维顶点;并构建所述非均匀采样顶点集合中的各个顶点之间的连接关系,以构建三维片面;以及基于所述三维顶点和所述三维片面,得到所述三维模型。The device according to claim 9, wherein the building module is specifically used to convert the non-uniform The sampling vertex set is mapped to a three-dimensional space point set to construct a three-dimensional vertex; and a connection relationship between each vertex in the non-uniform sampling vertex set is constructed to construct a three-dimensional side; and based on the three-dimensional vertex and the three-dimensional side , to obtain the three-dimensional model.
  14. 根据权利要求9所述的装置,其中,所述确定模块,具体用于对所述目标图像的深度图进行中值滤波,并对中值滤波后的所述深度图中的边缘异常深度信息进行修正,以得到修正后的所述突变区域。The device according to claim 9, wherein the determination module is specifically configured to perform median filtering on the depth map of the target image, and perform a median filtering on the edge abnormality depth information in the depth map after median filtering. Correction to obtain the corrected mutation region.
  15. 根据权利要求14所述的装置,其中,所述确定模块,具体用于针对所述目标图像的深度图中的每个像素点,采用预设滤波窗口半径,确定任意一个像素点对应的滤波像素集合,并确定所述滤波像素集合中的所有像素点的权重值;并根据所述滤波像素集合中的所有像素点的权重值,将所述任意一个像素点的深度信息更新为目标深度信息,所述目标深度信息为所述任意一个像素点的相邻像素点的深度信息的中值;以及遍历所述目标图像的深度图中的所有像素点,以得到修正后的所述突变区域。The device according to claim 14, wherein the determination module is specifically configured to use a preset filter window radius for each pixel in the depth map of the target image to determine the filter pixel corresponding to any pixel. Set, and determine the weight values of all pixel points in the filtered pixel set; and update the depth information of any one pixel point to the target depth information based on the weight values of all pixel points in the filtered pixel set, The target depth information is the median value of the depth information of adjacent pixels of any one pixel; and all pixels in the depth map of the target image are traversed to obtain the corrected mutation area.
  16. 根据权利要求14或15所述的装置,其中,所述确定模块,具体用于基于目标滤波窗口半径,对所述目标图像的深度图进行第一次的中值滤波,并更新所述目标滤波窗口半径;并基于更新后的所述目标滤波窗口半径,对第一次中值滤波后的所述深度图进行下一次的中值滤波,并继续更新所述目标滤波窗口半径,直至完成预设次数的中值滤波,以对所述目标图像的深度图进行中值滤波。The device according to claim 14 or 15, wherein the determination module is specifically configured to perform a first median filter on the depth map of the target image based on the target filter window radius, and update the target filter window radius; and based on the updated target filter window radius, perform the next median filter on the depth map after the first median filter, and continue to update the target filter window radius until the preset is completed times of median filtering to perform median filtering on the depth map of the target image.
  17. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至8中任一项所述的三维模型构建方法的步骤。An electronic device, including a processor, a memory and a program or instructions stored on the memory and executable on the processor. When the program or instructions are executed by the processor, the implementation of claims 1 to 8 is achieved. The steps of the three-dimensional model construction method described in any one of the above.
  18. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至8中任一项所述的三维模型构建方法的步骤。A readable storage medium on which programs or instructions are stored. When the programs or instructions are executed by a processor, the steps of the three-dimensional model construction method according to any one of claims 1 to 8 are implemented.
  19. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至8中任一项所述的三维模型构建方法。A chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the three-dimensional process as claimed in any one of claims 1 to 8. Model building methods.
  20. 一种计算机程序产品,所述程序产品被存储在存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1至8中任一项所述的三维模型构建方法。A computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the three-dimensional model building method according to any one of claims 1 to 8.
  21. 一种电子设备,其特征在于,包括所述电子设备用于执行如权利要求1至8中任一项所述的三维模型构建方法。 An electronic device, characterized by including the electronic device for executing the three-dimensional model building method according to any one of claims 1 to 8.
PCT/CN2023/102728 2022-07-01 2023-06-27 Method and apparatus for constructing three-dimensional model, and electronic device and storage medium WO2024002064A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210774950.4 2022-07-01
CN202210774950.4A CN115205456A (en) 2022-07-01 2022-07-01 Three-dimensional model construction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2024002064A1 true WO2024002064A1 (en) 2024-01-04

Family

ID=83579065

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102728 WO2024002064A1 (en) 2022-07-01 2023-06-27 Method and apparatus for constructing three-dimensional model, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN115205456A (en)
WO (1) WO2024002064A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115205456A (en) * 2022-07-01 2022-10-18 维沃移动通信有限公司 Three-dimensional model construction method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190311199A1 (en) * 2018-04-10 2019-10-10 Seiko Epson Corporation Adaptive sampling of training views
US20200320778A1 (en) * 2014-07-11 2020-10-08 Shanghai United Imaging Healthcare Co., Ltd. System and method for image processing
CN111970503A (en) * 2020-08-24 2020-11-20 腾讯科技(深圳)有限公司 Method, device and equipment for three-dimensionalizing two-dimensional image and computer readable storage medium
CN112967381A (en) * 2021-03-05 2021-06-15 北京百度网讯科技有限公司 Three-dimensional reconstruction method, apparatus, and medium
CN114283266A (en) * 2021-12-21 2022-04-05 广州虎牙科技有限公司 Three-dimensional model adjusting method and device, storage medium and equipment
CN115205456A (en) * 2022-07-01 2022-10-18 维沃移动通信有限公司 Three-dimensional model construction method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200320778A1 (en) * 2014-07-11 2020-10-08 Shanghai United Imaging Healthcare Co., Ltd. System and method for image processing
US20190311199A1 (en) * 2018-04-10 2019-10-10 Seiko Epson Corporation Adaptive sampling of training views
CN111970503A (en) * 2020-08-24 2020-11-20 腾讯科技(深圳)有限公司 Method, device and equipment for three-dimensionalizing two-dimensional image and computer readable storage medium
CN112967381A (en) * 2021-03-05 2021-06-15 北京百度网讯科技有限公司 Three-dimensional reconstruction method, apparatus, and medium
CN114283266A (en) * 2021-12-21 2022-04-05 广州虎牙科技有限公司 Three-dimensional model adjusting method and device, storage medium and equipment
CN115205456A (en) * 2022-07-01 2022-10-18 维沃移动通信有限公司 Three-dimensional model construction method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115205456A (en) 2022-10-18

Similar Documents

Publication Publication Date Title
WO2020108358A1 (en) Image inpainting method and apparatus, computer device, and storage medium
US10963727B2 (en) Method, device and storage medium for determining camera posture information
CN109242961B (en) Face modeling method and device, electronic equipment and computer readable medium
CN109887003B (en) Method and equipment for carrying out three-dimensional tracking initialization
CN108961303B (en) Image processing method and device, electronic equipment and computer readable medium
CN110136229B (en) Method and equipment for real-time virtual face changing
CN115082639B (en) Image generation method, device, electronic equipment and storage medium
CN109840881B (en) 3D special effect image generation method, device and equipment
CN110910486A (en) Indoor scene illumination estimation model, method and device, storage medium and rendering method
CN105825544A (en) Image processing method and mobile terminal
CN111340866A (en) Depth image generation method, device and storage medium
WO2024002064A1 (en) Method and apparatus for constructing three-dimensional model, and electronic device and storage medium
CN111612878B (en) Method and device for making static photo into three-dimensional effect video
CN113313832B (en) Semantic generation method and device of three-dimensional model, storage medium and electronic equipment
CN113643414A (en) Three-dimensional image generation method and device, electronic equipment and storage medium
CN111275824A (en) Surface reconstruction for interactive augmented reality
CN115100337A (en) Whole body portrait video relighting method and device based on convolutional neural network
CN114881841A (en) Image generation method and device
CN113766117B (en) Video de-jitter method and device
CN115578515B (en) Training method of three-dimensional reconstruction model, three-dimensional scene rendering method and device
CN110619670A (en) Face interchange method and device, computer equipment and storage medium
CN115661364A (en) Three-dimensional simulation model reconstruction method for cultural relic and ancient building group restoration
CN109360166A (en) A kind of image processing method, device, electronic equipment and computer-readable medium
CN114119701A (en) Image processing method and device
US9077963B2 (en) Systems and methods for generating a depth map and converting two-dimensional data to stereoscopic data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23830241

Country of ref document: EP

Kind code of ref document: A1