WO2021189784A1 - Scenario reconstruction method, system and apparatus, and sweeping robot - Google Patents

Scenario reconstruction method, system and apparatus, and sweeping robot Download PDF

Info

Publication number
WO2021189784A1
WO2021189784A1 PCT/CN2020/115921 CN2020115921W WO2021189784A1 WO 2021189784 A1 WO2021189784 A1 WO 2021189784A1 CN 2020115921 W CN2020115921 W CN 2020115921W WO 2021189784 A1 WO2021189784 A1 WO 2021189784A1
Authority
WO
WIPO (PCT)
Prior art keywords
pose
current
current moment
difference
image frame
Prior art date
Application number
PCT/CN2020/115921
Other languages
French (fr)
Chinese (zh)
Inventor
张涵
于元隆
梁振振
黄志勇
Original Assignee
南京科沃斯机器人技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 南京科沃斯机器人技术有限公司 filed Critical 南京科沃斯机器人技术有限公司
Publication of WO2021189784A1 publication Critical patent/WO2021189784A1/en

Links

Images

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
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • 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

Definitions

  • This application relates to the field of data processing technology, and in particular to a scene reconstruction method, system, device and sweeping robot.
  • a camera can be used to obtain images of the scene, and the matching image features can be obtained by means of extracting image features, using image features for feature matching, and so on. Then, sparse reconstruction can be performed based on the matched image features to obtain the camera pose of each image. Finally, dense reconstruction can be performed based on the camera pose to obtain a dense point cloud, which can then be used to reconstruct a three-dimensional scene.
  • the purpose of this application is to provide a scene reconstruction method, system, device and sweeping robot, which can improve the accuracy and robustness of scene reconstruction.
  • one aspect of the present application provides a scene reconstruction method, the method includes: acquiring the current environment state; and selecting the first pose or the second pose as the pose suitable for the current moment according to the current environment state , And create a scene model based on the selected first pose and/or second pose; where the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment Posture.
  • another aspect of the present application also provides a scene reconstruction system.
  • the system includes: an environment state acquisition unit for acquiring the current environment state; One pose or second pose is used as the pose suitable for the current moment, and the scene model is established according to the selected first pose and/or second pose; where the first pose corresponds to the image data at the current moment The pose, the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • the scene reconstruction device includes a memory and a processor.
  • the memory is used to store a computer program.
  • the computer program When the computer program is executed by the processor, It is used to achieve the following functions: obtain the current environmental state; select the first pose or the second pose as the pose suitable for the current moment according to the current environmental state, and according to the selected first pose and/or second pose
  • the pose establishes a scene model; where the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • another aspect of the present application also provides a sweeping robot, the sweeping robot includes a memory and a processor, the memory is used to store a computer program, when the computer program is executed by the processor, Realize the following functions: get the current environment state; select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish according to the selected first pose and/or second pose Scene model; where the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • the technical solutions provided by one or more embodiments of the present application can obtain the current environmental state during scene reconstruction, and the environmental state can more accurately reflect the indoor scene.
  • certain environmental conditions such as sudden changes in brightness, insufficient visual information, etc.
  • relatively large errors may occur in the pose generated by the image data.
  • the position generated by the inertial measurement data in the inertial measurement unit can be used. Pose, so that the generated three-dimensional model is more accurate. Because image data can accurately characterize indoor scenes, but image data is easily affected by the external environment, and the inertial measurement data is only related to the motion state of the device itself, and the generated pose will not be affected by the external environment, so the two types of data are combined Reconstruction of the scene can ensure high accuracy and robustness.
  • FIG. 1 is a schematic diagram of steps of a scene reconstruction method in an embodiment of the present invention
  • Fig. 2 is a flowchart of scene reconstruction in an embodiment of the present invention
  • Fig. 3 is a schematic diagram of pixel point mapping in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of functional modules of a scene reconstruction system in an embodiment of the present invention.
  • Fig. 5 is a schematic structural diagram of a scene reconstruction device in an embodiment of the present invention.
  • an image sensor can be installed on the equipment for 3D scene reconstruction, and the image sensor has an image acquisition function.
  • the image sensor Through the image sensor, the image data corresponding to the indoor scene can be collected during the traveling of the device.
  • the image sensor may be an RGB-D sensor. Through the RGB-D sensor, RGB-D data can be collected, and the RGB-D data can include RGB images and depth images.
  • the image data collected by the image sensor can be processed to reconstruct the three-dimensional scene.
  • unstable environmental conditions such as sudden brightness changes, insufficient visual information, and too fast steering.
  • the image captured by the image sensor may have a sudden change in brightness.
  • indoor scenes are likely to have areas with insufficient texture information and insufficient depth changes. These areas may be walls, ceilings, floors, etc., for example.
  • the image sensor collects images of these areas, it will not be able to accurately match the images due to lack of sufficient visual information. Therefore, only relying on the image data collected by the image sensor may not be able to perform high-precision scene reconstruction.
  • an embodiment of the present application provides a scene reconstruction method, which may be executed by a device that performs 3D scene reconstruction, or may be executed by a server specifically responsible for data processing.
  • the equipment for 3D scene reconstruction may be robots, autonomous vehicles, virtual reality glasses, and so on.
  • the sweeping robot can collect various data required, and then use the built-in operating system to process the collected data, thereby completing the process of scene reconstruction.
  • the sweeping robot can communicate with devices with data processing functions such as Tmall Genie, cloud servers, etc., so as to upload various collected data to the The data is processed to complete the process of scene reconstruction.
  • the scene reconstruction method provided by an embodiment of the present application may include the following multiple steps.
  • an image sensor and an inertial measurement unit may be installed on the device that performs three-dimensional scene reconstruction.
  • the image sensor may be an RGB-D sensor.
  • the image sensor may also be a sensor in other image formats.
  • it can be a CMYK sensor, CMY sensor, HSL sensor, HSV sensor, YUV sensor, etc.
  • the inertial measurement unit may include an accelerometer and a gyroscope.
  • the accelerometer can measure the acceleration components of the sweeping robot in three orthogonal directions
  • the gyroscope can measure the angular velocity components of the device in three orthogonal directions.
  • the image sensor can collect image data of indoor scenes, and the IMU can generate corresponding inertial measurement data according to the operating status of the sweeping robot.
  • the first pose generated based on the image data at the current moment, and the pose generated based on the inertial measurement data at the current moment is the second pose.
  • the device can read image data from the image sensor, and can read inertial measurement data from the IMU.
  • the image data and inertial measurement data can be processed by the server or the data processing module in the device.
  • the image data may include color images and depth images (Depth Image).
  • the format of the color image can be consistent with the image format supported by the image sensor.
  • the color image may be an RGB image.
  • the pixel points in the depth image can represent the distance between the image sensor and each point in the scene.
  • the current environmental status can be obtained from the image data.
  • the environment state can be characterized by the matching residuals between adjacent image frames in the image data.
  • Calculating the matching residual between the image frame at the current moment and the target image frame includes: calculating the pixel difference between the image frame at the current moment and the pixel points mapped to each other in the target image frame.
  • the image data is first processed according to the solution in the prior art to generate the current moment
  • the initial relative pose between the image frame and the target image frame Traverse each pixel in the target image frame, and query the pixel points obtained by mapping each pixel in the current image frame according to the initial relative pose between the target image frame and the current image frame. For example, in FIG. 3, through the initial relative pose, the pixel in the first row and first column in the target image frame can be mapped to the pixel in the fourth row and fifth column in the image frame at the current moment.
  • the two pixels that are mapped to each other should be consistent in brightness or depth.
  • the current state of the environment can be judged by calculating the difference between the pixel points mapped to each other in the image frame at the current moment and the target image frame. Specifically, after calculating the difference between each pair of mutually mapped pixels, these differences can be added, so that the matching residual between the image frame at the current moment and the target image frame can be obtained. The smaller the matching residual, the more stable the environment at the current moment. Therefore, the calculated matching residual can be compared with the specified matching residual threshold. If the calculated matching residual is greater than or equal to the matching residual threshold, it indicates that the matching degree of the two image frames is not good enough.
  • the environmental state of is unstable; on the contrary, it indicates that the environmental state of the current moment is stable.
  • the matching residual threshold may be an empirical value obtained by performing statistics on a large number of normal matching residuals. In practical applications, the size of the matching residual threshold can be flexibly changed.
  • the pixel difference value includes a brightness difference value and a depth difference value
  • the corresponding matching residuals can be calculated from these two aspects respectively. For example, when the two matching residuals are both greater than or equal to the corresponding matching residual threshold, it can be determined that the environmental state at the current moment is unstable. For another example, as long as one of the two matching residuals is greater than or equal to the corresponding matching residual threshold, it can be determined that the environmental state at the current moment is unstable.
  • different weight values can be assigned to the two matching residuals respectively, and then a comprehensive matching residual can be obtained by means of weighted summation.
  • S3 Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and build a scene model based on the selected first pose and/or second pose; among them, the first pose The pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • the corresponding first pose or second pose can be selected. Specifically, if the matching residual between the image frame at the current moment and the target image frame is greater than or equal to the preset matching residual threshold, the surface current environment state is unstable, and the first pose generated by the image data at the current moment is used as the State the pose at the current moment; if the matching residual between the image frame at the current moment and the target image frame is less than the preset matching residual threshold, the surface current environment is stable, and the inertial measurement data generated at the current moment is the second place
  • the pose is the pose applicable to the current moment.
  • the pose of the image frame at the current moment and the target image frame are further calculated.
  • Pose difference if the two poses are greater than or equal to the preset pose difference, it means that the pose generated based on the image frame at the current moment may not be correct, and further verification is needed; if the pixels between the two frames are If the difference is less than the preset pose difference, the pose of the image frame at the current moment is correct, and the pose of the image frame at the current moment (that is, the first pose) is used as the pose at the current moment.
  • the pose of the image frame at the current moment is the pose to be verified, in order to further determine whether the pose to be verified is correct, compare the first pose and the second pose at the current moment, if the difference between the two is greater than or equal to the specified difference Value threshold, the current second pose is taken as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, the current first pose is taken as the pose applicable to the current The pose of the moment.
  • the reason for further comparing the first pose and the second pose is that when the pose difference between the current moment of the image frame and the target image frame is greater than or equal to the preset pose difference, only the current moment of image A preliminary verification is made whether the pose of the frame is correct, indicating that the pose generated by the image frame at the current moment may not be correct, and further verification is needed. Since the inertial measurement data is often only related to the motion state of the device itself, the generated pose will not be affected by the external environment. Therefore, the pose calculated based on the inertial measurement data can guarantee certain accuracy in most cases.
  • the pose generated by the inertial measurement data can be used to compare the pose generated by the inertial measurement data at the current moment with the pose generated by the image frame to further Determine whether the pose generated by the image frame at the current moment is correct.
  • the pose of the image frame at the current moment and the matching residual of the target image frame are greater than or equal to the preset matching residual threshold, it can only indicate that the pose generated by the image frame at the current moment may not be correct. In order to further improve the judgment In another preferred embodiment, if the matching residual between the previous image frame and the target image frame is greater than the preset matching residual threshold, it indicates that the current environment is likely to be unstable. In order to further confirm the current Whether the environment is unstable, further compare the first pose and the second pose at the current moment. If the difference between the two is greater than or equal to the specified difference threshold, it means that the first pose generated by the image data has a large error.
  • the current second pose should be regarded as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, it means that the first pose generated by the image data does not have a large error, then The current first pose is taken as the pose applicable to the current moment.
  • the pose can be processed according to the existing technology to complete the process of scene reconstruction.
  • the sparse feature point cloud can be densely reconstructed according to the generated pose to obtain a dense point cloud, and the dense point cloud can be used for scene reconstruction.
  • loop detection may be performed during the scene reconstruction process. Specifically, after the current scene is reconstructed, the current scene can be encoded and stored, and from the historically reconstructed scenes, it can be identified whether there is a historical scene similar to the current scene. If it exists, it means a loopback has occurred. Later, the loop detection technology can be used to directly calculate the pose of the current scene directly from the historical scene, so that the result of the pose is more accurate, and thus the accuracy of scene reconstruction is improved.
  • the Dibao robot can maintain a communication connection with the cloud server after completing the network configuration.
  • the Dibao robot can collect indoor image data through an RGB-D camera, and usually can collect inertial measurement data through an inertial measurement unit. Both image data and inertial measurement data can be uploaded to a server in the cloud on a regular basis.
  • the cloud server can combine the two aspects of data to reconstruct the indoor scene, and can send the reconstructed indoor model or indoor map to the Dibao robot, so that the Dibao robot can better plan the cleaning path.
  • the image data collected by the Dibao robot often contains areas with insufficient texture information such as walls, ceilings, and floors, and insufficient depth changes. The difference between the image frames of these areas may not be large. Based on the image The relative pose generated by the data may not be accurate enough. In view of this, the relative pose generated by the image data can be combined with the relative pose generated by the inertial measurement data to correct the relative pose generated by the image data, so as to ensure the modeling accuracy of the indoor scene, so that the Dibao robot can more accurately plan the cleaning path according to the generated map .
  • the Dibao robot can directly process the collected image data and inertial measurement data to reconstruct the indoor scene, and can store the reconstructed indoor model or indoor map locally. Later, the user can directly view the indoor map stored in the Dibao robot through the APP, and issue an area cleaning instruction to the Dibao robot.
  • an autonomous vehicle can reconstruct the three-dimensional scene around the driving path by collecting image data in the driving path and the vehicle's own inertial measurement data, and can perform path planning and navigation based on the reconstructed scene.
  • the vehicle may drive from the shadow to the sunlight.
  • the relative pose error generated based on the image data will be large.
  • the relative pose generated by the inertial measurement data can be used to perform the pose correction. This makes the reconstructed 3D scene more accurate, thereby ensuring the accuracy of path planning and the safety of autonomous driving.
  • the virtual reality eyes can simultaneously collect image data in the user’s environment and the inertial measurement data generated when the user moves, and the virtual reality eyes can be based on the collection
  • the obtained data reconstructs the user's environment.
  • the user may suddenly turn around or move by a large amount while playing the game.
  • the difference between adjacent image frames of the image data is large, and the pose generated based on the image data may not be accurate enough. Therefore, the relative pose generated by the image data can be corrected in combination with the relative pose generated by the inertial measurement data, so as to ensure the modeling accuracy of the indoor scene.
  • this application also provides a scene reconstruction system, which includes:
  • the environmental state obtaining unit is used to obtain the current environmental state
  • the pose selection unit is used to select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose; Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • the current first pose is used as the pose applicable to the current moment; if the current environment state is not stable, the current second pose is used as the current pose applicable to the current The pose of the moment.
  • the environmental state acquisition unit includes:
  • An image frame reading module configured to read the image frame at the current moment in the image data, and read the target image frame located before the image frame at the current moment and adjacent to the image frame at the current moment;
  • the matching residual calculation module is used to calculate the matching residual between the image frame at the current moment and the target image frame, and obtain the current environmental state according to the matching residual.
  • the matching residual calculation module includes:
  • the pixel difference calculation module is used to calculate the pixel difference between the pixel points mapped to each other in the image frame at the current moment and the target image frame.
  • the current environment state is unstable; if the pixel difference between the two frames is less than the preset pixel difference, the current environment The state is stable.
  • the pose selection unit includes:
  • the pose difference calculation module is used to calculate the pose difference of the image frame at the current moment and the target image frame when the pixel difference between the two frames is less than the preset pixel difference;
  • the pose judgment module is used to determine the pose of the image frame at the current moment as the pose to be verified if the difference between the two poses is greater than or equal to the preset pose difference; if the pixel difference between the two frames is less than The preset pose difference value determines that the pose of the image frame at the current moment is correct.
  • the pose selection unit further includes:
  • Difference comparison module used to compare the first pose and the second pose at the current moment if the pose of the image frame at the current moment is the pose to be verified, if the difference between the two is greater than or equal to the specified difference threshold , The current second pose is taken as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, the current first pose is taken as the pose applicable to the current moment Posture.
  • the pose selection unit includes:
  • the pose comparison module is used to compare the first pose and the second pose at the current moment if the current environment is unstable;
  • the pose determination module is configured to, if the difference between the two is greater than or equal to the specified difference threshold, use the current second pose as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold For the difference threshold, the current first pose is taken as the pose applicable to the current moment.
  • the present application also provides a scene reconstruction device.
  • the scene reconstruction device includes a memory and a processor.
  • the memory is used to store a computer program.
  • the computer program is executed by the processor, it is used to implement The following functions:
  • the first pose is the pose corresponding to the image data at the current moment
  • the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • the present application also provides a cleaning robot, which includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the following functions:
  • the first pose is the pose corresponding to the image data at the current moment
  • the second pose is the pose corresponding to the inertial measurement data at the current moment.
  • the memory may include a physical device for storing information, which is usually digitized and then stored in a medium using electrical, magnetic, or optical methods.
  • the memory may include: devices that use electrical energy to store information, such as RAM, ROM, etc.; devices that use magnetic energy to store information, such as hard disks, floppy disks, magnetic tapes, magnetic core memories, bubble memory, and U disks; use optical methods to store information Device such as CD or DVD.
  • devices that use electrical energy to store information such as RAM, ROM, etc.
  • devices that use magnetic energy to store information such as hard disks, floppy disks, magnetic tapes, magnetic core memories, bubble memory, and U disks
  • use optical methods to store information Device such as CD or DVD.
  • there are other types of memory such as quantum memory, graphene memory, and so on.
  • the processor can be implemented in any suitable manner.
  • the processor may take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (for example, software or firmware) executable by the (micro)processor, logic gates, switches, special-purpose integrated Circuit (Application Specific Integrated Circuit, ASIC), programmable logic controller and embedded microcontroller form, etc.
  • program codes for example, software or firmware
  • the technical solutions provided by one or more embodiments of the present application can obtain the current environmental state during scene reconstruction, and the environmental state can more accurately reflect the indoor scene.
  • certain environmental conditions such as sudden changes in brightness, insufficient visual information, etc.
  • relatively large errors may occur in the pose generated by the image data.
  • the position generated by the inertial measurement data in the inertial measurement unit can be used. Pose, so that the generated three-dimensional model is more accurate. Because image data can accurately characterize indoor scenes, but image data is easily affected by the external environment, and the inertial measurement data is only related to the motion state of the device itself, and the generated pose will not be affected by the external environment, so the two types of data are combined Reconstruction of the scene can ensure high accuracy and robustness.
  • the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt a form of a complete hardware implementation, a complete software implementation, or a combination of software and hardware implementations. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

