






















技术领域technical field
本申请涉及图像处理技术领域,尤其涉及一种三维房型的生成方法、装置及设备。The present application relates to the technical field of image processing, and in particular, to a method, device and device for generating a three-dimensional room type.
背景技术Background technique
在智能家装的技术领域,为了能够实现房间渲染操作,一般包括以下步骤:用户输入待渲染的户型图,而后选择不同的装修风格,从而可以生成具有不同装修风格的房间渲染图。现有技术中,为了保证房间渲染图的效果和精确度,用户输入的待渲染的户型图一般都是使用价格昂贵且不便携的全景相机进行室内采集所获得的全景图。In the technical field of smart home decoration, in order to realize the room rendering operation, the following steps are generally included: the user inputs the floor plan to be rendered, and then selects different decoration styles, so that room renderings with different decoration styles can be generated. In the prior art, in order to ensure the effect and accuracy of the room rendering, the floor plan to be rendered input by the user is generally a panoramic image obtained by indoor acquisition using an expensive and inportable panoramic camera.
然而,对于用户而言,采用特定的全景相机进行图像采集获得全景图,不仅价格昂贵,操作不方便,并且拍摄技能要求较高,从而限定了上述技术方案的应用范围,不利于用户数量的快速发展。However, for users, using a specific panoramic camera for image acquisition to obtain panoramic images is not only expensive, inconvenient to operate, but also requires high shooting skills, which limits the application scope of the above technical solutions and is not conducive to the rapid increase in the number of users. develop.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种三维房型的生成方法、装置及设备,用以解决在利用全景相机进行图像采集获得全景图时所存在的不仅价格昂贵,操作不方便,并且拍摄技能要求较高的问题。The embodiments of the present application provide a method, device, and device for generating a three-dimensional room type, which are used to solve the problems of high price, inconvenient operation, and high requirements for shooting skills when a panoramic camera is used for image acquisition to obtain a panoramic image. .
第一方面,本申请实施例提供了一种三维房型的生成方法,包括:In a first aspect, an embodiment of the present application provides a method for generating a three-dimensional house type, including:
获取房间不同视角的至少两个图像;acquire at least two images from different perspectives of the room;
生成与所述至少两个图像分别对应三维布局图;generating a three-dimensional layout map corresponding to the at least two images respectively;
基于所述至少两个图像,确定与所述三维布局图相对应的拼接位置;determining a splicing position corresponding to the three-dimensional layout based on the at least two images;
根据所述拼接位置对所述三维布局图进行拼接处理,生成与房间相对应的三维房型。The splicing process is performed on the three-dimensional layout diagram according to the splicing position to generate a three-dimensional room type corresponding to the room.
第二方面,本申请实施例提供了一种三维房型的生成装置,包括:In a second aspect, an embodiment of the present application provides a device for generating a three-dimensional house type, including:
第一获取模块,用于获取房间不同视角的至少两个图像;a first acquisition module, configured to acquire at least two images from different viewing angles of the room;
第一生成模块,用于生成与所述至少两个图像分别对应三维布局图;a first generation module, configured to generate a three-dimensional layout map corresponding to the at least two images respectively;
第一确定模块,用于基于所述至少两个图像,确定与所述三维布局图相对应的拼接位置;a first determining module, configured to determine a splicing position corresponding to the three-dimensional layout based on the at least two images;
第一处理模块,用于根据所述拼接位置对所述三维布局图进行拼接处理,生成与房间相对应的三维房型。The first processing module is configured to perform splicing processing on the three-dimensional layout according to the splicing position to generate a three-dimensional room type corresponding to the room.
第三方面,本申请实施例提供了一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第一方面所示的三维房型的生成方法。In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are When executed by the processor, the method for generating a three-dimensional house type shown in the first aspect above is implemented.
第四方面,本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第一方面所示的三维房型的生成方法。In a fourth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, the computer program enables the computer to implement the method for generating a three-dimensional house type shown in the first aspect above.
第五方面,本申请实施例提供了一种三维房型的生成方法,包括:In a fifth aspect, an embodiment of the present application provides a method for generating a three-dimensional house type, including:
获取房间不同视角的至少两个图像;acquire at least two images from different perspectives of the room;
生成与所述至少两个图像分别对应的二维布局图;generating a two-dimensional layout map corresponding to the at least two images respectively;
确定与所述至少两个图像相对应的相机参数;determining camera parameters corresponding to the at least two images;
基于所述至少两个图像、二维布局图和所述相机参数,生成与所述至少两个图像相对应的三维房型。Based on the at least two images, the two-dimensional layout map, and the camera parameters, a three-dimensional room type corresponding to the at least two images is generated.
第六方面,本申请实施例提供了一种三维房型的生成装置,包括:In a sixth aspect, an embodiment of the present application provides a device for generating a three-dimensional house type, including:
第二获取模块,用于获取房间不同视角的至少两个图像;a second acquisition module, configured to acquire at least two images of different viewing angles of the room;
第二生成模块,用于生成与所述至少两个图像分别对应的二维布局图;a second generating module, configured to generate two-dimensional layout diagrams corresponding to the at least two images respectively;
第二确定模块,用于确定与所述至少两个图像相对应的相机参数;a second determination module, configured to determine camera parameters corresponding to the at least two images;
第二处理模块,用于基于所述至少两个图像、二维布局图和所述相机参数,生成与所述至少两个图像相对应的三维房型。A second processing module, configured to generate a three-dimensional room type corresponding to the at least two images based on the at least two images, the two-dimensional layout map and the camera parameters.
第七方面,本申请实施例提供了一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第五方面所示的三维房型的生成方法。In a seventh aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are When executed by the processor, the method for generating a three-dimensional house type shown in the fifth aspect above is implemented.
第八方面,本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第五方面所示的三维房型的生成方法。In an eighth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, the computer program enables the computer to implement the method for generating a three-dimensional room type shown in the fifth aspect above.
第九方面,本发明实施例提供了一种三维房型的生成方法,包括:In a ninth aspect, an embodiment of the present invention provides a method for generating a three-dimensional house type, including:
获取房间不同视角的至少两个三维布局图;Obtain at least two 3D layout drawings of the room from different perspectives;
确定与所述至少两个三维布局图相对应的拼接位置;determining a splicing position corresponding to the at least two three-dimensional layouts;
根据所述拼接位置对所述至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。The at least two 3D layout drawings are spliced according to the splicing position to generate a 3D room type corresponding to the room.
第十方面,本发明实施例提供了一种三维房型的生成方法,包括:In a tenth aspect, an embodiment of the present invention provides a method for generating a three-dimensional house type, including:
第三获取模块,用于获取房间不同视角的至少两个三维布局图;The third acquisition module is used to acquire at least two three-dimensional layout diagrams of different viewing angles of the room;
第三确定模块,用于确定与所述至少两个三维布局图相对应的拼接位置;a third determining module, configured to determine the splicing positions corresponding to the at least two three-dimensional layouts;
第三处理模块,用于根据所述拼接位置对所述至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。The third processing module is configured to perform splicing processing on the at least two three-dimensional layout drawings according to the splicing position to generate a three-dimensional room type corresponding to the room.
第十一方面,本申请实施例提供了一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第九方面所示的三维房型的生成方法。In an eleventh aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are When executed by the processor, the method for generating a three-dimensional house type shown in the ninth aspect above is implemented.
第十二方面,本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第九方面所示的三维房型的生成方法。In a twelfth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, the computer program enables the computer to implement the method for generating a three-dimensional house type shown in the ninth aspect above.
本申请实施例提供的三维房型的生成方法、装置及设备,通过获取房间不同视角的至少两个图像,生成与所述至少两个图像分别对应的三维布局图,并基于所述至少两个图像来确定与三维布局图相对应的拼接位置,而后根据所述拼接位置对所述三维布局图进行拼接处理,生成与房间相对应的三维房型,有效地实现了可以通过普通的图像采集装置对房间进行图像采集操作,并通过所获得的图像输出与拍摄房间的三维房型,三维房型中可以包括门窗位置等信息,从而有效地解决了在利用全景相机进行图像采集获得全景图时所存在的不仅价格昂贵,操作不方便,并且拍摄技能要求较高的问题,并且,有效地拓展了该方法所适用的应用范围,极大地方便了针对一房间进行装修设计等操作,有利于推动相关应用的快速发展。The method, device, and device for generating a three-dimensional room type provided by the embodiments of the present application generate three-dimensional layout diagrams corresponding to the at least two images by acquiring at least two images of a room from different viewing angles, and based on the at least two images to determine the splicing position corresponding to the three-dimensional layout, and then perform splicing processing on the three-dimensional layout according to the splicing position to generate a three-dimensional room type corresponding to the room, effectively realizing that the room can be scanned by ordinary image acquisition devices. Carry out the image acquisition operation, and through the obtained image output and the three-dimensional room type of the shooting room, the three-dimensional room type can include information such as the location of doors and windows, thus effectively solving the problem of not only the price when using the panoramic camera for image acquisition to obtain the panoramic image. It is expensive, inconvenient to operate, and requires high shooting skills. Moreover, it effectively expands the application scope of this method, which greatly facilitates the decoration and design of a room, and is conducive to promoting the rapid development of related applications. .
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本申请实施例提供的一种三维房型的生成方法的示意图;1 is a schematic diagram of a method for generating a three-dimensional house type provided by an embodiment of the present application;
图2为本申请实施例提供的一种三维房型的生成方法的流程示意图;2 is a schematic flowchart of a method for generating a three-dimensional house type provided by an embodiment of the present application;
图3为本申请实施例提供的至少两个图像的拍摄角度的示意图;3 is a schematic diagram of shooting angles of at least two images provided by an embodiment of the present application;
图4为本申请实施例提供的生成与所述至少两个图像所对应的至少两个三维布局图的流程示意图;4 is a schematic flowchart of generating at least two three-dimensional layout diagrams corresponding to the at least two images according to an embodiment of the present application;
图5为本申请实施例提供的基于所述至少两个图像,确定与所述至少两个三维布局图相对应的拼接位置的流程示意图;5 is a schematic flowchart of determining a splicing position corresponding to the at least two three-dimensional layout diagrams based on the at least two images according to an embodiment of the present application;
图6为本申请实施例提供的基于与所有墙面信息相对应的二维墙面图像和所述至少两个图像,确定与所述至少两个三维布局图相对应的拼接位置的流程示意图;6 is a schematic flowchart of determining the splicing positions corresponding to the at least two three-dimensional layouts based on the two-dimensional wall images corresponding to all wall information and the at least two images provided by the embodiment of the present application;
图7为本申请实施例提供的基于所述图像相似度,确定与相邻的两个三维布局图相对应的拼接位置的流程示意图;7 is a schematic flowchart of determining a splicing position corresponding to two adjacent three-dimensional layout diagrams based on the image similarity provided by an embodiment of the present application;
图8为本申请实施例提供的另一种三维房型的生成方法的流程示意图;8 is a schematic flowchart of another method for generating a three-dimensional house type provided by an embodiment of the present application;
图9为本申请实施例提供的根据所述拼接位置对所述至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型的流程示意图;FIG. 9 is a schematic flowchart of performing splicing processing on the at least two three-dimensional layout drawings according to the splicing positions, and generating a three-dimensional room type corresponding to a room, according to an embodiment of the present application;
图10为本申请实施例提供的对所述拼接后房型数据进行优化处理,生成所述三维房型的流程示意图;10 is a schematic flow chart of performing optimization processing on the spliced room type data to generate the three-dimensional room type provided by the embodiment of the application;
图11为本申请实施例提供的又一种三维房型的生成方法的流程示意图;11 is a schematic flowchart of another method for generating a three-dimensional house type provided by an embodiment of the present application;
图12为本申请应用实施例提供的一种三维房型的生成方法的流程示意图;12 is a schematic flowchart of a method for generating a three-dimensional house type provided by an application embodiment of the present application;
图13为本申请应用实施例提供的获取相机参数的流程示意图;13 is a schematic flowchart of acquiring camera parameters according to an application embodiment of the present application;
图14为本申请应用实施例提供的确定拼接位置的流程示意图;14 is a schematic flowchart of determining a splicing position provided by an application embodiment of the present application;
图15为本申请应用实施例提供的拼接操作之后的示意图;15 is a schematic diagram after the splicing operation provided by the application embodiment of the present application;
图16为本申请实施例提供的一种三维房型的生成方法的流程示意图;16 is a schematic flowchart of a method for generating a three-dimensional house type provided by an embodiment of the application;
图17为本申请实施例提供的另一种三维房型的生成方法的流程示意图;17 is a schematic flowchart of another method for generating a three-dimensional house type provided by an embodiment of the application;
图18为本申请实施例提供的一种三维房型的生成装置的结构示意图;18 is a schematic structural diagram of a device for generating a three-dimensional house type provided by an embodiment of the application;
图19为图18所示的三维房型的生成装置所对应的电子设备的结构示意图;19 is a schematic structural diagram of an electronic device corresponding to the device for generating a three-dimensional house type shown in FIG. 18;
图20为本申请实施例提供的一种三维房型的生成装置的结构示意图;20 is a schematic structural diagram of a device for generating a three-dimensional house type provided by an embodiment of the application;
图21为图20所示的三维房型的生成装置所对应的电子设备的结构示意图;21 is a schematic structural diagram of an electronic device corresponding to the device for generating a three-dimensional house type shown in FIG. 20;
图22为本申请实施例提供的一种三维房型的生成装置的结构示意图;22 is a schematic structural diagram of a device for generating a three-dimensional house type provided by an embodiment of the application;
图23为图22所示的三维房型的生成装置所对应的电子设备的结构示意图。FIG. 23 is a schematic structural diagram of an electronic device corresponding to the apparatus for generating a three-dimensional house type shown in FIG. 22 .
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the examples of this application and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise, "a plurality" Generally, at least two kinds are included, but the case of including at least one kind is not excluded.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this document is only an association relationship to describe the associated objects, indicating that there may be three kinds of relationships, for example, A and/or B, which may indicate that A exists alone, and A and B exist at the same time. B, there are three cases of B alone. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a commodity or system comprising a list of elements includes not only those elements, but also includes not explicitly listed other elements, or elements inherent to the commodity or system. Without further limitation, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the article or system that includes the element.
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.
为了方便本领域技术人员理解本申请实施例提供的技术方案,下面对相关技术进行说明:In order to facilitate those skilled in the art to understand the technical solutions provided by the embodiments of the present application, related technologies are described below:
在智能家装技术领域,为了能够实现房间渲染操作,一般包括以下步骤:用户输入待渲染的户型图,而后选择不同的装修风格,从而可以生成具有不同装修风格的房间渲染图。目前比较常见的户型图获取方式是采用全景相机的室内全景采集方案,具体的,基于全景相机获取室内布局图(layout)的实现步骤包括:In the field of smart home decoration technology, in order to realize the room rendering operation, the following steps are generally included: the user inputs the floor plan to be rendered, and then selects different decoration styles, so that room renderings with different decoration styles can be generated. At present, the common way to obtain the floor plan is to use the panoramic camera indoor panoramic acquisition scheme. Specifically, the implementation steps of obtaining the indoor layout based on the panoramic camera include:
(1)通过全景相机对房间进行图像采集,得到房间内的360度全景图像。(1) The room is captured by a panoramic camera to obtain a 360-degree panoramic image in the room.
(2)通过卷积神经网络(Convolutional Neural Networks,简称CNN)识别全景图像中的地板-墙、天花板-墙以及墙墙的边界线。(2) Recognize floor-wall, ceiling-wall, and wall-wall boundary lines in panoramic images through Convolutional Neural Networks (CNN for short).
(3)基于边界线信息、相机内参以及相机拍摄离地高度,确定室内户型的户型数据。(3) Based on the boundary line information, the camera's internal parameters, and the camera's height above the ground, determine the house type data of the indoor house type.
然而,上述技术方案存在以下缺陷:全景图像不容易获取,需要专业的全景相机进行拍摄,不仅价格昂贵,操作不方便,并且拍摄技能要求较高,普通用户无法操作,从而限定了上述技术方案的应用范围,不利于用户数量的快速发展。However, the above technical solutions have the following defects: panoramic images are not easy to obtain, and professional panoramic cameras are required for shooting, which is not only expensive, but also inconvenient to operate, and requires high shooting skills, which cannot be operated by ordinary users, thus limiting the advantages of the above technical solutions. The scope of application is not conducive to the rapid development of the number of users.
为了解决上述技术问题,本实施例提供了一种三维房型的生成方法、装置及设备,该方法的执行主体可以为三维房型的生成装置,生成装置可以通信连接有图像采集装置。In order to solve the above technical problems, this embodiment provides a method, device and device for generating a 3D house type. The execution body of the method can be a 3D house type generation device, and the generation device can be communicatively connected with an image acquisition device.
其中,图像采集装置可以是任何具有一定图像采集功能和计算能力的计算设备,具体实现时,图像采集装置可以是照相机、摄像机、具有拍摄功能的智能终端(手机、平板电脑)等等。此外,图像采集装置的基本结构可以包括:至少一个处理器。处理器的数量取决于图像采集装置的配置和类型。图像采集装置也可以包括存储器,该存储器可以为易失性的,例如RAM,也可以为非易失性的,例如只读存储器(Read-Only Memory,简称ROM)、闪存等,或者也可以同时包括两种类型。存储器内通常存储有操作系统(Operating System,简称OS)、一个或多个应用程序,也可以存储有程序数据等。除了处理单元和存储器之外,图像采集装置还包括一些基本配置,例如网卡芯片、IO总线、显示组件以及一些外围设备等。可选地,一些外围设备可以包括,例如键盘、鼠标、输入笔、打印机等。其它外围设备在本领域中是众所周知的,在此不做赘述。可选地,图像采集装置可以为PC(personal computer)终端、手持终端(例如:智能手机、平板电脑)等。The image acquisition device may be any computing device with a certain image acquisition function and computing capability, and in specific implementation, the image acquisition device may be a camera, a video camera, a smart terminal (mobile phone, tablet computer) with a shooting function, and the like. In addition, the basic structure of the image acquisition device may include: at least one processor. The number of processors depends on the configuration and type of image capture device. The image acquisition device may also include a memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (ROM for short), flash memory, etc., or both Includes two types. The memory usually stores an operating system (Operating System, OS for short), one or more application programs, and may also store program data and the like. In addition to the processing unit and memory, the image acquisition device also includes some basic configurations, such as a network card chip, an IO bus, a display component, and some peripheral devices. Optionally, some peripheral devices may include, for example, a keyboard, mouse, stylus, printer, and the like. Other peripheral devices are well known in the art and will not be described in detail here. Optionally, the image acquisition device may be a PC (personal computer) terminal, a handheld terminal (eg, a smart phone, a tablet computer), or the like.
生成装置是指可以在网络虚拟环境中提供计算处理服务的设备,通常是指利用网络进行信息规划、数据处理的装置。在物理实现上,生成装置可以是任何能够提供计算服务,响应服务请求,并进行处理的设备,例如:可以是集群服务器、常规服务器、云服务器、云主机、虚拟中心等。生成装置的构成主要包括处理器、硬盘、内存、系统总线等,和通用的计算机架构类似。The generating device refers to a device that can provide computing and processing services in a network virtual environment, and usually refers to a device that utilizes the network for information planning and data processing. In terms of physical implementation, the generating device can be any device that can provide computing services, respond to service requests, and perform processing, such as cluster servers, conventional servers, cloud servers, cloud hosts, and virtual centers. The composition of the generating device mainly includes a processor, a hard disk, a memory, a system bus, etc., which is similar to a general computer architecture.
在上述本实施例中,图像采集装置可以与生成装置进行网络连接,该网络连接可以是无线或有线网络连接。若图像采集装置与生成装置是通信连接,该移动网络的网络制式可以为2G(GSM)、2.5G(GPRS)、3G(WCDMA、TD-SCDMA、CDMA2000、UTMS)、4G(LTE)、4G+(LTE+)、WiMax等中的任意一种。In the above-mentioned present embodiment, the image capturing apparatus may be connected to the generating apparatus via a network, and the network connection may be a wireless or wired network connection. If the image acquisition device and the generation device are in communication connection, the network standard of the mobile network can be 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ ( Any of LTE+), WiMax, etc.
在本申请实施例中,图像采集装置用于针对一房间进行图像采集操作,从而可以获得一房间不同视角的多个图像,多个图像是指数量大于或等于两个的图像,并且,多个图像中每个图像的拍摄视角可以均小于或等于设定值,即通过图像采集装置所获得的图像并非全景图像。在获取到多个图像之后,可以将图像上传至三维房型的生成装置,以使得生成装置可以对所上传的图像进行分析处理。In this embodiment of the present application, the image acquisition device is used to perform an image acquisition operation on a room, so that multiple images from different viewing angles of a room can be obtained. The shooting angle of each image in the image may be less than or equal to the set value, that is, the image obtained by the image acquisition device is not a panoramic image. After acquiring a plurality of images, the images can be uploaded to the generating device of the three-dimensional room type, so that the generating device can analyze and process the uploaded images.
三维房型的生成装置,用于接收客户端上传的多个图像,即使得生成装置可以获得多个非全景格式的图像,而后,如图1所示,生成装置可以对多个图像进行分析处理,生成与每个图像相对应的二维布局图,所生成的二维布局图中可以包括房间中的墙面信息;之后,结合每个图像、与图像相对应的相机参数(相机参数可以包括以下至少之一:相机内参、相机外参)对二维布局图进行分析处理,生成与每个图像相对应的三维布局图;之后,基于至少两个图像对所生成的多个三维布局图进行分析处理,确定与多个三维布局图相对应的拼接位置,可以理解的是,多个图像可以生成多个三维布局图,而任意两个三维布局图之间即可确定一拼接位置,也即,在三维布局图的数量为N个时,所确定的拼接位置也为N个。在获取到拼接位置之后,则可以根据拼接位置对所获得的所有三维布局图进行拼接处理,从而可以生成与房间相对应的三维房型。The three-dimensional room type generating device is used to receive multiple images uploaded by the client, that is, the generating device can obtain multiple non-panoramic format images, and then, as shown in FIG. 1, the generating device can analyze and process the multiple images, Generate a two-dimensional layout map corresponding to each image, and the generated two-dimensional layout map can include wall information in the room; then, combine each image and the camera parameters corresponding to the images (the camera parameters can include the following At least one of: camera internal parameter, camera external parameter) analyzes and processes the two-dimensional layout map, and generates a three-dimensional layout map corresponding to each image; after that, analyzes the generated multiple three-dimensional layout maps based on at least two images process, and determine the splicing positions corresponding to multiple three-dimensional layouts. It can be understood that multiple images can generate multiple three-dimensional layouts, and a splicing position can be determined between any two three-dimensional layouts, that is, When the number of three-dimensional layout diagrams is N, the determined splicing positions are also N. After the splicing position is obtained, all the obtained three-dimensional layout drawings can be spliced according to the splicing position, so that a three-dimensional room type corresponding to the room can be generated.
本实施例提供的技术方案,通过获取房间不同视角的至少两个图像,生成与至少两个图像分别对应的三维布局图,并基于至少两个图像确定与三维布局图相对应的拼接位置,而后根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型,有效地实现了可以通过普通的图像采集装置对房间进行图像采集操作,并通过所获得的图像输出与拍摄房间的三维房型,三维房型中可以包括门窗位置等信息,从而有效地解决了在利用全景相机进行图像采集获得全景图时所存在的不仅价格昂贵,操作不方便,并且拍摄技能要求较高的问题,并且,有效地拓展了该方法所适用的应用范围,极大地方便了针对一房间进行装修设计等操作,有利于推动相关应用的快速发展。The technical solution provided by this embodiment generates three-dimensional layout diagrams corresponding to the at least two images by acquiring at least two images of different viewing angles of the room, and determines the splicing position corresponding to the three-dimensional layout diagram based on the at least two images, and then The 3D layout map is stitched according to the stitching position to generate a 3D room type corresponding to the room, which effectively realizes the image acquisition operation of the room through an ordinary image acquisition device, and outputs the obtained image with the three-dimensional image of the room. The room type, the three-dimensional room type can include information such as the location of doors and windows, which effectively solves the problems of high price, inconvenient operation, and high requirements for shooting skills when using panoramic cameras for image acquisition to obtain panoramic images. The method effectively expands the applicable application range of the method, greatly facilitates operations such as decoration design for a room, and is conducive to promoting the rapid development of related applications.
下面通过一个示例性的应用场景具体说明本申请各个实施例提供的三维房型的生成方法、装置及设备。The method, apparatus, and device for generating a three-dimensional house type provided by various embodiments of the present application are specifically described below through an exemplary application scenario.
图2为本申请实施例提供的一种三维房型的生成方法的流程示意图;参考附图2所示,本实施例提供了一种三维房型的生成方法,该方法的执行主体可以为三维房型的生成装置,可以理解的是,该三维房型的生成装置可以实现为软件、或者软件和硬件的组合。具体的,该三维房型的生成方法可以包括:FIG. 2 is a schematic flowchart of a method for generating a three-dimensional house type provided by an embodiment of the present application; with reference to FIG. 2 , this embodiment provides a method for generating a three-dimensional house type, and the execution body of the method may be a three-dimensional house type. Generating device, it should be understood that the three-dimensional house type generating device may be implemented as software, or a combination of software and hardware. Specifically, the method for generating the three-dimensional house type may include:
步骤S201:获取房间不同视角的至少两个图像。Step S201: Acquire at least two images from different viewing angles of the room.
步骤S202:生成与至少两个图像分别对应的三维布局图。Step S202: Generate a three-dimensional layout map corresponding to the at least two images respectively.
步骤S203:基于至少两个图像,确定与三维布局图相对应的拼接位置。Step S203: Based on the at least two images, determine a splicing position corresponding to the three-dimensional layout.
步骤S204:根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型。Step S204: Perform splicing processing on the three-dimensional layout diagram according to the splicing position to generate a three-dimensional room type corresponding to the room.
下面对上述各个步骤进行详细说明:The above steps are described in detail below:
步骤S201:获取房间不同视角的至少两个图像。Step S201: Acquire at least two images from different viewing angles of the room.
其中,在针对一房间存在三维房型生成需求时,则可以通过图像采集装置对房间进行图像拍摄操作,从而可以获得房间不同视角的至少两个图像,在图像采集装置获取到至少两个图像之后,可以将至少两个图像传输至三维房型的生成装置,从而使得生成装置可以稳定地获取到至少两个图像。当然的,本领域技术人员也可以采用其他的方式来获取房间不同视角的至少两个图像,例如:一房间的至少两个图像可以存储在预设区域,通过访问预设区域即可获取到房间不同视角的至少两个图像。Wherein, when there is a demand for generating a three-dimensional room type for a room, an image capture operation can be performed on the room through the image capture device, so that at least two images of the room from different perspectives can be obtained. After the image capture device obtains at least two images, The at least two images can be transmitted to the generating device of the three-dimensional room type, so that the generating device can obtain the at least two images stably. Of course, those skilled in the art can also use other methods to obtain at least two images of a room from different perspectives. For example, at least two images of a room can be stored in a preset area, and the room can be obtained by accessing the preset area. At least two images from different viewing angles.
另外,所获得的至少两个图像中的任意一个图像的拍摄视角小于或等于设定值,其中,设定值是预先配置的用于限定图像为非全景图像的拍摄视角限值,在不同的应用场景中,设定值的大小或者取值范围可以不同,例如:在某些应用场景中,设定值可以为200°等等;或者,在另一些应用场景中,设定值可以为220°等等。在图像的拍摄视角小于或等于设定值时,则可以确定该图像并非全景图像,在图像的拍摄视角大于设定值时,则可以确定该图像为全景图像。具体的,本实施例中通过图像采集装置(而不是用于生成全景图像的全景相机)所获得的至少两个图像并非是全景图像,从而有效地解决了现有技术中需要采用全景相机获得全景图像时所存在的图像采集成本比较高的问题。In addition, the shooting angle of view of any one of the obtained at least two images is less than or equal to a set value, where the set value is a pre-configured limit of the shooting angle of view used to limit the image to a non-panoramic image. In application scenarios, the size or range of the set value can be different, for example: in some application scenarios, the set value can be 200°, etc.; or, in other application scenarios, the set value can be 220° °Wait. When the shooting angle of view of the image is less than or equal to the set value, it can be determined that the image is not a panoramic image, and when the shooting angle of the image is greater than the set value, it can be determined that the image is a panoramic image. Specifically, in this embodiment, the at least two images obtained by the image acquisition device (instead of the panoramic camera used to generate the panoramic image) are not panoramic images, thus effectively solving the need to use the panoramic camera to obtain the panoramic view in the prior art. The problem of image acquisition cost is relatively high.
在一些实例中,至少两个图像的拍摄视角不同则说明:至少两个图像的拍摄视角所对应的拍摄区域之间存在重叠区域,需要注意的是,在针对一房间进行图像采集操作时,所采集的图像的拍摄角度的大小与图像的数量相关,在图像的拍摄角度较大时,所获得的图像的数量可以较少;在图像的拍摄角度较小时,则所获得的图像的数量可以较多。In some instances, the different shooting angles of the at least two images indicate that there is an overlapping area between the shooting areas corresponding to the shooting angles of the at least two images. The size of the shooting angle of the collected image is related to the number of images. When the shooting angle of the image is large, the number of obtained images can be smaller; when the shooting angle of the image is small, the number of obtained images can be larger. many.
具体的,本实施例对于所获取的房间不同视角的至少两个图像的图像数量不做限定,本领域技术人员可以根据不同的房间房型进行不同的配置,例如:针对一对称的长方形户型的房间进行图像拍摄时,在两张图像所对应的拍摄视角可以覆盖整个房间时,可以只获取两张图像,此时两张图像所对应的拍摄视角不同,且两张图像所对应的拍摄视角范围总和大于360°,以生成一与房间相对应的完整的三维房型;在两张图像所对应的拍摄视角不能够覆盖整个房间时,则可以获取三张图像或者四张图像,三张图像或者四张图像所对应的拍摄视角不同,且三张图像或者四张图像所对应的拍摄视角范围总和大于360°,以生成一与房间相对应的完整的三维房型。Specifically, this embodiment does not limit the number of images of at least two images obtained from different viewing angles of the room, and those skilled in the art can perform different configurations according to different room types, for example, for a symmetrical rectangular room. During image shooting, when the shooting angle of view corresponding to the two images can cover the entire room, only two images can be obtained. At this time, the shooting angle of view corresponding to the two images is different, and the total shooting angle of view corresponding to the two images. More than 360°, to generate a complete three-dimensional room type corresponding to the room; when the shooting angle of view corresponding to the two images cannot cover the entire room, three images or four images, three images or four images can be obtained The shooting angles corresponding to the images are different, and the sum of the shooting angle ranges corresponding to the three images or the four images is greater than 360°, so as to generate a complete three-dimensional room type corresponding to the room.
对于一方型的房间而言,在三张图像能够覆盖整个房间时,则可以获取三张图像,三张图像所对应的拍摄视角不同,且三张图像所对应的拍摄视角范围总和大于360°;在四张图像能够覆盖整个房间时,则可以获取四张图像,四张图像所对应的拍摄视角不同,且四张图像所对应的拍摄视角范围总和大于360°。在一些实例中,如图3所示,在图像采集装置为手机时,鉴于大多数用户手机的主摄的视场角在60度左右,因此,在针对一房间获取四个图像时,四个图像的拍摄角度可以从四个墙角出发向斜对面进行拍摄,即四个拍摄视角可以与四个房间顶角相对应,此时,四个图像可以对应有不同的拍摄视角。For a one-sided room, when three images can cover the entire room, three images can be obtained, the shooting angles corresponding to the three images are different, and the total shooting angle range corresponding to the three images is greater than 360°; When the four images can cover the entire room, four images can be acquired, the shooting angles of view corresponding to the four images are different, and the sum of the shooting angle of view corresponding to the four images is greater than 360°. In some instances, as shown in FIG. 3 , when the image acquisition device is a mobile phone, since the field of view of the main camera of most users’ mobile phones is about 60 degrees, when four images are acquired for a room, the four The shooting angles of the images can start from the four corners of the wall to shoot diagonally opposite, that is, the four shooting angles can correspond to the four top corners of the room, and at this time, the four images can correspond to different shooting angles.
步骤S202:生成与至少两个图像分别对应的三维布局图。Step S202: Generate a three-dimensional layout map corresponding to the at least two images respectively.
在获取到至少两个图像之后,可以对至少两个图像进行分析处理,从而可以生成与至少两个图像分别对应的三维布局图。具体的,本实施例对于生成三维布局图的实现方式不做限定,本领域技术人员可以根据具体的应用场景和应用需求进行设置,例如:预先训练有用于对至少两个图像进行分析处理的机器学习模型,利用机器学习模型对至少两个图像进行分析处理,从而可以生成与至少两个图像分别对应的三维布局图,三维布局图中可以包括:纹理信息、三维墙面信息、各个墙面之间的空间位置关系等等。After the at least two images are acquired, the at least two images can be analyzed and processed, so that a three-dimensional layout map corresponding to the at least two images can be generated. Specifically, this embodiment does not limit the implementation manner of generating a three-dimensional layout diagram, and those skilled in the art can set according to specific application scenarios and application requirements. For example, a machine for analyzing and processing at least two images is pre-trained The learning model uses the machine learning model to analyze and process at least two images, so that a three-dimensional layout map corresponding to the at least two images can be generated, and the three-dimensional layout map can include: texture information, three-dimensional wall information, and each wall the spatial relationship between them, etc.
当然的,本领域技术人员还可以采用其他的方式来生成与至少两个图像分别对应的三维布局图,只要能够保证对三维布局图进行获取的准确可靠性。Of course, those skilled in the art may also use other methods to generate the three-dimensional layout maps corresponding to the at least two images respectively, as long as the accuracy and reliability of acquiring the three-dimensional layout maps can be ensured.
步骤S203:基于至少两个图像,确定与三维布局图相对应的拼接位置。Step S203: Based on the at least two images, determine a splicing position corresponding to the three-dimensional layout.
在获取到与至少两个图像分别对应的三维布局图之后,由于三维布局图是与至少两个图像分别对应的,而至少两个图像所对应的拍摄视角不同,因此,三维布局图的数量为至少两个,且至少两个三维布局图对应于房间的不同区域。为了能够生成与房间相对应的完整的三维房型,则在获取到至少两个图像之后,可以基于至少两个图像对三维布局图进行分析处理,以确定与三维布局图相对应的拼接位置。After acquiring the three-dimensional layout maps corresponding to the at least two images respectively, since the three-dimensional layout maps correspond to the at least two images respectively, and the shooting angles corresponding to the at least two images are different, the number of the three-dimensional layout maps is At least two, and at least two three-dimensional layouts correspond to different areas of the room. In order to generate a complete three-dimensional room type corresponding to the room, after the at least two images are acquired, the three-dimensional layout diagram may be analyzed and processed based on the at least two images to determine the splicing position corresponding to the three-dimensional layout diagram.
另外,本实施例对于确定与三维布局图相对应的拼接位置的具体实现方式不做限定,本领域技术人员可以根据具体的应用需求进行设置,例如:基于至少两个图像确定任意两个图像之间的相邻关系,在至少两个图像为四个图、且分别为图像a、图像b、图像c和图像d时,图像a与图像b之间存在相邻关系、图像a与图像d之间存在相邻关系、图像a与图像c之间不存在相邻关系。在获取到任意两个图像之间的相邻关系之后,则可以基于上述任意两个图像之间的相邻关系来确定与三维布局图相对应的拼接位置。In addition, this embodiment does not limit the specific implementation of determining the splicing position corresponding to the three-dimensional layout, and those skilled in the art can set it according to specific application requirements, for example: determine the difference between any two images based on at least two images When at least two images are four images and are respectively image a, image b, image c and image d, there is an adjacent relationship between image a and image b, and the relationship between image a and image d is adjacent. There is an adjacent relationship between image a and image c, and there is no adjacent relationship between image a and image c. After acquiring the adjacent relationship between any two images, the splicing position corresponding to the three-dimensional layout can be determined based on the adjacent relationship between any two images.
步骤S204:根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型。Step S204: Perform splicing processing on the three-dimensional layout diagram according to the splicing position to generate a three-dimensional room type corresponding to the room.
在获取到拼接位置之后,则可以根据拼接位置对与至少两个图像分别对应的三维布局图进行拼接处理,从而可以生成与房间相对应的三维房型,该三维房型即为与一房间相对应的三维空间布局图,三维空间布局图中可以包括房间的墙面信息、门窗位置、位置信息、大小信息等信息,通过三维空间布局图,具体直观的看清房间的走向布局。After the splicing position is acquired, the 3D layout drawings corresponding to at least two images can be spliced according to the splicing position, so that a 3D room type corresponding to the room can be generated, and the 3D room type is a room corresponding to a room. The three-dimensional space layout diagram can include the wall information, door and window positions, location information, size information and other information of the room. Through the three-dimensional space layout diagram, the direction and layout of the room can be clearly and intuitively seen.
在生成与房间相对应的三维房型之后,则可以基于三维房型对房间进行装修处理、渲染处理或者设计处理,具体的,装修参数可以基于不同的应用需求和设计需求进行调整,在装修参数不同时,则可以生成与不同装修参数相对应的房间装修模型。After the 3D room type corresponding to the room is generated, the room can be decorated, rendered or designed based on the 3D room type. Specifically, the decoration parameters can be adjusted based on different application requirements and design requirements. When the decoration parameters are different , the room decoration model corresponding to different decoration parameters can be generated.
本实施例提供的三维房型的生成方法,通过获取房间不同视角的至少两个图像,生成与至少两个图像分别对应的三维布局图,并基于至少两个图像来确定与三维布局图相对应的拼接位置,而后根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型,有效地实现了可以通过普通的图像采集装置对房间进行图像采集操作,这样并通过所获得的图像输出与拍摄房间的三维房型,三维房型中可以包括门窗位置等信息,从而有效地解决了在利用全景相机进行图像采集获得全景图时所存在的不仅价格昂贵,操作不方便,并且拍摄技能要求较高的问题,并且,有效地拓展了该方法所适用的应用范围,极大地方便了针对一房间进行装修设计等操作,有利于推动相关应用的快速发展。The method for generating a three-dimensional room type provided by this embodiment generates three-dimensional layout diagrams corresponding to the at least two images by acquiring at least two images of different viewing angles of a room, and determines a three-dimensional layout diagram corresponding to the three-dimensional layout diagram based on the at least two images. splicing position, and then splicing the three-dimensional layout according to the splicing position to generate a three-dimensional room type corresponding to the room, which effectively realizes the image acquisition operation of the room through the ordinary image acquisition device, so that the obtained image is output. Compared with the 3D room type of the shooting room, the 3D room type can include information such as the position of doors and windows, which effectively solves the problems of high cost, inconvenient operation and high requirements for shooting skills when using panoramic cameras for image acquisition to obtain panoramic images. In addition, it effectively expands the application scope of the method, which greatly facilitates operations such as decoration and design for a room, and is conducive to promoting the rapid development of related applications.
图4为本申请实施例提供的生成与至少两个图像所对应的至少两个三维布局图的流程示意图;在上述实施例的基础上,参考附图4所示,本实施例提供了一种生成与至少两个图像分别对应的三维布局图的实现方式,具体的,本实施例中的生成与至少两个图像分别对应的三维布局图可以包括:FIG. 4 is a schematic flowchart of generating at least two three-dimensional layout diagrams corresponding to at least two images according to an embodiment of the present application; on the basis of the foregoing embodiment, referring to FIG. 4 , this embodiment provides a An implementation manner of generating the three-dimensional layout diagrams corresponding to the at least two images respectively. Specifically, the generating of the three-dimensional layout diagrams corresponding to the at least two images in this embodiment may include:
步骤S401:生成与至少两个图像分别对应的二维布局图。Step S401: Generate a two-dimensional layout map corresponding to the at least two images respectively.
其中,二维布局图是指用于对图像中各个房间中的墙面进行分割的图形,能够反映图像中各个墙面之间的位置关系。在获取到至少两个图像之后,则可以对至少两个图像进行分析处理,以生成与至少两个图像分别对应的二维布局图,所生成的二维布局图中可以包括房间中的墙面信息。在生成与至少两个图像分别对应的二维布局图时,可以包括以下步骤:通过深度学习网络来对至少两个图像进行分析处理,从而可以与至少两个图像分别对应的二维布局图。The two-dimensional layout diagram refers to a graph used to segment the walls in each room in the image, and can reflect the positional relationship between the walls in the image. After the at least two images are acquired, the at least two images may be analyzed and processed to generate a two-dimensional layout map corresponding to the at least two images respectively, and the generated two-dimensional layout map may include the walls in the room information. When generating the two-dimensional layout maps corresponding to the at least two images respectively, the following steps may be included: analyzing and processing the at least two images through a deep learning network, so as to obtain the two-dimensional layout maps corresponding to the at least two images respectively.
具体的,在通过深度学习网络来对至少两个图像进行分析处理时,可以通过墙角边缘的检测来生成与至少两个图像分别对应的二维布局图;或者,也可以通过墙角关键点的检测来生成与至少两个图像分别对应的二维布局图;或者,也可以直接进行墙面区域的分割,从而可以生成与至少两个图像分别对应的二维布局图。Specifically, when at least two images are analyzed and processed through a deep learning network, two-dimensional layout diagrams corresponding to the at least two images can be generated by detecting the edges of the corners; alternatively, the detection of key points in the corners can also be used. to generate two-dimensional layout maps corresponding to at least two images respectively; or, the wall area can also be directly segmented, so that two-dimensional layout maps corresponding to at least two images respectively can be generated.
当然的,本领域技术人员也可以采用其他的方式来生成与至少两个图像分别对应的二维布局图,只要能够保证对二维布局图进行生成的质量和效率即可,在此不再赘述。Of course, those skilled in the art can also use other methods to generate two-dimensional layout maps corresponding to at least two images respectively, as long as the quality and efficiency of generating the two-dimensional layout maps can be guaranteed, which will not be repeated here. .
步骤S402:确定与至少两个图像相对应的相机参数。Step S402: Determine camera parameters corresponding to at least two images.
在获取到至少两个图像之后,则可以对至少两个图像进行分析处理,以确定与至少两个图像相对应的相机参数,具体的,相机参数可以包括以下至少之一:相机内参、相机外参;此时,确定与至少两个图像相对应的相机参数可以包括:计算与至少两个图像相对应的灭点信息;根据灭点信息,计算与至少两个图像相对应的相机内参;根据灭点信息和相机内参,确定与至少两个图像相对应的相机外参。After the at least two images are acquired, the at least two images may be analyzed and processed to determine camera parameters corresponding to the at least two images. Specifically, the camera parameters may include at least one of the following: camera internal parameters, camera external parameters At this time, determining the camera parameters corresponding to the at least two images may include: calculating vanishing point information corresponding to the at least two images; calculating the camera internal parameters corresponding to the at least two images according to the vanishing point information; The vanishing point information and the camera intrinsic parameters determine the camera extrinsic parameters corresponding to at least two images.
其中,灭点也叫消失点,用于描述物理世界中的无穷远处,在物理世界中互相平行的两条直线,在相机的二维投影的过程中,可以汇聚相交到一点,该点就是灭点或者消失点。具体的,计算与至少两个图像相对应的灭点信息可以包括:获取至少两个图像中所包括的线段信息,而后基于线段信息计算出与至少两个图像相对应的灭点,在获取到灭点信息之后,可以基于灭点信息所对应的灭点特性来计算与至少两个图像相对应的相机内参。Among them, the vanishing point is also called the vanishing point, which is used to describe the infinity in the physical world. Two lines that are parallel to each other in the physical world can converge and intersect to a point during the two-dimensional projection of the camera. This point is Vanishing point or vanishing point. Specifically, calculating the vanishing point information corresponding to the at least two images may include: acquiring line segment information included in the at least two images, and then calculating the vanishing point corresponding to the at least two images based on the line segment information, and after the acquired After the vanishing point information is obtained, the camera intrinsic parameters corresponding to the at least two images may be calculated based on the vanishing point characteristic corresponding to the vanishing point information.
在获取到灭点信息和相机内参之后,可以对灭点信息和相机内参进行分析处理,以确定与至少两个图像相对应的相机外参,相机外参可以包括:世界坐标系与相机坐标系之间的旋转矩阵和/或平移矩阵。After the vanishing point information and the camera internal parameters are obtained, the vanishing point information and the camera internal parameters can be analyzed and processed to determine the camera external parameters corresponding to at least two images. The camera external parameters can include: the world coordinate system and the camera coordinate system Rotation matrix and/or translation matrix between .
步骤S403:基于至少两个图像、二维布局图和相机参数,生成至少两个三维布局图。Step S403: Based on the at least two images, the two-dimensional layout, and the camera parameters, generate at least two three-dimensional layouts.
其中,在获取到至少两个图像、二维布局图和相机参数之后,可以对至少两个图像、二维布局图和相机参数进行分析处理,从而可以生成与至少两个图像分别对应的三维布局图。在一些实例中,基于至少两个图像、二维布局图和相机参数,生成与至少两个图像分别对应的三维布局图可以包括:获取(设定)与至少两个图像相对应的图像拍摄位置与地面之间的高度信息;基于高度信息、至少两个图像和相机参数,确定与至少两个图像中像素点相对应的空间约束关系;基于空间约束关系对至少两个二维布局图中的像素点进行三维重建操作,生成三维布局图。Wherein, after the at least two images, the two-dimensional layout map and the camera parameters are acquired, the at least two images, the two-dimensional layout map and the camera parameters can be analyzed and processed, so that the three-dimensional layout corresponding to the at least two images can be generated respectively picture. In some instances, based on the at least two images, the two-dimensional layout, and the camera parameters, generating the three-dimensional layout corresponding to the at least two images respectively may include: acquiring (setting) image capturing positions corresponding to the at least two images height information with the ground; based on the height information, at least two images and camera parameters, determine the spatial constraint relationship corresponding to the pixel points in the at least two images; Pixel points are subjected to 3D reconstruction operations to generate a 3D layout map.
具体的,在利用图像采集装置进行图像采集操作时,图像采集装置所对应的图像拍摄位置与地面之间会对应一个高度信息,可以理解的是,上述的高度信息可以是预先设定的或者是用户输入的;在针对不同的应用场景或者应用需求时,可以设定或者输入不同的高度信息或者同一个高度信息,例如:高度信息可以为1.5m、1.4m等等。Specifically, when the image capture device is used for image capture operation, there will be a piece of height information between the image capture position corresponding to the image capture device and the ground. It can be understood that the above-mentioned height information may be preset or User input; for different application scenarios or application requirements, different height information or the same height information can be set or input, for example, the height information can be 1.5m, 1.4m and so on.
在设定图像拍摄位置与地面之间所存在的高度信息之后,可以获取图像拍摄位置与地面之间所存在的高度信息,而后可以对高度信息、至少两个图像和相机参数进行分析处理,以确定与至少两个图像中像素点的空间约束关系。After setting the height information existing between the image shooting position and the ground, the height information existing between the image shooting position and the ground can be obtained, and then the height information, at least two images and camera parameters can be analyzed and processed to Determine spatial constraints to pixels in at least two images.
在一些实例中,与至少两个图像中像素点的空间约束关系可以包括以下至少之一:对于墙面以及地面与地板的交线上的每一个点,其世界坐标系下的坐标Z(即图像拍摄位置与地面之间所存在的高度信息H)已知,则可以实现从像素坐标系中的点到世界坐标系的映射。对于墙面上的点,其距离相机的深度信息与墙面与地面交线上的点一致,从而每个墙面上的点都可以进行三维重建。对于屋顶上的点,通过每个墙面与屋顶交线上的点的三维坐标,可以得到屋顶距离地面的高度,则屋顶上每个点也都可以进行三维重建。In some instances, the spatial constraint relationship with the pixel points in the at least two images may include at least one of the following: for each point on the wall and on the intersection of the ground and the floor, its coordinate Z in the world coordinate system (that is, If the height information H) existing between the image shooting position and the ground is known, the mapping from the point in the pixel coordinate system to the world coordinate system can be realized. For the points on the wall, the depth information from the camera is consistent with the points on the intersection of the wall and the ground, so that each point on the wall can be reconstructed in 3D. For the points on the roof, the height of the roof from the ground can be obtained through the 3D coordinates of the points on the intersection of each wall and the roof, and then each point on the roof can also be reconstructed in 3D.
在获取到空间约束关系之后,则可以基于空间约束关系对至少两个二维布局图中的像素点进行三维重建操作,从而可以生成三维布局图,这样有效地保证了对三维布局图进行获取的准确可靠性。After the spatial constraint relationship is obtained, a three-dimensional reconstruction operation can be performed on the pixels in at least two two-dimensional layout maps based on the spatial constraint relationship, so that a three-dimensional layout map can be generated, which effectively ensures the accuracy of acquiring the three-dimensional layout map. Accurate and reliable.
图5为本申请实施例提供的基于至少两个图像,确定与三维布局图相对应的拼接位置的流程示意图;在上述实施例的基础上,继续参考附图5所示,本实施例提供了一种确定与三维布局图相对应的拼接位置的实现方式,具体的,本实施例中的基于至少两个图像,确定与三维布局图相对应的拼接位置,包括:FIG. 5 is a schematic flowchart of determining a splicing position corresponding to a three-dimensional layout based on at least two images according to an embodiment of the present application; on the basis of the above embodiment, with continued reference to FIG. 5 , this embodiment provides An implementation manner of determining the splicing position corresponding to the three-dimensional layout. Specifically, in this embodiment, determining the splicing position corresponding to the three-dimensional layout based on at least two images includes:
步骤S501:提取每个三维布局图中所包括的墙面信息。Step S501: Extract the wall information included in each three-dimensional layout.
步骤S502:生成与墙面信息相对应的二维墙面图像。Step S502: Generate a two-dimensional wall image corresponding to the wall information.
步骤S503:基于与所有墙面信息相对应的二维墙面图像和至少两个图像,确定与三维布局图相对应的拼接位置。Step S503: Based on the two-dimensional wall images and at least two images corresponding to all the wall information, determine a splicing position corresponding to the three-dimensional layout.
其中,在获取到与至少两个图像分别对应的三维布局图之后,由于三维布局图中可以包括至少一个墙面,为了能够准确地确定与至少两个三维布局图相对应的拼接位置,则可以对每个三维布局图进行分析处理,以提取每个三维布局图中所包括的墙面信息,可以理解的是,所提取出来的墙面信息的数量可以为一个或多个,在获取到墙面信息之后,可以基于三维布局图生成与墙面信息相对应的二维墙面图像,具体的,可以针对每个墙面信息都生成一个二维墙面图像,因此,一个三维布局图可以对应有一个或多个二维墙面图像。Wherein, after the three-dimensional layout drawings corresponding to the at least two images are obtained, since the three-dimensional layout drawings may include at least one wall, in order to accurately determine the splicing positions corresponding to the at least two three-dimensional layout drawings, it is possible to Analyze and process each 3D layout to extract the wall information included in each 3D layout. It can be understood that the number of extracted wall information can be one or more. After the surface information, a two-dimensional wall image corresponding to the wall information can be generated based on the three-dimensional layout. Specifically, a two-dimensional wall image can be generated for each wall information. Therefore, a three-dimensional layout can correspond to There are one or more 2D wall images.
在一些实例中,生成与墙面信息相对应的二维墙面图像可以包括:获取用于生成二维墙面图像的约束关系;基于约束关系和三维布局图,生成与墙面信息相对应的二维墙面图像。其中,约束关系可以包括:墙面信息所对应的区域面积与二维墙面图像的图像分辨率呈正相关。In some instances, generating the two-dimensional wall image corresponding to the wall information may include: acquiring a constraint relationship for generating the two-dimensional wall image; 2D wall image. The constraint relationship may include: the area of the area corresponding to the wall information is positively correlated with the image resolution of the two-dimensional wall image.
具体的,在进行图像采集操作时,不同视场角或者不同拍摄角度所对应的图像中可以包括有不同的墙面信息,例如:某些图片中所包括的墙面信息的数量为一个或多个,并且,在墙面信息的数量为多个时,多个墙面信息所对应的墙面面积大小可以不同。基于上述陈述内容可知,与上述图像所对应的三维布局图中可以包括一个或多个墙面信息,且在墙面信息的数量为多个时,多个墙面信息的墙面面积大小可能不同。因此,与一个三维布局图所对应的二维墙面图像可以不同,为了能够准确地生成与墙面信息相对应的二维墙面图像,预先配置有三维布局图中的墙面信息与二维墙面图像之间所存在的缩放关系,具体的,在三维布局图中的墙面信息所对应的区域面积较大时,则可以生成较高图像分辨率的二维墙面图像。在三维布局图中的墙面信息所对应的区域面积较小时,则可以生成较小图像分辨率的二维墙面图像。Specifically, during the image acquisition operation, images corresponding to different viewing angles or different shooting angles may include different wall information. For example, some pictures include one or more wall information. Moreover, when the quantity of the wall information is multiple, the size of the wall area corresponding to the multiple wall information may be different. Based on the above statement, it can be seen that the three-dimensional layout corresponding to the above image may include one or more wall information, and when the number of wall information is multiple, the wall area sizes of the multiple wall information may be different . Therefore, it may be different from the two-dimensional wall image corresponding to a three-dimensional layout. In order to accurately generate a two-dimensional wall image corresponding to the wall information, the wall information and the two-dimensional wall information in the three-dimensional layout are pre-configured. The scaling relationship between the wall images, specifically, when the area corresponding to the wall information in the three-dimensional layout diagram is large, a two-dimensional wall image with a higher image resolution can be generated. When the area corresponding to the wall information in the three-dimensional layout diagram is small, a two-dimensional wall image with a small image resolution can be generated.
在对三维布局图中的墙面信息与二维墙面图像之间所存在的缩放关系进行配置完毕之后,则可以获取用于生成二维墙面图像的约束关系,而后可以对约束关系和三维布局图进行分析处理,从而可以生成与墙面信息相对应的二维墙面图像。After configuring the scaling relationship between the wall information in the 3D layout and the 2D wall image, the constraint relationship used to generate the 2D wall image can be obtained, and then the constraint relationship and the 3D wall image can be obtained. The layout diagram is analyzed and processed, so that a two-dimensional wall image corresponding to the wall information can be generated.
在获取到三维布局图中所有墙面信息所对应的二维墙面图像之后,可以对所有的二维墙面图像和至少两个图像进行分析处理,以确定与至少两个三维布局图相对应的拼接位置,可以理解的是,拼接位置的数量与三维布局图的数量相关,在三维布局图的个数为两个时,拼接位置的个数为两个,在三维布局图的个数为三个时,拼接位置的个数可以为三个。After acquiring the 2D wall images corresponding to all the wall information in the 3D layout, all 2D wall images and at least two images can be analyzed and processed to determine the images corresponding to the at least two 3D layouts It can be understood that the number of splicing positions is related to the number of 3D layout diagrams. When the number of 3D layout diagrams is two, the number of splicing positions is two, and the number of 3D layout diagrams is When there are three, the number of splicing positions can be three.
本实施例中,通过提取每个三维布局图中所包括的墙面信息,生成与墙面信息相对应的二维墙面图像,而后基于与所有墙面信息相对应的二维墙面图像和至少两个图像来确定与至少两个三维布局图相对应的拼接位置,从而有效地保证了对拼接位置进行确定的准确可靠性,进一步便于基于拼接位置对至少两个三维布局图进行拼接操作。In this embodiment, by extracting the wall information included in each three-dimensional layout, a two-dimensional wall image corresponding to the wall information is generated, and then based on the two-dimensional wall images corresponding to all the wall information and At least two images are used to determine the splicing positions corresponding to the at least two three-dimensional layouts, thereby effectively ensuring the accuracy and reliability of determining the splicing positions, and further facilitating the splicing operation of the at least two three-dimensional layouts based on the splicing positions.
图6为本申请实施例提供的基于与所有墙面信息相对应的二维墙面图像和至少两个图像,确定与三维布局图相对应的拼接位置的流程示意图;在上述实施例的基础上,参考附图6所示,本实施例提供了另一种确定与三维布局图相对应的拼接位置的实现方式,具体的,本实施例中的基于与所有墙面信息相对应的二维墙面图像和至少两个图像,确定与三维布局图相对应的拼接位置可以包括:6 is a schematic flowchart of determining a splicing position corresponding to a three-dimensional layout diagram based on two-dimensional wall images corresponding to all wall information and at least two images provided by an embodiment of the present application; , as shown in FIG. 6 , this embodiment provides another implementation manner of determining the splicing position corresponding to the three-dimensional layout diagram. Specifically, in this embodiment, the For the surface image and at least two images, determining the splicing position corresponding to the three-dimensional layout may include:
步骤S601:获取任意两个二维墙面图像之间所对应的图像相似度。Step S601: Obtain the image similarity corresponding to any two two-dimensional wall images.
步骤S602:基于至少两个图像,确定至少两个三维布局图的图像相邻关系。Step S602: Based on the at least two images, determine the image adjacency relationship of the at least two three-dimensional layout drawings.
步骤S603:基于图像相似度,确定与相邻的两个三维布局图相对应的拼接位置。Step S603: Based on the image similarity, determine the splicing positions corresponding to the two adjacent three-dimensional layouts.
其中,在获取到与所有三维布局图相对应的所有二维墙面图像之后,可以对任意两个二维墙面图像进行图像相似度计算操作,从而可以获得任意两个二维墙面图像之间的图像相似度。在获取到至少两个图像之后,可以对至少两个图像进行分析处理,以确定至少两个三维布局图的图像相邻关系。在一些实例中,基于至少两个图像,确定至少两个三维布局图的图像相邻关系可以包括:确定与至少两个图像相对应的第一相邻关系;基于第一相邻关系,确定至少两个三维布局图的图像相邻关系。Wherein, after all the two-dimensional wall images corresponding to all the three-dimensional layouts are obtained, the image similarity calculation operation can be performed on any two two-dimensional wall images, so that the image similarity between any two two-dimensional wall images can be obtained. image similarity between them. After the at least two images are acquired, analysis processing may be performed on the at least two images to determine the image adjacency relationship of the at least two three-dimensional layout diagrams. In some instances, based on the at least two images, determining an image adjacency relationship of the at least two three-dimensional layouts may include: determining a first adjacency relationship corresponding to the at least two images; determining at least a first adjacency relationship based on the first adjacency relationship Image adjacency of two 3D layouts.
具体的,在获取到至少两个图像之后,可以对至少两个图像进行图像相似度的计算操作,从而可以确定与至少两个图像相对应的第一相邻关系,可以理解的是,第一相邻关系可以包括相邻关系和非相邻关系,举例来说,至少两个图像包括图像a、图像b、图像c和图像d时,图像a与图像b之间存在相邻关系,图像a与图像c之间存在相邻关系,图像a与图像d之间不存在相邻关系,即图像a与图像d之间存在非相邻关系。Specifically, after the at least two images are acquired, an image similarity calculation operation may be performed on the at least two images, so that the first adjacent relationship corresponding to the at least two images may be determined. The adjacent relationship may include adjacent relationship and non-adjacent relationship. For example, when at least two images include image a, image b, image c, and image d, there is an adjacent relationship between image a and image b, and image a There is an adjacent relationship with image c, and there is no adjacent relationship between image a and image d, that is, there is a non-adjacent relationship between image a and image d.
由于三维布局图是基于图像所确定的,因此,在确定与至少两个图像相对应的第一相邻关系之后,则可以基于第一相邻关系来确定至少两个三维布局图的图像相邻关系,具体的,至少两个三维布局图的图像相邻关系与第一相邻关系相对应。Since the three-dimensional layout is determined based on the images, after the first adjacent relationship corresponding to the at least two images is determined, it can be determined that the images of the at least two three-dimensional layouts are adjacent based on the first adjacent relationship The relationship, specifically, the image adjacent relationship of the at least two three-dimensional layout maps corresponds to the first adjacent relationship.
在获取到图像相似度和至少两个三维布局图的图像相邻关系之后,可以基于图像相似度对至少两个三维布局图进行分析处理,从而可以获得与相邻的两个三维布局图相对应的拼接位置。After the image similarity and the image adjacency relationship of the at least two three-dimensional layouts are obtained, the at least two three-dimensional layouts can be analyzed and processed based on the image similarity, so that two adjacent three-dimensional layouts corresponding to the two adjacent three-dimensional layouts can be obtained. splicing position.
需要注意的是,本实施例中上述步骤S601-步骤S602之间的执行顺序并不限于实施例中所描述的执行顺序,本领域技术人员可以根据具体的应用需求和设计需求对步骤S601-步骤S602之间的执行顺序进行调整,例如:步骤S602可以在步骤S601之前执行,或者,步骤S602可以与步骤S602同时执行,在此不再赘述。It should be noted that, in this embodiment, the execution sequence between the above steps S601 to S602 is not limited to the execution sequence described in the embodiment, and those skilled in the art can perform the steps S601 to S601 according to specific application requirements and design requirements. The execution order between S602 is adjusted. For example, step S602 may be executed before step S601, or step S602 may be executed simultaneously with step S602, which will not be repeated here.
在一些实例中,在确定与至少两个图像相对应的第一相邻关系之后,本实施例中的方法还可以包括:对至少两个图像进行缩放处理,以使得所有图像中所包括的墙面高度相同。In some instances, after determining the first adjacent relationship corresponding to the at least two images, the method in this embodiment may further include: scaling the at least two images, so that the walls included in all the images The face heights are the same.
具体的,为了进一步提高对图像进行分析识别的质量和效率,在对至少两个图像进行分析处理,确定至少两个图像相对应的第一相邻关系之后,可以对至少两个图像进行缩放处理,以使得所有图像中所包括的墙面高度相同,具体的,可以以至少两个图像中任意一个图像中所包括的墙面高度作为基准,对其他图像中所包括的墙面调整进行调整;或者,也可以获取预先设置的墙面高度,基于所设定的墙面高度可以对所有图像中包括的墙面高度进行调整。当然的,本领域技术人员也可以采用其他的方式来对至少两个图像进行缩放处理,只要能够保证所有图像中所包括的墙面高度相同即可;这样在对至少两个图像进行图像匹配操作时,可以有效地提高图像匹配的精确度。Specifically, in order to further improve the quality and efficiency of analyzing and identifying images, after analyzing and processing at least two images and determining the first adjacent relationship corresponding to the at least two images, scaling processing may be performed on the at least two images. , so that the heights of the walls included in all the images are the same, and specifically, the heights of the walls included in any one of the at least two images can be used as a benchmark to adjust the walls included in the other images; Alternatively, a preset wall height can also be obtained, and based on the set wall height, the wall height included in all images can be adjusted. Of course, those skilled in the art can also use other methods to scale the at least two images, as long as the heights of the walls included in all the images can be guaranteed to be the same; in this way, the image matching operation is performed on the at least two images. can effectively improve the accuracy of image matching.
本实施例中,通过获取任意两个二维墙面图像之间所对应的图像相似度,而后基于至少两个图像,确定至少两个三维布局图的图像相邻关系,并基于图像相似度来确定与相邻的两个三维布局图相对应的拼接位置,从而有效地保证了对拼接位置进行确定的准确可靠性。In this embodiment, the image similarity between any two two-dimensional wall images is obtained, and then based on the at least two images, the image adjacent relationship of at least two three-dimensional layout images is determined, and based on the image similarity The splicing positions corresponding to the two adjacent three-dimensional layouts are determined, thereby effectively ensuring the accuracy and reliability of determining the splicing positions.
图7为本申请实施例提供的基于图像相似度,确定与相邻的两个三维布局图相对应的拼接位置的流程示意图;在上述实施例的基础上,继续参考附图7所示,本实施例提供了一种基于图像相似度,确定与相邻的两个三维布局图相对应的拼接位置的实现方式,具体的,本实施例中的基于图像相似度,确定与相邻的两个三维布局图相对应的拼接位置可以包括:FIG. 7 is a schematic flowchart of determining a splicing position corresponding to two adjacent three-dimensional layout diagrams based on image similarity provided by an embodiment of the present application; The embodiment provides an implementation manner of determining the splicing positions corresponding to two adjacent three-dimensional layouts based on the image similarity. Specifically, in this embodiment, based on the image similarity, The splicing positions corresponding to the 3D layout can include:
步骤S701:获取最高的图像相似度所对应的第一拼接墙面对;Step S701: obtaining the first mosaic wall pair corresponding to the highest image similarity;
步骤S702:基于第一拼接墙面对,确定与相邻的两个三维布局图相对应的拼接位置。Step S702: Based on the first splicing wall pair, determine the splicing positions corresponding to the two adjacent three-dimensional layout drawings.
举例来说,相邻的两个三维布局图分别为图像A和图像B,图像A可以对应有二维墙面图像a1、二维墙面图像a2、二维墙面图像a3,图像B可以对应有二维墙面图像b1和二维墙面图像b2,而后可以获取任意两个二维墙面图像之间所对应的图像相似度,例如:二维墙面图像a1与二维墙面图像b1之间的第一相似度,二维墙面图像a2与二维墙面图像b1之间的第二相似度,二维墙面图像a3与二维墙面图像b1之间的第三相似度,二维墙面图像a1与二维墙面图像b2之间的第四相似度,二维墙面图像a2与二维墙面图像b2之间的第五相似度,二维墙面图像a3与二维墙面图像b2之间的第六相似度。For example, two adjacent three-dimensional layout drawings are respectively image A and image B. Image A may correspond to a two-dimensional wall image a1, a two-dimensional wall image a2, and a two-dimensional wall image a3, and image B may correspond to There are two-dimensional wall image b1 and two-dimensional wall image b2, and then the corresponding image similarity between any two two-dimensional wall images can be obtained, for example: two-dimensional wall image a1 and two-dimensional wall image b1 The first similarity between the two-dimensional wall image a2 and the two-dimensional wall image b1, the third similarity between the two-dimensional wall image a3 and the two-dimensional wall image b1, The fourth similarity between the two-dimensional wall image a1 and the two-dimensional wall image b2, the fifth similarity between the two-dimensional wall image a2 and the two-dimensional wall image b2, the two-dimensional wall image a3 and the second The sixth similarity between the dimensional wall images b2.
在获取到上述的图像相似度之后,则可以获取最高的图像相似度,假设最高的图像相似度为第四相似度时,则可以获取到与最高的图像相似度所对应的第一拼接墙面对为二维墙面图像a1与二维墙面图像b2。在获取到第一拼接墙面对之后,则可以对第一拼接墙面对进行分析处理,以确定与相邻的两个三维布局图相对应的拼接位置。After the above-mentioned image similarity is obtained, the highest image similarity can be obtained. Assuming that the highest image similarity is the fourth similarity, the first mosaic wall corresponding to the highest image similarity can be obtained. The pair is a two-dimensional wall image a1 and a two-dimensional wall image b2. After the first splicing wall pair is acquired, the first splicing wall pair may be analyzed and processed to determine a splicing position corresponding to two adjacent three-dimensional layout drawings.
在一些实例中,基于第一拼接墙面对,确定与相邻的两个三维布局图相对应的拼接位置可以包括:对第一拼接墙面对进行特征提取操作,获得第一墙面特征和第二墙面特征;基于第一墙面特征和第二墙面特征,确定与相邻的两个三维布局图相对应的至少一个拼接位置。In some examples, determining the splicing positions corresponding to the two adjacent three-dimensional layouts based on the first splicing wall pair may include: performing a feature extraction operation on the first splicing wall pair to obtain the first wall feature and The second wall feature; based on the first wall feature and the second wall feature, determining at least one splicing position corresponding to two adjacent three-dimensional layout drawings.
具体的,在获取到第一拼接墙面对之后,可以对第一拼接墙面对进行特征提取操作,从而可以获得第一墙面特征和第二墙面特征。在获取到第一墙面特征和第二墙面特征之后,可以对第一墙面特征和第二墙面特征进行分析匹配,从而可以获取到两个墙面之间匹配度最高的位置,而后可以将匹配度最高的位置确定为与相邻的两个三维布局图相对应的至少一个拼接位置。Specifically, after the first splicing wall pair is acquired, a feature extraction operation may be performed on the first splicing wall pair, so as to obtain the first wall feature and the second wall feature. After the first wall feature and the second wall feature are obtained, the first wall feature and the second wall feature can be analyzed and matched, so that the position with the highest matching degree between the two walls can be obtained, and then The position with the highest matching degree may be determined as at least one splicing position corresponding to two adjacent three-dimensional layout drawings.
需要注意的是,在获取到与第一拼接墙面所对应的一个拼接位置之后,则可以基于上述所确定的一个拼接位置和至少两个三维布局图之间的相邻关系,确定其他的拼接位置,从而获取到与所有三维布局图相对应的所有拼接位置。It should be noted that, after obtaining a splicing position corresponding to the first splicing wall, other splicing can be determined based on the above-determined splicing position and the adjacent relationship between at least two three-dimensional layout drawings. position, so as to obtain all splicing positions corresponding to all 3D layouts.
本实施例中,通过获取最高的图像相似度所对应的第一拼接墙面对,而后基于第一拼接墙面对来确定与相邻的两个三维布局图相对应的拼接位置,从而有效地保证了对拼接位置进行确定的准确可靠性,进一步提高了基于拼接位置对至少两个三维布局图进行拼接处理的质量和效率。In this embodiment, by obtaining the first splicing wall pair corresponding to the highest image similarity, and then determining the splicing position corresponding to the two adjacent three-dimensional layouts based on the first splicing wall pair, so as to effectively The accuracy and reliability of determining the splicing position is ensured, and the quality and efficiency of the splicing processing for at least two three-dimensional layout drawings based on the splicing position are further improved.
图8为本申请实施例提供的另一种三维房型的生成方法的流程示意图;在上述实施例的基础上,继续参考附图8所示,在确定与相邻的两个三维布局图相对应的拼接位置之后,本实施例中的方法还可以包括:FIG. 8 is a schematic flowchart of another method for generating a three-dimensional house type provided by an embodiment of the present application; on the basis of the above-mentioned embodiment, referring to FIG. After the splicing position of , the method in this embodiment may further include:
步骤S801:检测拼接位置是否合理。Step S801: Check whether the splicing position is reasonable.
在获取到拼接位置之后,可以基于拼接位置对三维布局图进行拼接处理,而拼接处理后的拼接效果可能符合设定要求,或者,拼接效果也可能会不符合设定要求。因此,为了能够保证基于拼接位置对三维布局图进行拼接处理的质量和效果,在获取到拼接位置之后,则可以检测拼接位置是否合理。具体的,检测拼接位置是否合理可以包括:基于拼接位置对三维布局图进行预拼接,获得预拼接房型;识别预拼接房型中各个墙面所对应的墙面特征;基于各个墙面所对应的墙面特征,检测拼接位置是否合理。After the splicing position is obtained, the 3D layout map can be spliced based on the splicing position, and the splicing effect after the splicing processing may meet the set requirements, or the splicing effect may not meet the set requirements. Therefore, in order to ensure the quality and effect of the splicing processing on the three-dimensional layout based on the splicing position, after the splicing position is obtained, it can be detected whether the splicing position is reasonable. Specifically, detecting whether the splicing position is reasonable may include: pre-splicing the three-dimensional layout based on the splicing position to obtain the pre-splicing room type; identifying the wall features corresponding to each wall in the pre-splicing room type; Surface features to detect whether the splicing position is reasonable.
具体的,在获取到拼接位置之后,可以基于拼接位置对三维布局图进行与拼接处理,从而可以获得预拼接房型,在获取到预拼接房型之后,可以对预拼接房型进行墙面特征提取操作,从而可以获得预拼接房型中各个墙面所对应的墙面特征。在获取到与各个墙面所对应的墙面特征之后,可以对与各个墙面所对应的墙面特征进行分析处理,以检测拼接位置是否合理。需要注意的是,针对不同的墙面特征,可以采用不同的方式来检测拼接位置是否合理。Specifically, after the splicing position is obtained, the three-dimensional layout can be spliced based on the splicing position, so that a pre-spliced room type can be obtained. Thus, the wall features corresponding to each wall in the pre-spliced room type can be obtained. After acquiring the wall features corresponding to each wall, the wall features corresponding to each wall can be analyzed and processed to detect whether the splicing position is reasonable. It should be noted that for different wall features, different methods can be used to detect whether the splicing position is reasonable.
在一些实例中,在墙面特征包括:墙面的尺寸特征时,本实施例中的基于各个墙面所对应的墙面特征,检测拼接位置是否合理可以包括:基于各个墙面所对应的尺寸特征,确定预拼接房型中任意两个墙面之间的尺寸偏差信息;在尺寸偏差信息小于设定值时,则确定拼接位置合理;或者,在尺寸偏差信息大于或等于设定值时,则确定的该拼接位置不合理。In some instances, when the wall feature includes: the size feature of the wall, the detection of whether the splicing position is reasonable based on the wall feature corresponding to each wall in this embodiment may include: based on the size corresponding to each wall feature, determine the size deviation information between any two walls in the pre-spliced room type; when the size deviation information is less than the set value, it is determined that the splicing position is reasonable; or, when the size deviation information is greater than or equal to the set value, then The determined splicing position is unreasonable.
具体的,在墙面特征包括墙面的尺寸特征时,例如:墙面特征包括墙面的高度信息、宽度信息时,则可以确定预拼接房型中任意两个墙面之间的尺寸偏差信息,例如:高度偏差信息、宽度偏差信息等等,在获取到尺寸偏差信息之后,可以将尺寸偏差信息与设定值进行分析比较,在尺寸偏差信息小于设定值时,则说明预拼接房型中的图像拼接效果满足设定要求,进而可以确定拼接位置较为合理。在尺寸偏差位置大于或等于设定值时,则说明预拼接房型中的图像拼接效果不满足设定要求,进而可以确定拼接位置不合理。Specifically, when the wall feature includes the size feature of the wall, for example, when the wall feature includes the height information and width information of the wall, the size deviation information between any two walls in the pre-spliced room type can be determined, For example: height deviation information, width deviation information, etc. After obtaining the size deviation information, the size deviation information can be analyzed and compared with the set value. When the size deviation information is less than the set value, it means that the pre-splicing room type The image stitching effect meets the set requirements, and the stitching position can be determined to be more reasonable. When the size deviation position is greater than or equal to the set value, it means that the image stitching effect in the pre-stitched room type does not meet the set requirements, and then it can be determined that the stitching position is unreasonable.
在另一些实例中,在墙面特征包括:墙面之间的相对位置特征时,本实施例中的基于各个墙面所对应的墙面特征,检测拼接位置是否合理可以包括:基于各个墙面之间的相对位置特征,检测预拼接房型中任意两个墙面之间是否出现墙面交叉或墙面遮挡;当出现墙面交叉或者墙面遮挡时,则确定拼接位置不合理;或者,当未出现墙面交叉、且未出现墙面遮挡时,则确定拼接位置合理。In other instances, when the wall features include: relative position features between the walls, the detection of whether the splicing position is reasonable based on the wall features corresponding to each wall in this embodiment may include: based on each wall The relative position characteristics between the two walls are detected to detect whether there is wall intersection or wall occlusion between any two walls in the pre-spliced room type; when there is wall intersection or wall occlusion, it is determined that the splicing position is unreasonable; or, when When there is no wall intersection and no wall blocking, it is determined that the splicing position is reasonable.
当然的,本领域技术人员也可以采用其他的方式来检测拼接位置是否合理,只要能够保证对拼接位置是否合理进行检测的准确可靠性即可,在此不再赘述。Of course, those skilled in the art can also use other methods to detect whether the splicing position is reasonable, as long as the accuracy and reliability of the detection of whether the splicing position is reasonable can be ensured, which will not be repeated here.
步骤S802:在拼接位置合理时,则基于拼接位置对三维布局图进行拼接处理。或者,Step S802: When the splicing position is reasonable, the splicing process is performed on the three-dimensional layout diagram based on the splicing position. or,
步骤S803:在拼接位置不合理时,则获取第二高的图像相似度所对应的第二拼接墙面对,并确定与第二拼接墙面对相对应的拼接位置。Step S803 : when the splicing position is unreasonable, acquire the second splicing wall pair corresponding to the second highest image similarity, and determine the splicing position corresponding to the second splicing wall pair.
在对拼接位置进行检测的结果为拼接位置合理时,则说明此时预拼接房型的拼接效果满足预设要求,进而则可以直接基于拼接位置对三维布局图进行拼接处理。在对拼接位置进行检测的结果为拼接位置不合理时,则说明此时预拼接房型的拼接效果不满足预设要求,此时,为了提高预拼接房型的质量和效果,可以获取第二高的图像相似度所对应的第二拼接墙面对,而后确定与第二拼接墙面对相对应的拼接位置,具体的,确定与第二拼接墙面对相对应的拼接位置的具体实现方式与确定与第一拼接墙面对相对应的拼接位置的实现方式相类似,在此不再赘述。When the result of detecting the splicing position is that the splicing position is reasonable, it means that the splicing effect of the pre-spliced room type at this time meets the preset requirements, and then the splicing processing of the three-dimensional layout can be performed directly based on the splicing position. When the result of the detection of the splicing position is that the splicing position is unreasonable, it means that the splicing effect of the pre-splicing room type does not meet the preset requirements. At this time, in order to improve the quality and effect of the pre-splicing room type, the second highest The second splicing wall pair corresponding to the image similarity, and then determining the splicing position corresponding to the second splicing wall pair, specifically, the specific implementation method and determination of determining the splicing position corresponding to the second splicing wall pair The implementation manner of the first splicing wall facing the corresponding splicing position is similar to that of the first splicing wall, and will not be repeated here.
本实施例中,通过检测拼接位置是否合理,在拼接位置合理时,则基于拼接位置对三维布局图进行拼接处理,在拼接位置不合理时,则获取第二高的图像相似度所对应的第二拼接墙面对,并确定与第二拼接墙面对相对应的拼接位置,从而有效地实现了可以基于针对拼接位置进行检测的不同结果来执行不同的数据处理操作,进一步保证了对三维布局图进行拼接的质量和效果。In this embodiment, by detecting whether the splicing position is reasonable, when the splicing position is reasonable, the three-dimensional layout map is spliced based on the splicing position, and when the splicing position is unreasonable, the second image corresponding to the second highest image similarity is obtained. The second splicing wall is paired, and the splicing position corresponding to the second splicing wall pair is determined, thereby effectively realizing that different data processing operations can be performed based on the different results detected for the splicing position, and further ensuring the three-dimensional layout. The quality and effect of image stitching.
图9为本申请实施例提供的根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型的流程示意图;在上述实施例的基础上,参考附图9所示,本实施例提供了一种生成与房间相对应的三维房型的实现方式,具体的,本实施例中的根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型可以包括:FIG. 9 is a schematic flowchart of splicing a three-dimensional layout diagram according to a splicing position to generate a three-dimensional room type corresponding to a room provided by the embodiment of the present application; on the basis of the above embodiment, referring to FIG. An implementation method for generating a three-dimensional room type corresponding to a room is provided. Specifically, in this embodiment, the three-dimensional layout diagram is spliced according to the splicing position, and the generation of the three-dimensional room type corresponding to the room may include:
步骤S901:基于拼接位置对所有的三维布局图进行拼接处理,获得与房间相对应的拼接后房型数据;Step S901: Perform splicing processing on all three-dimensional layout drawings based on the splicing position, and obtain the spliced room type data corresponding to the room;
步骤S902:检测拼接后房型数据中所有的拼接位置处是否存在间隙;Step S902: Detecting whether there are gaps at all splicing positions in the room type data after splicing;
步骤S903:在拼接后房型数据中所有的拼接位置不存在间隙时,则将拼接后房型数据确定为三维房型;或者,Step S903: when there is no gap in all the splicing positions in the spliced room type data, then determine the spliced room type data as a three-dimensional room type; or,
步骤S904:在拼接后房型数据中一拼接位置存在间隙时,则对拼接后房型数据进行优化处理,生成三维房型。Step S904: When there is a gap in a splicing position in the spliced room type data, optimize the spliced room type data to generate a three-dimensional room type.
其中,在获取到拼接位置之后,可以基于拼接位置对所有的三维布局图进行拼接处理,从而可以获得一与房间相对应的拼接后房型数据(与整个房间相对应)。在获取到拼接房型数据之后,可以对拼接房型数据进行分析处理,以检测拼接后房型数据中所有的拼接位置处是否存在间隙。在拼接后房型数据中的所有拼接位置都不存在间隙时,则说明基于拼接位置所获得的拼接后房型数据满足设定要求,从而可以将拼接后房型数据确定为三维房型。在拼接后房型数据中一拼接位置存在间隙时,则说明基于拼接位置所获得的拼接后房型数据不满足设定要求,对房型数据进行拼接的质量和效果,则可以对拼接后房型数据进行优化处理,生成三维房型。Wherein, after the splicing position is acquired, all the three-dimensional layout drawings can be spliced based on the splicing position, so as to obtain a spliced room type data corresponding to the room (corresponding to the entire room). After acquiring the spliced room type data, the spliced room type data can be analyzed and processed to detect whether there are gaps at all splicing positions in the spliced room type data. When there is no gap in all the splicing positions in the spliced room type data, it means that the spliced room type data obtained based on the splicing positions meets the set requirements, so that the spliced room type data can be determined as a three-dimensional room type. When there is a gap in a splicing position in the room type data after splicing, it means that the splicing room type data obtained based on the splicing position does not meet the set requirements, and the quality and effect of splicing the room type data can be optimized. Processing to generate a three-dimensional room type.
举例来说,拼接位置包括:位置a、位置b、位置c,三维房型包括:数据A、数据B和数据C,基于拼接位置a将数据A和数据B进行拼接操作,之后基于拼接位置b对数据B和数据C进行拼接操作,基于拼接位置c对数据A和数据C进行拼接操作,从而可以获得一房间相对应的拼接后房型数据。而后检测拼接后房型数据对应于上述的位置a、位置b和位置c是否存在间隙,假设位置a、位置b和位置c均不存在间隙时,则可以将拼接后房型数据确定为三维房型;在位置b处存在间隙时,即在基于拼接位置a将数据A和数据B进行拼接生成数据AB、基于拼接位置c对数据A和数据C进行拼接生成CA之后,在基于拼接位置b对数据AB和数据CA进行拼接操作时,数据AB与数据CA之间存在错误情况,此时,为了保证房型数据拼接的质量和效果,则可以对拼接后房型数据进行优化处理,以生成三维房型,所生成的三维房型满足设定要求。For example, the splicing position includes: position a, position b, and position c, and the three-dimensional room type includes: data A, data B, and data C. Based on the splicing position a, the splicing operation is performed on the data A and the data B, and then based on the splicing position b. The splicing operation is performed on the data B and the data C, and the splicing operation is performed on the data A and the data C based on the splicing position c, so that the spliced room type data corresponding to a room can be obtained. Then check whether there is a gap between the spliced room type data corresponding to the above-mentioned position a, position b and position c. If there is no gap in position a, position b and position c, then the spliced room type data can be determined as a three-dimensional room type; in When there is a gap at position b, that is, after splicing data A and data B based on splicing position a to generate data AB, and splicing data A and data C based on splicing position c to generate CA, after splicing data AB and data C based on splicing position b. When the data CA is spliced, there is an error between the data AB and the data CA. At this time, in order to ensure the quality and effect of the room type data splicing, the room type data after splicing can be optimized to generate a three-dimensional room type. The three-dimensional room type meets the set requirements.
本实施例中,有效地实现了在所生成的拼接后房型数据满足设定要求时,可以直接将拼接后房型数据确定为最后的三维房型;在所生成的拼接后房型数据不满足设定要求时,可以对拼接后房型数据进行优化处理,这样可以生成满足设定要求的三维房型,进一步提高了该方法使用的准确可靠性。In this embodiment, when the generated room type data after splicing meets the set requirements, the spliced room type data can be directly determined as the final three-dimensional room type; when the generated spliced room type data does not meet the set requirements When spliced, the room type data after splicing can be optimized, so that a three-dimensional room type that meets the set requirements can be generated, which further improves the accuracy and reliability of the method.
图10为本申请实施例提供的对拼接后房型数据进行优化处理,生成三维房型的流程示意图;在上述实施例的基础上,参考附图10所示,本实施例提供了一种生成三维房型的实现方式,具体的,本实施例中的对拼接后房型数据进行优化处理,生成三维房型可以包括:FIG. 10 is a schematic flow chart of optimizing the spliced room type data to generate a three-dimensional room type provided by an embodiment of the application; on the basis of the above embodiment, referring to FIG. 10 , this embodiment provides a method for generating a three-dimensional room type. Specifically, in this embodiment, optimizing the room type data after splicing, and generating a three-dimensional room type may include:
步骤S1001:基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置。Step S1001: Optimizing all the splicing positions based on the existence of a gap in a splicing position in the room type data after splicing, to obtain the optimized splicing positions.
其中,在拼接后房型数据中一拼接位置存在间隙时,则说明所获得的拼接后房型数据不满足设定要求,此时,为了能够使得拼接后房型数据可以满足设定要求,则可以基于拼接后房型数据中一拼接位置存在的间隙对所有的拼接位置进行优化,获得优化后拼接位置。在一些实例中,基于拼接后房型数据中至少一个拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置可以包括:获取三维布局图针对每个拼接位置相对应的拼接匹配度;将最高的拼接匹配度所对应的两个三维布局图,确定为参考图像对;基于参考图像对和间隙对三维布局图所对应的拼接位置进行调整,获得优化后拼接位置。Among them, when there is a gap in a splicing position in the room type data after splicing, it means that the obtained room type data after splicing does not meet the set requirements. The gap existing in a splicing position in the posterior room type data is optimized for all splicing positions to obtain the optimized splicing position. In some instances, all splicing positions are optimized based on gaps in at least one splicing position in the room type data after splicing, and obtaining the optimized splicing positions may include: obtaining the splicing matching degree corresponding to each splicing position in the three-dimensional layout; The two 3D layouts corresponding to the highest stitching matching degree are determined as reference image pairs; the stitching positions corresponding to the 3D layouts are adjusted based on the reference image pair and the gap to obtain the optimized stitching positions.
具体的,在基于拼接位置对所有的三维布局图进行拼接操作之后,可以获取到三维布局图针对每个拼接位置相对应的拼接匹配度,在获取到与每个拼接位置相对应的拼接匹配度之后,则可以获取最高的拼接匹配度,而后将最高的拼接匹配度所对应的两个三维布局图,而后将上述所确定的两个三维布局图确定为参考图像对。可以理解的是,参考图像对的个数可以为一个或多个。在获取到参考图像对之后,可以基于参考图像对和间隙对三维布局图所对应的拼接位置进行调整,从而可以获得优化后拼接位置。Specifically, after the splicing operation is performed on all the three-dimensional layout drawings based on the splicing positions, the splicing matching degree corresponding to each splicing position of the three-dimensional layout drawings can be obtained, and after the splicing matching degree corresponding to each splicing position is obtained After that, the highest stitching matching degree can be obtained, and then two three-dimensional layout diagrams corresponding to the highest stitching matching degree are determined, and then the two three-dimensional layout diagrams determined above are determined as the reference image pair. It can be understood that the number of reference image pairs may be one or more. After the reference image pair is acquired, the splicing position corresponding to the three-dimensional layout map can be adjusted based on the reference image pair and the gap, so that the optimized splicing position can be obtained.
在一些实例中,参考图像对可以包括:位于第一方向上的第一图像对和位于第二方向上的第二图像对;此时,本实施例中的基于参考图和间隙对三维布局图所对应的拼接位置进行调整,获得优化后拼接位置可以包括:基于第一图像对和间隙,确定拼接位置在第一方向上的第一调整距离;基于第二图像对和间隙,确定拼接位置在第二方向上的第二调整距离;分别基于第一调整距离和第二调整距离在第一方向上和第二方向上对拼接位置进行调整,获得优化后拼接位置。In some instances, the reference image pair may include: a first image pair located in a first direction and a second image pair located in a second direction; at this time, the three-dimensional layout map based on the reference map and the gap pair in this embodiment Adjusting the corresponding splicing position, and obtaining the optimized splicing position may include: determining the first adjustment distance of the splicing position in the first direction based on the first image pair and the gap; determining the splicing position in the first direction based on the second image pair and the gap. The second adjustment distance in the second direction; the splicing position is adjusted in the first direction and the second direction based on the first adjustment distance and the second adjustment distance, respectively, to obtain the optimized splicing position.
上述的第一方向可以为针对一房间的长度方向,第二方向可以为针对以房间的宽度方向,而拼接位置处所存在的间隙可以包括以下至少之一:长度方向上的长度间隙、宽度方向上的宽度间隙。因此,为了保证对拼接位置进行优化的质量和效果,可以对拼接位置进行两次优化操作,即分别在长度方向上和宽度方向上进行优化操作。The above-mentioned first direction may be for the length direction of a room, the second direction may be for the width direction of the room, and the gap existing at the splicing position may include at least one of the following: a length gap in the length direction, a width direction width gap. Therefore, in order to ensure the quality and effect of optimizing the splicing position, two optimization operations may be performed on the splicing position, that is, the optimization operations are respectively performed in the length direction and the width direction.
具体的,在获取到第一图像对和间隙之后,可以基于第一图像对和间隙确定拼接位置在长度方向上的第一调整距离,在获取到第二图像对和间隙之后,可以基于第二图像对和间隙确定拼接位置在长度方向上的第二调整距离,而后可以分别基于第一调整距离和第二调整距离在第一方向上和第二方向上对拼接位置进行调整,获得优化后拼接位置,可以理解的是,所获得的优化后拼接位置用于使得拼接后房型数据中并不存在间隙。Specifically, after the first image pair and the gap are acquired, the first adjustment distance of the splicing position in the length direction can be determined based on the first image pair and the gap, and after the second image pair and the gap are acquired, the second adjustment distance can be determined based on the second image pair and the gap. The image pair and the gap determine the second adjustment distance of the stitching position in the length direction, and then the stitching position can be adjusted in the first direction and the second direction based on the first adjustment distance and the second adjustment distance, respectively, to obtain the optimized stitching It can be understood that the obtained optimized splicing position is used so that there is no gap in the room type data after splicing.
步骤S1002:基于优化后拼接位置对所有的三维布局图进行拼接处理,生成与房间相对应的三维房型。Step S1002 : splicing all the three-dimensional layout drawings based on the optimized splicing positions to generate a three-dimensional room type corresponding to the room.
在获取到优化后拼接位置之后,可以基于优化后拼接位置对所有的三维布局图进行拼接处理,从而可以生成与房间相对应的三维房型,所生成的三维房型满足设定要求。After the optimized splicing position is obtained, all 3D layout drawings can be spliced based on the optimized splicing position, so that a 3D room type corresponding to the room can be generated, and the generated 3D room type meets the set requirements.
本实施例中,基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置,而后基于优化后拼接位置对所有的三维布局图进行拼接处理,从而可以获得满足设定要求、且与房间相对应的三维房型,进一步保证了三维房型生成的质量和效果,提高了该方法使用的稳定可靠性。In this embodiment, all splicing positions are optimized based on the existence of gaps in a splicing position in the room type data after splicing, and the optimized splicing positions are obtained, and then all the three-dimensional layout drawings are spliced based on the optimized splicing positions, so as to obtain a satisfactory Setting a three-dimensional room type that is required and corresponding to the room further ensures the quality and effect of the three-dimensional room type generation, and improves the stability and reliability of the method.
图11为本申请实施例提供的又一种三维房型的生成方法的流程示意图;在上述任意一个实施例的基础上,继续参考附图11所示,本实施例中的方法还可以包括:11 is a schematic flowchart of another method for generating a three-dimensional house type provided by an embodiment of the present application; on the basis of any of the above embodiments, with continued reference to shown in FIG. 11 , the method in this embodiment may further include:
步骤S1101:识别房间中所包括的实体以及实体特征信息。Step S1101: Identify entities included in the room and entity feature information.
步骤S1102:对实体、实体特征信息和三维房型进行融合处理,生成目标三维房型。Step S1102: Perform fusion processing on the entity, entity feature information and 3D room type to generate a target 3D room type.
其中,在获取到房间不同视角的至少两个图像之后,可以对至少两个图像进行分析处理,以识别房间中所包括的实体以及实体特征信息,上述房间中所包括的实体可以包括:门窗、家具、家电等,实体特征信息可以包括:实体轮廓以及实体几何尺寸,实体特征数据包括以下至少之一:实体的起点、实体的终点、实体的识别几何尺寸、实体的类型信息、实体与其他实体之间的空间位置关系。Wherein, after acquiring at least two images from different perspectives of the room, the at least two images can be analyzed and processed to identify entities and entity feature information included in the room. The entities included in the room may include: doors, windows, Furniture, home appliances, etc., entity feature information may include: entity outline and entity geometric size, entity feature data includes at least one of the following: entity start point, entity end point, entity identification geometric size, entity type information, entity and other entities the spatial relationship between them.
在获取到实体以及实体特征信息之后,可以对实体、实体特征信息和三维房型进行融合处理,从而生成融合有实体的目标三维房型,这样使得用户通过目标三维房型可以更加直观地获取到房间中所包括的实体,有利于保证或者提高对目标三维房型进行渲染或者装修的质量和效果,进一步提高了该方法的实用性。After obtaining the entity and entity feature information, the entity, entity feature information and 3D room type can be fused to generate the target 3D room type fused with the entity, so that the user can more intuitively obtain all the rooms in the room through the target 3D room type. The included entity is beneficial to ensure or improve the quality and effect of rendering or decoration of the target three-dimensional house type, and further improves the practicability of the method.
在上述任意一个实施例的基础上,为了提高该方法的实用性,在生成与房间相对应的三维房型之后,本实施例方法还可以包括:On the basis of any one of the above embodiments, in order to improve the practicability of the method, after generating the three-dimensional room type corresponding to the room, the method of this embodiment may further include:
步骤S1201:生成与三维房型相对应的施工房型。Step S1201: Generate a construction room type corresponding to the three-dimensional room type.
步骤S1202:根据三维房型和所述施工房型,获得施工核对信息。Step S1202: Obtain construction verification information according to the three-dimensional house type and the construction house type.
其中,在获取到三维房型之后,可以基于三维房型进行施工操作,从而可以生成与三维房型相对应的施工房型,可以理解的是,施工房型可以是指基于三方房型所建造的实际房型。在获取到施工房型之后,可以对三维房型和施工房型进行对比,从而可以获得施工核对信息,该施工核对信息用于标识施工房型与三维房型之间的匹配信息,例如:三维房型中的门与施工房型中的门之间的匹配信息,三维房型中的墙与施工房型中的墙之间的匹配信息等等。Among them, after the three-dimensional room type is obtained, construction operations can be performed based on the three-dimensional room type, so that a construction room type corresponding to the three-dimensional room type can be generated. It can be understood that the construction room type may refer to the actual room type constructed based on the three-dimensional room type. After the construction room type is obtained, the 3D room type and the construction room type can be compared to obtain the construction check information, which is used to identify the matching information between the construction room type and the 3D room type, for example: the door in the 3D room type and the Matching information between doors in the construction room type, matching information between walls in the three-dimensional room type and walls in the construction room type, and so on.
在一些实例中,在获取到施工核对信息之后,可以对施工核对信息进行显示,以使得用户可以通过施工核对信息快速、直接地获取到基于三维房型进行施工操作的质量和效果,进一步提高了该方法的实用性。In some instances, after the construction verification information is acquired, the construction verification information can be displayed, so that the user can quickly and directly acquire the quality and effect of the construction operation based on the three-dimensional house type through the construction verification information, which further improves the construction verification information. practicality of the method.
在一些实例中,在获取到施工核对信息之后,可以提取施工房型中不满足设定要求的房型对象,例如:门、窗、墙等等。在获取到上述房型对象之后,可以基于三维房型中房型对象所对应的数据对施工房型进行修正操作,从而可以获得修正后的施工房型,该修正后的施工房型满足设定要求,这样不仅保证了基于三维房型进行施工操作的质量和效果,并且还能够保证施工房型可以满足用户的设定要求。In some instances, after obtaining the construction verification information, room type objects in the construction room type that do not meet the set requirements, such as doors, windows, walls, etc., may be extracted. After the above room type objects are obtained, the construction room type can be corrected based on the data corresponding to the room type objects in the three-dimensional room type, so as to obtain the revised construction room type. The revised construction room type meets the setting requirements, which not only guarantees The quality and effect of the construction operation based on the three-dimensional room type, and can also ensure that the construction room type can meet the user's set requirements.
在上述任意一个实施例的基础上,在生成与房间相对应的三维房型之后,本实施例中的方法还可以包括:On the basis of any one of the foregoing embodiments, after generating a three-dimensional room type corresponding to the room, the method in this embodiment may further include:
步骤S1301:获取所述三维房型的展示请求。Step S1301: Obtain the display request of the three-dimensional room type.
步骤S1302:基于所述展示请求,并利用设定设备对所述三维房型进行展示。Step S1302: Based on the display request, use a setting device to display the three-dimensional room type.
其中,在获取到与房间相对应的三维房型之后,在用户对三维房型的展示需求时,用户可以对三维房型的生成装置输入执行操作,在获取到执行操作之后,可以生成三维房型的展示请求;而后可以基于展示请求并利用设定设备对三维房型进行展示。Wherein, after obtaining the 3D room type corresponding to the room, when the user has a demand for the display of the 3D room type, the user can input an execution operation to the generating device of the 3D room type, and after obtaining the execution operation, a display request of the 3D room type can be generated ; and then the three-dimensional room type can be displayed based on the display request and using the setting device.
在一些实例中,所述展示请求可以包括以下至少之一:增强现实展示请求、虚拟现实展示请求、混合现实展示请求、影像现实展示请求;相对应的,所述设定设备可以包括以下至少之一:增强现实设备、虚拟现实设备、混合现实设备、影像现实设备。In some instances, the display request may include at least one of the following: an augmented reality display request, a virtual reality display request, a mixed reality display request, and an image reality display request; correspondingly, the setting device may include at least one of the following One: Augmented reality equipment, virtual reality equipment, mixed reality equipment, image reality equipment.
具体的,在获取到增强现实(Augmented Reality,简称AR)展示请求时,所对应的设定设备可以为增强现实AR设备,可以理解的是,上述的AR设备可以是头戴显示设备,例如:AR眼镜,而后可以基于AR展示请求,利用AR设备对所获得的三维房型进行展示。Specifically, when an augmented reality (Augmented Reality, AR) display request is obtained, the corresponding setting device may be an augmented reality AR device. It can be understood that the above AR device may be a head-mounted display device, for example: AR glasses, and then based on the AR display request, the AR device can be used to display the obtained three-dimensional room type.
在获取到虚拟现实(Virtual Reality,简称VR)展示请求时,所对应的设定设备可以为增强现实VR设备,可以理解的是,上述的VR设备可以是头戴显示设备,例如:VR眼镜,而后可以基于VR展示请求,利用VR设备对所获得的三维房型进行展示。When a virtual reality (Virtual Reality, VR for short) display request is obtained, the corresponding setting device may be an augmented reality VR device. It can be understood that the above VR device may be a head-mounted display device, such as VR glasses, Then, based on the VR display request, the obtained three-dimensional room type can be displayed by using the VR device.
在获取到混合现实(Mixed Reality,简称MR;或者,Hybrid Reality,简称HR)展示请求时,所对应的设定设备可以为增强现实MR设备,可以理解的是,上述的MR设备可以是头戴显示设备,例如:MR眼镜,而后可以基于MR展示请求,利用MR设备对所获得的三维房型进行展示。When a mixed reality (Mixed Reality, MR for short; or Hybrid Reality, HR for short) display request is obtained, the corresponding setting device can be an augmented reality MR device. It can be understood that the above MR device can be a headset A display device, such as MR glasses, can then use the MR device to display the obtained three-dimensional room type based on the MR display request.
在获取到影像现实(Cinematic Reality,简称CR)展示请求时,所对应的设定设备可以为增强现实CR设备,可以理解的是,上述的CR设备可以是头戴显示设备,例如:CR眼镜,而后可以基于CR展示请求,利用CR设备对所获得的三维房型进行展示。When obtaining a Cinematic Reality (CR) display request, the corresponding setting device may be an augmented reality CR device. It can be understood that the above-mentioned CR device may be a head-mounted display device, such as CR glasses, Then, based on the CR display request, the CR device can be used to display the obtained three-dimensional room type.
本实施例中,通过获取所述三维房型的展示请求,而后基于所述展示请求,并利用设定设备对所述三维房型进行展示,有效地实现了当存在针对三维房型的展示需求时,可以基于展示请求和设定设备对三维房型进行展示,从而使得用户可以直接获知到三维房型的房屋布局和房间效果,进一步提高了该方法的实用性。In this embodiment, by acquiring the display request for the three-dimensional room type, and then using the setting device to display the three-dimensional room type based on the display request, it is effectively realized that when there is a display demand for the three-dimensional room type, it can be The three-dimensional room type is displayed based on the display request and the setting device, so that the user can directly know the house layout and room effect of the three-dimensional room type, which further improves the practicability of the method.
在上述任意一个实施例的基础上,在生成与房间相对应的三维房型之后,本实施例中的方法还可以包括:On the basis of any one of the foregoing embodiments, after generating a three-dimensional room type corresponding to the room, the method in this embodiment may further include:
步骤S1401:获取所述三维房型的生成质量。Step S1401: Obtain the generation quality of the three-dimensional room type.
步骤S1402:在所述生成质量不满足设定条件时,则生成图像重拍请求,以基于所述图像重拍请求重新获取房间不同视角的至少两个图像。Step S1402: When the generation quality does not meet the set condition, generate an image retake request, so as to re-acquire at least two images of different viewing angles of the room based on the image retake request.
其中,在获取到三维房型之后,可以对三维房型进行分析处理,以获取三维房型的生成质量,具体的,本实施例对于三维房型的生成质量的具体获取方式不做限定,本领域技术人员可以根据具体的应用场景或者应用需求进行设置,例如:预先设置有用于对三维房型进行分析处理的评价规则,利用评价规则对三维房型进行分析处理,从而可以获得三维房型的生成质量;或者,预先配置有用于确定三维房型的生成质量的机器学习模型,在获取到三维房型之后,可以将三维房型输入至机器学习模型,从而可以获得三维房型的生成质量。Wherein, after the 3D room type is obtained, the 3D room type can be analyzed and processed to obtain the generation quality of the 3D room type. Specifically, this embodiment does not limit the specific acquisition method of the generation quality of the 3D room type, and those skilled in the art can Set according to specific application scenarios or application requirements, for example: pre-set evaluation rules for analyzing and processing 3D room types, and use the evaluation rules to analyze and process 3D room types, so that the generation quality of 3D room types can be obtained; or, pre-configured There is a machine learning model for determining the generation quality of the 3D room type. After the 3D room type is obtained, the 3D room type can be input into the machine learning model, so that the generation quality of the 3D room type can be obtained.
可以理解的是,生成质量可以以评分或者等级的方式来进行表示,例如,生成质量为80分、90分或者95分等等;或者,生成质量可以为用于标识质量较高的第一等级,或者,生成质量可以为用于标识质量一般的第二等级,或者,生成质量可以为用于标识质量较低的第三等级等等。It can be understood that the generation quality can be expressed in the form of scores or grades, for example, the generation quality is 80 points, 90 points or 95 points, etc.; or, the generation quality can be a first level used to identify higher quality , or the generation quality may be a second level for identifying average quality, or the generation quality may be a third level for identifying lower quality, and so on.
在获取到生成质量之后,可以检测生成质量是否满足设定条件,其中,预先配置有用于对三维房型进行分析处理的设定条件,可以理解的是,不同的应用场景所对应的设定条件可以不同。在获取到生成质量和设定条件之后,可以检测生成质量是否满足设定条件,在生成质量不满足设定条件时,则说明所生成的三维房型不能满足用户的设计需求,此时则可以生成图像重拍请求,以基于图像重拍请求重新获取房间不同视角的至少两个图像,而后可以基于重新获取到的至少两个图像来重新生成三维房型,以便使得重新生成的三维房型可以满足用户的设计需求。在生成质量满足设定条件时,则说明所生成的三维房型能够满足用户的设计需求,进而保证了三维房型的生成质量和效果。After the generation quality is obtained, it can be detected whether the generation quality satisfies the setting conditions, wherein the setting conditions for analyzing and processing the three-dimensional house type are pre-configured. It can be understood that the setting conditions corresponding to different application scenarios can be different. After obtaining the generation quality and setting conditions, it can be detected whether the generation quality meets the setting conditions. If the generation quality does not meet the setting conditions, it means that the generated 3D house type cannot meet the user's design requirements. An image retake request to re-acquire at least two images from different perspectives of the room based on the image re-take request, and then regenerate a three-dimensional room type based on the at least two re-acquired images, so that the regenerated three-dimensional room type can meet the user's requirements. design requirements. When the generation quality satisfies the set condition, it means that the generated three-dimensional house type can meet the design requirements of the user, thereby ensuring the generation quality and effect of the three-dimensional house type.
举例来说,预先配置有用于对三维房型进行分析处理的设定条件,该设定条件中包括满足用户的设计需求的最小质量限值,例如,最小质量限值可以为90分,在获取到三维房型之后,可以获取三维房型的生成质量,在生成质量为93分或者95分时,则证明上述三维房型的生成质量满足设定条件,进而则可以将所生成的三维房型进行输出。在生成质量为85分或者88分时,则证明上述三维房型的生成质量不满足设定条件,此时可以生成图像重拍请求,以基于所述图像重拍请求重新获取房间不同视角的至少两个图像,而后可以基于重新获取的至少两个图像来重新建立三维房型,并获取所述三维房型的生成质量,在生成质量满足设定条件时,则可以对重新建立的三维房型进行输出。For example, a setting condition for analyzing and processing a three-dimensional room type is preconfigured, and the setting condition includes a minimum quality limit that meets the user's design requirements. For example, the minimum quality limit may be 90 points. After the 3D room type is obtained, the generation quality of the 3D room type can be obtained. When the generation quality is 93 points or 95 points, it is proved that the generation quality of the above-mentioned 3D room type meets the set conditions, and then the generated 3D room type can be output. When the generation quality is 85 points or 88 points, it proves that the generation quality of the above-mentioned three-dimensional room type does not meet the set conditions, and an image retake request can be generated at this time, so as to re-acquire at least two images of different viewing angles of the room based on the image retake request. Then, a 3D room type can be re-established based on the at least two re-acquired images, and the generation quality of the 3D room type can be obtained. When the generation quality meets the set condition, the re-established 3D room type can be output.
本实施例中,通过获取所述三维房型的生成质量,在所述生成质量不满足设定条件时,则生成图像重拍请求,以基于所述图像重拍请求重新获取房间不同视角的至少两个图像,有效地实现了可以基于重新获取到的至少两个图像来重新生成三维房型,以便使得重新生成的三维房型可以满足用户的设计需求,进一步提高了三维房型生成的质量和效果。In this embodiment, by acquiring the generation quality of the three-dimensional room type, when the generation quality does not meet the set condition, an image retake request is generated, so as to re-acquire at least two different viewing angles of the room based on the image retake request. It effectively realizes that the three-dimensional room type can be regenerated based on the at least two re-acquired images, so that the regenerated three-dimensional room type can meet the user's design requirements, and further improve the quality and effect of the three-dimensional room type generation.
具体应用时,参考附图12所示,以通过手机针对一房间获取四个图像为例进行说明,本应用实施例提供了一种三维房型的生成方法,该方法可以使用几张不同角度拍摄的手拍图,通过手拍图进行户型重建、户型拼接、全局优化等方法,最终得到全屋户型图。这样可以极大的释放用户潜能,从而促进智能家装行业的发展。另外,该方法的执行主体可以为三维房型的生成装置,该生成装置可以包括:输入模块、与输入模块通信连接的2d layout检测模块、内外参标定模块、单图3d layout(布局图)重建模块、layout拼接模块、全局优化模块、实体识别模块和输出模块。具体的,该方法可以包括以下步骤:For specific application, referring to FIG. 12 , taking the example of acquiring four images of a room through a mobile phone, this application embodiment provides a method for generating a three-dimensional room type, which can use several images taken at different angles. The hand-made map is used to reconstruct the house type, stitch the house type, and optimize the global layout through the hand-made map, and finally obtain the whole house layout map. This can greatly release the potential of users, thereby promoting the development of the smart home improvement industry. In addition, the execution body of the method may be a three-dimensional house type generating device, and the generating device may include: an input module, a 2d layout detection module connected in communication with the input module, a calibration module for internal and external parameters, and a single-picture 3d layout (layout) reconstruction module , layout splicing module, global optimization module, entity recognition module and output module. Specifically, the method may include the following steps:
步骤1:通过输入模块获取四张手拍图。Step 1: Obtain four hand shots through the input module.
鉴于大多数用户手机的主摄像头的视场角为60度左右,因此,4张图的拍摄角度可以从四个墙角出发向斜对面进行拍摄操作,如图3所示。In view of the fact that the field of view of the main camera of most users' mobile phones is about 60 degrees, the shooting angles of the four pictures can be taken from the four corners to the diagonally opposite, as shown in Figure 3.
需要注意的是,对于输入手拍图的数量,对于不同场景可以输入不同数量的手拍图,例如,在某些应用场景中,也可以输入2张,3张或者更多张手拍图进行后续的全屋layout重建的操作。另外,手拍图的拍摄位置,拍摄角度等也也可以进行任意调整,只要能够使得所拍摄获得的图像之间存在覆盖区域即可。It should be noted that, for the number of input hand-shot pictures, different numbers of hand-shot pictures can be input for different scenarios. For example, in some application scenarios, 2, 3 or more hand-shot pictures can also be input. Subsequent whole house layout reconstruction operations. In addition, the shooting position and shooting angle of the hand-shot image can also be adjusted arbitrarily, as long as a coverage area can exist between the captured images.
步骤2:利用2d layout检测模块,获取与四张手拍图相对应的四张2dlayout图。Step 2: Use the 2d layout detection module to obtain four 2dlayout images corresponding to the four hand-shot images.
步骤3:利用内外参标定模块,获取与四张手拍图相对应的相机参数。Step 3: Use the internal and external parameter calibration module to obtain camera parameters corresponding to the four hand-shot images.
具体的,参考附图13所示,在确定与四张图像相对应的相机参数时,可以使用基于灭点的内外参标定算法来获取,在图像采集装置为手机的主摄像头时,由于手机的主摄像头的畸变都比较小,因此,可以不考虑相机的畸变系数的标定。在相机参数包括相机内参和相机外参时,下面对确定与四张图像相对应的相机参数所包括的各个步骤进行详细的描述:Specifically, referring to FIG. 13, when determining the camera parameters corresponding to the four images, the internal and external parameters calibration algorithm based on the vanishing point can be used to obtain them. When the image acquisition device is the main camera of the mobile phone, due to the The distortion of the main camera is relatively small, therefore, the calibration of the distortion coefficient of the camera may not be considered. When the camera parameters include camera intrinsic parameters and camera extrinsic parameters, the steps involved in determining the camera parameters corresponding to the four images are described in detail below:
步骤3.1:线段提取。Step 3.1: Line segment extraction.
通过手机获得四个手拍图,通过线段提取算法(Line Segment Detector,简称LSD)或者深度学习网络对四个手拍图进行线段提取操作,获得每个手拍图中所包括的线段。Four hand-shot images are obtained through a mobile phone, and a line segment extraction operation is performed on the four hand-shot images through a Line Segment Detector (LSD) or a deep learning network to obtain the line segments included in each hand-shot image.
步骤3.2:灭点计算。Step 3.2: Vanishing point calculation.
基于每个图像中所包括的线段,利用三个灭点所在的方向相互垂直的约束条件,统计与所有线段相对应的所有灭点,统计一组互相垂直的3个灭点所覆盖的线段的个数,获取线段个数最多的一组灭点,将上述灭点作为目标的一组灭点(vpx,vpy,vpz),其中,vpx、vpy、vpz分别用于表示在x、y、z三个方向的灭点。Based on the line segments included in each image, using the constraint that the directions of the three vanishing points are perpendicular to each other, count all the vanishing points corresponding to all the line segments, and count the line segments covered by a set of three mutually perpendicular vanishing points. The number of vanishing points is obtained, and the set of vanishing points with the largest number of line segments is obtained, and the above-mentioned vanishing points are used as a set of vanishing points (vpx, vpy, vpz) of the target, where vpx, vpy and vpz are used to represent the values of x, y, and z respectively. vanishing point in three directions.
步骤3.3:相机内参计算。Step 3.3: Calculation of camera internal parameters.
基于前面得到的(vpx,vpy,vpz)三个灭点,进行相机内参的计算。Based on the three vanishing points (vpx, vpy, vpz) obtained earlier, the camera internal parameters are calculated.
用K表示相机内参矩阵,K的表示如下:The camera intrinsic parameter matrix is represented by K, and the representation of K is as follows:
其中,fx为在X方向上的焦距信息,fy为在Y方向上的焦距信息,cx为在X方向上的坐标信息,cy为在Y方向上的坐标信息,对于K而言,通常认为fx=fy,因此,只有主点坐标f、cx、cy三个未知数。Among them, fx is the focal length information in the X direction, fy is the focal length information in the Y direction, cx is the coordinate information in the X direction, cy is the coordinate information in the Y direction, for K, it is usually considered that fx =fy, therefore, there are only three unknowns of the principal point coordinates f, cx and cy.
另外,w表示相机内参矩阵进行运算后所对应的中间结果,K都是用w来算的,而w与K的关系如下:w=(KKT)-1,对于每组灭点vpi、vpj,由于一张图可以得到三个灭点,任意两个灭点之间就是垂直的;可以产生关于w的元素的一个线性方程:三对灭点的约束并在一起得到方程Aw=0,其中,A是一个3*4的矩阵(三个灭点可以得到一个方程组),w由A的零向量得到,即通过A得到w的值,而后利用w的cholesky分解可以得到内参矩阵K的值,从而完成了相机的内参的标定。In addition, w represents the intermediate result corresponding to the operation of the camera's internal parameter matrix, K is calculated by w, and the relationship between w and K is as follows: w=(KKT )-1 , for each group of vanishing points vpi, vpj , Since a graph can get three vanishing points, any two vanishing points are vertical; a linear equation about the elements of w can be generated: The constraints of the three pairs of vanishing points are combined together to obtain the equation Aw=0, where A is a 3*4 matrix (three vanishing points can obtain a system of equations), and w is obtained from the zero vector of A, that is, w is obtained through A The value of , and then the value of the internal parameter matrix K can be obtained by using the cholesky decomposition of w, thus completing the calibration of the internal parameters of the camera.
步骤3.4:相机外参计算。Step 3.4: Calculation of camera extrinsic parameters.
对于每一个手拍图而言,假设世界坐标系与相机坐标系完全重合,则世界坐标系与相机坐标系之间的相机外参只有旋转变换而没有平移,此时,只需要计算出世界坐标系与相机坐标系之间的旋转矩阵,即完成了相机外参的标定操作。For each hand-shot image, assuming that the world coordinate system and the camera coordinate system are completely coincident, the camera external parameters between the world coordinate system and the camera coordinate system have only rotation transformation but no translation. At this time, only the world coordinate needs to be calculated. The rotation matrix between the system and the camera coordinate system completes the calibration of the camera external parameters.
灭点与相机参数之间的关系如下:The relationship between the vanishing point and the camera parameters is as follows:
其中,α为设定系数,VpZ和Vpx分别为在Z方向上的灭点和在X方向上的灭点,K为相机内参矩阵,rx、ry和rz分别为世界坐标系与相机坐标系在X方向、Y方向和Z方向所对应的旋转量。Among them, α is the setting coefficient, VpZ and Vpx are the vanishing point in the Z direction and the vanishing point in the X direction, K is the camera internalparameter matrix, rx , ry and rz are the world coordinate system, respectively The rotation amount corresponding to the camera coordinate system in the X, Y and Z directions.
基于上述公式可以得到旋转向量与灭点之间的表达式,如下:Based on the above formula, the expression between the rotation vector and the vanishing point can be obtained as follows:
这里,Vpx,Vpz分别代表x方向和z方向的灭点,两个方向的方向向量通过灭点直接计算出来,在获取到任意两个方向的向量之后,另外一个方向的向量通过前两个向量进行叉乘得到,即rz=ry×rx,从而得到了旋转矩阵R,完成了相机外参的标定。Here, Vpx and Vpz represent the vanishing points in the x and z directions, respectively. The direction vectors of the two directions are directly calculated through the vanishing points. After obtaining the vectors in any two directions, the vectors in the other direction pass through the first two vectors. The cross product is obtained, that is, rz =ry ×rx , so that the rotation matrix R is obtained, and the calibration of the external parameters of the camera is completed.
步骤4:利用单图3d layout重建模块获得与四张2d layout图相对应的3d layout图。Step 4: Use the single-image 3d layout reconstruction module to obtain 3d layout images corresponding to the four 2d layout images.
具体的,利用3d layout重建模块基于手拍图、2d layout图、相机参数,对2dlayout图中的每个像素点进行3d重建,从而得到单图3d layout图。Specifically, the 3D layout reconstruction module is used to perform 3D reconstruction on each pixel in the 2D layout image based on the hand-shot image, the 2D layout image, and the camera parameters, thereby obtaining a single image 3D layout image.
设定相机在拍摄图像操作时,距离地面的高度为h(例如:1.5m或者1.6m等),世界坐标系与像素坐标系之间的映射关系如下:When the camera is shooting images, the height from the ground is h (for example: 1.5m or 1.6m, etc.), and the mapping relationship between the world coordinate system and the pixel coordinate system is as follows:
其中,α为预设系数,(u,v)是像素坐标系中的点,K是相机内参,R是旋转矩阵(对应于相机外参),(X,Y,Z)是世界坐标系中的点,X为世界坐标系中点在水平方向上的值,Y为世界坐标系中点在竖直方向上的值,Z为世界坐标系中点在高度方向上的值,其中,Z为h。Among them, α is the preset coefficient, (u, v) is the point in the pixel coordinate system, K is the camera internal parameter, R is the rotation matrix (corresponding to the camera external parameter), (X, Y, Z) is the world coordinate system. , X is the value of the midpoint in the world coordinate system in the horizontal direction, Y is the value of the midpoint in the world coordinate system in the vertical direction, Z is the value of the midpoint in the world coordinate system in the height direction, where Z is h.
具体的,2d layout图中的像素点与3d layout图中的像素点之间存在以下约束关系:对于墙面以及地面与地板的交线上的每一个点,其世界坐标系下的坐标Z已知,则可以实现从像素坐标系中的点到世界坐标系的映射。对于墙面上的点,其距离相机的深度信息与墙面与地面交线上的点一致,从而每个墙面上的点都可以进行3d重建。对于屋顶上的点,通过每个墙面与屋顶交线上的点的3d坐标,可以得到屋顶距离地面的高度,则屋顶上每个点也都可以进行3d重建。从而,通过对2d像素点进行3d重建操作,即获取到与2d layout图相对应的3d layout。Specifically, the following constraints exist between the pixels in the 2d layout and the pixels in the 3d layout: for each point on the wall and on the intersection of the ground and the floor, the coordinate Z in the world coordinate system has Knowing that, the mapping from the point in the pixel coordinate system to the world coordinate system can be realized. For the points on the wall, the depth information from the camera is consistent with the points on the intersection of the wall and the ground, so that each point on the wall can be reconstructed in 3D. For the points on the roof, the height of the roof from the ground can be obtained through the 3D coordinates of the points on the intersection of each wall and the roof, and then each point on the roof can also be reconstructed in 3D. Thus, by performing a 3d reconstruction operation on the 2d pixels, a 3d layout corresponding to the 2d layout image is obtained.
步骤5:利用layout拼接模块确定3d layout图的拼接位置,并基于拼接位置进行拼接操作。Step 5: Use the layout splicing module to determine the splicing position of the 3D layout, and perform the splicing operation based on the splicing position.
为了得到针对一房间的整体的三维房型,需要对4个视图所对应的3dlayout进行拼接。layout拼接模块可以找到相邻两个3d layout图之间所对应的拼接位置,而后可以基于拼接位置进行拼接操作。具体的,参考附图14所示,基于拼接位置进行拼接操作包括以下步骤:In order to obtain an overall three-dimensional room type for a room, it is necessary to stitch the 3dlayouts corresponding to the four views. The layout splicing module can find the splicing position corresponding to two adjacent 3D layouts, and then perform splicing operations based on the splicing position. Specifically, referring to Figure 14, performing the splicing operation based on the splicing position includes the following steps:
步骤5.1:预处理。Step 5.1: Preprocessing.
预处理过程可以实现以下两个功能:The preprocessing process can achieve the following two functions:
(1)对四个手拍图进行排序,获得任意两个手拍图之间的相邻关系,具体的,可以判断哪两个视图两两相邻。(1) Sort the four hand shots to obtain the adjacent relationship between any two hand shots. Specifically, it can be determined which two views are adjacent to each other.
其中,通过特征点匹配操作来判断任意两个手拍图之间的相邻关系,具体的,可以获取任意两个手拍图之间的匹配特征点的数量,在匹配特征点数量较多时,两个手拍图确定为相邻图像的概率较大;在匹配特征点数量较少时,两个手拍图确定为相邻图像的概率较小。Among them, the feature point matching operation is used to determine the adjacent relationship between any two hand shots. Specifically, the number of matching feature points between any two hand shots can be obtained. When the number of matching feature points is large, The probability that two hand-patted images are determined to be adjacent images is high; when the number of matching feature points is small, the probability of two hand-patted pictures to be determined to be adjacent images is small.
(2)对各个视图的尺寸进行缩放,确保所有视图拼接前的墙面高度相等。(2) Scale the size of each view to ensure that the height of the wall before splicing all views is equal.
步骤5.2:墙面2d图像的生成。Step 5.2: Generation of the 2d image of the wall.
基于重建好的3d layout图,对3d layout图中所包括的每一个墙面生成一个对应的2d墙面图像,其中,2d墙面图像与3d layout图中墙面之间存在一个对应的缩放关系,基于上述缩放关系即可得到3d layout图中所包括的每个墙面的2d墙面图像。Based on the reconstructed 3d layout, a corresponding 2d wall image is generated for each wall included in the 3d layout, wherein there is a corresponding scaling relationship between the 2d wall image and the wall in the 3d layout , based on the above scaling relationship, a 2d wall image of each wall included in the 3d layout can be obtained.
步骤5.3:墙面2d图像的配准。Step 5.3: Registration of the
基于上述步骤5.1和步骤5.2的结果,对不同3d layout图所对应的2d墙面图像进行图像配准操作,获得与相邻的两个3d layout图相对应的拼接位置。具体的,匹配算法可以是基于传统的sift等特征描述子进行特征点提取和匹配,也可以基于深度学习算法直接进行两张图之间相似性的判别,之后再确定与3d layout图所对应的拼接位置。Based on the results of the above steps 5.1 and 5.2, image registration is performed on the 2d wall images corresponding to different 3d layouts, and the splicing positions corresponding to the two adjacent 3d layouts are obtained. Specifically, the matching algorithm can be based on traditional feature descriptors such as sift to extract and match feature points, or can directly judge the similarity between two images based on a deep learning algorithm, and then determine the corresponding 3D layout image. splice location.
在获取拼接位置所对应的拼接墙面之后,还可以判断所确定的两个拼接墙面是否合理,比如两个墙面的宽度差别太大,拼接后出现墙面互相遮挡或者墙面交叉等情况,则确定拼接位置或拼接墙面不适合拼接,从而需要寻找匹配特征强度次之的另一对拼接墙面,直至获得合适的配准墙面对为止。After obtaining the splicing walls corresponding to the splicing positions, it is also possible to judge whether the two splicing walls are reasonable. , then it is determined that the splicing position or the splicing wall is not suitable for splicing, so it is necessary to find another pair of splicing walls with the next matching feature strength until a suitable registration wall pair is obtained.
步骤6:利用全局优化模块进行优化操作。Step 6: Use the global optimization module to perform optimization operations.
在获取到拼接位置之后,可以基于拼接位置对四个视图进行拼接操作,即视图1-2、2-3、3-4、4-1进行之间都明确了匹配面和拼接位置,但是,在利用拼接位置进行图像拼接操作之后,拼接后可能出现首尾不能接合的情况,如图15所示。After the splicing position is obtained, the splicing operation can be performed on the four views based on the splicing position, that is, the matching surface and the splicing position are clarified between views 1-2, 2-3, 3-4, and 4-1. However, After the image stitching operation is performed using the stitching position, there may be a situation where the head and tail cannot be joined after stitching, as shown in Figure 15.
因此,在获取到拼接位置之后,还可以判断拼接位置进行拼接操作之后,拼接后的图像数据之间是否会出现拼接不结合的情况。判断所有的视图的拼接位置是否与得到的拼接位置相匹配,如果不匹配的话,就需要优化;如果没有a的话,说明拼接位置很准确,此时不需要进行微调。Therefore, after the splicing position is obtained, it can also be determined whether the spliced image data will not be spliced together after the splicing operation is performed at the splicing position. Determine whether the splicing positions of all views match the obtained splicing positions. If they do not match, they need to be optimized; if there is no a, the splicing positions are very accurate, and fine-tuning is not required at this time.
举例来说,参考附图15所示,在对视图1和视图2进行拼接获得视图12、对视图3和视图4进行拼接获得视图34之后,在将视图12与视图34进行拼接操作时,出现不能正确的接合的情况,即产生了长度为a的间隙。简单来说,视图1-视图4拼起来,视图2和视图3之间本来有一个拼接位置,但是拼不起来了,发现存在一个a的间隙。For example, referring to FIG. 15, after splicing
为了解决上述问题,全局优化模块会同时考虑12与34之间的拼接位置所对应的间隙,然后使用配准特征强的一对来指导另一对的拼接距离,从而保证拼接后的房型数据的首尾兼顾。In order to solve the above problems, the global optimization module will consider the gap corresponding to the splicing position between 12 and 34 at the same time, and then use a pair with strong registration features to guide the splicing distance of the other pair, so as to ensure the spliced room type data. Both ends.
例如:在视图1与视图2之间的特征点匹配的个数没有视图3与视图4之间的匹配特征点的个数多时,则可以以视图3与视图4作为基准,调整视图1与视图2的位置,使得间隙a消失。另外,优化完视图12与视图34的拼接后,还可以针对视图1与视图4、视图2与视图3两对进行一次拼接距离的优化,从而完成全局优化。在上述优化的过程中,视图1与视图4、视图2与视图3之间也有一个相互指导关系,将匹配特征点的个数多的图像对确定为基准,去调整另一个图像对,这样实现了可以在长度方向上和宽度方向上进行单独的优化操作,有效地保证了优化的质量和效果。For example: when the number of matching feature points between
步骤7:硬装识别。Step 7: Hardware identification.
在获取到针对以房间的完整的2d和3d layout图像之后,利用硬装识别模块识别每个墙面上的门窗的位置和大小信息,具体可以使用cnn网络进行门窗的位置检测和识别,而后将所识别的实体与三维房型进行融合处理,从而可以生成融合有实体以及实体特征的三维房型,经过上述的一系列操作,就可以通过输入的4张不同角度拍摄的2d手拍图得到全屋的2d房型布局图和3d房型布局图,并且包含门窗的位置等实体信息,这样有利于提升用户对三维房型进行阅览的质量和效果。After obtaining the complete 2d and 3d layout images for the room, use the hard-mounted recognition module to identify the position and size information of the doors and windows on each wall. Specifically, the cnn network can be used to detect and identify the position of the doors and windows, and then the The recognized entity is fused with the 3D room type, so that a 3D room type with entity and entity characteristics can be generated. 2d room layout and 3d room layout, and include physical information such as the location of doors and windows, which is conducive to improving the quality and effect of users' reading of 3D room types.
本应用实施例提供的生成方法,通过用户的手机、在房屋几个不同的角度拍摄几张手拍图,而后对手拍图进行分析处理,并通过layout拼接算法对房间的户型图进行重建,获得整个房间的2d和3d布局以及门窗等户型信息,这样有效地解决了在利用全景设备进行图像采集时所存在的操作不便的问题,这样极大的降低了三维房型的生成方法的使用门槛,提升了该方法的适用范围,对智能家装领域的用户数量增长有着巨大的价值,进一步提高了该方法的实用性。In the generation method provided by this application example, a user's mobile phone is used to take several hand-taken pictures from several different angles of the house, and then the hand-taken pictures are analyzed and processed, and the floor plan of the room is reconstructed through the layout splicing algorithm to obtain The 2d and 3d layout of the entire room, as well as the door and window information, effectively solves the problem of inconvenient operation when using panoramic equipment for image acquisition, which greatly reduces the threshold for the generation of three-dimensional room types and improves the The scope of application of the method is greatly improved, and the number of users in the field of smart home decoration is greatly increased, which further improves the practicability of the method.
图16为本申请实施例提供的一种三维房型的生成方法的流程示意图;参考附图16所示,本实施例提供了一种三维房型的生成方法,该方法的执行主体可以为三维房型的生成装置,可以理解的是,该三维房型的生成装置可以实现为软件、或者软件和硬件的组合。具体的,该三维房型的生成方法可以包括:FIG. 16 is a schematic flowchart of a method for generating a three-dimensional house type provided by an embodiment of the application; with reference to FIG. 16 , this embodiment provides a method for generating a three-dimensional house type, and the execution body of the method may be a three-dimensional house type. Generating device, it should be understood that the three-dimensional house type generating device may be implemented as software, or a combination of software and hardware. Specifically, the method for generating the three-dimensional house type may include:
步骤S1601:获取房间不同视角的至少两个图像。Step S1601: Acquire at least two images from different viewing angles of the room.
其中,本实施例中上述步骤的实现方式和实现效果与上述实施例中步骤S201的实现方式和实现效果相类似,具体可参考上述陈述内容,在此不再赘述。The implementation manner and implementation effect of the above steps in this embodiment are similar to the implementation manner and implementation effect of step S201 in the above-mentioned embodiment. For details, reference may be made to the above statement content, which will not be repeated here.
步骤S1602:生成与至少两个图像分别应的二维布局图。Step S1602: Generate a two-dimensional layout map corresponding to the at least two images respectively.
步骤S1603:确定与至少两个图像相对应的相机参数。Step S1603: Determine camera parameters corresponding to at least two images.
步骤S1604:基于至少两个图像、二维布局图和相机参数,生成与至少两个图像相对应的三维房型。Step S1604: Generate a three-dimensional room type corresponding to the at least two images based on the at least two images, the two-dimensional layout diagram and the camera parameters.
其中,本实施例中上述步骤的实现方式和实现效果与上述实施例中步骤S401-步骤S403的实现方式和实现效果相类似,具体可参考上述陈述内容,在此不再赘述。The implementation manner and effects of the above steps in this embodiment are similar to the implementation manner and effects of steps S401 to S403 in the foregoing embodiment. For details, reference may be made to the above statement, which will not be repeated here.
本实施例中的技术方案,提供了一种基于房间不同视角的至少两个图像,通过2d布局图的识别操作,相机参数识别操作等方法,可以获取与单张图像相对应的三维房型,从而有效地提高了该方法的实用性。The technical solution in this embodiment provides at least two images based on different viewing angles of the room. Through the recognition operation of the 2D layout diagram, the recognition operation of the camera parameters, etc., the three-dimensional room type corresponding to the single image can be obtained, thereby Effectively improve the practicability of the method.
在一些实例中,图像的拍摄视角不同,且至少两个图像的拍摄视角所对应的拍摄区域之间存在重叠区域。In some instances, the shooting angles of the images are different, and there is an overlapping area between the shooting areas corresponding to the shooting angles of the at least two images.
在一些实例中,二维布局图中包括房间中的墙面信息。In some instances, the two-dimensional floor plan includes wall information in the room.
在一些实例中,确定与至少两个图像相对应的相机参数可以包括:计算与至少两个图像相对应的灭点信息;根据灭点信息,计算与至少两个图像相对应的相机内参;根据灭点信息和相机内参,确定与至少两个图像相对应的相机外参。In some instances, determining the camera parameters corresponding to the at least two images may include: calculating vanishing point information corresponding to the at least two images; calculating camera intrinsic parameters corresponding to the at least two images according to the vanishing point information; The vanishing point information and the camera intrinsic parameters determine the camera extrinsic parameters corresponding to at least two images.
在一些实例中,基于至少两个图像、二维布局图和相机参数,生成与至少两个图像相对应的三维房型可以包括:获取与至少两个图像相对应的图像拍摄位置与地面之间的高度信息;基于高度信息、至少两个图像和相机参数,确定与至少两个图像中像素点相对应的空间约束关系;基于空间约束关系对二维布局图中的像素点进行三维重建操作,生成与至少两个图像分别对应的三维房型。In some instances, generating the three-dimensional house type corresponding to the at least two images based on the at least two images, the two-dimensional layout map, and the camera parameters may include: acquiring a distance between the image capturing location corresponding to the at least two images and the ground. Height information; based on the height information, at least two images and camera parameters, determine the spatial constraint relationship corresponding to the pixel points in the at least two images; based on the spatial constraint relationship, perform a three-dimensional reconstruction operation on the pixels in the two-dimensional layout map, and generate Three-dimensional room types corresponding to at least two images respectively.
本实施例中上述方法的具体实现方式、实现效果和实现原理与上述图2-图15所对应实施例中的方法的具体实现方式、实现效果和实现原理相类似,具体可参考上述陈述内容,在此不再赘述。The specific implementation manner, implementation effect and implementation principle of the above method in this embodiment are similar to the specific implementation manner, implementation effect and implementation principle of the method in the above-mentioned embodiment corresponding to FIG. 2 to FIG. It is not repeated here.
图17为本申请实施例提供的另一种三维房型的生成方法的流程示意图;参考附图17所示,本实施例提供了另一种三维房型的生成方法,该方法的执行主体可以为三维房型的生成装置,可以理解的是,该三维房型的生成装置可以实现为软件、或者软件和硬件的组合。具体的,该三维房型的生成方法可以包括:FIG. 17 is a schematic flowchart of another method for generating a three-dimensional house type provided by an embodiment of the application; with reference to FIG. 17 , this embodiment provides another method for generating a three-dimensional house type, and the execution body of the method may be a three-dimensional house type. The device for generating a room type, it should be understood that the device for generating a three-dimensional room type may be implemented as software, or a combination of software and hardware. Specifically, the method for generating the three-dimensional house type may include:
步骤S1701:获取房间不同视角的至少两个三维布局图。Step S1701: Acquire at least two three-dimensional layout diagrams of the room from different viewing angles.
步骤S1702:确定与至少两个三维布局图相对应的拼接位置。Step S1702: Determine the splicing positions corresponding to the at least two three-dimensional layouts.
步骤S1703:根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。Step S1703: Perform splicing processing on at least two three-dimensional layout drawings according to the splicing positions to generate a three-dimensional room type corresponding to the room.
下面对上述各个步骤进行详细说明:The above steps are described in detail below:
步骤S1701:获取房间不同视角的至少两个三维布局图。Step S1701: Acquire at least two three-dimensional layout diagrams of the room from different viewing angles.
其中,在针对一房间存在三维房型生成需求时,则可以获取房间不同视角的至少两个三维布局图,具体的,本实施例对于获取房间不同视角的至少两个三维布局图的具体实现方式不做限定,本领域技术人员可以根据具体的应用需求和设计需求进行设置,例如:可以获取针对一房间的至少两个手拍图像,对手拍图像进行分析处理即可获取至少两个三维布局图;或者,预先存储有与一房间相对应的至少两个三维布局图,通过访问预设区域即可获取至少两个三维布局图。Wherein, when there is a demand for generating a three-dimensional room type for a room, at least two three-dimensional layout diagrams of different viewing angles of the room can be acquired. Specifically, the specific implementation method of acquiring at least two three-dimensional layout diagrams of different viewing angles of the room in this embodiment is different. As a limitation, those skilled in the art can set according to specific application requirements and design requirements, for example: at least two hand-shot images for a room can be obtained, and at least two three-dimensional layout drawings can be obtained by analyzing and processing the hand-shot images; Alternatively, at least two three-dimensional layout drawings corresponding to a room are pre-stored, and at least two three-dimensional layout drawings can be acquired by accessing a preset area.
需要注意的是,至少两个三维布局图的视角不同,也即至少两个三维布局图中任意两个三维布局图的视角不同,这样可以实现对房间中更大视角范围内的区域进行重建操作。在另一些实例中,为了能够准确地获取到与房间整体相对应的三维房型,至少两个三维布局图中任意两个三维布局图之间存在重叠区域,这样可以实现对房间中所有视角范围内的区域进行重建操作。It should be noted that the viewing angles of at least two 3D layout diagrams are different, that is, the viewing angles of any two 3D layout diagrams in at least two 3D layout diagrams are different, so that reconstruction operations can be performed on areas within a larger viewing angle range in the room. . In some other instances, in order to accurately obtain the 3D room type corresponding to the whole room, there is an overlapping area between any two 3D layout drawings in at least two 3D layout drawings, so that it is possible to realize the accuracy of all viewing angles in the room. area for reconstruction.
步骤S1702:确定与至少两个三维布局图相对应的拼接位置。Step S1702: Determine the splicing positions corresponding to the at least two three-dimensional layouts.
步骤S1703:根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。Step S1703: Perform splicing processing on at least two three-dimensional layout drawings according to the splicing positions to generate a three-dimensional room type corresponding to the room.
其中,本实施例中上述步骤的实现方式和实现效果与上述实施例中步骤S203-步骤S204的实现方式和实现效果相类似,具体可参考上述陈述内容,在此不再赘述。The implementation manner and effects of the above steps in this embodiment are similar to the implementation manner and effects of steps S203 to S204 in the foregoing embodiment. For details, reference may be made to the above statement, which will not be repeated here.
本实施例中的技术方案,通过获取房间不同视角的至少两个三维布局图,确定与至少两个三维布局图相对应的拼接位置,而后根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型,从而有效地实现了对不同视图所对应的三维布局图进行拼接的方法,能够有效地解决在针对一房间进行视图拼接操作时,拼接后的视图存在大视差拼接的问题,进一步提高了该方法的实用性。In the technical solution in this embodiment, by acquiring at least two three-dimensional layout drawings from different viewing angles of a room, determining the splicing positions corresponding to the at least two three-dimensional layout drawings, and then performing splicing processing on the at least two three-dimensional layout drawings according to the splicing positions, Generate a 3D room type corresponding to the room, thus effectively realizing the method of splicing the 3D layouts corresponding to different views, which can effectively solve the problem of large parallax splicing of the spliced views when the view splicing operation is performed for a room. , which further improves the practicability of the method.
在一些实例中,根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型可以包括:基于拼接位置对所有的三维布局图进行拼接处理,获得与房间相对应的拼接后房型数据;检测拼接后房型数据中所有的拼接位置是否存在间隙;在拼接后房型数据中所有的拼接位置不存在间隙时,则将拼接后房型数据确定为三维房型;或者,在拼接后房型数据中一拼接位置存在间隙时,则对拼接后房型数据进行优化处理,生成三维房型。In some instances, performing splicing processing on at least two 3D layout drawings according to splicing positions, and generating a 3D room type corresponding to a room may include: performing splicing processing on all 3D layout drawings based on splicing positions to obtain a splicing process corresponding to the room Back room type data; check whether there are gaps in all the splicing positions in the spliced room type data; if there is no gap in all the splicing positions in the spliced room type data, the spliced room type data is determined as a three-dimensional room type; or, after the splicing room type data When there is a gap in a splicing position in the data, the room type data after splicing is optimized to generate a three-dimensional room type.
在一些实例中,对拼接后房型数据进行优化处理,生成三维房型,包括:基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置;基于优化后拼接位置对所有的三维布局图进行拼接处理,生成与房间相对应的三维房型。In some instances, optimizing the room type data after splicing to generate a three-dimensional room type includes: optimizing all splicing positions based on the existence of a gap in a splicing position in the splicing room type data to obtain the optimized splicing positions; based on the optimized splicing positions All 3D layout drawings are spliced and processed to generate a 3D room type corresponding to the room.
在一些实例中,基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置可以包括:获取至少两个三维布局图针对任意一个拼接位置相对应的拼接匹配度;在拼接匹配度大于或等于预设阈值时,则将与拼接匹配度相对应的两个三维布局图确定为参考图像对;基于参考图像对和间隙对至少两个三维布局图所对应的拼接位置进行调整,获得优化后拼接位置。In some instances, all splicing positions are optimized based on the existence of gaps in a splicing position in the room type data after splicing, and obtaining the optimized splicing positions may include: obtaining the splicing matching degree corresponding to any splicing position of at least two three-dimensional layouts ; When the splicing matching degree is greater than or equal to the preset threshold, the two three-dimensional layout maps corresponding to the splicing matching degree are determined as the reference image pair; based on the reference image pair and the gap pair at least two 3D layout maps corresponding to the splicing Adjust the position to obtain the optimized splicing position.
在一些实例中,参考图像对包括:位于第一方向上的第一图像对和位于第二方向上的第二图像对;基于参考图和间隙对至少两个三维布局图所对应的拼接位置进行调整,获得优化后拼接位置可以包括:基于第一图像对和间隙,确定拼接位置在第一方向上的第一调整距离;基于第二图像对和间隙,确定拼接位置在第二方向上的第二调整距离;分别基于第一调整距离和第二调整距离在第一方向上和第二方向上对拼接位置进行调整,获得优化后拼接位置。In some examples, the reference image pair includes: a first image pair located in a first direction and a second image pair located in a second direction; based on the reference image and the gap, stitching positions corresponding to the at least two three-dimensional layout images are performed. Adjusting to obtain the optimized splicing position may include: determining the first adjustment distance of the splicing position in the first direction based on the first image pair and the gap; determining the first adjustment distance of the splicing position in the second direction based on the second image pair and the gap. 2. Adjustment distance; adjust the splicing position in the first direction and the second direction based on the first adjustment distance and the second adjustment distance, respectively, to obtain the optimized splicing position.
本实施例中上述方法的具体实现方式、实现效果和实现原理与上述图2-图15所对应实施例中的方法的具体实现方式、实现效果和实现原理相类似,具体可参考上述陈述内容,在此不再赘述。The specific implementation manner, implementation effect and implementation principle of the above method in this embodiment are similar to the specific implementation manner, implementation effect and implementation principle of the method in the above-mentioned embodiment corresponding to FIG. 2 to FIG. It is not repeated here.
图18为本申请实施例提供的一种三维房型的生成装置的结构示意图;参考附图18所示,本实施例提供了一种三维房型的生成装置,该生成装置可以执行上述图2所示的三维房型的生成方法,具体的,该生成装置可以包括:FIG. 18 is a schematic structural diagram of a device for generating a three-dimensional house type provided by an embodiment of the present application; with reference to FIG. 18 , this embodiment provides a device for generating a three-dimensional house type, which can perform the above-mentioned steps shown in FIG. 2 . The method for generating a three-dimensional house type, specifically, the generating device may include:
第一获取模块11,用于获取房间不同视角的至少两个图像;The
第一生成模块12,用于生成与至少两个图像分别对应的三维布局图;a
第一确定模块13,用于基于至少两个图像,确定与三维布局图相对应的拼接位置;a
第一处理模块14,用于根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型。The
在一些实例中,图像的拍摄视角不同,且至少两个图像的拍摄视角所对应的拍摄区域之间存在重叠区域。In some instances, the shooting angles of the images are different, and there is an overlapping area between the shooting areas corresponding to the shooting angles of the at least two images.
在一些实例中,在第一生成模块12生成与至少两个图像分别对应的三维布局图时,第一生成模块12用于执行:生成与至少两个图像分别对应的至二维布局图;确定与至少两个图像相对应的相机参数;基于至少两个图像、二维布局图和相机参数,生成与至少两个图像分别对应的三维布局图。In some instances, when the
在一些实例中,二维布局图中包括房间中的墙面信息。In some instances, the two-dimensional floor plan includes wall information in the room.
在一些实例中,相机参数包括以下至少之一:相机内参、相机外参;在第一生成模块12确定与至少两个图像相对应的相机参数时,第一生成模块12用于执行:计算与至少两个图像相对应的灭点信息;根据灭点信息,计算与至少两个图像相对应的相机内参;根据灭点信息和相机内参,确定与至少两个图像相对应的相机外参。In some instances, the camera parameters include at least one of the following: camera intrinsic parameters and camera extrinsic parameters; when the
在一些实例中,在第一生成模块12基于至少两个图像、二维布局图和相机参数,生成与至少两个图像分别对应的三维布局图时,第一生成模块12用于执行:获取与至少两个图像相对应的图像拍摄位置与地面之间的高度信息;基于高度信息、至少两个图像和相机参数,确定与至少两个图像中像素点相对应的空间约束关系;基于空间约束关系对二维布局图中的像素点进行三维重建操作,生成三维布局图。In some instances, when the
在一些实例中,在第一确定模块13基于至少两个图像,确定与三维布局图相对应的拼接位置时,第一确定模块13用于执行:提取每个三维布局图中所包括的墙面信息;生成与墙面信息相对应的二维墙面图像;基于与所有墙面信息相对应的二维墙面图像和至少两个图像,确定与三维布局图相对应的拼接位置。In some instances, when the first determining
在一些实例中,在第一确定模块13生成与墙面信息相对应的二维墙面图像时,第一确定模块13用于执行:获取用于生成二维墙面图像的约束关系;基于约束关系和三维布局图,生成与墙面信息相对应的二维墙面图像。In some instances, when the
在一些实例中,约束关系包括:墙面信息所对应的区域面积与二维墙面图像的图像分辨率呈正相关。In some instances, the constraint relationship includes: the area of the area corresponding to the wall information is positively correlated with the image resolution of the two-dimensional wall image.
在一些实例中,在第一确定模块13基于与所有墙面信息相对应的二维墙面图像和至少两个图像,确定与三维布局图相对应的拼接位置时,第一确定模块13用于执行:获取任意两个二维墙面图像之间所对应的图像相似度;基于至少两个图像,确定至少两个三维布局图的图像相邻关系;基于图像相似度,确定与相邻的两个三维布局图相对应的拼接位置。In some instances, when the first determining
在一些实例中,在第一确定模块13基于图像相似度,确定与相邻的两个三维布局图相对应的拼接位置时,第一确定模块13用于执行:获取最高的图像相似度所对应的第一拼接墙面对;基于第一拼接墙面对,确定与相邻的两个三维布局图相对应的拼接位置。In some instances, when the first determining
在一些实例中,在第一确定模块13基于第一拼接墙面对,确定与相邻的两个三维布局图相对应的拼接位置时,第一确定模块13用于执行:对第一拼接墙面对进行特征提取操作,获得第一墙面特征和第二墙面特征;基于第一墙面特征和第二墙面特征,确定与相邻的两个三维布局图相对应的至少一个拼接位置。In some instances, when the first determining
在一些实例中,在第一确定模块13基于至少两个图像,确定至少两个三维布局图的图像相邻关系时,第一确定模块13用于执行:确定与至少两个图像相对应的第一相邻关系;基于第一相邻关系,确定至少两个三维布局图的图像相邻关系。In some instances, when the first determining
在一些实例中,在确定与至少两个图像相对应的第一相邻关系之后,本实施例中的第一处理模块14用于执行:对至少两个图像进行缩放处理,以使得所有图像中所包括的墙面高度相同。In some instances, after determining the first adjacent relationship corresponding to the at least two images, the
在一些实例中,在确定与相邻的两个三维布局图相对应的拼接位置之后,本实施例中的第一处理模块14用于执行:检测拼接位置是否合理;在拼接位置合理时,则基于拼接位置对三维布局图进行拼接处理;或者,在拼接位置不合理时,则获取第二高的图像相似度所对应的第二拼接墙面对,并确定与第二拼接墙面对相对应的拼接位置。In some instances, after determining the splicing positions corresponding to the two adjacent three-dimensional layout diagrams, the
在一些实例中,在第一处理模块14检测拼接位置是否合理时,该第一处理模块14用于执行以下步骤:基于拼接位置对三维布局图进行预拼接,获得预拼接房型;识别预拼接房型中各个墙面所对应的墙面特征;基于各个墙面所对应的墙面特征,检测拼接位置是否合理。In some instances, when the
在一些实例中,墙面特征包括:墙面的尺寸特征;在第一处理模块14基于各个墙面所对应的墙面特征,检测拼接位置是否合理时,该第一处理模块14用于执行以下步骤:基于各个墙面所对应的尺寸特征,确定预拼接房型中任意两个墙面之间的尺寸偏差信息;在尺寸偏差信息小于设定值时,则确定拼接位置合理;或者,在尺寸偏差信息大于或等于设定值时,则确定的该拼接位置不合理。In some instances, the wall features include: size features of the walls; when the
在一些实例中,墙面特征包括:墙面之间的相对位置特征;在第一处理模块14基于各个墙面所对应的墙面特征,检测拼接位置是否合理时,该第一处理模块14用于执行以下步骤:基于各个墙面之间的相对位置特征,检测预拼接房型中任意两个墙面之间是否出现墙面交叉或墙面遮挡;当出现墙面交叉或者墙面遮挡时,则确定拼接位置不合理;或者,当未出现墙面交叉、且未出现墙面遮挡时,则确定拼接位置合理。In some instances, the wall features include: relative position features between the walls; when the
在一些实例中,在第一处理模块14根据拼接位置对三维布局图进行拼接处理,生成与房间相对应的三维房型时,该第一处理模块14用于执行以下步骤:基于拼接位置对所有的三维布局图进行拼接处理,获得与房间相对应的拼接后房型数据;检测拼接后房型数据中所有的拼接位置是否存在间隙;在拼接后房型数据中所有的拼接位置不存在间隙时,则将拼接后房型数据确定为三维房型;或者,在拼接后房型数据中一拼接位置存在间隙时,则对拼接后房型数据进行优化处理,生成三维房型。In some instances, when the
在一些实例中,在第一处理模块14对拼接后房型数据进行优化处理,生成三维房型时,该第一处理模块14用于执行以下步骤:基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置;基于优化后拼接位置对所有的三维布局图进行拼接处理,生成与房间相对应的三维房型。In some instances, when the
在一些实例中,在第一处理模块14基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置时,该第一处理模块14用于执行以下步骤:获取三维布局图针对每个拼接位置相对应的拼接匹配度;将最高的拼接匹配度所对应的两个三维布局图,确定为参考图像对;基于参考图像对和间隙对三维布局图所对应的拼接位置进行调整,获得优化后拼接位置。In some instances, when the
在一些实例中,参考图像对包括:位于第一方向上的第一图像对和位于第二方向上的第二图像对;在第一处理模块14基于参考图和间隙对三维布局图所对应的拼接位置进行调整,获得优化后拼接位置时,该第一处理模块14用于执行以下步骤:基于第一图像对和间隙,确定拼接位置在第一方向上的第一调整距离;基于第二图像对和间隙,确定拼接位置在第二方向上的第二调整距离;分别基于第一调整距离和第二调整距离在第一方向上和第二方向上对拼接位置进行调整,获得优化后拼接位置。In some examples, the reference image pair includes: a first image pair located in a first direction and a second image pair located in a second direction; the
在一些实例中,本实施例中的第一处理模块14用于执行:识别房间中所包括的实体以及实体特征信息;对实体、实体特征信息和三维房型进行融合处理,生成目标三维房型。In some instances, the
在一些实例中,在生成与房间相对应的三维房型之后,本实施例中的第一处理模块14还用于:生成与所述三维房型相对应的施工房型;根据所述三维房型和所述施工房型,获得施工核对信息。In some instances, after generating the three-dimensional room type corresponding to the room, the
在一些实例中,在生成与房间相对应的三维房型之后,本实施例中的第一处理模块14还用于:获取所述三维房型的展示请求;基于所述展示请求,并利用设定设备对所述三维房型进行展示。In some instances, after the three-dimensional room type corresponding to the room is generated, the
在一些实例中,所述展示请求包括以下至少之一:增强现实展示请求、虚拟现实展示请求、混合现实展示请求、影像现实展示请求;相对应的,所述设定设备包括以下至少之一:增强现实设备、虚拟现实设备、混合现实设备、影像现实设备。In some instances, the display request includes at least one of the following: an augmented reality display request, a virtual reality display request, a mixed reality display request, and an image reality display request; correspondingly, the setting device includes at least one of the following: Augmented reality equipment, virtual reality equipment, mixed reality equipment, video reality equipment.
在一些实例中,在生成与房间相对应的三维房型之后,本实施例中的第一处理模块14还用于:获取所述三维房型的生成质量;在所述生成质量不满足设定条件时,则生成图像重拍请求,以基于所述图像重拍请求重新获取房间不同视角的至少两个图像。In some instances, after generating the three-dimensional room type corresponding to the room, the
图18所示装置可以执行图1-图15所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图15所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图15所示实施例中的描述,在此不再赘述。The apparatus shown in FIG. 18 may execute the method of the embodiment shown in FIG. 1 to FIG. 15 . For parts not described in detail in this embodiment, reference may be made to the related description of the embodiment shown in FIG. 1 to FIG. 15 . For the execution process and technical effect of the technical solution, refer to the descriptions in the embodiments shown in FIG. 1 to FIG. 15 , which will not be repeated here.
在一个可能的设计中,图18所示三维房型的生成装置的结构可实现为一电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图19所示,该电子设备可以包括:第一处理器21和第一存储器22。其中,第一存储器22用于存储相对应电子设备执行上述图1-图15所示实施例中提供的三维房型的生成方法的程序,第一处理器21被配置为用于执行第一存储器22中存储的程序。In a possible design, the structure of the apparatus for generating a three-dimensional house type shown in FIG. 18 can be implemented as an electronic device, and the electronic device can be various devices such as a mobile phone, a tablet computer, and a server. As shown in FIG. 19 , the electronic device may include: a
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第一处理器21执行时能够实现如下步骤:The program includes one or more computer instructions, wherein, when the one or more computer instructions are executed by the
获取房间不同视角的至少两个图像;acquire at least two images from different perspectives of the room;
生成与至少两个图像分别对应的三维布局图;generating a three-dimensional layout map corresponding to the at least two images respectively;
基于至少两个图像,确定与三维布局图相对应的拼接位置;based on the at least two images, determining a splicing position corresponding to the three-dimensional layout;
根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。According to the splicing position, at least two 3D layout drawings are spliced and processed to generate a 3D room type corresponding to the room.
进一步的,第一处理器21还用于执行前述图1-图15所示实施例中的全部或部分步骤。Further, the
其中,电子设备的结构中还可以包括第一通信接口23,用于电子设备与其他设备或通信网络通信。The structure of the electronic device may further include a
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图1-图15所示方法实施例中三维房型的生成方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, which includes the methods involved in executing the method for generating a three-dimensional house type in the method embodiment shown in FIG. 1 to FIG. 15 above. program.
图20为本申请实施例提供的一种三维房型的生成装置的结构示意图;参考附图20所示,本实施例提供了一种三维房型的生成装置,该三维房型的生成装置用于执行上述图16所示的三维房型的生成方法,具体的,该生成装置可以包括:FIG. 20 is a schematic structural diagram of a device for generating a three-dimensional house type provided by an embodiment of the application; with reference to FIG. 20 , the embodiment provides a device for generating a three-dimensional house type, and the device for generating a three-dimensional house type is used to execute the above The method for generating a three-dimensional house type shown in FIG. 16, specifically, the generating device may include:
第二获取模块31,用于获取房间不同视角的至少两个图像。The
第二生成模块32,用于生成与至少两个图像分别对应的二维布局图。The
第二确定模块33,用于确定与至少两个图像相对应的相机参数。The
第二处理模块34,用于基于至少两个图像、二维布局图和相机参数,生成与至少两个图像相对应的三维房型。The
在一些实例中,图像的拍摄视角不同,且至少两个图像的拍摄视角所对应的拍摄区域之间存在重叠区域。In some instances, the shooting angles of the images are different, and there is an overlapping area between the shooting areas corresponding to the shooting angles of the at least two images.
在一些实例中,二维布局图中包括房间中的墙面信息。In some instances, the two-dimensional floor plan includes wall information in the room.
在一些实例中,在第二确定模块33确定与至少两个图像相对应的相机参数时,该第二确定模块33用于执行:计算与至少两个图像相对应的灭点信息;根据灭点信息,计算与至少两个图像相对应的相机内参;根据灭点信息和相机内参,确定与至少两个图像相对应的相机外参。In some instances, when the second determining
在一些实例中,在第二处理模块34基于至少两个图像、二维布局图和相机参数,生成与至少两个图像相对应的三维房型时,第二处理模块34用于执行:获取与至少两个图像相对应的图像拍摄位置与地面之间的高度信息;基于高度信息、至少两个图像和相机参数,确定与至少两个图像中像素点相对应的空间约束关系;基于空间约束关系对二维布局图中的像素点进行三维重建操作,生成与至少两个图像相对应的三维房型。In some instances, when the
图20所示装置可以执行图1、图12-图14、图16所示实施例的方法,本实施例未详细描述的部分,可参考对图1、图12-图14、图16所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1、图12-图14、图16所示实施例中的描述,在此不再赘述。The apparatus shown in FIG. 20 can execute the method of the embodiment shown in FIG. 1 , FIG. 12 to FIG. 14 , and FIG. 16 . For the parts not described in detail in this embodiment, please refer to the method shown in FIG. 1 , FIG. 12 to FIG. 14 , and FIG. 16 . Relevant description of the embodiment. For the execution process and technical effect of the technical solution, refer to the descriptions in the embodiments shown in FIG. 1 , FIG. 12 to FIG. 14 , and FIG. 16 , which will not be repeated here.
在一个可能的实现中,图20所示三维房型的生成装置的结构可实现为一种电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图21所示,该电子设备可以包括:第二处理器41和第二存储器42。其中,第二存储器43用于存储相对应电子设备执行上述图1、图12-图14、图16所示实施例中提供的三维房型的生成方法的程序,第二处理器41被配置为用于执行第二存储器42中存储的程序。In a possible implementation, the structure of the apparatus for generating a three-dimensional house type shown in FIG. 20 may be implemented as an electronic device, and the electronic device may be various devices such as a mobile phone, a tablet computer, and a server. As shown in FIG. 21 , the electronic device may include: a
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第二处理器41执行时能够实现如下步骤:The program includes one or more computer instructions, wherein the one or more computer instructions can realize the following steps when executed by the second processor 41:
获取房间不同视角的至少两个图像;acquire at least two images from different perspectives of the room;
生成与至少两个图像分别对应的二维布局图;generating a two-dimensional layout map corresponding to at least two images respectively;
确定与至少两个图像相对应的相机参数;determining camera parameters corresponding to at least two images;
基于至少两个图像、二维布局图和相机参数,生成与至少两个图像相对应的三维房型。Based on the at least two images, the two-dimensional layout map, and the camera parameters, a three-dimensional room type corresponding to the at least two images is generated.
可选的,第二处理器41还用于执行前述图1、图12-图14、图16所示实施例中的全部或部分步骤。Optionally, the
其中,电子设备的结构中还可以包括第二通信接口43,用于终端与其他设备或通信网络通信。The structure of the electronic device may further include a
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图1、图12-图14、图16所示方法实施例中三维房型的生成方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, which includes a three-dimensional house type for executing the three-dimensional house type in the method embodiments shown in the above-mentioned FIGS. 1 , 12-14 , and FIG. 16 . The procedures involved in the generation method.
图22为本申请实施例提供的一种三维房型的生成装置的结构示意图;参考附图22所示,本实施例提供了一种三维房型的生成装置,该生成装置可以执行上述图17所对应的三维房型的生成方法,具体的,生成装置可以包括:FIG. 22 is a schematic structural diagram of an apparatus for generating a three-dimensional house type provided by an embodiment of the application; with reference to FIG. 22 , this embodiment provides a device for generating a three-dimensional house type, and the generating apparatus can execute the corresponding steps in FIG. 17 above. The method for generating the three-dimensional house type, specifically, the generating device may include:
第三获取模块51,用于获取房间不同视角的至少两个三维布局图;The third acquiring
第三确定模块52,用于确定与至少两个三维布局图相对应的拼接位置;The
第三处理模块53,用于根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。The
在一些实例中,在第三处理模块53根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型时,第三处理模块53用于执行:基于拼接位置对所有的三维布局图进行拼接处理,获得与房间相对应的拼接后房型数据;检测拼接后房型数据中所有的拼接位置是否存在间隙;在拼接后房型数据中所有的拼接位置不存在间隙时,则将拼接后房型数据确定为三维房型;或者,在拼接后房型数据中一拼接位置存在间隙时,则对拼接后房型数据进行优化处理,生成三维房型。In some instances, when the
在一些实例中,在第三处理模块53对拼接后房型数据进行优化处理,生成三维房型时,第三处理模块53用于执行:基于拼接后房型数据中一拼接位置存在间隙对所有的拼接位置进行优化,获得优化后拼接位置;基于优化后拼接位置对所有的三维布局图进行拼接处理,生成与房间相对应的三维房型。In some instances, the
在一些实例中,在第三处理模块53基于拼接位置处所存在的间隙对拼接位置进行优化,获得优化后拼接位置时,第三处理模块53用于执行:获取至少两个三维布局图针对每个拼接位置相对应的拼接匹配度;将最高的拼接匹配度所对应的两个三维布局图,确定为参考图像对;基于参考图像对和间隙对至少两个三维布局图所对应的拼接位置进行调整,获得优化后拼接位置。In some instances, when the
在一些实例中,参考图像对包括:位于第一方向上的第一图像对和位于第二方向上的第二图像对;在第三处理模块53基于参考图和间隙对至少两个三维布局图所对应的拼接位置进行调整,获得优化后拼接位置时,第三处理模块53用于执行:基于第一图像对和间隙,确定拼接位置在第一方向上的第一调整距离;基于第二图像对和间隙,确定拼接位置在第二方向上的第二调整距离;分别基于第一调整距离和第二调整距离在第一方向上和第二方向上对拼接位置进行调整,获得优化后拼接位置。In some examples, the reference image pair includes: a first image pair located in a first direction and a second image pair located in a second direction; at least two three-dimensional layout maps are paired at the
图22所示装置可以执行图1、图12-图14、图17所示实施例的方法,本实施例未详细描述的部分,可参考对图1、图12-图14、图17所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1、图12-图14、图17所示实施例中的描述,在此不再赘述。The apparatus shown in FIG. 22 can execute the method of the embodiment shown in FIG. 1 , FIG. 12 to FIG. 14 , and FIG. 17 . For the part not described in detail in this embodiment, please refer to the method shown in FIG. 1 , FIG. 12 to FIG. Relevant description of the embodiment. For the execution process and technical effect of the technical solution, refer to the descriptions in the embodiments shown in FIG. 1 , FIG. 12 to FIG. 14 , and FIG. 17 , which will not be repeated here.
在一个可能的实现中,图22所示三维房型的生成装置的结构可实现为一种电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图23所示,该电子设备可以包括:第三处理器61和第三存储器62。其中,第三存储器63用于存储相对应电子设备执行上述图17所示实施例中提供的三维房型的生成方法的程序,第三处理器61被配置为用于执行第三存储器62中存储的程序。In a possible implementation, the structure of the apparatus for generating a three-dimensional house type shown in FIG. 22 may be implemented as an electronic device, and the electronic device may be various devices such as a mobile phone, a tablet computer, and a server. As shown in FIG. 23 , the electronic device may include: a
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第三处理器61执行时能够实现如下步骤:The program includes one or more computer instructions, wherein, when the one or more computer instructions are executed by the
获取房间不同视角的至少两个三维布局图;Obtain at least two 3D layout drawings of the room from different perspectives;
确定与至少两个三维布局图相对应的拼接位置;determining a splicing position corresponding to at least two three-dimensional layouts;
根据拼接位置对至少两个三维布局图进行拼接处理,生成与房间相对应的三维房型。According to the splicing position, at least two 3D layout drawings are spliced and processed to generate a 3D room type corresponding to the room.
可选的,第三处理器61还用于执行前述图17所示实施例中的全部或部分步骤。Optionally, the
其中,电子设备的结构中还可以包括第三通信接口63,用于终端与其他设备或通信网络通信。The structure of the electronic device may further include a
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图17所示方法实施例中三维房型的生成方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, which includes a program involved in executing the method for generating a 3D house type in the method embodiment shown in FIG. 17 .
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and certainly can also be implemented by combining hardware and software. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of computer products in essence or that make contributions to the prior art. In the form of a computer program product embodied on a medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理器以产生一个机器,使得通过计算机或其他可编程设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable device to produce a machine such that the instructions executed by the processor of the computer or other programmable device produce a process for implementing the process. Figures a process or processes and/or block diagrams of a block or blocks of devices specifying the functionality within the blocks.
这些计算机程序指令也可存储在能引导计算机或其他可编程设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable device to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means that implements A function specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可装载到计算机或其他可编程设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable device such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide Steps for implementing the function specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, excludes transitory computer-readable media, such as modulated data signals and carrier waves.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application. scope.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110272326.XACN113298708B (en) | 2021-03-12 | 2021-03-12 | Method, device and equipment for generating three-dimensional room type |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110272326.XACN113298708B (en) | 2021-03-12 | 2021-03-12 | Method, device and equipment for generating three-dimensional room type |
| Publication Number | Publication Date |
|---|---|
| CN113298708Atrue CN113298708A (en) | 2021-08-24 |
| CN113298708B CN113298708B (en) | 2025-06-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110272326.XAActiveCN113298708B (en) | 2021-03-12 | 2021-03-12 | Method, device and equipment for generating three-dimensional room type |
| Country | Link |
|---|---|
| CN (1) | CN113298708B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114219845A (en)* | 2021-11-30 | 2022-03-22 | 慧之安信息技术股份有限公司 | Residential unit area judgment method and device based on deep learning |
| CN114299271A (en)* | 2021-12-31 | 2022-04-08 | 北京有竹居网络技术有限公司 | Three-dimensional modeling method, three-dimensional modeling device, electronic device and readable storage medium |
| CN114554108A (en)* | 2022-02-24 | 2022-05-27 | 北京有竹居网络技术有限公司 | Image processing method and device and electronic equipment |
| CN115115786A (en)* | 2022-07-21 | 2022-09-27 | 北京有竹居网络技术有限公司 | Method, apparatus, device and storage medium for three-dimensional model generation |
| CN115733705A (en)* | 2022-11-08 | 2023-03-03 | 深圳绿米联创科技有限公司 | Space-based information processing method and device, electronic equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110505463A (en)* | 2019-08-23 | 2019-11-26 | 上海亦我信息技术有限公司 | Based on the real-time automatic 3D modeling method taken pictures |
| CN111932681A (en)* | 2020-07-17 | 2020-11-13 | 北京字节跳动网络技术有限公司 | House information display method and device and electronic equipment |
| CN111932666A (en)* | 2020-07-17 | 2020-11-13 | 北京字节跳动网络技术有限公司 | Reconstruction method and device of house three-dimensional virtual image and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110505463A (en)* | 2019-08-23 | 2019-11-26 | 上海亦我信息技术有限公司 | Based on the real-time automatic 3D modeling method taken pictures |
| WO2021036353A1 (en)* | 2019-08-23 | 2021-03-04 | 上海亦我信息技术有限公司 | Photographing-based 3d modeling system and method, and automatic 3d modeling apparatus and method |
| CN111932681A (en)* | 2020-07-17 | 2020-11-13 | 北京字节跳动网络技术有限公司 | House information display method and device and electronic equipment |
| CN111932666A (en)* | 2020-07-17 | 2020-11-13 | 北京字节跳动网络技术有限公司 | Reconstruction method and device of house three-dimensional virtual image and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114219845A (en)* | 2021-11-30 | 2022-03-22 | 慧之安信息技术股份有限公司 | Residential unit area judgment method and device based on deep learning |
| CN114219845B (en)* | 2021-11-30 | 2022-08-19 | 慧之安信息技术股份有限公司 | Residential unit area judgment method and device based on deep learning |
| CN114299271A (en)* | 2021-12-31 | 2022-04-08 | 北京有竹居网络技术有限公司 | Three-dimensional modeling method, three-dimensional modeling device, electronic device and readable storage medium |
| CN114554108A (en)* | 2022-02-24 | 2022-05-27 | 北京有竹居网络技术有限公司 | Image processing method and device and electronic equipment |
| CN114554108B (en)* | 2022-02-24 | 2023-10-27 | 北京有竹居网络技术有限公司 | Image processing methods, devices and electronic equipment |
| CN115115786A (en)* | 2022-07-21 | 2022-09-27 | 北京有竹居网络技术有限公司 | Method, apparatus, device and storage medium for three-dimensional model generation |
| CN115733705A (en)* | 2022-11-08 | 2023-03-03 | 深圳绿米联创科技有限公司 | Space-based information processing method and device, electronic equipment and storage medium |
| Publication number | Publication date |
|---|---|
| CN113298708B (en) | 2025-06-27 |
| Publication | Publication Date | Title |
|---|---|---|
| US10916033B2 (en) | System and method for determining a camera pose | |
| US10798359B2 (en) | Generating hi-res dewarped book images | |
| US9877009B2 (en) | Lidar stereo fusion live action 3D model video reconstruction for six degrees of freedom 360° volumetric virtual reality video | |
| CN112686877B (en) | Construction and measurement method and system of 3D house damage model based on binocular camera | |
| CN113298708B (en) | Method, device and equipment for generating three-dimensional room type | |
| US11521311B1 (en) | Collaborative disparity decomposition | |
| US9652849B2 (en) | Techniques for rapid stereo reconstruction from images | |
| US8452081B2 (en) | Forming 3D models using multiple images | |
| US20130095920A1 (en) | Generating free viewpoint video using stereo imaging | |
| US8565557B2 (en) | Free view generation in ray-space | |
| US20120177283A1 (en) | Forming 3d models using two images | |
| US11688130B2 (en) | Modeling indoor scenes using measurements captured using mobile devices | |
| JP2016537901A (en) | Light field processing method | |
| US10354399B2 (en) | Multi-view back-projection to a light-field | |
| CN108352060A (en) | Method and apparatus for generating the data for indicating pixel beam | |
| WO2022011560A1 (en) | Image cropping method and apparatus, electronic device, and storage medium | |
| CN114677439A (en) | Camera pose determination method and device, electronic equipment and storage medium | |
| CN118570379A (en) | Method, device, equipment, medium and product for three-dimensional reconstruction of facilities | |
| CA3131587A1 (en) | 2d and 3d floor plan generation | |
| US20250166326A1 (en) | Systems and methods for generating dimensionally coherent training data | |
| Wang et al. | Estimating heights of buildings from geotagged photos for data enrichment on OpenStreetMap | |
| Sturm | Image Geometry | |
| CN120747422A (en) | AR content display method, device, computer equipment and storage medium | |
| CN118097515A (en) | Video fingerprint drawing method, device, computer equipment and storage medium | |
| CN115147479A (en) | Combined calibration method, device, medium and equipment for non-mechanical radar and camera |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right | Effective date of registration:20240320 Address after:# 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore Applicant after:Alibaba Innovation Co. Country or region after:Singapore Address before:Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore Applicant before:Alibaba Singapore Holdings Ltd. Country or region before:Singapore | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |