CN118429550A - Three-dimensional reconstruction method, system, electronic equipment and storage medium - Google Patents

Three-dimensional reconstruction method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN118429550A
CN118429550A CN202410901847.0A CN202410901847A CN118429550A CN 118429550 A CN118429550 A CN 118429550A CN 202410901847 A CN202410901847 A CN 202410901847A CN 118429550 A CN118429550 A CN 118429550A
Authority
CN
China
Prior art keywords
scanned
dimensional
scanning module
scanning
point cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410901847.0A
Other languages
Chinese (zh)
Other versions
CN118429550B (en
Inventor
李仁举
施飞
居冰峰
赵晓波
江腾飞
张健
孙安玉
王文斌
黄磊杰
李洲强
朱吴乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shining 3D Technology Co Ltd
Original Assignee
Shining 3D Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shining 3D Technology Co Ltd filed Critical Shining 3D Technology Co Ltd
Priority to CN202410901847.0A priority Critical patent/CN118429550B/en
Publication of CN118429550A publication Critical patent/CN118429550A/en
Application granted granted Critical
Publication of CN118429550B publication Critical patent/CN118429550B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/06Ray-tracing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/08Indexing scheme for image data processing or generation, in general involving all processing steps from image acquisition to 3D model generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application provides a three-dimensional reconstruction method, a system, electronic equipment and a storage medium, wherein the three-dimensional reconstruction method comprises the following steps: acquiring first point cloud data obtained by scanning an object to be scanned by a scanning module with the farthest working distance; wherein the first point cloud data comprises a plurality of first three-dimensional points; determining characteristic parameters of the first point cloud data; determining a target area on an object to be scanned according to the characteristic parameters; determining a target scanning module from a plurality of scanning modules according to the characteristic parameters in the target area; acquiring second point cloud data obtained by scanning a target area by a target scanning module; wherein the second point cloud data comprises a plurality of second three-dimensional points; determining the weight of each first three-dimensional point and each second three-dimensional point; and fusing the plurality of first three-dimensional points and the plurality of second three-dimensional points corresponding to the at least one target area according to the weights to obtain three-dimensional reconstruction data of the object to be scanned. The application relates to the technical field of three-dimensional reconstruction, which can improve the accuracy of three-dimensional reconstruction of an object to be scanned.

Description

三维重建方法、系统、电子设备及存储介质Three-dimensional reconstruction method, system, electronic device and storage medium

技术领域Technical Field

本申请涉及三维扫描技术领域,尤其涉及一种三维重建方法、系统、电子设备及存储介质。The present application relates to the field of three-dimensional scanning technology, and in particular to a three-dimensional reconstruction method, system, electronic device and storage medium.

背景技术Background technique

目前,在大尺寸的场景中实施跨尺度扫描物体时,通常依赖多种扫描设备对待扫描对象进行扫描,以确保点云数据的完整性。例如,通常利用手持结构光扫描模组保证全局数据完整,且同时依靠高精度固定式设备获取高精度细节数据,然后在点云重建过程中采用来源于多种设备的不同点云数据进行拼接处理,并依靠点云权重进行同区域点云合并。然而这种方式在点云数据重建后数据容易出现明显过度痕迹及网格连接断裂风险,导致三维重建数据的准确度低,而且依赖对网格数据的后端处理,固定式设备难以扫描大型目标,时间效率低下。At present, when implementing cross-scale scanning of objects in large-scale scenes, multiple scanning devices are usually relied on to scan the scanned objects to ensure the integrity of the point cloud data. For example, a handheld structured light scanning module is usually used to ensure the integrity of the global data, and at the same time, high-precision fixed equipment is relied on to obtain high-precision detail data. Then, in the point cloud reconstruction process, different point cloud data from multiple devices are used for splicing processing, and the point cloud weights are relied on to merge the point clouds in the same area. However, this method is prone to obvious excessive traces and mesh connection breakage risks after point cloud data reconstruction, resulting in low accuracy of 3D reconstruction data. In addition, it relies on the back-end processing of mesh data, and fixed equipment is difficult to scan large targets, which is time-inefficient.

发明内容Summary of the invention

鉴于以上内容,有必要提出一种三维重建方法、系统、电子设备及存储介质,以解决三维重构数据的准确度及扫描效率低的技术问题。In view of the above, it is necessary to propose a three-dimensional reconstruction method, system, electronic device and storage medium to solve the technical problems of low accuracy and scanning efficiency of three-dimensional reconstruction data.

本申请提供一种三维重建方法,应用于电子设备,所述电子设备通信连接于多个扫描模组,所述多个扫描模组用于扫描待扫描对象,每个扫描模组工作距离范围不同,所述方法包括:获取工作距离最远的扫描模组扫描所述待扫描对象得到的第一点云数据;其中,所述第一点云数据包括多个第一三维点;确定所述第一点云数据的特征参数;根据所述特征参数在所述待扫描对象上确定目标区域;根据所述目标区域中的所述特征参数从所述多个扫描模组中确定目标扫描模组;获取所述目标扫描模组扫描所述目标区域获得的第二点云数据;其中,所述第二点云数据包括多个第二三维点;确定每个第一三维点和每个第二三维点的权重;根据所述权重融合所述多个第一三维点和至少一个所述目标区域对应的所述多个第二三维点,得到所述待扫描对象的三维重建数据。The present application provides a three-dimensional reconstruction method, which is applied to an electronic device, wherein the electronic device is communicatively connected to a plurality of scanning modules, the plurality of scanning modules are used to scan an object to be scanned, and each scanning module has a different working distance range. The method comprises: obtaining first point cloud data obtained by scanning the object to be scanned by a scanning module with the longest working distance; wherein the first point cloud data comprises a plurality of first three-dimensional points; determining characteristic parameters of the first point cloud data; determining a target area on the object to be scanned according to the characteristic parameters; determining a target scanning module from the plurality of scanning modules according to the characteristic parameters in the target area; obtaining second point cloud data obtained by the target scanning module scanning the target area; wherein the second point cloud data comprises a plurality of second three-dimensional points; determining the weights of each first three-dimensional point and each second three-dimensional point; and fusing the plurality of first three-dimensional points and the plurality of second three-dimensional points corresponding to at least one of the target areas according to the weights to obtain three-dimensional reconstruction data of the object to be scanned.

在一些实施例中,所述特征参数包括:所述待扫描对象的类别;以及所述第一点云数据的曲率数据。In some embodiments, the feature parameters include: the category of the object to be scanned; and curvature data of the first point cloud data.

在一些实施例中,所述根据所述目标区域中的所述特征参数从所述多个扫描模组中确定目标扫描模组包括:遍历所述每个扫描模组的类别;当遍历到的扫描模组的类别与所述待扫描对象的类别相同时,确定所述类别对应的扫描模组为目标扫描模组。In some embodiments, determining a target scanning module from the multiple scanning modules based on the characteristic parameters in the target area includes: traversing the category of each scanning module; when the category of the traversed scanning module is the same as the category of the object to be scanned, determining the scanning module corresponding to the category as the target scanning module.

在一些实施例中,所述根据所述目标区域中的特征参数从所述多个扫描模组中确定目标扫描模组包括:根据所述曲率数据确定对所目标区域进行扫描时所需的物理分辨率;遍历所述每个扫描模组对应的点云物理分辨率,确定所述点云物理分辨率与所述目标区域所需的物理分辨率之间的差值;从所述点云物理分辨率大于所述目标区域所需的物理分辨率的扫描模组中,确定最小的所述差值对应的扫描模组为目标扫描模组。In some embodiments, determining the target scanning module from the multiple scanning modules based on the characteristic parameters in the target area includes: determining the physical resolution required for scanning the target area based on the curvature data; traversing the point cloud physical resolution corresponding to each scanning module to determine the difference between the point cloud physical resolution and the physical resolution required for the target area; and determining, from the scanning modules whose point cloud physical resolution is greater than the physical resolution required for the target area, the scanning module corresponding to the smallest difference as the target scanning module.

在一些实施例中,根据所述目标扫描模组的点云物理分辨率设置所述电子设备中的融合分辨率,所述融合分辨率用于表征所述目标区域的三维重建数据的分辨率。In some embodiments, the fusion resolution in the electronic device is set according to the point cloud physical resolution of the target scanning module, and the fusion resolution is used to characterize the resolution of the three-dimensional reconstruction data of the target area.

在一些实施例中,基于目标扫描模组与所述待扫描对象之间的距离,确定所述目标扫描模组扫描所述待扫描对象时发射的光线的数量。In some embodiments, the number of light rays emitted by the target scanning module when scanning the object to be scanned is determined based on the distance between the target scanning module and the object to be scanned.

在一些实施例中,根据所述每个第一三维点所属的光线在对应的扫描模组中的位置,确定所述每个第一三维点的权重;根据所述每个第二三维点所属的光线在所述目标扫描模组中的位置,确定所述每个第二三维点的权重;及/或根据所述每个第一三维点对应的扫描模组与所述待扫描对象之间的距离,确定所述每个第一三维点的权重;根据所述目标扫描模组与所述待扫描对象之间的距离,确定所述每个第二三维点的权重;及/或根据所述每个第一三维点所属的光线照射所述待扫描对象的入射角,确定所述每个第一三维点的权重;根据所述每个第二三维点所属的光线照射所述待扫描对象的入射角,确定所述每个第二三维点的权重。In some embodiments, the weight of each first three-dimensional point is determined according to the position of the light to which each first three-dimensional point belongs in the corresponding scanning module; the weight of each second three-dimensional point is determined according to the position of the light to which each second three-dimensional point belongs in the target scanning module; and/or the weight of each first three-dimensional point is determined according to the distance between the scanning module corresponding to each first three-dimensional point and the object to be scanned; the weight of each second three-dimensional point is determined according to the distance between the target scanning module and the object to be scanned; and/or the weight of each first three-dimensional point is determined according to the incident angle of the light to which each first three-dimensional point belongs irradiating the object to be scanned; the weight of each second three-dimensional point is determined according to the incident angle of the light to which each second three-dimensional point belongs irradiating the object to be scanned.

本申请实施例还提供一种三维重建系统,所述系统包括:多个扫描模组以及电子设备;所述多个扫描模组用于扫描待扫描对象,每个扫描模组扫描时与所述待扫描对象之间的距离不同;所述电子设备用于获取最大的所述距离对应的扫描模组采集的第一点云数据;确定所述第一点云数据的特征参数;根据所述特征参数从所述多个扫描模组中确定目标扫描模组;获取所述目标扫描模组扫描所述待扫描对象获得的第二点云数据;融合所述第一点云数据和所述第二点云数据,得到所述待扫描对象的三维重建数据。An embodiment of the present application also provides a three-dimensional reconstruction system, which includes: multiple scanning modules and an electronic device; the multiple scanning modules are used to scan an object to be scanned, and each scanning module has a different distance from the object to be scanned during scanning; the electronic device is used to obtain first point cloud data collected by the scanning module corresponding to the largest distance; determine characteristic parameters of the first point cloud data; determine a target scanning module from the multiple scanning modules based on the characteristic parameters; obtain second point cloud data obtained by the target scanning module scanning the object to be scanned; and fuse the first point cloud data and the second point cloud data to obtain three-dimensional reconstruction data of the object to be scanned.

本申请实施例还提供一种电子设备,所述电子设备包括:存储器,存储至少一个指令;处理器,执行所述存储器中存储的指令以实现所述的三维重建方法。An embodiment of the present application further provides an electronic device, comprising: a memory storing at least one instruction; and a processor executing the instruction stored in the memory to implement the three-dimensional reconstruction method.

本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现所述的三维重建方法。An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the three-dimensional reconstruction method.

由以上技术方案可以看出,本申请实施例通过在扫描系统中部署多个距离不同的扫描模组,并在实时扫描过程中优先采用最远距离的扫描模组获取第一点云数据,再根据第一点云数据确定待扫描对象的特征参数,并根据特征参数确定待扫描对象所需的物理分辨率,最终调整适配的扫描模组以对待扫描对象进行三维重建。如此能够在确保点云数据完整性的基础上提升对不同结构和形状的特征进行分析的精确度,从而提升三维重建数据的准确度。It can be seen from the above technical solutions that the embodiment of the present application deploys multiple scanning modules with different distances in the scanning system, and preferentially uses the scanning module with the longest distance to obtain the first point cloud data during the real-time scanning process, and then determines the characteristic parameters of the object to be scanned according to the first point cloud data, and determines the physical resolution required for the object to be scanned according to the characteristic parameters, and finally adjusts the adaptive scanning module to perform three-dimensional reconstruction of the object to be scanned. In this way, the accuracy of analyzing the features of different structures and shapes can be improved on the basis of ensuring the integrity of the point cloud data, thereby improving the accuracy of the three-dimensional reconstruction data.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请一实施例提供的一种三维重建系统的示意图。FIG. 1 is a schematic diagram of a three-dimensional reconstruction system provided in an embodiment of the present application.

图2是本申请一实施例提供的一种三维重建方法的流程图。FIG. 2 is a flow chart of a three-dimensional reconstruction method provided in an embodiment of the present application.

图3是本申请一实施例提供的确定目标扫描模组的方法的流程图。FIG. 3 is a flow chart of a method for determining a target scanning module provided in an embodiment of the present application.

图4是本申请另一实施例提供的确定目标扫描模组的方法的流程图。FIG. 4 is a flow chart of a method for determining a target scanning module provided in another embodiment of the present application.

图5是本申请一实施例提供的确定第一三维点和第二三维点的权重的方法的流程图。FIG. 5 is a flowchart of a method for determining weights of a first three-dimensional point and a second three-dimensional point provided by an embodiment of the present application.

图6是本申请另一实施例提供的确定第一三维点和第二三维点的权重的方法的流程图。FIG. 6 is a flowchart of a method for determining weights of a first three-dimensional point and a second three-dimensional point provided by another embodiment of the present application.

图7是本申请又一实施例提供的确定第一三维点和第二三维点的权重的方法的流程图。FIG. 7 is a flowchart of a method for determining weights of a first three-dimensional point and a second three-dimensional point provided by yet another embodiment of the present application.

图8是本申请实施例提供的一种电子设备的结构示意图。FIG8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

具体实施方式Detailed ways

为了能够更清楚地理解本申请的目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互结合。在下面的描述中阐述了很多具体细节以便于充分理解本申请,所述描述的实施例仅是本申请一部分实施例,而不是全部的实施例。In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and/or" used herein includes any and all combinations of one or more related listed items.

本申请实施例提供一种三维重建方法,可应用于一个或者多个电子设备中,电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific IntegratedCircuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The embodiment of the present application provides a three-dimensional reconstruction method, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, etc.

电子设备可以是任何一种可与客户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。An electronic device can be any electronic product that can interact with customers, such as personal computers, tablet computers, smart phones, personal digital assistants (PDAs), game consoles, Internet Protocol Television (IPTV), smart wearable devices, etc.

电子设备还可以包括网络设备和/或客户设备。其中,所述网络设备包括,但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(Cloud Computing)的由大量主机或网络服务器构成的云。The electronic device may also include a network device and/or a client device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

电子设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The networks where electronic devices are located include but are not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.

如图1所示,本申请提供的一种三维重建系统包括电子设备100以及多个扫描模组,电子设备100与数据库200通信连接。电子设备还与多个扫描模组通信连接,例如图1所示的第一扫描模组300、第二扫描模组400以及第三扫描模组500。其中,多个扫描模组用于对待扫描对象600进行扫描,以对待扫描对象600进行三维重建。其中,每个扫描模组扫描时与待扫描对象600之间的距离不同。数据库200可以是电子设备100内置的数据存储设备,还可以是与电子设备100通信连接的外置数据存储设备,本申请对此不做限定。数据库200用于存储多个扫描模组对待扫描对象600进行扫描获得的点云数据。As shown in FIG1 , a three-dimensional reconstruction system provided by the present application includes an electronic device 100 and a plurality of scanning modules, and the electronic device 100 is communicatively connected to a database 200. The electronic device is also communicatively connected to a plurality of scanning modules, such as the first scanning module 300, the second scanning module 400 and the third scanning module 500 shown in FIG1 . Among them, the plurality of scanning modules are used to scan an object to be scanned 600 so as to perform three-dimensional reconstruction of the object to be scanned 600. Among them, the distance between each scanning module and the object to be scanned 600 is different during scanning. The database 200 can be a data storage device built into the electronic device 100, or it can be an external data storage device communicatively connected to the electronic device 100, and the present application does not limit this. The database 200 is used to store point cloud data obtained by scanning the object to be scanned 600 by a plurality of scanning modules.

在本申请一实施例中,电子设备100从数据库200获取最大的所述距离对应的扫描模组扫描所述待扫描对象得到的第一点云数据,其中,所述第一点云数据包括多个第一三维点。其中,最大的距离对应的扫描模组可以是如图1所示的扫描模组300。电子设备100还用于确定第一点云数据的特征参数,并根据特征参数从多个扫描模组中确定目标扫描模组,其中,目标扫描模组可以是如图1所示的第二扫描模组400或第三扫描模组500。电子设备100还用于获取目标扫描模组(例如,图1所示的第二扫描模组400或第三扫描模组500)扫描待扫描对象600获得的第二点云数据,其中,所述第二点云数据包括多个第二三维点。电子设备100还用于确定每个第一三维点和每个第二三维点的权重,根据权重融合多个第一三维点和多个第二三维点,得到待扫描对象600的三维重建数据,其中,三维重建数据用于表征待扫描对象600的结构和形状。In one embodiment of the present application, the electronic device 100 obtains the first point cloud data obtained by scanning the object to be scanned by the scanning module corresponding to the largest distance from the database 200, wherein the first point cloud data includes a plurality of first three-dimensional points. The scanning module corresponding to the largest distance may be the scanning module 300 shown in FIG. 1. The electronic device 100 is also used to determine the characteristic parameters of the first point cloud data, and determine the target scanning module from the plurality of scanning modules according to the characteristic parameters, wherein the target scanning module may be the second scanning module 400 or the third scanning module 500 shown in FIG. 1. The electronic device 100 is also used to obtain the second point cloud data obtained by scanning the object to be scanned 600 by the target scanning module (for example, the second scanning module 400 or the third scanning module 500 shown in FIG. 1), wherein the second point cloud data includes a plurality of second three-dimensional points. The electronic device 100 is also used to determine the weight of each first three-dimensional point and each second three-dimensional point, and fuse the plurality of first three-dimensional points and the plurality of second three-dimensional points according to the weight to obtain the three-dimensional reconstruction data of the object to be scanned 600, wherein the three-dimensional reconstruction data is used to characterize the structure and shape of the object to be scanned 600.

如图2所示,是本申请一实施例提供的一种三维重建方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。本申请实施例提供的一种三维重建方法包括如下步骤。As shown in Figure 2, it is a flow chart of a 3D reconstruction method provided by an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. A 3D reconstruction method provided by an embodiment of the present application includes the following steps.

S20,获取工作距离最远的扫描模组扫描所述待扫描对象得到的第一点云数据;其中,所述第一点云数据包括多个第一三维点。S20, obtaining first point cloud data obtained by scanning the object to be scanned by a scanning module with the longest working distance; wherein the first point cloud data includes a plurality of first three-dimensional points.

在本申请一实施例中,待扫描对象可以是任意需要测量几何形状的物体,例如,汽车、医疗器件以及产品零件等,本申请对待扫描对象的属性以及形状不做限定。在对待扫描对象进行测量之前,可以在待扫描对象上粘贴少量的物体标志点,该物体标志点可以是反光标志点或反光纹理。In an embodiment of the present application, the object to be scanned may be any object whose geometric shape needs to be measured, such as a car, a medical device, or a product part, and the present application does not limit the properties and shape of the object to be scanned. Before measuring the object to be scanned, a small number of object markers may be attached to the object to be scanned, and the object markers may be reflective markers or reflective textures.

在本申请一实施例中,扫描模组内设置有相机及光源发射器。其中,光源发射器用于向待扫描对象的表面投射结构光;相机用于捕获待扫描对象表面反射的结构光,并根据反射的光线确定待扫描对象对应的点云数据。为了确保点云数据的完整性,可基于多个扫描模组对待扫描对象进行扫描,其中,每个扫描模组的工作距离范围不同,使用时需要的与待扫描对象之间的距离也不同。如此能够获取对待扫描对象不同深度以及不同角度的点云数据,本申请对扫描模组具体的扫描姿态以及每个扫描模组的位置不做限定;In one embodiment of the present application, a camera and a light source transmitter are provided in the scanning module. The light source transmitter is used to project structured light onto the surface of the object to be scanned; the camera is used to capture the structured light reflected by the surface of the object to be scanned, and determine the point cloud data corresponding to the object to be scanned based on the reflected light. In order to ensure the integrity of the point cloud data, the object to be scanned can be scanned based on multiple scanning modules, wherein each scanning module has a different working distance range and requires a different distance from the object to be scanned when used. In this way, point cloud data of different depths and angles of the object to be scanned can be obtained. The present application does not limit the specific scanning posture of the scanning module and the position of each scanning module;

光源可为光器、DLP投影仪、LED等,投射出的结构光可为单条光线、多条平行光线、多组交叉平行线、散斑、光栅等。The light source may be an optical device, a DLP projector, an LED, etc., and the projected structured light may be a single light ray, multiple parallel light rays, multiple groups of intersecting parallel lines, speckle, a grating, etc.

在本申请一实施例中,第一点云数据可以是工作距离最远的扫描模组对待扫描对象进行扫描时获得的点云数据的集合。其中,第一点云数据包括多个第一三维点,每个第一三维点对应于一个三维坐标。示例性的,与待扫描对象之间的距离最大的扫描模组可以是如图1所示的扫描模组300。In one embodiment of the present application, the first point cloud data may be a collection of point cloud data obtained when the scanning module with the longest working distance scans the object to be scanned. The first point cloud data includes a plurality of first three-dimensional points, each of which corresponds to a three-dimensional coordinate. Exemplarily, the scanning module with the longest distance from the object to be scanned may be the scanning module 300 shown in FIG. 1 .

在本申请一实施例中,第一三维点的三维坐标用于表征第一三维点在预设坐标系中的位置。其中,预设坐标系的坐标原点可以是扫描模组在待扫描对象所在的目标空间中的位置,还可以是目标空间中预先设定的一点,本申请对此不做限定。In one embodiment of the present application, the three-dimensional coordinates of the first three-dimensional point are used to represent the position of the first three-dimensional point in a preset coordinate system. The coordinate origin of the preset coordinate system may be the position of the scanning module in the target space where the object to be scanned is located, or may be a pre-set point in the target space, which is not limited in the present application.

S21,确定所述第一点云数据的特征参数。S21: Determine characteristic parameters of the first point cloud data.

在本申请一实施例中,第一点云数据的特征参数用于描述每个第一三维点的局部属性。所述特征参数包括:所述待扫描对象的类别;以及所述第一点云数据的曲率数据。其中,待扫描对象的类别用于表征待扫描对象的结构和形状。示例性的,当待扫描对象的类别为球体时,表明待扫描对象的表面结构为球体结构;当待扫描对象的类别为立方体时,表明待扫描对象的表面结构为立方体结构。本申请对待扫描对象的具体类别不做限定。其中,第一点云数据的曲率数据用于表征待扫描对象表面的粗糙程度或表面形状的复杂程度。当曲率数据越大时,表明待扫描对象的表面粗糙程度或表面形状的复杂程度越高;当曲率数据越小时,表明待扫描对象的表面粗糙程度或表面形状的复杂程度越低。In one embodiment of the present application, the characteristic parameters of the first point cloud data are used to describe the local attributes of each first three-dimensional point. The characteristic parameters include: the category of the object to be scanned; and the curvature data of the first point cloud data. The category of the object to be scanned is used to characterize the structure and shape of the object to be scanned. Exemplarily, when the category of the object to be scanned is a sphere, it indicates that the surface structure of the object to be scanned is a spherical structure; when the category of the object to be scanned is a cube, it indicates that the surface structure of the object to be scanned is a cube structure. The present application does not limit the specific category of the object to be scanned. The curvature data of the first point cloud data is used to characterize the roughness of the surface of the object to be scanned or the complexity of the surface shape. When the curvature data is larger, it indicates that the surface roughness or the complexity of the surface shape of the object to be scanned is higher; when the curvature data is smaller, it indicates that the surface roughness or the complexity of the surface shape of the object to be scanned is lower.

在一些实施例中,第一点云数据的特征参数还包括:法向量,用于表征每个第一三维点所在表面的法线方向;表面粗糙度,用于表征点云表面的平滑程度或粗糙程度,能够用于分析物体表面的纹理;第一点云数据的颜色值、强度值、光线的入射方向等。In some embodiments, the characteristic parameters of the first point cloud data also include: a normal vector, which is used to characterize the normal direction of the surface where each first three-dimensional point is located; surface roughness, which is used to characterize the smoothness or roughness of the point cloud surface and can be used to analyze the texture of the object surface; color value, intensity value, incident direction of light, etc. of the first point cloud data.

S22,根据所述特征参数在所述待扫描对象上确定目标区域,根据所述目标区域中的所述特征参数从所述多个扫描模组中确定目标扫描模组。S22, determining a target area on the object to be scanned according to the characteristic parameters, and determining a target scanning module from the multiple scanning modules according to the characteristic parameters in the target area.

在本申请一实施例中,为了根据多个扫描模组对待扫描对象进行扫描得到的点云数据对待扫描对象进行三维重建,从而提升三维重建的准确度,可根据第一点云数据的特征参数从多个扫描模组中确定目标扫描模组。In one embodiment of the present application, in order to perform three-dimensional reconstruction of the scanned object based on point cloud data obtained by scanning the scanned object by multiple scanning modules, thereby improving the accuracy of three-dimensional reconstruction, a target scanning module can be determined from multiple scanning modules based on characteristic parameters of the first point cloud data.

在本申请一实施例中,在扫描时,为了提升对待扫描对象上结构和形状较为复杂的区域进行三维重建的准确度,可先根据特征参数在待扫描对象上确定目标区域。示例性的,特征参数可以是第一点云数据的曲率数据,当待扫描对象上任意区域对应的点云数据的曲率数据较大时,表明该待扫描对象上该区域的结构和形状较为复杂,则可确定该区域为目标区域。In one embodiment of the present application, during scanning, in order to improve the accuracy of three-dimensional reconstruction of a region with a relatively complex structure and shape on the object to be scanned, a target region may be first determined on the object to be scanned based on a characteristic parameter. Exemplarily, the characteristic parameter may be curvature data of the first point cloud data. When the curvature data of the point cloud data corresponding to any region on the object to be scanned is large, it indicates that the structure and shape of the region on the object to be scanned are relatively complex, and the region may be determined to be a target region.

在本申请一实施例中,每个扫描模组适用于扫描不同距离、不同结构以及形状的待扫描对象。例如,一些扫描模组发射的光线能够用于扫描球体结构的待扫描对象;另一些扫描模组发射的光线能够用于扫描立方体结构的待扫描对象。本申请对扫描模组适用的待扫描对象的类型不做限定。具体的,当特征参数包括待扫描对象的类别时,确定目标扫描模组的方法可参见图3对应的详细说明。In one embodiment of the present application, each scanning module is suitable for scanning objects to be scanned at different distances, structures and shapes. For example, the light emitted by some scanning modules can be used to scan objects to be scanned with a spherical structure; the light emitted by other scanning modules can be used to scan objects to be scanned with a cubic structure. The present application does not limit the types of objects to be scanned to which the scanning modules are applicable. Specifically, when the characteristic parameters include the category of the object to be scanned, the method for determining the target scanning module can refer to the detailed description corresponding to FIG. 3.

在本申请一实施例中,第一点云数据的曲率数据用于表征第一点云数据表面的局部几何形状,能够用于描述第一三维点的弯曲程度或曲率变化。当曲率数据越大时,表明待扫描对象的表面粗糙程度或表面形状的复杂程度越高,则可根据物理分辨率较高的扫描模组对待扫描对象进行扫描,以提升对待扫描对象进行三维重建的准确度;当曲率数据越小时,表明待扫描对象的表面粗糙程度或表面形状的复杂程度越低,则可根据物理分辨率较低的扫描模组对待扫描对象进行扫描,从而在确保三维重建的准确度的基础上提升对待扫描对象进行三维重建的效率。具体的,当特征参数包括第一点云数据的曲率数据时,确定目标扫描模组的方法可参见图4对应的详细说明。In one embodiment of the present application, the curvature data of the first point cloud data is used to characterize the local geometric shape of the surface of the first point cloud data, and can be used to describe the curvature or curvature change of the first three-dimensional point. When the curvature data is larger, it indicates that the surface roughness or the complexity of the surface shape of the object to be scanned is higher, and the object to be scanned can be scanned according to a scanning module with a higher physical resolution to improve the accuracy of the three-dimensional reconstruction of the object to be scanned; when the curvature data is smaller, it indicates that the surface roughness or the complexity of the surface shape of the object to be scanned is lower, and the object to be scanned can be scanned according to a scanning module with a lower physical resolution, thereby improving the efficiency of the three-dimensional reconstruction of the object to be scanned on the basis of ensuring the accuracy of the three-dimensional reconstruction. Specifically, when the characteristic parameters include the curvature data of the first point cloud data, the method for determining the target scanning module can refer to the detailed description corresponding to Figure 4.

在本申请一实施例中,为了确保对待扫描对象进行三维重建的准确度并提升三维重建的效率,所述方法还包括:根据所述目标扫描模组的点云物理分辨率设置所述电子设备中的融合分辨率,所述融合分辨率用于表征所述目标区域的三维重建数据的分辨率。其中,扫描模组的点云物理分辨率可以是扫描模组的光学分辨率,用于衡量扫描模组中的感光器件精密程度。具体的,点云物理分辨率可以是扫描模组的光学部件每平方英寸面积内所能捕捉到的实际的光点数,通常用dpi(dots per inch,每英寸点数)来表示,该点云物理分辨率能够反映扫描模组捕捉点云数据的细节的能力。点云物理分辨率越高,扫描模组捕捉的点云数据的细节越丰富。In one embodiment of the present application, in order to ensure the accuracy of three-dimensional reconstruction of the scanned object and improve the efficiency of three-dimensional reconstruction, the method further includes: setting the fusion resolution in the electronic device according to the point cloud physical resolution of the target scanning module, and the fusion resolution is used to characterize the resolution of the three-dimensional reconstruction data of the target area. Among them, the point cloud physical resolution of the scanning module may be the optical resolution of the scanning module, which is used to measure the precision of the photosensitive device in the scanning module. Specifically, the point cloud physical resolution may be the actual number of light points that can be captured per square inch of area by the optical components of the scanning module, usually expressed in dpi (dots per inch), and the point cloud physical resolution can reflect the ability of the scanning module to capture the details of the point cloud data. The higher the point cloud physical resolution, the richer the details of the point cloud data captured by the scanning module.

在本申请的一实施例中,为了提升对待扫描对象进行三维重建的准确度,可将待扫描对象所在的目标空间划分为多个体素,为点云数据的体素化处理提供数据支撑。后续可基于多个体素对点云数据进行划分,得到每个体素对应的点云数据,融合每个体素对应的点云数据,从而提升三维重建的准确度。其中,目标空间中的体素的数量。示例性的,体素的尺寸可以是1mm*1mm*1mm,还可以是0.3mm*0.3mm*0.3mm,本申请对此不做限定。In one embodiment of the present application, in order to improve the accuracy of three-dimensional reconstruction of the object to be scanned, the target space where the object to be scanned is located can be divided into multiple voxels to provide data support for the voxelization of point cloud data. The point cloud data can be subsequently divided based on multiple voxels to obtain the point cloud data corresponding to each voxel, and the point cloud data corresponding to each voxel can be fused to improve the accuracy of three-dimensional reconstruction. Among them, the number of voxels in the target space. Exemplarily, the size of the voxel can be 1mm*1mm*1mm, or it can be 0.3mm*0.3mm*0.3mm, which is not limited in the present application.

在本申请一实施例中,在对待扫描物体进行三维重建的过程中,若体素的尺寸过高会导致对目标空间进行分割的细粒度不足,从而造成信息丢失的问题;若体素尺寸过低会导致目标空间中的体素数量过多,进而导致三维重建耗时长、电子设备的计算资源占用率高的问题。为了规避上述问题,可根据目标扫描模组的点云物理分辨率设置电子设备中的融合分辨率,该融合分辨率用于表征待扫描对象对应的三维重建数据的分辨率。In one embodiment of the present application, during the three-dimensional reconstruction of the object to be scanned, if the voxel size is too high, the target space will be segmented in insufficient granularity, resulting in information loss; if the voxel size is too low, the number of voxels in the target space will be too large, which will lead to the problem that the three-dimensional reconstruction takes a long time and the computing resource occupancy rate of the electronic device is high. In order to avoid the above problems, the fusion resolution in the electronic device can be set according to the physical resolution of the point cloud of the target scanning module, and the fusion resolution is used to characterize the resolution of the three-dimensional reconstruction data corresponding to the object to be scanned.

在本申请一实施例中,以激光源为例;扫描模组中的相机在做光线配准时,由于扫描模组所投射光线密集且几何形状一致,可能会导致配准错误,造成点云数据的误差较高。为了提升获取的点云数据的准确度,可减少扫描模组发出的光线的数量。具体的,扫描模组在三维重建过程中向待扫描对象发射多条光线,其中,多条光线包括一条中心光线,以及围绕中心光线平行散开分布的其余光线。由于其余投射光平面曲面化严重,因此其余光线生成的点云数据会出现较大的形变,因此由其余光线生成的点云数据的准确度会逐渐降低。In one embodiment of the present application, taking a laser source as an example; when the camera in the scanning module performs light alignment, since the light projected by the scanning module is dense and has a consistent geometric shape, alignment errors may occur, resulting in a high error in the point cloud data. In order to improve the accuracy of the acquired point cloud data, the number of light rays emitted by the scanning module can be reduced. Specifically, the scanning module emits multiple light rays to the object to be scanned during the three-dimensional reconstruction process, wherein the multiple light rays include a central light ray and the remaining light rays that are distributed in parallel and dispersed around the central light ray. Since the remaining projected light planes are severely curved, the point cloud data generated by the remaining light rays will show a large deformation, and therefore the accuracy of the point cloud data generated by the remaining light rays will gradually decrease.

在本申请一实施例中,在对待扫描对象进行三维重建的过程中,所述方法还包括:基于目标扫描模组与所述待扫描对象之间的距离,确定所述目标扫描模组扫描所述待扫描对象时发射的光线的数量。具体的,在利用目标扫描模组对待扫描对象进行扫描时,可取消扫描模组中的至少一对光线,其中,至少一条光线的数量可根据扫描模组与待扫描对象之间的距离确定,距离越远则取消的光线的数量越少,距离越近则取消的光线的数量越多。示例性的,当距离待扫描对象最远的扫描模组(例如,图1所示的扫描模组300)与待扫描对象(例如,图1所示的待扫描对象600)之间的距离为10cm,若目标扫描模组(例如,图1所示的待扫描对象)发射7条光线对待扫描对象进行扫描时,可取消7条光线中位于外侧的至少一对光线。如此能够降低光线的数量,从而降低点云数据的复杂度,进而能够提升点云数据处理的效率;还能够降低外侧光线的数量,从而降低待扫描对象边缘对应的点云数据,进而能够降低点云数据的形变,从而能够提升处理点云数据的准确度。In one embodiment of the present application, during the three-dimensional reconstruction of the object to be scanned, the method further includes: determining the number of light rays emitted by the target scanning module when scanning the object to be scanned based on the distance between the target scanning module and the object to be scanned. Specifically, when the object to be scanned is scanned using the target scanning module, at least one pair of light rays in the scanning module can be cancelled, wherein the number of at least one light ray can be determined according to the distance between the scanning module and the object to be scanned, the farther the distance is, the fewer the number of light rays to be cancelled, and the closer the distance is, the more the number of light rays to be cancelled. Exemplarily, when the distance between the scanning module farthest from the object to be scanned (for example, the scanning module 300 shown in FIG. 1) and the object to be scanned (for example, the object to be scanned 600 shown in FIG. 1) is 10 cm, if the target scanning module (for example, the object to be scanned shown in FIG. 1) emits 7 light rays to scan the object to be scanned, at least one pair of light rays located on the outside of the 7 light rays can be cancelled. This can reduce the number of rays, thereby reducing the complexity of point cloud data, and thus improving the efficiency of point cloud data processing; it can also reduce the number of outer rays, thereby reducing the point cloud data corresponding to the edge of the object to be scanned, and thus reducing the deformation of the point cloud data, thereby improving the accuracy of point cloud data processing.

S23,获取所述目标扫描模组扫描所述目标区域获得的第二点云数据;其中,所述第二点云数据包括多个第二三维点。S23, acquiring second point cloud data obtained by the target scanning module scanning the target area; wherein the second point cloud data includes a plurality of second three-dimensional points.

在本申请一实施例中,第二点云数据可以是目标扫描模组对待扫描对象进行扫描时获得的点云数据的集合。其中,第二点云数据包括多个第二三维点,每个第二三维点对应于一个三维坐标。示例性的,目标扫描模组可以是如图1所示的扫描模组400或扫描模组500。In one embodiment of the present application, the second point cloud data may be a collection of point cloud data obtained when the target scanning module scans the object to be scanned. The second point cloud data includes a plurality of second three-dimensional points, each of which corresponds to a three-dimensional coordinate. Exemplarily, the target scanning module may be the scanning module 400 or the scanning module 500 as shown in FIG. 1 .

在本申请一实施例中,第二三维点的三维坐标用于表征第二三维点在预设坐标系中的位置。其中,预设坐标系的坐标原点可以是扫描模组在待扫描对象所在的目标空间中的位置,还可以是目标空间中预先设定的一点,本申请对此不做限定。In one embodiment of the present application, the three-dimensional coordinates of the second three-dimensional point are used to represent the position of the second three-dimensional point in a preset coordinate system. The coordinate origin of the preset coordinate system may be the position of the scanning module in the target space where the object to be scanned is located, or may be a pre-set point in the target space, which is not limited in the present application.

S24,确定每个第一三维点和每个第二三维点的权重。S24, determining the weight of each first three-dimensional point and each second three-dimensional point.

在本申请一实施例中,为了提升对待扫描对象进行三维重建的准确度,可结合多个扫描模组与待扫描对象之间的距离、照射形成第一三维点和第二三维点的光线在对应的扫描模组中的位置以及光线照射待扫描模组时的入射角确定每个第一三维点和每个第二三维点的权重。In one embodiment of the present application, in order to improve the accuracy of three-dimensional reconstruction of the object to be scanned, the weights of each first three-dimensional point and each second three-dimensional point can be determined in combination with the distances between multiple scanning modules and the object to be scanned, the positions of the light rays that irradiate to form the first three-dimensional points and the second three-dimensional points in the corresponding scanning modules, and the incident angles of the light rays when irradiating the modules to be scanned.

在本申请一实施例中,可根据第一三维点在预设坐标系中的三维坐标以及扫描模组在预设坐标系中的三维坐标,确定该第一三维点对应的光线照射待扫描模组时的入射角;并可根据第二三维点在预设坐标系中的三维坐标以及扫描模组在预设坐标系中的三维坐标,确定该第二三维点对应的光线照射待扫描模组时的入射角。具体的,可确定第一三维点与扫描模组之间的坐标连线,并确定第一点云数据的法向量,计算坐标连线和第一点云数据的法向量之间的夹角,得到第一三维点对应的光线照射待扫描模组时的入射角;可确定第二三维点与扫描模组之间的坐标连线,并确定第二点云数据的法向量,计算坐标连线和第二点云数据的法向量之间的夹角,得到第二三维点对应的光线照射待扫描模组时的入射角。In one embodiment of the present application, the incident angle of the light corresponding to the first three-dimensional point when irradiating the module to be scanned can be determined according to the three-dimensional coordinates of the first three-dimensional point in the preset coordinate system and the three-dimensional coordinates of the scanning module in the preset coordinate system; and the incident angle of the light corresponding to the second three-dimensional point when irradiating the module to be scanned can be determined according to the three-dimensional coordinates of the second three-dimensional point in the preset coordinate system and the three-dimensional coordinates of the scanning module in the preset coordinate system. Specifically, the coordinate line between the first three-dimensional point and the scanning module can be determined, and the normal vector of the first point cloud data can be determined, and the angle between the coordinate line and the normal vector of the first point cloud data can be calculated to obtain the incident angle of the light corresponding to the first three-dimensional point when irradiating the module to be scanned; the coordinate line between the second three-dimensional point and the scanning module can be determined, and the normal vector of the second point cloud data can be determined, and the angle between the coordinate line and the normal vector of the second point cloud data can be calculated to obtain the incident angle of the light corresponding to the second three-dimensional point when irradiating the module to be scanned.

在本申请一实施例中,确定第一三维点和第二三维点的权重的方法请参见图5对应的详细说明、及/或图6对应的详细说明、及/或图7对应的详细说明。In one embodiment of the present application, for a method of determining the weights of the first three-dimensional point and the second three-dimensional point, please refer to the detailed description corresponding to FIG. 5 , and/or the detailed description corresponding to FIG. 6 , and/or the detailed description corresponding to FIG. 7 .

S25,根据所述权重融合所述多个第一三维点和至少一个所述目标区域对应的所述多个第二三维点,得到所述待扫描对象的三维重建数据。S25, fusing the plurality of first three-dimensional points and the plurality of second three-dimensional points corresponding to at least one of the target regions according to the weights to obtain three-dimensional reconstruction data of the object to be scanned.

在本申请一实施例中,为了根据每个体素中的点云数据拟合待扫描对象的表面在每个体素中的近似平面,可基于最小二乘法对每个体素中的第一三维点和至少一个目标区域对应的第二三维点进行拟合,得到每个体素对应的目标点以及目标法向量,后续可根据目标点以及目标法向量确定待扫描对象的表面在每个体素中的近似平面。其中,在基于最小二乘法对每个体素中的第一三维点和至少一个目标区域对应的第二三维点进行拟合时,可根据第一三维点和第二三维点的权重在拟合过程中调整第一三维点和第二三维点的置信度。如此能够提升待扫描对象的三维重建数据的准确度。In one embodiment of the present application, in order to fit the approximate plane of the surface of the object to be scanned in each voxel according to the point cloud data in each voxel, the first three-dimensional point in each voxel and the second three-dimensional point corresponding to at least one target area can be fitted based on the least squares method to obtain the target point and the target normal vector corresponding to each voxel, and then the approximate plane of the surface of the object to be scanned in each voxel can be determined based on the target point and the target normal vector. Wherein, when fitting the first three-dimensional point in each voxel and the second three-dimensional point corresponding to at least one target area based on the least squares method, the confidence of the first three-dimensional point and the second three-dimensional point can be adjusted during the fitting process according to the weights of the first three-dimensional point and the second three-dimensional point. In this way, the accuracy of the three-dimensional reconstruction data of the object to be scanned can be improved.

在本申请一实施例中,在获取每个体素对应的目标点以及目标法向量之后,可根据目标点以及对应的目标法向量确定待扫描对象在体素中的近似平面,再融合每个体素的近似平面得到待扫描对象的三维重建数据。In one embodiment of the present application, after obtaining the target point and target normal vector corresponding to each voxel, the approximate plane of the object to be scanned in the voxel can be determined based on the target point and the corresponding target normal vector, and then the approximate plane of each voxel can be fused to obtain the three-dimensional reconstruction data of the object to be scanned.

示例性的,当待扫描对象的表面存在曲线C1和曲线C2,且曲线C1和曲线C2在三维点P相交,若曲线C1在三维点P处的切线向量为T1,曲线C2在三维点P处的切线向量为T2,则切线向量T1和切线向量T2都在三维点P处表面的切平面上。根据向量T1和向量T2可确定三维点P的法向量,并可通过三维点P的三维坐标以及法向量确定切平面的方向,并基于切平面表征待扫描对象在三维点P处的表面。为了获取待扫描物体的平面对应的近似平面,可根据上述方法确定每个体素的局部近似平面,并根据每个体素的局部近似平面构建待扫描物体的平面。Exemplarily, when there are curves C1 and C2 on the surface of the object to be scanned, and curves C1 and C2 intersect at a three-dimensional point P, if the tangent vector of curve C1 at the three-dimensional point P is T1, and the tangent vector of curve C2 at the three-dimensional point P is T2, then both tangent vector T1 and tangent vector T2 are on the tangent plane of the surface at the three-dimensional point P. The normal vector of the three-dimensional point P can be determined based on vectors T1 and T2, and the direction of the tangent plane can be determined by the three-dimensional coordinates of the three-dimensional point P and the normal vector, and the surface of the object to be scanned at the three-dimensional point P can be characterized based on the tangent plane. In order to obtain the approximate plane corresponding to the plane of the object to be scanned, the local approximate plane of each voxel can be determined according to the above method, and the plane of the object to be scanned can be constructed based on the local approximate plane of each voxel.

在本申请一实施例中,当三维点P在预设坐标系中的三维坐标为(x0,y0,z0),且目标法向量n为(A,B,C),则可根据以下关系式确定该三维点P所在的平面方程:In one embodiment of the present application, when the three-dimensional coordinates of the three-dimensional point P in the preset coordinate system are (x 0 , y 0 , z 0 ) and the target normal vector n is (A, B, C), the plane equation of the three-dimensional point P can be determined according to the following relationship:

;其中,(A,B,C)代表三维点P所在的平面的法向量,(x0,y0,z0)代表三维点P的三维坐标。 ; Among them, (A, B, C) represents the normal vector of the plane where the three-dimensional point P is located, and (x 0 , y 0 , z 0 ) represents the three-dimensional coordinates of the three-dimensional point P.

由以上技术方案可以看出,本申请实施例通过在扫描系统中部署多个距离不同的扫描模组,并在实时扫描过程中优先采用最远距离的扫描模组获取第一点云数据,再根据第一点云数据确定待扫描对象的特征参数,并根据特征参数确定待扫描对象所需的物理分辨率,最终调整适配的扫描模组以对待扫描对象进行三维重建。如此能够在确保点云数据完整性的基础上提升对不同结构和形状的特征进行分析的精确度,从而提升三维重建数据的准确度。It can be seen from the above technical solutions that the embodiment of the present application deploys multiple scanning modules with different distances in the scanning system, and preferentially uses the scanning module with the longest distance to obtain the first point cloud data during the real-time scanning process, and then determines the characteristic parameters of the object to be scanned according to the first point cloud data, and determines the physical resolution required for the object to be scanned according to the characteristic parameters, and finally adjusts the adaptive scanning module to perform three-dimensional reconstruction of the object to be scanned. In this way, the accuracy of analyzing the features of different structures and shapes can be improved on the basis of ensuring the integrity of the point cloud data, thereby improving the accuracy of the three-dimensional reconstruction data.

如图3所示,是本申请一实施例提供的确定目标扫描模组的方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。本申请实施例提供的确定目标扫描模组的方法包括如下步骤。As shown in Figure 3, it is a flow chart of a method for determining a target scanning module provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a target scanning module provided in an embodiment of the present application includes the following steps.

S30,遍历所述每个扫描模组的类别。S30, traversing the categories of each scanning module.

在本申请一实施例中,每个扫描模组适用于扫描不同结构以及形状的待扫描对象。例如,一些扫描模组发射的光线能够用于扫描球体结构的待扫描对象;另一些扫描模组发射的光线能够用于扫描立方体结构的待扫描对象。为了确定适用于扫描待扫描对象的扫描模组,可遍历多个扫描模组中每个扫描模组的类别。本申请对遍历多个扫描模组的顺序不做限定。In one embodiment of the present application, each scanning module is suitable for scanning objects to be scanned of different structures and shapes. For example, the light emitted by some scanning modules can be used to scan objects to be scanned with a spherical structure; the light emitted by other scanning modules can be used to scan objects to be scanned with a cubic structure. In order to determine the scanning module suitable for scanning the object to be scanned, the category of each scanning module in the multiple scanning modules can be traversed. The present application does not limit the order of traversing the multiple scanning modules.

S31,当遍历到的扫描模组的类别与所述待扫描对象的类别相同时,确定所述类别对应的扫描模组为目标扫描模组。S31, when the category of the traversed scanning module is the same as the category of the object to be scanned, determining the scanning module corresponding to the category as the target scanning module.

在本申请一实施例中,当遍历到的扫描模组的类别与待扫描对象的类别相同时,表明遍历到的扫描模组适用于对待扫描对象进行扫描以进行三维重建。示例性的,当遍历到的扫描模组为球体,且待扫描对象的结构也为球体,则可确认遍历到的扫描模组为目标扫描模组。进而能够获取目标扫描模组扫描待扫描对象得到的第二点云数据。能够为后续进行多点云融合以获得三维重建数据提供数据支撑。In one embodiment of the present application, when the category of the traversed scanning module is the same as the category of the object to be scanned, it indicates that the traversed scanning module is suitable for scanning the object to be scanned for three-dimensional reconstruction. Exemplarily, when the traversed scanning module is a sphere, and the structure of the object to be scanned is also a sphere, it can be confirmed that the traversed scanning module is the target scanning module. Then, the second point cloud data obtained by the target scanning module scanning the object to be scanned can be obtained. It can provide data support for the subsequent fusion of multiple point clouds to obtain three-dimensional reconstruction data.

如图4所示,是本申请另一实施例提供的确定目标扫描模组的方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。本申请实施例提供的确定目标扫描模组的方法包括如下步骤。As shown in Figure 4, it is a flow chart of a method for determining a target scanning module provided by another embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a target scanning module provided by an embodiment of the present application includes the following steps.

S40,根据所述曲率数据确定对所述目标区域进行扫描时所需的物理分辨率。S40: Determine a physical resolution required for scanning the target area according to the curvature data.

在本申请一实施例中,可根据第一三维点对应的三维坐标确定第一三维点的曲率数据,并根据曲率数据确定对待扫描对象进行扫描时所需的物理分辨率,当曲率数据越大时物理分辨率越大,当曲率数据越小时物理分辨率越小。具体的,当曲率数据越大时表明待扫描对象表面的结构越复杂,则可确定对待扫描对象进行扫描时所需的体素的尺寸越小,则物理分辨率越大,如此能够提升对点云数据进行体素化处理的细粒度,从而能够提升三维重建的准确度;当曲率数据越小时表明待扫描对象表面越平滑,则可确定对待扫描对象进行扫描时所需的体素的尺寸越大,则物理分辨率越小,从而提升点云数据处理的效率。In one embodiment of the present application, the curvature data of the first three-dimensional point can be determined according to the three-dimensional coordinates corresponding to the first three-dimensional point, and the physical resolution required for scanning the object to be scanned can be determined according to the curvature data. When the curvature data is larger, the physical resolution is larger, and when the curvature data is smaller, the physical resolution is smaller. Specifically, when the curvature data is larger, it indicates that the structure of the surface of the object to be scanned is more complex. It can be determined that the size of the voxel required for scanning the object to be scanned is smaller, and the physical resolution is larger, so that the fine-grainedness of voxel processing of point cloud data can be improved, thereby improving the accuracy of three-dimensional reconstruction; when the curvature data is smaller, it indicates that the surface of the object to be scanned is smoother. It can be determined that the size of the voxel required for scanning the object to be scanned is larger, and the physical resolution is smaller, thereby improving the efficiency of point cloud data processing.

S41,遍历所述每个扫描模组对应的点云物理分辨率,确定所述点云物理分辨率与所述目标区域所需的物理分辨率之间的差值。S41, traversing the point cloud physical resolution corresponding to each scanning module, and determining the difference between the point cloud physical resolution and the physical resolution required by the target area.

在本申请一实施例中,扫描模组的点云物理分辨率可以是扫描模组的光学分辨率,用于衡量扫描模组中的感光器件精密程度。具体的,点云物理分辨率可以是扫描模组的光学部件每平方英寸面积内所能捕捉到的实际的光点数,通常用dpi(dots per inch,每英寸点数)来表示,该点云物理分辨率能够反映扫描模组捕捉点云数据的细节的能力。点云物理分辨率越高,扫描模组捕捉的点云数据的细节越丰富。为了确定适用于扫描待扫描对象的扫描模组,可遍历多个扫描模组中每个扫描模组对应的点云物理分辨率。本申请对遍历多个扫描模组的顺序不做限定。In one embodiment of the present application, the point cloud physical resolution of the scanning module may be the optical resolution of the scanning module, which is used to measure the precision of the photosensitive device in the scanning module. Specifically, the point cloud physical resolution may be the actual number of light points that can be captured per square inch of the optical components of the scanning module, usually expressed in dpi (dots per inch). The point cloud physical resolution can reflect the ability of the scanning module to capture the details of the point cloud data. The higher the point cloud physical resolution, the richer the details of the point cloud data captured by the scanning module. In order to determine the scanning module suitable for scanning the object to be scanned, the point cloud physical resolution corresponding to each scanning module in the multiple scanning modules may be traversed. The present application does not limit the order of traversing multiple scanning modules.

在本申请一实施例中,为了确定与目标区域所需的物理分辨率相近的点云物理分辨率,还确定所述点云物理分辨率与所述目标区域所需的物理分辨率之间的差值。后续可根据该差值确定与所需的物理分辨率相近的点云物理分辨率以及对应的目标扫描模组。In one embodiment of the present application, in order to determine a point cloud physical resolution close to the physical resolution required by the target area, the difference between the point cloud physical resolution and the physical resolution required by the target area is also determined. Subsequently, the point cloud physical resolution close to the required physical resolution and the corresponding target scanning module can be determined based on the difference.

S42,从所述点云物理分辨率大于所述目标区域所需的物理分辨率的扫描模组中,确定最小的所述差值对应的扫描模组为目标扫描模组。S42, from the scanning modules whose point cloud physical resolution is greater than the physical resolution required by the target area, determine the scanning module corresponding to the smallest difference as the target scanning module.

在本申请一实施例中,当遍历到的扫描模组的点云物理分辨率大于目标区域所需的物理分辨率,且该点云物理分辨率与目标区域所需的物理分辨率之间说的差值最小时,表明该扫描模组适用于对待扫描对象进行扫描,且该扫描模组扫描到的第二点云数据的精确度符合对应的物理分辨率,因此可确定该扫描模组为目标扫描模组。In one embodiment of the present application, when the point cloud physical resolution of the traversed scanning module is greater than the physical resolution required for the target area, and the difference between the point cloud physical resolution and the physical resolution required for the target area is the smallest, it indicates that the scanning module is suitable for scanning the object to be scanned, and the accuracy of the second point cloud data scanned by the scanning module meets the corresponding physical resolution, so it can be determined that the scanning module is the target scanning module.

如图5所示,是本申请一实施例提供的确定第一三维点和第二三维点的权重的方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。本申请实施例提供的定第一三维点和第二三维点的权重的方法包括如下步骤。As shown in FIG5 , it is a flow chart of a method for determining the weights of a first three-dimensional point and a second three-dimensional point provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining the weights of a first three-dimensional point and a second three-dimensional point provided in an embodiment of the present application includes the following steps.

S50,根据所述每个第一三维点所属的光线在对应的扫描模组中的位置,确定所述每个第一三维点的权重。S50, determining the weight of each first three-dimensional point according to the position of the light to which each first three-dimensional point belongs in the corresponding scanning module.

在本申请一实施例中,扫描模组发射多条光线照射待扫描对象,并接收待扫描对象反射的光线以得到待扫描对象的点云数据。当照射待扫描对象的光线在对应的扫描模组中的位置距离扫描模组的中心越远,则该光线照射待扫描对象的部位越靠外侧,因此由该光线扫描待扫描对象得到的第一三维点的权重越低。当照射待扫描对象的光线在对应的扫描模组中的位置距离扫描模组的中心越近,则该光线照射待扫描对象的部位越靠近待扫描对象的中心,因此由该光线扫描待扫描对象得到的第一三维点的权重越高。In one embodiment of the present application, a scanning module emits a plurality of light rays to illuminate an object to be scanned, and receives light rays reflected by the object to be scanned to obtain point cloud data of the object to be scanned. The farther the position of the light rays irradiating the object to be scanned in the corresponding scanning module is from the center of the scanning module, the closer the part of the object to be scanned illuminated by the light rays is to the outside, and thus the weight of the first three-dimensional point obtained by scanning the object to be scanned by the light rays is lower. The closer the position of the light rays irradiating the object to be scanned in the corresponding scanning module is from the center of the scanning module, the closer the part of the object to be scanned illuminated by the light rays is to the center of the object to be scanned, and thus the weight of the first three-dimensional point obtained by scanning the object to be scanned by the light rays is higher.

S51,根据所述每个第二三维点所属的光线在所述目标扫描模组中的位置,确定所述每个第二三维点的权重。S51, determining the weight of each second three-dimensional point according to the position of the light to which each second three-dimensional point belongs in the target scanning module.

在本申请一实施例中,当照射待扫描对象的光线在目标扫描模组中的位置距离目标扫描模组的中心越远,则该光线照射待扫描对象的部位越靠外侧,因此由该光线扫描待扫描对象得到的第二三维点的权重越低。当照射待扫描对象的光线在目标扫描模组中的位置距离目标扫描模组的中心越近,则该光线照射待扫描对象的部位越靠近待扫描对象的中心,因此由该光线扫描待扫描对象得到的第二三维点的权重越高。In one embodiment of the present application, when the position of the light irradiating the object to be scanned in the target scanning module is farther from the center of the target scanning module, the part of the object to be scanned irradiated by the light is closer to the outside, so the weight of the second three-dimensional point obtained by scanning the object to be scanned by the light is lower. When the position of the light irradiating the object to be scanned in the target scanning module is closer to the center of the target scanning module, the part of the object to be scanned by the light is closer to the center of the object to be scanned, so the weight of the second three-dimensional point obtained by scanning the object to be scanned by the light is higher.

如图6所示,是本申请另一实施例提供的确定第一三维点和第二三维点的权重的方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。本申请实施例提供的确定第一三维点和第二三维点的权重的方法包括如下步骤。As shown in Figure 6, it is a flow chart of a method for determining the weights of a first three-dimensional point and a second three-dimensional point provided by another embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining the weights of a first three-dimensional point and a second three-dimensional point provided by an embodiment of the present application includes the following steps.

S60,根据所述每个第一三维点对应的扫描模组与所述待扫描对象之间的距离,确定所述每个第一三维点的权重。S60: Determine the weight of each first three-dimensional point according to the distance between the scanning module corresponding to each first three-dimensional point and the object to be scanned.

在本申请一实施例中,扫描模组与待扫描对象之间的距离越远,表明由该扫描模组获得的点云数据表征的待扫描对象表面的特征越粗糙,则由该扫描模组扫描待扫描对象获得的点云数据的权重越低;扫描模组与待扫描对象之间的距离越近,表明由该扫描模组获得的点云数据表征的待扫描对象表面的特征的精度越高,则由该扫描模组扫描待扫描对象获得的点云数据的权重越高。In one embodiment of the present application, the greater the distance between the scanning module and the object to be scanned, the coarser the features of the surface of the object to be scanned represented by the point cloud data obtained by the scanning module, and the lower the weight of the point cloud data obtained by scanning the object to be scanned by the scanning module; the closer the distance between the scanning module and the object to be scanned, the higher the accuracy of the features of the surface of the object to be scanned represented by the point cloud data obtained by the scanning module, and the higher the weight of the point cloud data obtained by scanning the object to be scanned by the scanning module.

S61,根据所述目标扫描模组与所述待扫描对象之间的距离,确定所述每个第二三维点的权重。S61, determining the weight of each second three-dimensional point according to the distance between the target scanning module and the object to be scanned.

在本申请一实施例中,目标扫描模组与待扫描对象之间的距离越远,表明由目标扫描模组获得的第二点云数据表征的待扫描对象表面的特征越粗糙,则第二三维点的权重越低;扫描模组与待扫描对象之间的距离越近,表明由该扫描模组获得的点云数据表征的待扫描对象表面的特征的精度越高,则第二三维点的权重越高。In one embodiment of the present application, the greater the distance between the target scanning module and the object to be scanned, the rougher the features of the surface of the object to be scanned represented by the second point cloud data obtained by the target scanning module, and the lower the weight of the second three-dimensional point; the closer the distance between the scanning module and the object to be scanned, the higher the accuracy of the features of the surface of the object to be scanned represented by the point cloud data obtained by the scanning module, and the higher the weight of the second three-dimensional point.

如图7所示,是本申请又一实施例提供的确定第一三维点和第二三维点的权重的方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。本申请实施例提供的确定第一三维点和第二三维点的权重的方法包括如下步骤。As shown in FIG. 7 , it is a flowchart of a method for determining the weights of a first three-dimensional point and a second three-dimensional point provided by another embodiment of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The method for determining the weights of a first three-dimensional point and a second three-dimensional point provided by an embodiment of the present application includes the following steps.

S70,根据所述每个第一三维点所属的光线照射所述待扫描对象的入射角,确定所述每个第一三维点的权重。S70, determining a weight of each first three-dimensional point according to an incident angle of the light to which each first three-dimensional point belongs irradiating the object to be scanned.

在本申请一实施例中,在确定第一三维点所属的光线对应的入射角时,可确定第一三维点与扫描模组之间的坐标连线,并确定第一点云数据的法向量,计算坐标连线和第一点云数据之间的法向量的夹角,得到第一三维点对应的光线照射待扫描模组时的入射角。当入射角大越大时,表明光线越接近垂直于待扫描对象表面的方向,因此第一点云数据的权重越高;当入射角大越小时,表明光线越接近相切于待扫描对象表面的方向,因此第一点云数据的权重越低。In one embodiment of the present application, when determining the incident angle corresponding to the light to which the first three-dimensional point belongs, the coordinate line between the first three-dimensional point and the scanning module can be determined, and the normal vector of the first point cloud data can be determined, and the angle between the coordinate line and the normal vector of the first point cloud data can be calculated to obtain the incident angle of the light corresponding to the first three-dimensional point when irradiating the module to be scanned. When the incident angle is larger, it indicates that the light is closer to the direction perpendicular to the surface of the object to be scanned, so the weight of the first point cloud data is higher; when the incident angle is smaller, it indicates that the light is closer to the direction tangent to the surface of the object to be scanned, so the weight of the first point cloud data is lower.

S71,根据所述每个第二三维点所属的光线照射所述待扫描对象的入射角,确定所述每个第二三维点的权重。S71, determining a weight of each second three-dimensional point according to an incident angle of the light to which each second three-dimensional point belongs irradiating the object to be scanned.

在本申请一实施例中,可确定第二三维点与扫描模组之间的坐标连线,并确定第二点云数据的法向量,计算坐标连线和第二点云数据之间的法向量的夹角,得到第二三维点对应的光线照射待扫描模组时的入射角。当入射角大越大时,表明光线越接近垂直于待扫描对象表面的方向,因此第二点云数据的权重越高;当入射角大越小时,表明光线越接近相切于待扫描对象表面的方向,因此第二点云数据的权重越低。In one embodiment of the present application, the coordinate line between the second three-dimensional point and the scanning module can be determined, and the normal vector of the second point cloud data can be determined, and the angle between the coordinate line and the normal vector of the second point cloud data can be calculated to obtain the incident angle of the light corresponding to the second three-dimensional point when irradiating the module to be scanned. When the incident angle is larger, it indicates that the light is closer to the direction perpendicular to the surface of the object to be scanned, so the weight of the second point cloud data is higher; when the incident angle is smaller, it indicates that the light is closer to the direction tangent to the surface of the object to be scanned, so the weight of the second point cloud data is lower.

请参见图8,是本申请实施例提供的一种电子设备的结构示意图。电子设备100包括存储器12和处理器13。存储器12用于存储计算机可读指令,处理器13用执行所述储器中存储的计算机可读指令以实现上述任一实施例所述的一种三维重建方法。Please refer to Figure 8, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is used to execute the computer-readable instructions stored in the memory to implement a three-dimensional reconstruction method described in any of the above embodiments.

在本申请一实施例中,电子设备100还包括总线、存储在所述存储器12中并可在所述处理器13上运行的计算机程序,例如一种三维重建程序。In an embodiment of the present application, the electronic device 100 further includes a bus, and a computer program stored in the memory 12 and executable on the processor 13, such as a three-dimensional reconstruction program.

图8仅示出了具有存储器12和处理器13的电子设备100,本领域技术人员可以理解的是,图4示出的结构并不构成对电子设备100的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG8 only shows an electronic device 100 having a memory 12 and a processor 13. Those skilled in the art will appreciate that the structure shown in FIG4 does not limit the electronic device 100 and may include fewer or more components than shown, or a combination of certain components, or a different arrangement of components.

结合图2,电子设备100中的所述存储器12存储多个计算机可读指令以实现一种三维重建方法,所述处理器13可执行所述多个指令从而实现:获取工作距离最远的扫描模组扫描所述待扫描对象得到的第一点云数据;其中,所述第一点云数据包括多个第一三维点;确定所述第一点云数据的特征参数;根据所述特征参数在所述待扫描对象上确定目标区域;根据所述目标区域中的所述特征参数从所述多个扫描模组中确定目标扫描模组;获取所述目标扫描模组扫描所述目标区域获得的第二点云数据;其中,所述第二点云数据包括多个第二三维点;确定每个第一三维点和每个第二三维点的权重;根据所述权重融合所述多个第一三维点和至少一个所述目标区域对应的所述多个第二三维点,得到所述待扫描对象的三维重建数据。In conjunction with Figure 2, the memory 12 in the electronic device 100 stores multiple computer-readable instructions to implement a three-dimensional reconstruction method, and the processor 13 can execute the multiple instructions to achieve: obtaining the first point cloud data obtained by scanning the object to be scanned by the scanning module with the longest working distance; wherein the first point cloud data includes multiple first three-dimensional points; determining the characteristic parameters of the first point cloud data; determining the target area on the object to be scanned according to the characteristic parameters; determining the target scanning module from the multiple scanning modules according to the characteristic parameters in the target area; obtaining the second point cloud data obtained by the target scanning module scanning the target area; wherein the second point cloud data includes multiple second three-dimensional points; determining the weights of each first three-dimensional point and each second three-dimensional point; and fusing the multiple first three-dimensional points and the multiple second three-dimensional points corresponding to at least one of the target areas according to the weights to obtain the three-dimensional reconstruction data of the object to be scanned.

具体地,所述处理器13对上述指令的具体实现方法可参考图2对应实施例中相关步骤的描述,在此不赘述。Specifically, the specific implementation method of the processor 13 for the above instructions can refer to the description of the relevant steps in the embodiment corresponding to Figure 2, which will not be repeated here.

本领域技术人员可以理解,所述示意图仅仅是电子设备100的示例,并不构成对电子设备100的限定,电子设备100可以是总线型结构,也可以是星形结构,电子设备100还可以包括比图示更多或更少的其他硬件或者软件,或者不同的部件布置,例如电子设备100还可以包括输入输出设备、网络接入设备等。Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. The electronic device 100 may be a bus-type structure or a star-type structure. The electronic device 100 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the electronic device 100 may also include input and output devices, network access devices, etc.

需要说明的是,电子设备100仅为举例,其他现有的或今后可能出现的电子产品如可适应于本申请,也应包含在本申请的保护范围以内,并以引用方式包含于此。It should be noted that the electronic device 100 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

其中,存储器12至少包括一种类型的可读存储介质,所述可读存储介质可以是非易失性的,也可以是易失性的。所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器12在一些实施例中可以是电子设备100的内部存储单元,例如该电子设备100的移动硬盘。存储器12在另一些实施例中也可以是电子设备100的外部存储设备,例如电子设备100上配备的插接式移动硬盘、智能存储卡(Smart Media Card, SMC)、安全数字(Secure Digital, SD)卡、闪存卡(FlashCard)等。存储器12不仅可以用于存储安装于电子设备100的应用软件及各类数据,例如一种三维重建程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium can be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 100, such as a mobile hard disk of the electronic device 100. In other embodiments, the memory 12 can also be an external storage device of the electronic device 100, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 100. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 100, such as a code of a three-dimensional reconstruction program, etc., but also can be used to temporarily store data that has been output or is to be output.

处理器13在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。处理器13是电子设备100的控制核心(Control Unit),利用各种接口和线路连接整个电子设备100的各个部件,通过运行或执行存储在所述存储器12内的程序或者模块(例如执行一种三维重建程序等),以及调用存储在所述存储器12内的数据,以执行电子设备100的各种功能和处理数据。In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 100, and uses various interfaces and lines to connect various components of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing programs or modules stored in the memory 12 (for example, executing a three-dimensional reconstruction program, etc.), and calling data stored in the memory 12.

所述处理器13执行所述电子设备100的操作系统以及安装的各类应用程序。所述处理器13执行所述应用程序以实现上述各个一种三维重建方法实施例中的步骤,例如图2所示的步骤。The processor 13 executes the operating system and various installed applications of the electronic device 100. The processor 13 executes the applications to implement the steps in each of the above-mentioned three-dimensional reconstruction method embodiments, such as the steps shown in FIG. 2 .

示例性的,所述计算机程序可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机程序在电子设备100中的执行过程。Exemplarily, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules/units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 100.

上述以软件功能模块的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、计算机设备,或者网络设备等)或处理器(Processor)执行本申请各个实施例所述的一种三维重建方法的部分。The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of a three-dimensional reconstruction method described in each embodiment of the present application.