Provided are a scenario reconstruction method, system and apparatus, and a sweeping robot. The method comprises: acquiring the current environmental state (S1); and selecting a first pose or a second pose as a pose which is suitable for the current moment according to the current environmental state, and establishing a scenario model according to the selected first pose and/or second pose (S3), wherein the first pose is a pose corresponding to image data at the current moment, and the second pose is a pose corresponding to inertial measurement data at the current moment. By means of the method, the accuracy and robustness of scenario reconstruction can be improved.

Description

一种场景重建方法、系统、装置及扫地机器人Scene reconstruction method, system, device and sweeping robot
交叉引用cross reference
本申请引用于2020年03月23日递交的名称为“一种场景重建方法、系统、装置及扫地机器人”的第202010207310.6号中国专利申请,其通过引用被全部并入本申请。This application refers to the Chinese Patent Application No. 202010207310.6 entitled "A Scene Reconstruction Method, System, Apparatus, and Sweeping Robot" filed on March 23, 2020, which is fully incorporated into this application by reference.
技术领域Technical field
本申请涉及数据处理技术领域,特别涉及一种场景重建方法、系统、装置及扫地机器人。This application relates to the field of data processing technology, and in particular to a scene reconstruction method, system, device and sweeping robot.
背景技术Background technique
在当前的三维场景重建技术中,可以利用相机获取场景的图像,并通过提取图像特征、利用图像特征进行特征匹配等手段得到匹配的图像特征。然后,可以基于匹配的图像特征进行稀疏重建,从而得到各个图像的相机位姿。最终,可以基于相机位姿进行稠密重建,得到稠密点云,该稠密点云便可以用于重建三维场景。In the current 3D scene reconstruction technology, a camera can be used to obtain images of the scene, and the matching image features can be obtained by means of extracting image features, using image features for feature matching, and so on. Then, sparse reconstruction can be performed based on the matched image features to obtain the camera pose of each image. Finally, dense reconstruction can be performed based on the camera pose to obtain a dense point cloud, which can then be used to reconstruct a three-dimensional scene.
目前的三维重建过程中,由于室内场景比较复杂,基于相机获取的图像来重建室内场景时,可能会导致准确性和鲁棒性较低的情况。In the current 3D reconstruction process, since the indoor scene is relatively complicated, when the indoor scene is reconstructed based on the image obtained by the camera, it may lead to a situation of low accuracy and robustness.
发明内容Summary of the invention
本申请的目的在于提供一种场景重建方法、系统、装置及扫地机器人,能够提高场景重建的准确性和鲁棒性。The purpose of this application is to provide a scene reconstruction method, system, device and sweeping robot, which can improve the accuracy and robustness of scene reconstruction.
为实现上述目的,本申请一方面提供一种场景重建方法,所述方法包括:获取当前的环境状态;根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。In order to achieve the above objective, one aspect of the present application provides a scene reconstruction method, the method includes: acquiring the current environment state; and selecting the first pose or the second pose as the pose suitable for the current moment according to the current environment state , And create a scene model based on the selected first pose and/or second pose; where the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment Posture.
为实现上述目的,本申请另一方面还提供一种场景重建系统,所述系统包括:环境状态获取单元,用于获取当前的环境状态;位姿选择单元,用于根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。In order to achieve the above-mentioned object, another aspect of the present application also provides a scene reconstruction system. The system includes: an environment state acquisition unit for acquiring the current environment state; One pose or second pose is used as the pose suitable for the current moment, and the scene model is established according to the selected first pose and/or second pose; where the first pose corresponds to the image data at the current moment The pose, the second pose is the pose corresponding to the inertial measurement data at the current moment.
为实现上述目的,本申请另一方面还提供一种场景重建装置,所述场景重建装置包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,用于实现以下功能:获取当前的环境状态;根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。To achieve the foregoing objective, another aspect of the present application provides a scene reconstruction device. The scene reconstruction device includes a memory and a processor. The memory is used to store a computer program. When the computer program is executed by the processor, It is used to achieve the following functions: obtain the current environmental state; select the first pose or the second pose as the pose suitable for the current moment according to the current environmental state, and according to the selected first pose and/or second pose The pose establishes a scene model; where the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
为实现上述目的,本申请另一方面还提供一种扫地机器人,所述扫地机器人包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,用于实现以下功能:获取当前的环境状态;根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。In order to achieve the above-mentioned object, another aspect of the present application also provides a sweeping robot, the sweeping robot includes a memory and a processor, the memory is used to store a computer program, when the computer program is executed by the processor, Realize the following functions: get the current environment state; select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish according to the selected first pose and/or second pose Scene model; where the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
由上可见,本申请一个或者多个实施方式提供的技术方案,在进行场景重建时,可以获取当前的环境状态,该环境状态可以比较准确地体现室内场 景。在某些环境状态下,比如在亮度突变、视觉信息不够明显等情况下,依赖图像数据生成的位姿会发生比较大的错误,此时,可以采用惯性测量单元中的惯性测量数据生成的位姿,从而使得生成的三维模型比较准确。由于图像数据能够准确地表征室内场景,但图像数据容易受到外界环境影响,而惯性测量数据只与设备自身的运动状态有关,其生成的位姿不会受到外界环境影响,因此结合这两种数据进行场景重建,能够保证较高的准确性和鲁棒性。It can be seen from the above that the technical solutions provided by one or more embodiments of the present application can obtain the current environmental state during scene reconstruction, and the environmental state can more accurately reflect the indoor scene. Under certain environmental conditions, such as sudden changes in brightness, insufficient visual information, etc., relatively large errors may occur in the pose generated by the image data. At this time, the position generated by the inertial measurement data in the inertial measurement unit can be used. Pose, so that the generated three-dimensional model is more accurate. Because image data can accurately characterize indoor scenes, but image data is easily affected by the external environment, and the inertial measurement data is only related to the motion state of the device itself, and the generated pose will not be affected by the external environment, so the two types of data are combined Reconstruction of the scene can ensure high accuracy and robustness.
附图说明Description of the drawings
为了更清楚地说明本发明实施方式中的技术方案,下面将对实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1是本发明实施方式中场景重建方法的步骤示意图;FIG. 1 is a schematic diagram of steps of a scene reconstruction method in an embodiment of the present invention;
图2是本发明实施方式中场景重建的流程图;Fig. 2 is a flowchart of scene reconstruction in an embodiment of the present invention;
图3是本发明实施方式中像素点映射的示意图;Fig. 3 is a schematic diagram of pixel point mapping in an embodiment of the present invention;
图4是本发明实施方式中场景重建系统的功能模块示意图;4 is a schematic diagram of functional modules of a scene reconstruction system in an embodiment of the present invention;
图5是本发明实施方式中场景重建装置的结构示意图。Fig. 5 is a schematic structural diagram of a scene reconstruction device in an embodiment of the present invention.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施方式及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施方式仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。In order to make the purpose, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described implementations are only a part of the implementations of the present application, rather than all of the implementations. Based on the implementation manners in this application, all other implementation manners obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
在实际应用中,进行三维场景重建的设备上可以安装图像传感器,该图像传感器具备图像采集功能。通过该图像传感器,可以在设备的行进过程中采集室内场景对应的图像数据。在一个具体应用示例中,该图像传感器可以 是RGB-D传感器。通过该RGB-D传感器,可以采集到RGB-D数据,在该RGB-D数据中,可以包括RGB图像和深度图像。In practical applications, an image sensor can be installed on the equipment for 3D scene reconstruction, and the image sensor has an image acquisition function. Through the image sensor, the image data corresponding to the indoor scene can be collected during the traveling of the device. In a specific application example, the image sensor may be an RGB-D sensor. Through the RGB-D sensor, RGB-D data can be collected, and the RGB-D data can include RGB images and depth images.
在现有技术中,可以通过对图像传感器采集的图像数据进行处理,从而进行三维场景重建。然而,通过图像传感器捕捉室内场景时,很可能会遇到亮度突变、视觉信息不够明显、转向过快等环境状态不稳定的情况。例如,当设备从向阳处移动至背光处时,图像传感器采集到的图像可能会出现亮度突变的情况。又例如,室内场景很可能会出现纹理信息不够丰富、深度变化不够明显的区域。这些区域例如可以是墙壁、天花板、地板等。当图像传感器采集这些区域的图像时,会由于缺少足够的视觉信息,而导致无法进行图像之间的准确匹配。因此,仅仅依靠图像传感器采集的图像数据,可能无法进行高精度的场景重建。In the prior art, the image data collected by the image sensor can be processed to reconstruct the three-dimensional scene. However, when capturing an indoor scene through an image sensor, it is likely to encounter unstable environmental conditions such as sudden brightness changes, insufficient visual information, and too fast steering. For example, when the device moves from the sun to the backlight, the image captured by the image sensor may have a sudden change in brightness. For another example, indoor scenes are likely to have areas with insufficient texture information and insufficient depth changes. These areas may be walls, ceilings, floors, etc., for example. When the image sensor collects images of these areas, it will not be able to accurately match the images due to lack of sufficient visual information. Therefore, only relying on the image data collected by the image sensor may not be able to perform high-precision scene reconstruction.
鉴于此,本申请一个实施方式提供一种场景重建方法,该方法可以由进行三维场景重建的设备执行,也可以由专门负责数据处理的服务器执行。其中,进行三维场景重建的设备可以是机器人、自动驾驶汽车、虚拟现实眼镜等。举例来说,扫地机器人在行进过程中,可以采集所需的各项数据,然后利用内置的操作系统对采集的数据进行处理,从而完成场景重建的过程。又例如,扫地机器人可以与天猫精灵、云端服务器等具备数据处理功能的设备进行通信,从而将采集的各项数据上传至具备数据处理功能的设备中,从而通过具备数据处理功能的设备对采集的数据进行处理,进而完成场景重建的过程。In view of this, an embodiment of the present application provides a scene reconstruction method, which may be executed by a device that performs 3D scene reconstruction, or may be executed by a server specifically responsible for data processing. Among them, the equipment for 3D scene reconstruction may be robots, autonomous vehicles, virtual reality glasses, and so on. For example, in the process of traveling, the sweeping robot can collect various data required, and then use the built-in operating system to process the collected data, thereby completing the process of scene reconstruction. For another example, the sweeping robot can communicate with devices with data processing functions such as Tmall Genie, cloud servers, etc., so as to upload various collected data to the The data is processed to complete the process of scene reconstruction.
请参阅图1和图2,本申请一个实施方式提供的场景重建方法,可以包括以下多个步骤。Please refer to FIG. 1 and FIG. 2. The scene reconstruction method provided by an embodiment of the present application may include the following multiple steps.
S1:获取当前的环境状态。S1: Get the current environmental status.
在本实施方式中,进行三维场景重建的设备上可以安装图像传感器和惯性测量单元(Inertial Measurement Unit,IMU)。其中,图像传感器可以是RGB-D传感器。当然,随着技术的发展和可替代方案的出现,图像传感器还可以是其它图像格式的传感器。例如可以是CMYK传感器、CMY传感器、HSL传 感器、HSV传感器、YUV传感器等。惯性测量单元中可以包括加速度计和陀螺仪,其中,加速度计可以测量扫地机器人在正交的三个方向的加速度分量,陀螺仪可以测量设备在正交的三个方向的角速度分量。In this embodiment, an image sensor and an inertial measurement unit (Inertial Measurement Unit, IMU) may be installed on the device that performs three-dimensional scene reconstruction. Among them, the image sensor may be an RGB-D sensor. Of course, with the development of technology and the emergence of alternative solutions, the image sensor may also be a sensor in other image formats. For example, it can be a CMYK sensor, CMY sensor, HSL sensor, HSV sensor, YUV sensor, etc. The inertial measurement unit may include an accelerometer and a gyroscope. The accelerometer can measure the acceleration components of the sweeping robot in three orthogonal directions, and the gyroscope can measure the angular velocity components of the device in three orthogonal directions.
图像传感器可以采集室内场景的图像数据,IMU则可以根据扫地机器人的运行状态,生成对应的惯性测量数据。在本申请中,基于当前时刻的图像数据生成的位姿第一位姿,基于当前时刻的惯性测量数据生成的位姿为第二位姿。The image sensor can collect image data of indoor scenes, and the IMU can generate corresponding inertial measurement data according to the operating status of the sweeping robot. In this application, the first pose generated based on the image data at the current moment, and the pose generated based on the inertial measurement data at the current moment is the second pose.
在本实施方式中,设备可以从图像传感器中读取图像数据,并且可以从IMU中读取惯性测量数据。图像数据和惯性测量数据可以由服务器或者设备中的数据处理模块处理。具体地,图像数据中可以包括彩色图像和深度图像(Depth Image)。其中,彩色图像的格式可以与图像传感器所支持的图像格式保持一致。例如,对于RGB-D传感器而言,彩色图像可以是RGB图像。深度图像中的像素点,可以表征图像传感器与场景中各个点的距离。In this embodiment, the device can read image data from the image sensor, and can read inertial measurement data from the IMU. The image data and inertial measurement data can be processed by the server or the data processing module in the device. Specifically, the image data may include color images and depth images (Depth Image). Among them, the format of the color image can be consistent with the image format supported by the image sensor. For example, for an RGB-D sensor, the color image may be an RGB image. The pixel points in the depth image can represent the distance between the image sensor and each point in the scene.
当前的环境状态可以从图像数据中获取。具体地,环境状态可以通过图像数据中相邻图像帧之间的匹配残差来表征。获取图像数据中当前时刻的图像帧,和位于该当前时刻的图像帧之前且与所述当前时刻的图像帧相邻的目标图像帧,计算当前时刻的图像帧和目标图像帧之间的匹配残差,根据匹配残差获得当前的环境状态。计算当前时刻的图像帧和所述目标图像帧之间的匹配残差包括:计算所述当前时刻的图像帧和所述目标图像帧中相互映射的像素点之间的像素差值。The current environmental status can be obtained from the image data. Specifically, the environment state can be characterized by the matching residuals between adjacent image frames in the image data. Obtain the image frame at the current moment in the image data, and the target image frame located before the image frame at the current moment and adjacent to the image frame at the current moment, and calculate the residual match between the image frame at the current moment and the target image frame Poor, obtain the current environmental state according to the matching residual. Calculating the matching residual between the image frame at the current moment and the target image frame includes: calculating the pixel difference between the image frame at the current moment and the pixel points mapped to each other in the target image frame.
计算所述当前时刻的图像帧和所述目标图像帧中相互映射的像素点之间的像素差值,具体地,首先根据现有技术中的方案,对图像数据进行处理,从而生成当前时刻的图像帧和所述目标图像帧之间的初始相对位姿。遍历目标图像帧中的各个像素点,并根据目标图像帧和当前时刻的图像帧之间的初始相对位姿,在当前时刻的图像帧中查询各个像素点映射得到的像素点。例如,在图3中,通过初始相对位姿,可以将目标图像帧中位于第一行第一列的像素点,映射至当前时刻的图像帧中位于第四行第五列处的像素点。通常 而言,相互映射的两个像素点在亮度或深度上应当是一致的。而如果出现了亮度突变或深度突变的情况,则会使得相互映射的两个像素点的值出现偏差。鉴于此,可以通过计算当前时刻的图像帧和目标图像帧中相互映射的像素点之间的差值,来判断当前的环境状态。具体地,在计算出每一对相互映射的像素点之间的差值之后,可以将这些差值相加,从而可以得到当前时刻的图像帧和目标图像帧之间的匹配残差。该匹配残差越小,说明当前时刻的环境状态越稳定。因此,可以将计算得到的匹配残差与指定的匹配残差阈值进行比较,如果计算得到的匹配残差大于或者等于该匹配残差阈值,则表明两个图像帧的匹配度不够好,当前时刻的环境状态不稳定;反之,则表明当前时刻的环境状态稳定。匹配残差阈值可以是针对大量的正常匹配残差进行统计得到的一个经验值,在实际应用中可以灵活改变匹配残差阈值的大小。Calculate the pixel difference between the image frame at the current moment and the pixel points mapped to each other in the target image frame. Specifically, the image data is first processed according to the solution in the prior art to generate the current moment The initial relative pose between the image frame and the target image frame. Traverse each pixel in the target image frame, and query the pixel points obtained by mapping each pixel in the current image frame according to the initial relative pose between the target image frame and the current image frame. For example, in FIG. 3, through the initial relative pose, the pixel in the first row and first column in the target image frame can be mapped to the pixel in the fourth row and fifth column in the image frame at the current moment. Generally speaking, the two pixels that are mapped to each other should be consistent in brightness or depth. However, if there is a sudden change in brightness or a sudden change in depth, the values of the two pixels mapped to each other will deviate. In view of this, the current state of the environment can be judged by calculating the difference between the pixel points mapped to each other in the image frame at the current moment and the target image frame. Specifically, after calculating the difference between each pair of mutually mapped pixels, these differences can be added, so that the matching residual between the image frame at the current moment and the target image frame can be obtained. The smaller the matching residual, the more stable the environment at the current moment. Therefore, the calculated matching residual can be compared with the specified matching residual threshold. If the calculated matching residual is greater than or equal to the matching residual threshold, it indicates that the matching degree of the two image frames is not good enough. The environmental state of is unstable; on the contrary, it indicates that the environmental state of the current moment is stable. The matching residual threshold may be an empirical value obtained by performing statistics on a large number of normal matching residuals. In practical applications, the size of the matching residual threshold can be flexibly changed.
在一个实施方式中,像素差值包括亮度差值和深度差值,可以从这两方面分别计算出对应的匹配残差。例如,当这两种匹配残差均大于或者等于对应的匹配残差阈值时,才可以判定当前时刻的环境状态不稳定。又例如,只要这两种匹配残差中的一个大于或者等于对应的匹配残差阈值,就可以判定当前时刻的环境状态不稳定。此外,在实际应用中,还可以分别为这两种匹配残差分配不同的权重值,然后通过加权求和的方式,得到一个综合的匹配残差。In one embodiment, the pixel difference value includes a brightness difference value and a depth difference value, and the corresponding matching residuals can be calculated from these two aspects respectively. For example, when the two matching residuals are both greater than or equal to the corresponding matching residual threshold, it can be determined that the environmental state at the current moment is unstable. For another example, as long as one of the two matching residuals is greater than or equal to the corresponding matching residual threshold, it can be determined that the environmental state at the current moment is unstable. In addition, in practical applications, different weight values can be assigned to the two matching residuals respectively, and then a comprehensive matching residual can be obtained by means of weighted summation.
S3:根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。S3: Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and build a scene model based on the selected first pose and/or second pose; among them, the first pose The pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
在本实施方式中,根据环境状态是否稳定,可以选择对应的第一位姿或者第二位姿。具体地,如果当前时刻的图像帧和目标图像帧之间的匹配残差大于或者等于预设匹配残差阈值,表面当前环境状态不稳定,将当前时刻的图像数据生成的第一位姿作为所述当前时刻的位姿;如果当前时刻的图像帧和目标图像帧之间的匹配残差小于预设匹配残差阈值,则表面当前环境状态 稳定,将当前时刻的惯性测量数据生成的第二位姿作为适用于所述当前时刻的位姿。In this embodiment, according to whether the environment state is stable, the corresponding first pose or second pose can be selected. Specifically, if the matching residual between the image frame at the current moment and the target image frame is greater than or equal to the preset matching residual threshold, the surface current environment state is unstable, and the first pose generated by the image data at the current moment is used as the State the pose at the current moment; if the matching residual between the image frame at the current moment and the target image frame is less than the preset matching residual threshold, the surface current environment is stable, and the inertial measurement data generated at the current moment is the second place The pose is the pose applicable to the current moment.
在另一个较佳的实施方式中,如果当前时刻的图像帧和目标图像帧之间的匹配残差小于预设匹配残差阈值,则进一步计算当前时刻的图像帧的位姿和目标图像帧的位姿差值,如果两者位姿差值大于或者等于预设位姿差值,则说明基于当前时刻的图像帧生成的位姿可能并不正确,需要进一步验证;如果两帧之间的像素差值小于预设位姿差值,则当前时刻的图像帧的位姿正确,采用当前时刻的图像帧的位姿(也即第一位姿)作为当前时刻的位姿。In another preferred embodiment, if the matching residual between the image frame at the current moment and the target image frame is less than the preset matching residual threshold, the pose of the image frame at the current moment and the target image frame are further calculated. Pose difference, if the two poses are greater than or equal to the preset pose difference, it means that the pose generated based on the image frame at the current moment may not be correct, and further verification is needed; if the pixels between the two frames are If the difference is less than the preset pose difference, the pose of the image frame at the current moment is correct, and the pose of the image frame at the current moment (that is, the first pose) is used as the pose at the current moment.
如果当前时刻的图像帧的位姿为待验证位姿,为进一步判断待验证位姿是否正确,比较当前时刻的第一位姿与第二位姿,若两者的差值大于或者等于指定差值阈值,则将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。If the pose of the image frame at the current moment is the pose to be verified, in order to further determine whether the pose to be verified is correct, compare the first pose and the second pose at the current moment, if the difference between the two is greater than or equal to the specified difference Value threshold, the current second pose is taken as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, the current first pose is taken as the pose applicable to the current The pose of the moment.
进一步比较第一位姿与第二位姿的原因是,当前时刻的图像帧的位姿和目标图像帧的位姿差值大于或者等于预设位姿差值时,只能对当前时刻的图像帧的位姿是否正确做出一个初步的验证,说明当前时刻的图像帧生成的位姿可能并不正确,需要进一步验证。由于惯性测量数据往往只与设备自身的运动状态相关,其生成的位姿不会受到外界环境的影响,因此,基于惯性测量数据计算得到的位姿在多数情况下能保证一定的准确性,在当前时刻的图像帧生成的位姿可能并不正确时,可以利用惯性测量数据生成的位姿基本正确的特性,比较当前时刻的惯性测量数据生成的位姿和图像帧生成的位姿,从而进一步判断当前时刻的图像帧生成的位姿是否正确。The reason for further comparing the first pose and the second pose is that when the pose difference between the current moment of the image frame and the target image frame is greater than or equal to the preset pose difference, only the current moment of image A preliminary verification is made whether the pose of the frame is correct, indicating that the pose generated by the image frame at the current moment may not be correct, and further verification is needed. Since the inertial measurement data is often only related to the motion state of the device itself, the generated pose will not be affected by the external environment. Therefore, the pose calculated based on the inertial measurement data can guarantee certain accuracy in most cases. When the pose generated by the image frame at the current moment may not be correct, the pose generated by the inertial measurement data can be used to compare the pose generated by the inertial measurement data at the current moment with the pose generated by the image frame to further Determine whether the pose generated by the image frame at the current moment is correct.
由于当前时刻的图像帧的位姿和目标图像帧的匹配残差大于或者等于预设匹配残差阈值时,也只能说明当前时刻的图像帧生成的位姿可能并不正确,为进一步提高判断的准确率,在另一个较佳的实施方式中,如果前时刻的图像帧和目标图像帧之间的匹配残差大于预设匹配残差阈值,表明当前环境很可能不稳定,为进一步确认当前环境是否不稳定,进一步比较当前时刻的第 一位姿与第二位姿,若两者的差值大于或者等于指定差值阈值,说明图像数据生成的第一位姿发生了较大的误差,应将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,说明图像数据生成的第一位姿并没有发生大的误差,则将当前的第一位姿作为适用于所述当前时刻的位姿。Since the pose of the image frame at the current moment and the matching residual of the target image frame are greater than or equal to the preset matching residual threshold, it can only indicate that the pose generated by the image frame at the current moment may not be correct. In order to further improve the judgment In another preferred embodiment, if the matching residual between the previous image frame and the target image frame is greater than the preset matching residual threshold, it indicates that the current environment is likely to be unstable. In order to further confirm the current Whether the environment is unstable, further compare the first pose and the second pose at the current moment. If the difference between the two is greater than or equal to the specified difference threshold, it means that the first pose generated by the image data has a large error. The current second pose should be regarded as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, it means that the first pose generated by the image data does not have a large error, then The current first pose is taken as the pose applicable to the current moment.
结合图像数据和惯性测量数据生成最终的位姿后,便可以按照现有的技术,对该位姿进行处理,从而完成场景重建的过程。具体地,可以根据生成的位姿对稀疏的特征点云进行稠密重建,从而得到稠密点云,便可以利用该稠密点云进行场景重建。After the final pose is generated by combining the image data and the inertial measurement data, the pose can be processed according to the existing technology to complete the process of scene reconstruction. Specifically, the sparse feature point cloud can be densely reconstructed according to the generated pose to obtain a dense point cloud, and the dense point cloud can be used for scene reconstruction.
在一个实施方式中,为了使得重建的场景更加精确,可以在场景重建过程中进行回环检测。具体地,在重建出当前场景之后,可以对该当前场景进行编码存储,并可以从历史重建的场景中,识别是否存在与该当前场景相似的历史场景。如果存在,则表示产生了回环。后续,可以通过回环检测技术,直接由历史场景直接推算当前场景的位姿,从而使得位姿的结果更加精确,进而提高了场景重建的精确度。In one embodiment, in order to make the reconstructed scene more accurate, loop detection may be performed during the scene reconstruction process. Specifically, after the current scene is reconstructed, the current scene can be encoded and stored, and from the historically reconstructed scenes, it can be identified whether there is a historical scene similar to the current scene. If it exists, it means a loopback has occurred. Later, the loop detection technology can be used to directly calculate the pose of the current scene directly from the historical scene, so that the result of the pose is more accurate, and thus the accuracy of scene reconstruction is improved.
在一个具体应用场景中,地宝机器人在完成配网之后,可以与云端的服务器保持通信连接。这样,地宝机器人在清扫室内的过程中,可以通过RGB-D相机采集室内的图像数据,通常可以通过惯性测量单元采集惯性测量数据。图像数据和惯性测量数据均可以定期上传至云端的服务器中。这样,云端的服务器可以结合这两方面的数据进行室内场景重建,并可以将重建得到的室内模型或者室内地图发送至地宝机器人处,从而使得地宝机器人能够更好地规划清扫路径。具体地,地宝机器人采集到的图像数据中,往往会包含墙壁、天花板、地板等纹理信息不够丰富、深度变化不够明显的区域,这些区域的图像帧之间的差异可能并不大,基于图像数据生成的相对位姿可能会不够准确。鉴于此,可以结合惯性测量数据生成的相对位姿,对图像数据生成的相对位姿进行校正,从而保证室内场景的建模精度,进而使得地宝机器人能够根据生成的地图更加准确地规划清扫路径。In a specific application scenario, the Dibao robot can maintain a communication connection with the cloud server after completing the network configuration. In this way, in the process of cleaning the room, the Dibao robot can collect indoor image data through an RGB-D camera, and usually can collect inertial measurement data through an inertial measurement unit. Both image data and inertial measurement data can be uploaded to a server in the cloud on a regular basis. In this way, the cloud server can combine the two aspects of data to reconstruct the indoor scene, and can send the reconstructed indoor model or indoor map to the Dibao robot, so that the Dibao robot can better plan the cleaning path. Specifically, the image data collected by the Dibao robot often contains areas with insufficient texture information such as walls, ceilings, and floors, and insufficient depth changes. The difference between the image frames of these areas may not be large. Based on the image The relative pose generated by the data may not be accurate enough. In view of this, the relative pose generated by the image data can be combined with the relative pose generated by the inertial measurement data to correct the relative pose generated by the image data, so as to ensure the modeling accuracy of the indoor scene, so that the Dibao robot can more accurately plan the cleaning path according to the generated map .
在另一个具体应用场景中,地宝机器人可以直接对采集的图像数据和惯性测量数据进行处理,从而进行室内场景重建,并可以将重建得到的室内模型或者室内地图存储在本地。后续,用户可以通过APP直接查看地宝机器人中存储的室内地图,并向地宝机器人下达区域清扫指令。In another specific application scenario, the Dibao robot can directly process the collected image data and inertial measurement data to reconstruct the indoor scene, and can store the reconstructed indoor model or indoor map locally. Later, the user can directly view the indoor map stored in the Dibao robot through the APP, and issue an area cleaning instruction to the Dibao robot.
在另一个具体应用场景中,自动驾驶车辆可以通过采集行驶路径中的图像数据和车辆自身的惯性测量数据,从而进行行驶路径周边的三维场景重建,并可以基于重建的场景进行路径规划和导航。在车辆行驶过程中,很可能会遇到亮度突变的情况。例如,车辆可能会从阴影下行驶至阳光中,在这种情况下,基于图像数据生成的相对位姿误差会较大,此时可以利用惯性测量数据生成的相对位姿进行位姿校正,从而使得重建的三维场景更加准确,进而保证路径规划的准确性和自动驾驶的安全性。In another specific application scenario, an autonomous vehicle can reconstruct the three-dimensional scene around the driving path by collecting image data in the driving path and the vehicle's own inertial measurement data, and can perform path planning and navigation based on the reconstructed scene. During the driving of the vehicle, it is likely to encounter a sudden change in brightness. For example, the vehicle may drive from the shadow to the sunlight. In this case, the relative pose error generated based on the image data will be large. In this case, the relative pose generated by the inertial measurement data can be used to perform the pose correction. This makes the reconstructed 3D scene more accurate, thereby ensuring the accuracy of path planning and the safety of autonomous driving.
在另一个具体应用场景中,当用户戴着虚拟现实眼镜玩游戏时,虚拟现实眼睛可以同时采集用户所处环境中的图像数据以及用户运动时产生的惯性测量数据,并且虚拟现实眼睛可以基于采集到的数据进行用户所处环境的重建。用户在玩游戏过程中,很可能会突然转身或者大幅度移动,此时,图像数据的相邻图像帧之间差异较大,基于图像数据生成的位姿可能会不够准确。因此,可以结合惯性测量数据生成的相对位姿,对图像数据生成的相对位姿进行校正,从而保证室内场景的建模精度。In another specific application scenario, when the user is playing games with virtual reality glasses, the virtual reality eyes can simultaneously collect image data in the user’s environment and the inertial measurement data generated when the user moves, and the virtual reality eyes can be based on the collection The obtained data reconstructs the user's environment. The user may suddenly turn around or move by a large amount while playing the game. At this time, the difference between adjacent image frames of the image data is large, and the pose generated based on the image data may not be accurate enough. Therefore, the relative pose generated by the image data can be corrected in combination with the relative pose generated by the inertial measurement data, so as to ensure the modeling accuracy of the indoor scene.
请参阅图4,本申请还提供一种场景重建系统,所述系统包括:Please refer to Fig. 4, this application also provides a scene reconstruction system, which includes:
环境状态获取单元,用于获取当前的环境状态;The environmental state obtaining unit is used to obtain the current environmental state;
位姿选择单元,用于根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。The pose selection unit is used to select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose; Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
在一个实施方式中,如果当前环境状态稳定,将当前的第一位姿作为适用于所述当前时刻的位姿;如果当前环境状态非稳定,将当前的第二位姿作为适用于所述当前时刻的位姿。In one embodiment, if the current environment state is stable, the current first pose is used as the pose applicable to the current moment; if the current environment state is not stable, the current second pose is used as the current pose applicable to the current The pose of the moment.
在一个实施方式中,环境状态获取单元包括:In one embodiment, the environmental state acquisition unit includes:
图像帧读取模块,用于在所述图像数据中读取当前时刻的图像帧,并读取位于所述当前时刻的图像帧之前且与所述当前时刻的图像帧相邻的目标图像帧;An image frame reading module, configured to read the image frame at the current moment in the image data, and read the target image frame located before the image frame at the current moment and adjacent to the image frame at the current moment;
匹配残差计算模块,用于计算当前时刻的图像帧与目标图像帧之间的匹配残差,并根据匹配残差获得当前的环境状态。The matching residual calculation module is used to calculate the matching residual between the image frame at the current moment and the target image frame, and obtain the current environmental state according to the matching residual.
在一个实施方式中,匹配残差计算模块包括:In one embodiment, the matching residual calculation module includes:
像素差值计算模块,用于计算所述当前时刻的图像帧和所述目标图像帧中相互映射的像素点之间的像素差值。The pixel difference calculation module is used to calculate the pixel difference between the pixel points mapped to each other in the image frame at the current moment and the target image frame.
在一个实施方式中,如果两帧之间的像素差值大于或者等于预设像素差值,则当前环境状态不稳定;如果两帧之间的像素差值小于预设像素差值,则当前环境状态稳定。In one embodiment, if the pixel difference between two frames is greater than or equal to the preset pixel difference, the current environment state is unstable; if the pixel difference between the two frames is less than the preset pixel difference, the current environment The state is stable.
在一个实施方式中,所述位姿选择单元包括:In one embodiment, the pose selection unit includes:
位姿差值计算模块,用于当两帧之间的像素差值小于预设像素差值时,计算当前时刻的图像帧的位姿和目标图像帧的位姿差值;The pose difference calculation module is used to calculate the pose difference of the image frame at the current moment and the target image frame when the pixel difference between the two frames is less than the preset pixel difference;
位姿判断模块,用于如果两者位姿差值大于或者等于预设位姿差值,则判定当前时刻的图像帧的位姿为待验证位姿;如果两帧之间的像素差值小于预设位姿差值,则判定当前时刻的图像帧的位姿正确。The pose judgment module is used to determine the pose of the image frame at the current moment as the pose to be verified if the difference between the two poses is greater than or equal to the preset pose difference; if the pixel difference between the two frames is less than The preset pose difference value determines that the pose of the image frame at the current moment is correct.
在一个实施方式中,所述位姿选择单元还包括:In an embodiment, the pose selection unit further includes:
差值比较模块,用于如果当前时刻的图像帧的位姿为待验证位姿,则比较当前时刻的第一位姿与第二位姿,若两者的差值大于或者等于指定差值阈值,则将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。Difference comparison module, used to compare the first pose and the second pose at the current moment if the pose of the image frame at the current moment is the pose to be verified, if the difference between the two is greater than or equal to the specified difference threshold , The current second pose is taken as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, the current first pose is taken as the pose applicable to the current moment Posture.
在一个实施方式中,所述位姿选择单元包括:In one embodiment, the pose selection unit includes:
位姿比较模块,用于如果当前环境不稳定,比较当前时刻的第一位姿与第二位姿;The pose comparison module is used to compare the first pose and the second pose at the current moment if the current environment is unstable;
位姿确定模块,用于若两者的差值大于或者等于指定差值阈值,则将当 前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。The pose determination module is configured to, if the difference between the two is greater than or equal to the specified difference threshold, use the current second pose as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold For the difference threshold, the current first pose is taken as the pose applicable to the current moment.
请参阅图5,本申请还提供一种场景重建装置,所述场景重建装置包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,用于实现以下功能:Referring to FIG. 5, the present application also provides a scene reconstruction device. The scene reconstruction device includes a memory and a processor. The memory is used to store a computer program. When the computer program is executed by the processor, it is used to implement The following functions:
获取当前的环境状态;Get the current environmental status;
根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose;
其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
本申请还提供一种扫地机器人,所述扫地机器人包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,用于实现以下功能:The present application also provides a cleaning robot, which includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the following functions:
获取当前的环境状态;Get the current environmental status;
根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose;
其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
在本实施方式中,所述存储器可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方法的媒体加以存储。该存储器可以包括:利用电能方式存储信息的装置,如RAM、ROM等;利用磁能方式存储信息的装置,如硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的装置,如CD或DVD。当然,还有其他方式的存储器,例如量子存储器、石墨烯存储器等等。In this embodiment, the memory may include a physical device for storing information, which is usually digitized and then stored in a medium using electrical, magnetic, or optical methods. The memory may include: devices that use electrical energy to store information, such as RAM, ROM, etc.; devices that use magnetic energy to store information, such as hard disks, floppy disks, magnetic tapes, magnetic core memories, bubble memory, and U disks; use optical methods to store information Device such as CD or DVD. Of course, there are other types of memory, such as quantum memory, graphene memory, and so on.
在本实施方式中,所述处理器可以按任何适当的方式实现。例如,所述处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、 专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。In this embodiment, the processor can be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (for example, software or firmware) executable by the (micro)processor, logic gates, switches, special-purpose integrated Circuit (Application Specific Integrated Circuit, ASIC), programmable logic controller and embedded microcontroller form, etc.
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
由上可见,本申请一个或者多个实施方式提供的技术方案,在进行场景重建时,可以获取当前的环境状态,该环境状态可以比较准确地体现室内场景。在某些环境状态下,比如在亮度突变、视觉信息不够明显等情况下,依赖图像数据生成的位姿会发生比较大的错误,此时,可以采用惯性测量单元中的惯性测量数据生成的位姿,从而使得生成的三维模型比较准确。由于图像数据能够准确地表征室内场景,但图像数据容易受到外界环境影响,而惯性测量数据只与设备自身的运动状态有关,其生成的位姿不会受到外界环境影响,因此结合这两种数据进行场景重建,能够保证较高的准确性和鲁棒性。It can be seen from the above that the technical solutions provided by one or more embodiments of the present application can obtain the current environmental state during scene reconstruction, and the environmental state can more accurately reflect the indoor scene. Under certain environmental conditions, such as sudden changes in brightness, insufficient visual information, etc., relatively large errors may occur in the pose generated by the image data. At this time, the position generated by the inertial measurement data in the inertial measurement unit can be used. Pose, so that the generated three-dimensional model is more accurate. Because image data can accurately characterize indoor scenes, but image data is easily affected by the external environment, and the inertial measurement data is only related to the motion state of the device itself, and the generated pose will not be affected by the external environment, so the two types of data are combined Reconstruction of the scene can ensure high accuracy and robustness.
本领域内的技术人员应明白,本发明的实施方式可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施方式、完全软件实施方式、或结合软件和硬件方面的实施方式的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt a form of a complete hardware implementation, a complete software implementation, or a combination of software and hardware implementations. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本发明是参照根据本发明实施方式的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
以上所述仅为本申请的实施方式而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only the implementation manners of this application, and are not intended to limit this application. For those skilled in the art, this application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.

Claims (21)

  1. 一种场景重建方法,其特征在于,所述方法包括:A scene reconstruction method, characterized in that the method includes:
    获取当前的环境状态;Get the current environmental status;
    根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose;
    其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  2. 根据权利要求1所述的方法,其特征在于,如果当前环境状态稳定,将当前的第一位姿作为适用于所述当前时刻的位姿;如果当前环境状态非稳定,将当前的第二位姿作为适用于所述当前时刻的位姿。The method according to claim 1, wherein if the current environment state is stable, the current first pose is used as the pose applicable to the current moment; if the current environment state is not stable, the current second pose The pose is the pose applicable to the current moment.
  3. 根据权利要求1所述的方法,其特征在于,所述图像数据从图像传感器中获取,所述惯性测量数据从惯性测量单元中获取。The method according to claim 1, wherein the image data is obtained from an image sensor, and the inertial measurement data is obtained from an inertial measurement unit.
  4. 根据权利要求1所述的方法,其特征在于,从图像数据获得当前的环境状态。The method according to claim 1, wherein the current environmental state is obtained from image data.
  5. 根据权利要求4所述的方法,其特征在于,所述从图像数据获得当前的环境状态,包括:The method according to claim 4, wherein the obtaining the current environmental state from the image data comprises:
    在所述图像数据中读取当前时刻的图像帧,并读取位于所述当前时刻的图像帧之前且与所述当前时刻的图像帧相邻的目标图像帧;Reading the image frame at the current moment in the image data, and reading the target image frame located before the image frame at the current moment and adjacent to the image frame at the current moment;
    计算当前时刻的图像帧与目标图像帧之间的匹配残差,并根据匹配残差获得当前的环境状态。Calculate the matching residual between the image frame at the current moment and the target image frame, and obtain the current environmental state according to the matching residual.
  6. 根据权利要求5所述的方法,其特征在于,所述计算当前时刻的图像帧与目标图像帧之间的匹配残差包括:The method according to claim 5, wherein the calculating the matching residual between the image frame at the current moment and the target image frame comprises:
    计算所述当前时刻的图像帧和所述目标图像帧中相互映射的像素点之间的像素差值。Calculate the pixel difference between the pixel points mapped to each other in the image frame at the current moment and the target image frame.
  7. 根据权利要求6所述的方法,其特征在于,所述图像数据包括彩色图像和深度图像,所述像素差值包括亮度差值和/或深度差值。The method according to claim 6, wherein the image data includes a color image and a depth image, and the pixel difference value includes a brightness difference value and/or a depth difference value.
  8. 根据权利要求6所述的方法,其特征在于,如果两帧之间的像素差值大于或者等于预设像素差值,则当前环境状态不稳定;如果两帧之间的像素差值小于预设像素差值,则当前环境状态稳定。The method according to claim 6, wherein if the pixel difference between the two frames is greater than or equal to the preset pixel difference, the current environment state is unstable; if the pixel difference between the two frames is less than the preset pixel difference Pixel difference, the current environment state is stable.
  9. 根据权利要求8所述的方法,其特征在于,当两帧之间的像素差值小于预设像素差值时,计算当前时刻的图像帧的位姿和目标图像帧的位姿差值,如果两者位姿差值大于或者等于预设位姿差值,则当前时刻的图像帧的位姿为待验证位姿;如果两帧之间的像素差值小于预设位姿差值,则当前时刻的图像帧的位姿正确。8. The method according to claim 8, wherein when the pixel difference between the two frames is less than the preset pixel difference, the pose difference between the current image frame and the target image frame is calculated, if If the difference between the two poses is greater than or equal to the preset pose difference, the pose of the image frame at the current moment is the pose to be verified; if the pixel difference between the two frames is less than the preset pose difference, the current The pose of the image frame at the moment is correct.
  10. 根据权利要求9所述的方法,其特征在于,如果当前时刻的图像帧的位姿为待验证位姿,则比较当前时刻的第一位姿与第二位姿,若两者的差值大于或者等于指定差值阈值,则将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。The method according to claim 9, wherein if the pose of the image frame at the current moment is the pose to be verified, the first pose and the second pose at the current moment are compared, and if the difference between the two is greater than Or equal to the specified difference threshold, the current second pose is taken as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, the current first pose is used as the applicable The pose at the current moment.
  11. 根据权利要求2或8所述的方法,其特征在于,如果当前环境不稳定,比较当前时刻的第一位姿与第二位姿,若两者的差值大于或者等于指定差值阈值,则将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。The method according to claim 2 or 8, wherein if the current environment is unstable, compare the first pose and the second pose at the current moment, and if the difference between the two is greater than or equal to the specified difference threshold, then Use the current second pose as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, use the current first pose as the pose applicable to the current moment .
  12. 一种场景重建系统,其特征在于,所述系统包括:A scene reconstruction system, characterized in that the system includes:
    环境状态获取单元,用于获取当前的环境状态;The environmental state obtaining unit is used to obtain the current environmental state;
    位姿选择单元,用于根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。The pose selection unit is used to select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose; Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  13. 根据权利要求12所述的系统,其特征在于,如果当前环境状态稳定,将当前的第一位姿作为适用于所述当前时刻的位姿;如果当前环境状态非稳定,将当前的第二位姿作为适用于所述当前时刻的位姿。The system according to claim 12, characterized in that if the current environment state is stable, the current first pose is used as the pose applicable to the current moment; if the current environment state is not stable, the current second pose is used The pose is the pose applicable to the current moment.
  14. 根据权利要求12所述的系统,其特征在于,环境状态获取单元包括:The system according to claim 12, wherein the environmental state acquiring unit comprises:
    图像帧读取模块,用于在所述图像数据中读取当前时刻的图像帧,并读取位于所述当前时刻的图像帧之前且与所述当前时刻的图像帧相邻的目标图像帧;An image frame reading module, configured to read the image frame at the current moment in the image data, and read the target image frame located before the image frame at the current moment and adjacent to the image frame at the current moment;
    匹配残差计算模块,用于计算当前时刻的图像帧与目标图像帧之间的匹配残差,并根据匹配残差获得当前的环境状态。The matching residual calculation module is used to calculate the matching residual between the image frame at the current moment and the target image frame, and obtain the current environmental state according to the matching residual.
  15. 根据权利要求14所述的系统,其特征在于,匹配残差计算模块包括:The system according to claim 14, wherein the matching residual calculation module comprises:
    像素差值计算模块,用于计算所述当前时刻的图像帧和所述目标图像帧中相互映射的像素点之间的像素差值。The pixel difference calculation module is used to calculate the pixel difference between the pixel points mapped to each other in the image frame at the current moment and the target image frame.
  16. 根据权利要求15所述的系统,其特征在于,如果两帧之间的像素差值大于或者等于预设像素差值,则当前环境状态不稳定;如果两帧之间的像素差值小于预设像素差值,则当前环境状态稳定。The system according to claim 15, wherein if the pixel difference between the two frames is greater than or equal to the preset pixel difference, the current environment state is unstable; if the pixel difference between the two frames is less than the preset pixel difference Pixel difference, the current environment state is stable.
  17. 根据权利要求16所述的系统,其特征在于,所述位姿选择单元包括:The system according to claim 16, wherein the pose selection unit comprises:
    位姿差值计算模块,用于当两帧之间的像素差值小于预设像素差值时,计算当前时刻的图像帧的位姿和目标图像帧的位姿差值;The pose difference calculation module is used to calculate the pose difference of the image frame at the current moment and the target image frame when the pixel difference between the two frames is less than the preset pixel difference;
    位姿判断模块,用于如果两者位姿差值大于或者等于预设位姿差值,则判定当前时刻的图像帧的位姿为待验证位姿;如果两帧之间的像素差值小于预设位姿差值,则判定当前时刻的图像帧的位姿正确。The pose judgment module is used to determine that the pose of the image frame at the current moment is the pose to be verified if the difference between the two poses is greater than or equal to the preset pose difference; if the pixel difference between the two frames is less than The preset pose difference value determines that the pose of the image frame at the current moment is correct.
  18. 根据权利要求17所述的系统,其特征在于,所述位姿选择单元还包括:The system according to claim 17, wherein the pose selection unit further comprises:
    差值比较模块,用于如果当前时刻的图像帧的位姿为待验证位姿,则比较当前时刻的第一位姿与第二位姿,若两者的差值大于或者等于指定差值阈值,则将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。Difference comparison module, used to compare the first pose and the second pose at the current moment if the pose of the image frame at the current moment is the pose to be verified, if the difference between the two is greater than or equal to the specified difference threshold , The current second pose is taken as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold, the current first pose is taken as the pose applicable to the current moment Posture.
  19. 根据权利要求13或16所述的系统,其特征在于,所述位姿选择单元包括:The system according to claim 13 or 16, wherein the pose selection unit comprises:
    位姿比较模块,用于如果当前环境不稳定,比较当前时刻的第一位姿与第二位姿;The pose comparison module is used to compare the first pose and the second pose at the current moment if the current environment is unstable;
    位姿确定模块,用于若两者的差值大于或者等于指定差值阈值,则将当前的第二位姿作为适用于所述当前时刻的位姿;若两者的差值小于所述指定差值阈值,则将当前的第一位姿作为适用于所述当前时刻的位姿。The pose determination module is configured to, if the difference between the two is greater than or equal to the specified difference threshold, use the current second pose as the pose applicable to the current moment; if the difference between the two is less than the specified difference threshold For the difference threshold, the current first pose is taken as the pose applicable to the current moment.
  20. 一种场景重建装置,其特征在于,所述场景重建装置包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,用于实现以下功能:A scene reconstruction device, characterized in that the scene reconstruction device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the following functions:
    获取当前的环境状态;Get the current environmental status;
    根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose;
    其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
  21. 一种扫地机器人,其特征在于,所述扫地机器人包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,用于实现以下功能:A sweeping robot, characterized in that the sweeping robot includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the following functions:
    获取当前的环境状态;Get the current environmental status;
    根据当前的环境状态选择第一位姿或第二位姿作为适用于当前时刻的位姿,并根据选择的第一位姿和/或第二位姿建立场景模型;Select the first pose or the second pose as the pose suitable for the current moment according to the current environment state, and establish a scene model according to the selected first pose and/or second pose;
    其中,第一位姿为当前时刻的图像数据对应的位姿,第二位姿为当前时刻的惯性测量数据对应的位姿。Among them, the first pose is the pose corresponding to the image data at the current moment, and the second pose is the pose corresponding to the inertial measurement data at the current moment.