电子设备100集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指示相关的硬件设备来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。If the module/unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.

其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存储器及其他存储器等。The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory and other memory, etc.

进一步地,计算机可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

总线可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,在图4中仅用一根箭头表示,但并不表示仅有一根总线或一种类型的总线。所述总线被设置为实现所述存储器12以及至少一个处理器13等之间的连接通信。The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one arrow is used in FIG4 , but it does not mean that there is only one bus or one type of bus. The bus is configured to realize connection and communication between the memory 12 and at least one processor 13, etc.

本申请实施例还提供一种计算机可读存储介质(图未示),计算机可读存储介质中存储有计算机可读指令,计算机可读指令被电子设备中的处理器执行以实现上述任一实施例所述的一种三维重建方法。An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable storage medium is stored computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement a three-dimensional reconstruction method described in any of the above embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.

此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。说明书陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一、第二等词语用来表示名称,而并不表示任何特定的顺序。In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.

最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims (10)

1. A three-dimensional reconstruction method applied to an electronic device, wherein the electronic device is communicatively connected to a plurality of scanning modules, the plurality of scanning modules are used for scanning an object to be scanned, and each scanning module has a different working distance range, the method comprising:
Acquiring first point cloud data obtained by scanning the object to be scanned by a scanning module with the farthest working distance; wherein the first point cloud data comprises a plurality of first three-dimensional points;
Determining characteristic parameters of the first point cloud data;
Determining a target area on the object to be scanned according to the characteristic parameters;
determining a target scanning module from the plurality of scanning modules according to the characteristic parameters in the target area;
acquiring second point cloud data obtained by scanning the target area by the target scanning module; wherein the second point cloud data includes a plurality of second three-dimensional points;
Determining the weight of each first three-dimensional point and each second three-dimensional point;
And fusing the plurality of first three-dimensional points and the plurality of second three-dimensional points corresponding to at least one target area according to the weights to obtain three-dimensional reconstruction data of the object to be scanned.
2. The three-dimensional reconstruction method according to claim 1, wherein the characteristic parameters include:
The category of the object to be scanned; and curvature data of the first point cloud data.
3. The three-dimensional reconstruction method according to claim 2, wherein the determining a target scan module from the plurality of scan modules according to the characteristic parameter in the target region comprises:
Traversing the category of each scanning module;
And when the category of the traversed scanning module is the same as the category of the object to be scanned, determining the scanning module corresponding to the category as a target scanning module.
4. The three-dimensional reconstruction method according to claim 2, wherein the determining a target scan module from the plurality of scan modules according to the characteristic parameters in the target region comprises:
Determining a physical resolution required for scanning the target area according to the curvature data;
Traversing the point cloud physical resolution corresponding to each scanning module, and determining the difference between the point cloud physical resolution and the physical resolution required by the target area;
and determining the scanning module corresponding to the smallest difference value as a target scanning module from the scanning modules with the point cloud physical resolution larger than the physical resolution required by the target area.
5. The three-dimensional reconstruction method according to claim 4, further comprising:
And setting fusion resolution in the electronic equipment according to the point cloud physical resolution of the target scanning module, wherein the fusion resolution is used for representing the resolution of the three-dimensional reconstruction data of the target area.
6. The three-dimensional reconstruction method according to claim 1, further comprising:
and determining the quantity of light rays emitted by the target scanning module when the target scanning module scans the object to be scanned based on the distance between the target scanning module and the object to be scanned.
7. The three-dimensional reconstruction method of claim 1, wherein the determining the weights for each first three-dimensional point and each second three-dimensional point comprises:
determining the weight of each first three-dimensional point according to the position of the ray of each first three-dimensional point in the corresponding scanning module; determining the weight of each second three-dimensional point according to the position of the ray of each second three-dimensional point in the target scanning module; and/or
Determining the weight of each first three-dimensional point according to the distance between the scanning module corresponding to each first three-dimensional point and the object to be scanned; determining the weight of each second three-dimensional point according to the distance between the target scanning module and the object to be scanned; and/or
Determining the weight of each first three-dimensional point according to the incidence angle of the light rays of each first three-dimensional point to irradiate the object to be scanned; and determining the weight of each second three-dimensional point according to the incidence angle of the light rays of each second three-dimensional point to irradiate the object to be scanned.
8. A three-dimensional reconstruction system, the system comprising: a plurality of scanning modules and electronic equipment;
the plurality of scanning modules are used for scanning the object to be scanned, and the distance between each scanning module and the object to be scanned is different;
The electronic equipment is used for acquiring first point cloud data acquired by the scanning module corresponding to the largest distance; determining characteristic parameters of the first point cloud data; determining a target scanning module from the plurality of scanning modules according to the characteristic parameters; acquiring second point cloud data obtained by scanning the object to be scanned by the target scanning module; and fusing the first point cloud data and the second point cloud data to obtain three-dimensional reconstruction data of the object to be scanned.
9. An electronic device comprising a processor and a memory, wherein the processor is configured to implement the three-dimensional reconstruction method according to any one of claims 1 to 7 when executing a computer program stored in the memory.
10. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the three-dimensional reconstruction method according to any one of claims 1 to 7.
CN202410901847.0A 2024-07-05 2024-07-05 Three-dimensional reconstruction method, system, electronic device and storage medium Active CN118429550B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410901847.0A CN118429550B (en) 2024-07-05 2024-07-05 Three-dimensional reconstruction method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410901847.0A CN118429550B (en) 2024-07-05 2024-07-05 Three-dimensional reconstruction method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN118429550A true CN118429550A (en) 2024-08-02
CN118429550B CN118429550B (en) 2024-09-03