PCT/CN2020/115921 2020-03-23 2020-09-17 Scenario reconstruction method, system and apparatus, and sweeping robot WO2021189784A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010207310.6 2020-03-23
CN202010207310.6A CN113436309A (en) 2020-03-23 2020-03-23 Scene reconstruction method, system and device and sweeping robot

Publications (1)

Publication Number Publication Date
WO2021189784A1 true WO2021189784A1 (en) 2021-09-30

Family

ID=77752467

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/115921 WO2021189784A1 (en) 2020-03-23 2020-09-17 Scenario reconstruction method, system and apparatus, and sweeping robot

Country Status (2)

Country Link
CN (1) CN113436309A (en)
WO (1) WO2021189784A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402826A (en) * 2023-06-09 2023-07-07 深圳市天趣星空科技有限公司 Visual coordinate system correction method, device, equipment and storage medium
CN116758157A (en) * 2023-06-14 2023-09-15 深圳市华赛睿飞智能科技有限公司 Unmanned aerial vehicle indoor three-dimensional space mapping method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140333741A1 (en) * 2013-05-08 2014-11-13 Regents Of The University Of Minnesota Constrained key frame localization and mapping for vision-aided inertial navigation
CN105953798A (en) * 2016-04-19 2016-09-21 深圳市神州云海智能科技有限公司 Determination method and apparatus for poses of mobile robot
CN109431381A (en) * 2018-10-29 2019-03-08 北京石头世纪科技有限公司 Localization method and device, electronic equipment, the storage medium of robot
CN109947886A (en) * 2019-03-19 2019-06-28 腾讯科技(深圳)有限公司 Image processing method, device, electronic equipment and storage medium
CN109978931A (en) * 2019-04-04 2019-07-05 北京悉见科技有限公司 Method for reconstructing three-dimensional scene and equipment, storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140333741A1 (en) * 2013-05-08 2014-11-13 Regents Of The University Of Minnesota Constrained key frame localization and mapping for vision-aided inertial navigation
CN105953798A (en) * 2016-04-19 2016-09-21 深圳市神州云海智能科技有限公司 Determination method and apparatus for poses of mobile robot
CN109431381A (en) * 2018-10-29 2019-03-08 北京石头世纪科技有限公司 Localization method and device, electronic equipment, the storage medium of robot
CN109947886A (en) * 2019-03-19 2019-06-28 腾讯科技(深圳)有限公司 Image processing method, device, electronic equipment and storage medium
CN109978931A (en) * 2019-04-04 2019-07-05 北京悉见科技有限公司 Method for reconstructing three-dimensional scene and equipment, storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402826A (en) * 2023-06-09 2023-07-07 深圳市天趣星空科技有限公司 Visual coordinate system correction method, device, equipment and storage medium
CN116402826B (en) * 2023-06-09 2023-09-26 深圳市天趣星空科技有限公司 Visual coordinate system correction method, device, equipment and storage medium
CN116758157A (en) * 2023-06-14 2023-09-15 深圳市华赛睿飞智能科技有限公司 Unmanned aerial vehicle indoor three-dimensional space mapping method, system and storage medium
CN116758157B (en) * 2023-06-14 2024-01-30 深圳市华赛睿飞智能科技有限公司 Unmanned aerial vehicle indoor three-dimensional space mapping method, system and storage medium

Also Published As

Publication number Publication date
CN113436309A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN109084732B (en) Positioning and navigation method, device and processing equipment
US11747823B2 (en) Monocular modes for autonomous platform guidance systems with auxiliary sensors
KR101776622B1 (en) Apparatus for recognizing location mobile robot using edge based refinement and method thereof
KR101725060B1 (en) Apparatus for recognizing location mobile robot using key point based on gradient and method thereof
JP6198230B2 (en) Head posture tracking using depth camera
US11050994B2 (en) Virtual reality parallax correction
KR101776620B1 (en) Apparatus for recognizing location mobile robot using search based correlative matching and method thereof
CN112686877B (en) Binocular camera-based three-dimensional house damage model construction and measurement method and system
WO2021189784A1 (en) Scenario reconstruction method, system and apparatus, and sweeping robot
JPWO2015145543A1 (en) Object detection apparatus, object detection method, and mobile robot
US20210407189A1 (en) Information processing apparatus, information processing method, and program
CN113137968B (en) Repositioning method and repositioning device based on multi-sensor fusion and electronic equipment
CN111220155A (en) Method, device and processor for estimating pose based on binocular vision inertial odometer
US20220351400A1 (en) Information processing apparatus, information processing method, and information processing program
WO2021189783A1 (en) Scene building method, system and device, and self-moving robot
EP3676801B1 (en) Electronic devices, methods, and computer program products for controlling 3d modeling operations based on pose metrics
CN110046554A (en) A kind of face alignment method and camera
CN114862953A (en) Mobile robot repositioning method and device based on visual features and 3D laser
CN111141274A (en) Robot automatic positioning and navigation method based on computer vision
CN111738085A (en) System construction method and device for realizing automatic driving and simultaneously positioning and mapping
Nalpantidis et al. Obtaining reliable depth maps for robotic applications from a quad-camera system
Wang et al. Self-Supervised Learning of Depth and Camera Motion from 360 {\deg} Videos
CN117007037A (en) Pose estimation method and device of mobile robot, mobile robot and medium
CN116051767A (en) Three-dimensional map construction method and related equipment
CN115619851A (en) Anchor point-based VSLAM (virtual local area network) rear-end optimization method, device, medium, equipment and vehicle

Legal Events

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

Ref document number: 20926567

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20926567

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20926567

Country of ref document: EP

Kind code of ref document: A1