Family

ID=92307369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410901847.0A Active CN118429550B (en) 2024-07-05 2024-07-05 Three-dimensional reconstruction method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN118429550B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119359927A (en) * 2024-12-24 2025-01-24 安徽工布智造工业科技有限公司 A 3D reconstruction method and system for a truss 3D camera
WO2025087092A1 (en) * 2023-10-26 2025-05-01 先临三维科技股份有限公司 Three-dimensional scanning processing method, system and apparatus, device and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150128300A (en) * 2014-05-09 2015-11-18 한국건설기술연구원 method of making three dimension model and defect analysis using camera and laser scanning
CN112146564A (en) * 2019-06-28 2020-12-29 先临三维科技股份有限公司 Three-dimensional scanning method, apparatus, computer equipment and computer-readable storage medium
US20210056716A1 (en) * 2019-08-23 2021-02-25 Leica Geosystems Ag Combined point cloud generation using a stationary laser scanner and a mobile scanner
CN117173424A (en) * 2023-11-01 2023-12-05 武汉追月信息技术有限公司 Point cloud slope surface edge line identification method, system and readable storage medium
CN117579754A (en) * 2024-01-16 2024-02-20 思看科技(杭州)股份有限公司 Three-dimensional scanning method, three-dimensional scanning device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150128300A (en) * 2014-05-09 2015-11-18 한국건설기술연구원 method of making three dimension model and defect analysis using camera and laser scanning
CN112146564A (en) * 2019-06-28 2020-12-29 先临三维科技股份有限公司 Three-dimensional scanning method, apparatus, computer equipment and computer-readable storage medium
US20210056716A1 (en) * 2019-08-23 2021-02-25 Leica Geosystems Ag Combined point cloud generation using a stationary laser scanner and a mobile scanner
CN117173424A (en) * 2023-11-01 2023-12-05 武汉追月信息技术有限公司 Point cloud slope surface edge line identification method, system and readable storage medium
CN117579754A (en) * 2024-01-16 2024-02-20 思看科技(杭州)股份有限公司 Three-dimensional scanning method, three-dimensional scanning device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025087092A1 (en) * 2023-10-26 2025-05-01 先临三维科技股份有限公司 Three-dimensional scanning processing method, system and apparatus, device and medium
CN119359927A (en) * 2024-12-24 2025-01-24 安徽工布智造工业科技有限公司 A 3D reconstruction method and system for a truss 3D camera

Also Published As

Publication number Publication date
CN118429550B (en) 2024-09-03

Similar Documents

Publication Publication Date Title
CN118429550B (en) Three-dimensional reconstruction method, system, electronic device and storage medium
WO2021228031A1 (en) Rendering method, apparatus and system
CN109102559B (en) Three-dimensional model processing method and device
US8436853B1 (en) Methods and systems for acquiring and ranking image sets
CN108140255B (en) The method and system of reflecting surface in scene for identification
KR20150046643A (en) Apparatus and method for generating acceleration structure in a ray tracing system
US9147279B1 (en) Systems and methods for merging textures
CN112008980A (en) 3D printing model processing method and system
JP2003115042A (en) Evaluation method, generation method and apparatus of three-dimensional shape model
WO2025092176A1 (en) Reconstruction method and apparatus for three-dimensional entity model, device, medium and program product
CN108182708B (en) Calibration method and calibration device of binocular camera and terminal equipment
CN113177988B (en) Spherical screen camera and laser calibration method, device, equipment and storage medium
CN114693532A (en) Image correction method and related equipment
US8948498B1 (en) Systems and methods to transform a colored point cloud to a 3D textured mesh
TW201319849A (en) Curved surface processing system and method
US10423752B2 (en) Semiconductor package metal shadowing checks
CN110726534B (en) Visual field range testing method and device for visual device
CN118429551B (en) Multi-source point cloud fusion method, device, electronic device and storage medium
CN117830385A (en) Material pile volume measurement method, device, electronic equipment and storage medium
CN114332203B (en) Method and device for determining light source information of virtual light source
CN117635804A (en) Efficient low-occupancy volume cloud rendering method, system, equipment and medium
CN106204604A (en) Projection touch control display apparatus and exchange method thereof
JP7285100B2 (en) Installation support device and installation support program
CN109241624B (en) Method, device, equipment and storage medium for determining demolding direction of car light accessory
KR102611481B1 (en) Method and apparatus for calculating actual distance between coordinates in iamge

Legal Events

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