WO2023173572A1 - Real-time panoramic imaging method and device for underwater cleaning robot - Google Patents

Real-time panoramic imaging method and device for underwater cleaning robot Download PDF

Info

Publication number
WO2023173572A1
WO2023173572A1 PCT/CN2022/092839 CN2022092839W WO2023173572A1 WO 2023173572 A1 WO2023173572 A1 WO 2023173572A1 CN 2022092839 W CN2022092839 W CN 2022092839W WO 2023173572 A1 WO2023173572 A1 WO 2023173572A1
Authority
WO
WIPO (PCT)
Prior art keywords
real
time
cleaning robot
panoramic imaging
matrix
Prior art date
Application number
PCT/CN2022/092839
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 WO2023173572A1 publication Critical patent/WO2023173572A1/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
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/61Scene description
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/80Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in fisheries management
    • Y02A40/81Aquaculture, e.g. of fish
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Definitions

  • the invention belongs to the field of panoramic imaging, and specifically relates to a real-time panoramic imaging method and device for an underwater cleaning robot.
  • the jacket is an indispensable support structure for most offshore oil platforms. It has been immersed in seawater for a long time and has become a breeding ground for the reproduction and growth of marine life. A large number of marine organisms such as oysters and barnacles grow on the surface of the jacket. These marine organisms adhere to the surface of the jacket. During their metabolism, they produce various chemical substances, and the acids among them have a great impact on the jacket. The corrosive nature of the jacket reduces the service life of the jacket. In order to alleviate the adverse effects of marine organisms on the jacket, it is crucial to regularly clean the marine organisms attached to the surface of the jacket on offshore oil platforms.
  • Underwater cleaning robots can regularly clean marine organisms attached to the surface of the jacket of offshore oil platforms.
  • existing underwater cleaning robots use a reflective panoramic imaging system.
  • image information such as the robot's position and posture on the pipeline can be obtained.
  • this method encounters big problems in practice.
  • the field of view seen by the robot through the reflector is very small, and it can only observe image information within 20cm around the machine.
  • installing a reflector on the top of the cleaning robot will cause the height of the whole machine to be high. When encountering a surge, the cleaning robot will be subject to a large impact, which may easily cause the robot to detach from the wall, fall into the sea, and other dangerous situations. , the robot's obstacle-crossing performance and cross-pipe performance also have great limitations.
  • Three-dimensional panoramic imaging technology is used to replace the mirror method to solve the above problems.
  • Three-dimensional panoramic imaging technology shoots existing scenes from multiple angles, stitches and fuses multiple pictures, and finally projects them onto a curved surface to create an effect similar to the real world.
  • Three-dimensional panoramic imaging technology is mainly divided into two types: columnar panorama and spherical 360° panorama.
  • Cylindrical panorama projects the panoramic picture taken along the horizontal direction onto a cylindrical plane, and then places the perspective inside the cylinder to achieve the purpose of horizontal panorama.
  • the spherical 360° panorama uses multi-angle panoramic shooting along the horizontal and vertical directions.
  • the final imaging surface is a sphere, that is, a projection surface with countless symmetry axes, which expands the imaging perspective.
  • the projection surface is only symmetrical with respect to the x-axis and y-axis.
  • the perspectives of each camera of the cleaning robot are different, and the mapping relationship between the camera and the three-dimensional model is also different.
  • the purpose of the present invention is to provide a real-time panoramic imaging method and device for an underwater cleaning robot.
  • the posture of the cleaning robot on the pipeline in real time and adjusting the texture mapping relationship in real time according to the posture, the image texture can be corrected.
  • the embodiment provides a real-time panoramic imaging method for an underwater cleaning robot, which includes the following steps:
  • the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
  • the constructed projection curved surface is a curved surface formed by intercepting the hemispherical curved surface with a cylinder.
  • the height of the cylinder is parallel to the diameter of the hemispherical curved surface.
  • the EDLines algorithm is used to perform catheter edge detection on the stitched panorama, and a threshold detection method is used for the detected line segments to filter long line segments as real-time catheter edge lines.
  • images from four directions collected by four cameras are acquired in real time, and the four images are spliced to obtain a stitched panorama.
  • a cleaning robot model is built in the three-dimensional projection curved surface. After obtaining the real-time rotation angle, the position and posture of the cleaning robot model is adjusted according to the real-time rotation angle to obtain a complete real-time panoramic view.
  • a real-time panoramic imaging device for an underwater cleaning robot including:
  • the three-dimensional projection surface building module is used to construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline;
  • the stitching panorama building module is used to obtain multi-angle images collected by the camera on the cleaning robot in real time, and stitch the multi-angle images to obtain a stitched panorama;
  • the edge detection module is used to perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
  • the real-time rotation angle calculation module is used to construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation contained in the homography matrix. angle;
  • the panoramic imaging module is used to retrieve the texture mapping matrix corresponding to the real-time rotation angle from the texture mapping library according to the real-time rotation angle, and map the splicing map to the three-dimensional projection surface based on the texture mapping matrix to achieve panoramic imaging.
  • the beneficial effects of the present invention include at least:
  • the real-time catheter edge line is obtained through edge detection. Based on the mapping relationship between the pixels of the real-time catheter edge line and the reference catheter edge line on the homography matrix, a transformation equation is constructed. By solving Transform the equation to obtain the real-time rotation angle, and use the pre-built texture mapping library to call the corresponding texture mapping matrix for panoramic imaging, which can improve the efficiency and accuracy of panoramic imaging of ocean jacket scenes.
  • Figure 1 is a flow chart of the real-time panoramic imaging method of the underwater cleaning robot provided by the embodiment
  • Figure 2 is a three-dimensional projection curved surface provided by the embodiment
  • Figure 3 is a schematic diagram of catheter edge detection provided by the embodiment, in which (a) is a spliced panorama, (b) is an edge detection result diagram, (c) is a threshold screening detection catheter straight line, and (d) is a real-time catheter edge line ;
  • Figure 4 is the dimensional relationship of robots in different states provided by the embodiment
  • FIG. 5 is a schematic structural diagram of the real-time panoramic imaging device of the underwater cleaning robot provided by the embodiment.
  • the embodiment provides a real-time panoramic imaging method for an underwater cleaning robot.
  • FIG. 1 is a flow chart of the real-time panoramic imaging method of an underwater cleaning robot provided by the embodiment. As shown in Figure 1, the real-time panoramic imaging method of an underwater cleaning robot provided by the embodiment includes the following steps:
  • Step 1 Construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline.
  • the cleaning robot is equipped with multiple cameras for collecting images. Specifically, the cameras can be distributed in four directions, front, rear, left and right, for collecting images from different angles.
  • the cleaning robot crawls on the marine conduit. Marine conduits are generally cylindrical, so the constructed projection surface is based on the hemispherical surface and is formed by intercepting the hemispherical surface with a cylinder, as shown in Figure 2.
  • the specific construction process is:
  • the projection surface is composed of the following formula, which is used to draw the cylindrical texture:
  • i, j are the sequence of surface nodes, (x, y, z) are the spatial coordinates of the projected surface, r is the cylinder radius, h is the cylinder height, m 1 is the number of axial vertices, and n 1 is The number of vertices in the circumferential direction.
  • the projection surface is composed of the following formula, which is used to draw spherical texture:
  • R is the radius of the sphere
  • r 1 is the radius of the curved surface circle at a certain height, and is given by Calculated
  • m is the number of longitude lines
  • n 2 is the number of latitudinal lines.
  • Step 2 Acquire multiple images collected by the camera on the cleaning robot in real time, and stitch the multiple images to obtain a stitched panorama.
  • multi-threading is used to control multiple cameras to simultaneously collect multiple images. It should be noted that during the actual acquisition process, the angles between the multiple cameras and the catheter are the same to ensure the accuracy of the stitched panorama.
  • the angle can be set to 45°, 60°, 120° and 135°, and the stitched panorama obtained from different angles will be different.
  • two-dimensional panoramic imaging technology is used to stitch multiple images to form a stitched panorama. Specifically, it includes: camera distortion correction, local feature point detection, feature point matching, image splicing, and seam melting processing on multiple images to obtain a spliced panorama.
  • Step 3 Perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines.
  • the EDLines algorithm is used to detect the edge of the catheter on the spliced panorama. After detecting the edge points, the straightness criterion and the least squares straight line fitting method are used to extract line segments from the generated pixel chain. Then, the line segments are obtained based on the detection.
  • the line segments use threshold detection method to filter long line segments as real-time catheter edge lines, as shown in Figure 3. This edge detection method is fast and highly accurate.
  • Step 4 Construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation angle contained in the homography matrix.
  • the angle between the camera and the catheter can be obtained through homography transformation, and the position and posture of the cleaning robot on the catheter and the texture mapping matrix in three-dimensional imaging can be adjusted. This achieves the purpose of displaying panoramic images in real time.
  • the constructed transformation equation is:
  • q b represents the pixel coordinates on the real-time catheter edge line
  • q a represents the pixel coordinates on the reference edge line
  • H ba represents the homography matrix
  • the rotation of the two cameras corresponding to pixel plane b and pixel plane a Matrix R ba and translation matrix t ab two camera intrinsic parameter matrices Ka and K b
  • pixel plane parameters ( d a ) consisting of, where, Represents the transpose of the normal vector of the pixel plane a, d a represents the distance to the pole in polar coordinates
  • H ba is:
  • R c is the radius of the conduit
  • r is the wheel diameter of the cleaning robot
  • W is the axial distance between the left wheel and the right wheel of the cleaning robot
  • the only variable in the z max formula is the catheter radius R c .
  • K a and K b are the internal parameter matrices of the camera, expressed as:
  • f xa , f xb , f ya , f yb are the focal length parameters of the camera
  • u 0a , v 0a , u 0b , v 0b are the main point displacement vectors.
  • the focal length parameters f x and f y of the two cameras are both Equal to 1, the displacement vector u 0a , v 0a , u 0b , v 0b is half the length and width of the spliced panorama;
  • ⁇ , ⁇ , and ⁇ represent the rotation angles in the x, y, and z directions respectively.
  • Step 5 According to the real-time rotation angle, the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
  • the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library according to the real-time rotation angle, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
  • the texture mapping matrix in the texture mapping library is mapped through the OpenGL texture mapping principle.
  • the texture mapping process includes: before texture mapping, the mapping relationship between three-dimensional points and pixels needs to be established. The mapping relationship between them is achieved through texture coordinates.
  • texture coordinates By specifying the texture coordinates of several key points on a three-dimensional model, a one-to-one correspondence between three-dimensional points and two-dimensional pixels is achieved, and the remaining points are interpolated through the fragment shader to achieve complete mapping of the image.
  • the value range of texture coordinates is 0 ⁇ 1, and the lower left corner of the texture image is the origin of texture coordinates.
  • a cleaning robot model is also built in the three-dimensional projection surface. After obtaining the real-time rotation angle, the position and posture of the cleaning robot model are adjusted according to the real-time rotation angle to obtain a complete real-time panoramic view.
  • the real-time panoramic imaging method of the underwater cleaning robot detects the posture of the cleaning robot on the pipeline in real time, and adjusts the texture mapping relationship in real time according to the posture to correctly map the image texture onto the projection surface, thereby realizing the vision in the ocean.
  • Panoramic imaging of jacket scenes detects the posture of the cleaning robot on the pipeline in real time, and adjusts the texture mapping relationship in real time according to the posture to correctly map the image texture onto the projection surface, thereby realizing the vision in the ocean.
  • FIG. 5 is a schematic structural diagram of the real-time panoramic imaging device of the underwater cleaning robot provided by the embodiment. As shown in Figure 5, the real-time panoramic imaging device provided by the embodiment includes:
  • the three-dimensional projection surface building module is used to construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline;
  • the stitching panorama building module is used to obtain multi-angle images collected by the camera on the cleaning robot in real time, and stitch the multi-angle images to obtain a stitched panorama;
  • the edge detection module is used to perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
  • the real-time rotation angle calculation module is used to construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation contained in the homography matrix. angle;
  • the panoramic imaging module is used to retrieve the texture mapping matrix corresponding to the real-time rotation angle from the texture mapping library according to the real-time rotation angle, and map the splicing map to the three-dimensional projection surface based on the texture mapping matrix to achieve panoramic imaging.
  • the real-time panoramic imaging device of the underwater cleaning robot provided in the above embodiment performs real-time panoramic imaging
  • the division of the above functional modules should be used as an example.
  • the above functions can be allocated to different functional modules as needed.
  • Complete that is, the internal structure of the terminal or server is divided into different functional modules to complete all or part of the functions described above.
  • the real-time panoramic imaging device of the underwater cleaning robot provided in the above embodiments and the real-time panoramic imaging method embodiment of the underwater cleaning robot belong to the same concept.
  • the real-time panoramic imaging method embodiment of the underwater cleaning robot please refer to the real-time panoramic imaging method embodiment of the underwater cleaning robot. I won’t go into details here.

Abstract

A real-time panoramic imaging method and device for an underwater cleaning robot. The method comprises: constructing a three-dimensional projection curved surface of panoramic imaging on the basis of a working scene of a cleaning robot on a marine conduit; acquiring in real time multi-angle images collected by a camera on the cleaning robot, and splicing the multi-angle images to obtain a spliced panorama; performing conduit edge detection on the spliced panorama to obtain a real-time conduit edge line; constructing a transformation equation on the basis of pixel points on the real-time conduit edge line, a homography matrix, and pixel points on a reference conduit edge line, and solving for the transformation equation to obtain a real-time rotation angle contained in the homography matrix; and calling, from a texture mapping library according to the real-time rotation angle, a texture mapping matrix corresponding to the real-time rotation angle, and mapping the spliced image onto the three-dimensional projection curved surface on the basis of the texture mapping matrix to realize panoramic imaging. The real-time panoramic imaging method and device for the underwater cleaning robot can improve the efficiency and the accuracy of panoramic imaging of marine jacket scenes.

Description

水下清洗机器人的实时全景成像方法和装置Real-time panoramic imaging method and device for underwater cleaning robot 技术领域Technical field
本发明属于全景成像领域,具体涉及一种水下清洗机器人的实时全景成像方法和装置。The invention belongs to the field of panoramic imaging, and specifically relates to a real-time panoramic imaging method and device for an underwater cleaning robot.
背景技术Background technique
海上石油平台作为开采海洋石油气资源的重要装备得到了长足发展。导管架是大多数海上石油平台不可或缺的支撑结构,其长期浸泡在海水中,成为海洋生物繁殖和生长的温床。大量诸如海蛎子、藤壶等海生物生长在导管架表面,这些海生物附着在导管架表面,它们在新陈代谢过程中,会产生各种化学物质,其中的酸类物质对导管架有很大的腐蚀性,导致导管架的使用寿命降低。为了缓解海洋生物对导管架产生的不良影响,对海上石油平台的导管架表面附着的海生物进行定期清洗是至关重要的。Offshore oil platforms have made great progress as important equipment for exploiting offshore oil and gas resources. The jacket is an indispensable support structure for most offshore oil platforms. It has been immersed in seawater for a long time and has become a breeding ground for the reproduction and growth of marine life. A large number of marine organisms such as oysters and barnacles grow on the surface of the jacket. These marine organisms adhere to the surface of the jacket. During their metabolism, they produce various chemical substances, and the acids among them have a great impact on the jacket. The corrosive nature of the jacket reduces the service life of the jacket. In order to alleviate the adverse effects of marine organisms on the jacket, it is crucial to regularly clean the marine organisms attached to the surface of the jacket on offshore oil platforms.
水下清洗机器人能够实现对海上石油平台的导管架表面附着的海生物进行定期清洗。但是现有的水下清洗机器人采用的是反射式全景成像系统,通过在清洗机器人顶部安装一个反射镜方式实现机器人在管道上位姿等图像信息的获取。但是这种方式在实际中遇到了很大的问题,首先,机器人通过反射镜看到的视野范围很小,只能观察到机器周围20cm范围内图像信息。其次,在清洗机器人顶部加装反射镜的方式,会造成整机高度边高,在遇到浪涌情况下,清洗机器人受冲击力大,容易造成机器人脱离壁面、掉落海中等危险情况的发生,机器人的越障性能,跨管性能也有很大的局限性。Underwater cleaning robots can regularly clean marine organisms attached to the surface of the jacket of offshore oil platforms. However, existing underwater cleaning robots use a reflective panoramic imaging system. By installing a reflector on the top of the cleaning robot, image information such as the robot's position and posture on the pipeline can be obtained. However, this method encounters big problems in practice. First, the field of view seen by the robot through the reflector is very small, and it can only observe image information within 20cm around the machine. Secondly, installing a reflector on the top of the cleaning robot will cause the height of the whole machine to be high. When encountering a surge, the cleaning robot will be subject to a large impact, which may easily cause the robot to detach from the wall, fall into the sea, and other dangerous situations. , the robot's obstacle-crossing performance and cross-pipe performance also have great limitations.
采用三维全景成像技术替代反射镜方式以解决上述问题。三维全景成 像技术通过对现有场景进行多角度拍摄,并将多幅图片进行拼接融合,最终投影到一个曲面上,形成一种类似真实世界的效果。三维全景成像技术主要分为柱状全景与球形360°全景两种。柱状全景将沿着水平方向拍摄的环视图片投影到一个柱状的平面上,然后将视角放置在柱体内部,达到水平去全景的目的。球形360°全景在则沿着水平与垂直两个方向进行多角度环视拍摄,最终的成像曲面是一个球形,即是具有无数个对称轴的投影曲面,扩大了成像视角。Three-dimensional panoramic imaging technology is used to replace the mirror method to solve the above problems. Three-dimensional panoramic imaging technology shoots existing scenes from multiple angles, stitches and fuses multiple pictures, and finally projects them onto a curved surface to create an effect similar to the real world. Three-dimensional panoramic imaging technology is mainly divided into two types: columnar panorama and spherical 360° panorama. Cylindrical panorama projects the panoramic picture taken along the horizontal direction onto a cylindrical plane, and then places the perspective inside the cylinder to achieve the purpose of horizontal panorama. The spherical 360° panorama uses multi-angle panoramic shooting along the horizontal and vertical directions. The final imaging surface is a sphere, that is, a projection surface with countless symmetry axes, which expands the imaging perspective.
但是在海洋导管架类场景下,投影面只相对于x轴和y轴对称。当清洗机器人在圆管上处于不同的姿态时,清洗机器人的各个相机视角是是不相同的,相机与三维模型之间的映射关系也是不同的,简单地直接利用建立的投影曲面和全景图像之间的映射关系,是不足以将图像纹理正确地映射到投影曲面,以得到正确全景图像。However, in marine jacket scenarios, the projection surface is only symmetrical with respect to the x-axis and y-axis. When the cleaning robot is in different postures on the round pipe, the perspectives of each camera of the cleaning robot are different, and the mapping relationship between the camera and the three-dimensional model is also different. Simply use the established projection surface and panoramic image directly. The mapping relationship between them is not enough to correctly map the image texture to the projection surface to obtain a correct panoramic image.
发明内容Contents of the invention
鉴于上述技术问题,本发明的目的是提供一种水下清洗机器人的实时全景成像方法和装置,通过实时检测清洗机器人在管道上的姿态,并根据姿态实时调整纹理映射关系,以将图像纹理正确地映射到投影曲面上,实现在海洋导管架类场景的全景成像。In view of the above technical problems, the purpose of the present invention is to provide a real-time panoramic imaging method and device for an underwater cleaning robot. By detecting the posture of the cleaning robot on the pipeline in real time, and adjusting the texture mapping relationship in real time according to the posture, the image texture can be corrected. Ground mapping onto the projection surface to achieve panoramic imaging in ocean jacket scenes.
为实现上述发明目的,实施例提供了一种水下清洗机器人的实时全景成像方法,包括以下步骤:In order to achieve the above-mentioned object of the invention, the embodiment provides a real-time panoramic imaging method for an underwater cleaning robot, which includes the following steps:
基于清洗机器人在海洋导管上的工作场景构建全景成像的三维投影曲面;Construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the marine pipeline;
实时获取清洗机器人上的相机采集的多张图像,拼接多张图像得到拼接全景图;Acquire multiple images collected by the camera on the cleaning robot in real time, and stitch the multiple images to obtain a stitched panorama;
对拼接全景图进行导管边缘检测以得到实时导管边缘线;Perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
基于实时导管边缘线上的像素点、单应性矩阵以及基准导管边缘线上的像素点构建变换等式,求解变换等式以得到单应性矩阵包含的实时旋转角度;Construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation angle contained in the homography matrix;
根据实时旋转角度从纹理映射库中调取与实时旋转角度对应的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。According to the real-time rotation angle, the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
在一个实施例中,构建的投影曲面为以半球曲面为基准,利圆柱截取半球曲面形成的曲面,优选地,在截取时,圆柱高度与半球曲面的直径平行。In one embodiment, the constructed projection curved surface is a curved surface formed by intercepting the hemispherical curved surface with a cylinder. Preferably, when intercepting, the height of the cylinder is parallel to the diameter of the hemispherical curved surface.
在一个实施例中,采用EDLines算法对拼接全景图进行导管边缘检测,针对检测得到的线段采用阈值检测方式以筛选长的线段作为实时导管边缘线。In one embodiment, the EDLines algorithm is used to perform catheter edge detection on the stitched panorama, and a threshold detection method is used for the detected line segments to filter long line segments as real-time catheter edge lines.
在一个实施例中,实时获取4个相机采集的4个方向的图像,拼接4个图像得到拼接全景图。In one embodiment, images from four directions collected by four cameras are acquired in real time, and the four images are spliced to obtain a stitched panorama.
在一个实施例中,所述三维投影曲面内还建有清洗机器人模型,在获得实时旋转角度后,根据实时旋转角度对清洗机器人模型进行位姿调整,以获得完整实时全景图。In one embodiment, a cleaning robot model is built in the three-dimensional projection curved surface. After obtaining the real-time rotation angle, the position and posture of the cleaning robot model is adjusted according to the real-time rotation angle to obtain a complete real-time panoramic view.
为实现上述发明目的,另一实施例提供了水下清洗机器人的实时全景成像装置,包括:In order to achieve the above object of the invention, another embodiment provides a real-time panoramic imaging device for an underwater cleaning robot, including:
三维投影曲面构建模块,用于基于清洗机器人在海洋导管上的工作场景构建全景成像的三维投影曲面;The three-dimensional projection surface building module is used to construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline;
拼接全景图构建模块,用于实时获取清洗机器人上的相机采集的多角度图像,拼接多角度图像得到拼接全景图;The stitching panorama building module is used to obtain multi-angle images collected by the camera on the cleaning robot in real time, and stitch the multi-angle images to obtain a stitched panorama;
边缘检测模块,用于对拼接全景图进行导管边缘检测以得到实时导管边缘线;The edge detection module is used to perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
实时旋转角度计算模块,用于基于实时导管边缘线上的像素点、单应性矩阵以及基准导管边缘线上的像素点构建变换等式,求解变换等式以得到单应性矩阵包含的实时旋转角度;The real-time rotation angle calculation module is used to construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation contained in the homography matrix. angle;
全景成像模块,用于根据实时旋转角度从纹理映射库中调取与实时旋转角度对应的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。The panoramic imaging module is used to retrieve the texture mapping matrix corresponding to the real-time rotation angle from the texture mapping library according to the real-time rotation angle, and map the splicing map to the three-dimensional projection surface based on the texture mapping matrix to achieve panoramic imaging.
与现有技术相比,本发明具有的有益效果至少包括:Compared with the prior art, the beneficial effects of the present invention include at least:
通过实时采集多角度图像拼接得到拼接全景图后,边缘检测得到实时导管边缘线,基于实时导管边缘线与基准导管边缘线的像素点关于单应性矩阵的映射关系,构建变换等式,通过求解变换等式得到实时旋转角度,利用事先构建的纹理映射库调用对应的纹理映射矩阵进行全景成像,能够提高海洋导管架类场景的全景成像的效率和准确性。After the spliced panorama is obtained through real-time collection of multi-angle images, the real-time catheter edge line is obtained through edge detection. Based on the mapping relationship between the pixels of the real-time catheter edge line and the reference catheter edge line on the homography matrix, a transformation equation is constructed. By solving Transform the equation to obtain the real-time rotation angle, and use the pre-built texture mapping library to call the corresponding texture mapping matrix for panoramic imaging, which can improve the efficiency and accuracy of panoramic imaging of ocean jacket scenes.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动前提下,还可以根据这些附图获得其他附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1是实施例提供的水下清洗机器人的实时全景成像方法的流程图;Figure 1 is a flow chart of the real-time panoramic imaging method of the underwater cleaning robot provided by the embodiment;
图2是实施例提供的三维投影曲面;Figure 2 is a three-dimensional projection curved surface provided by the embodiment;
图3是实施例提供的导管边缘检测的示意图,其中,(a)为拼接全景图,(b)为边缘检测结果图,(c)为阈值筛选检测导管直线,(d)为实时 导管边缘线;Figure 3 is a schematic diagram of catheter edge detection provided by the embodiment, in which (a) is a spliced panorama, (b) is an edge detection result diagram, (c) is a threshold screening detection catheter straight line, and (d) is a real-time catheter edge line ;
图4是实施例提供的不同状态机器人尺寸关系;Figure 4 is the dimensional relationship of robots in different states provided by the embodiment;
图5是实施例提供的水下清洗机器人的实时全景成像装置的结构示意图。FIG. 5 is a schematic structural diagram of the real-time panoramic imaging device of the underwater cleaning robot provided by the embodiment.
具体实施方式Detailed ways
为使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不限定本发明的保护范围。In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention and do not limit the scope of the present invention.
为了解决清洗机器人在海洋圆管场景下全景成像不实时导致的全景成像不准确的问题。实施例提供了一种水下清洗机器人的实时全景成像方法。In order to solve the problem of inaccurate panoramic imaging caused by the inaccurate real-time panoramic imaging of the cleaning robot in the ocean pipe scene. The embodiment provides a real-time panoramic imaging method for an underwater cleaning robot.
图1是实施例提供的水下清洗机器人的实时全景成像方法的流程图。如图1所示,实施例提供的水下清洗机器人的实时全景成像方法,包括以下步骤:Figure 1 is a flow chart of the real-time panoramic imaging method of an underwater cleaning robot provided by the embodiment. As shown in Figure 1, the real-time panoramic imaging method of an underwater cleaning robot provided by the embodiment includes the following steps:
步骤1,基于清洗机器人在海洋导管上的工作场景构建全景成像的三维投影曲面。Step 1: Construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline.
实施例中,清洗机器人带有多个用于采集图像的相机,具体可以分布于前后左右四个方向的相机,用于采集不同角度的图像。清洗机器人爬行与海洋导管上,海洋导管一般为圆筒状,因此构建的投影曲面为以半球曲面为基准,利圆柱截取半球曲面形成的曲面,如图2所示,具体地构建过程为:In the embodiment, the cleaning robot is equipped with multiple cameras for collecting images. Specifically, the cameras can be distributed in four directions, front, rear, left and right, for collecting images from different angles. The cleaning robot crawls on the marine conduit. Marine conduits are generally cylindrical, so the constructed projection surface is based on the hemispherical surface and is formed by intercepting the hemispherical surface with a cylinder, as shown in Figure 2. The specific construction process is:
圆柱的曲面方程为:x 1 2+y 1 2=r,球面的曲面方程为:
Figure PCTCN2022092839-appb-000001
The surface equation of the cylinder is: x 1 2 +y 1 2 =r, and the surface equation of the sphere is:
Figure PCTCN2022092839-appb-000001
当y 1>y 2时,投影曲面由下式组成,用于绘制柱面纹理: When y 1 > y 2 , the projection surface is composed of the following formula, which is used to draw the cylindrical texture:
Figure PCTCN2022092839-appb-000002
Figure PCTCN2022092839-appb-000002
上式中,i,j为曲面节点的序列,(x,y,z)为投影曲面的空间坐标,r为柱面半径,h为柱面高度,m 1为轴向顶点数量,n 1为圆周方向顶点数量。 In the above formula, i, j are the sequence of surface nodes, (x, y, z) are the spatial coordinates of the projected surface, r is the cylinder radius, h is the cylinder height, m 1 is the number of axial vertices, and n 1 is The number of vertices in the circumferential direction.
当y 1>y 2时,投影曲面由下式组成,用于绘制球面纹理: When y 1 > y 2 , the projection surface is composed of the following formula, which is used to draw spherical texture:
Figure PCTCN2022092839-appb-000003
Figure PCTCN2022092839-appb-000003
上式中,R为球面半径,r 1为某一高度下曲面圆形的半径,由
Figure PCTCN2022092839-appb-000004
计算求得,m为经线数量,n 2为纬线数量。
In the above formula, R is the radius of the sphere, r 1 is the radius of the curved surface circle at a certain height, and is given by
Figure PCTCN2022092839-appb-000004
Calculated, m is the number of longitude lines, and n 2 is the number of latitudinal lines.
步骤2,实时获取清洗机器人上的相机采集的多张图像,拼接多张图像得到拼接全景图。Step 2: Acquire multiple images collected by the camera on the cleaning robot in real time, and stitch the multiple images to obtain a stitched panorama.
实施例中,采用多线程控制多个相机同步采集多张图像,需要说明的是,在实际采集过程中,多个相机与导管之间的角度是相同的,以保证拼接全景图的准确定。该角度可以设为45°、60°、120°以及135°,不同角度得到的拼接全景图不一样。In the embodiment, multi-threading is used to control multiple cameras to simultaneously collect multiple images. It should be noted that during the actual acquisition process, the angles between the multiple cameras and the catheter are the same to ensure the accuracy of the stitched panorama. The angle can be set to 45°, 60°, 120° and 135°, and the stitched panorama obtained from different angles will be different.
实施例中,采用二维全景成像技术拼接多张图像形成拼接全景图。具体包括:对多张图像进行相机畸变校正、局部特征点检测,特征点匹配、图像拼接,接缝处融化处理得到拼接全景图。In the embodiment, two-dimensional panoramic imaging technology is used to stitch multiple images to form a stitched panorama. Specifically, it includes: camera distortion correction, local feature point detection, feature point matching, image splicing, and seam melting processing on multiple images to obtain a spliced panorama.
步骤3,对拼接全景图进行导管边缘检测以得到实时导管边缘线。Step 3: Perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines.
实施例中,首先,采用EDLines算法对拼接全景图进行导管边缘检测,检测边缘点后,利用直线度准则,最小二乘直线拟合法,从生成的像素链中提取线段,然后,采用针对检测得到的线段采用阈值检测方式以筛选长的线段作为实时导管边缘线,如图3所示。该边缘检测方式速度快,准确性高。In the embodiment, first, the EDLines algorithm is used to detect the edge of the catheter on the spliced panorama. After detecting the edge points, the straightness criterion and the least squares straight line fitting method are used to extract line segments from the generated pixel chain. Then, the line segments are obtained based on the detection. The line segments use threshold detection method to filter long line segments as real-time catheter edge lines, as shown in Figure 3. This edge detection method is fast and highly accurate.
步骤4,基于实时导管边缘线上的像素点、单应性矩阵以及基准导管边缘线上的像素点构建变换等式,求解变换等式以得到单应性矩阵包含的实时旋转角度。Step 4: Construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation angle contained in the homography matrix.
实施例中,对导管进行边缘检测之后,提取导管边缘线之后就可以通过单应性变换得到相机与导管之间的夹角,调整三维成像中清洗机器人在导管上的位姿以及纹理映射矩阵,从而达到实时显示全景图像的目的。In the embodiment, after performing edge detection on the catheter and extracting the edge line of the catheter, the angle between the camera and the catheter can be obtained through homography transformation, and the position and posture of the cleaning robot on the catheter and the texture mapping matrix in three-dimensional imaging can be adjusted. This achieves the purpose of displaying panoramic images in real time.
实施例中,构建的变换等式为:In the embodiment, the constructed transformation equation is:
q b=H baq a q b = H ba q a
其中,q b表示实时导管边缘线上的像素点坐标,q a表示基准边缘线上的像素点坐标,H ba表示单应性矩阵,由像素平面b和像素平面a对应的两个相机的旋转矩阵R ba和平移矩阵t ab、两个相机内参数矩阵K a和K b、像素平面参数(
Figure PCTCN2022092839-appb-000005
d a)组成,其中,
Figure PCTCN2022092839-appb-000006
表示像素平面a的法向量的转置,d a表示极坐标中到极点的距离,单应性矩阵H ba为:
Among them, q b represents the pixel coordinates on the real-time catheter edge line, q a represents the pixel coordinates on the reference edge line, H ba represents the homography matrix, and the rotation of the two cameras corresponding to pixel plane b and pixel plane a Matrix R ba and translation matrix t ab , two camera intrinsic parameter matrices Ka and K b , pixel plane parameters (
Figure PCTCN2022092839-appb-000005
d a ) consisting of, where,
Figure PCTCN2022092839-appb-000006
Represents the transpose of the normal vector of the pixel plane a, d a represents the distance to the pole in polar coordinates, and the homography matrix H ba is:
Figure PCTCN2022092839-appb-000007
Figure PCTCN2022092839-appb-000007
清洗机器人导管上运动过程中,清洗机器人坐标空间与导管坐标空间在x,y方向上没有相对运动,即清洗机器人中心与导管中心始终保持对齐状态。清洗机器人只会发生旋转以及由于清洗机器人姿态的变换产生的沿 导管半径方向移动的,如图4所示,其中,(a)为竖直状态示意图,(b)为竖直状态尺寸关系图,(c)为水平状态示意图,(d)为水平状态尺寸关系图。During the movement of the cleaning robot on the catheter, there is no relative movement between the cleaning robot coordinate space and the catheter coordinate space in the x and y directions, that is, the center of the cleaning robot and the center of the catheter are always aligned. The cleaning robot will only rotate and move along the radius of the conduit due to the change of the cleaning robot's posture, as shown in Figure 4, where (a) is a schematic diagram of the vertical state, (b) is a dimensional relationship diagram of the vertical state, (c) is a schematic diagram of the horizontal state, and (d) is a dimensional relationship diagram of the horizontal state.
当机器人分别在竖直状态下和水平状态下时,分别对应机器人与圆管在径向上的距离最大和最下极限。由图4可知:When the robot is in the vertical state and the horizontal state respectively, it corresponds to the maximum and minimum distance between the robot and the circular tube in the radial direction. It can be seen from Figure 4:
Figure PCTCN2022092839-appb-000008
Figure PCTCN2022092839-appb-000008
Figure PCTCN2022092839-appb-000009
Figure PCTCN2022092839-appb-000009
其中,R c为导管半径,r为清洗机器人轮径,W为清洗机器人左轮和右轮轴向距离,L为清洗机器人前轮中心与后轮中心距离;因此,有平移向量t ab=[0 0 z]。 Among them, R c is the radius of the conduit, r is the wheel diameter of the cleaning robot, W is the axial distance between the left wheel and the right wheel of the cleaning robot, and L is the distance between the center of the front wheel and the center of the rear wheel of the cleaning robot; therefore, there is a translation vector t ab = [0 0 z].
Figure PCTCN2022092839-appb-000010
Figure PCTCN2022092839-appb-000010
在不同的导管场景下运行全景成像算法时,z max公式中唯一的变量为导管半径R cWhen running the panoramic imaging algorithm under different catheter scenarios, the only variable in the z max formula is the catheter radius R c .
清洗机器人的各个参数如表1:The various parameters of the cleaning robot are shown in Table 1:
表1Table 1
Figure PCTCN2022092839-appb-000011
Figure PCTCN2022092839-appb-000011
将清洗机器人各个参数代入z max公式,并对R求导发现,z max是关于R单调递减的,因此,当R最小时,z max最大。此种场景下中,清洗机器人沿着清洗机器人径向方向上的唯一最大,对清洗机器人旋转角度的求解的影响也最大。在全景成像系统中,清洗机器人视点与圆管之间的距离大于1000mm。相比于最大位移,忽略清洗机器人的运动,因此平移向量 t ab=(0,0,0)。上述式可以简化为: Substituting various parameters of the cleaning robot into the z max formula, and deriving the derivative of R, it is found that z max is monotonically decreasing with respect to R. Therefore, when R is the smallest, z max is the largest. In this scenario, the single direction of the cleaning robot along the radial direction of the cleaning robot is the largest, and has the greatest impact on the solution of the rotation angle of the cleaning robot. In the panoramic imaging system, the distance between the cleaning robot's viewpoint and the circular tube is greater than 1000mm. Compared to the maximum displacement, the motion of the cleaning robot is ignored, so the translation vector t ab = (0,0,0). The above formula can be simplified to:
Figure PCTCN2022092839-appb-000012
Figure PCTCN2022092839-appb-000012
简化后,旋转矩阵R ba为: After simplification, the rotation matrix R ba is:
R ba=K b -1H baK a Rba Kb - 1HbaKa
K a与K b为相机的内参矩阵,表示为: K a and K b are the internal parameter matrices of the camera, expressed as:
Figure PCTCN2022092839-appb-000013
Figure PCTCN2022092839-appb-000013
f xa,f xb,f ya,f yb为相机的焦距参数,u 0a,v 0a,u 0b,v 0b为主点位移向量,进行投影变换矩阵时,两相机焦距参数f x,f y均等于1,位移向量u 0a,v 0a,u 0b,v 0b为拼接全景图长度和宽度的一半; f xa , f xb , f ya , f yb are the focal length parameters of the camera, u 0a , v 0a , u 0b , v 0b are the main point displacement vectors. When performing the projection transformation matrix, the focal length parameters f x and f y of the two cameras are both Equal to 1, the displacement vector u 0a , v 0a , u 0b , v 0b is half the length and width of the spliced panorama;
又已知旋转矩阵的表达式为:It is also known that the expression of the rotation matrix is:
Figure PCTCN2022092839-appb-000014
Figure PCTCN2022092839-appb-000014
则求解得到:Then the solution is:
Figure PCTCN2022092839-appb-000015
Figure PCTCN2022092839-appb-000015
其中,α、β、γ分别表示x,y,z方向上的旋转角度。Among them, α, β, and γ represent the rotation angles in the x, y, and z directions respectively.
步骤5,根据实时旋转角度从纹理映射库中调取与实时旋转角度对应 的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。Step 5: According to the real-time rotation angle, the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
当清洗机器人在导管上处于不同的姿态时,清洗机器人的各个相机视角是是不相同的,相机与三维投影曲面之间的映射关系也是不同的,因此需要能够实时检测机器人在圆管上的姿态并根据姿态实时调整纹理映射关系,才能实现在海洋导管架类场景的全景成像。When the cleaning robot is in different postures on the pipe, the perspectives of each camera of the cleaning robot are different, and the mapping relationship between the camera and the three-dimensional projection surface is also different. Therefore, it is necessary to be able to detect the posture of the robot on the circular pipe in real time. Only by adjusting the texture mapping relationship in real time according to the posture can panoramic imaging in ocean jacket scenes be achieved.
实时三维成像时,根据实时旋转角度从纹理映射库中调取与实时旋转角度对应的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。During real-time three-dimensional imaging, the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library according to the real-time rotation angle, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
需要说明的是,纹理映射库中的纹理映射矩阵是通过OpenGL纹理映射原理映射得到的,具体地,纹理映射过程包括:在进行纹理映射之前,需要建立三维点和像素之间的映射关系,它们之间的映射关系是通过纹理坐标来实现的。通过指定一个三维模型上若干关键点的纹理坐标,使得三维点和二维像素之间一一对应起来,其余的点通过片元着色器插值处理,就能实现图片的完整映射。纹理坐标的取值范围为0~1,纹理图片的左下角为纹理坐标的原点。It should be noted that the texture mapping matrix in the texture mapping library is mapped through the OpenGL texture mapping principle. Specifically, the texture mapping process includes: before texture mapping, the mapping relationship between three-dimensional points and pixels needs to be established. The mapping relationship between them is achieved through texture coordinates. By specifying the texture coordinates of several key points on a three-dimensional model, a one-to-one correspondence between three-dimensional points and two-dimensional pixels is achieved, and the remaining points are interpolated through the fragment shader to achieve complete mapping of the image. The value range of texture coordinates is 0~1, and the lower left corner of the texture image is the origin of texture coordinates.
实施例中,三维投影曲面内还建有清洗机器人模型,在获得实时旋转角度后,根据实时旋转角度对清洗机器人模型进行位姿调整,以获得完整实时全景图。In the embodiment, a cleaning robot model is also built in the three-dimensional projection surface. After obtaining the real-time rotation angle, the position and posture of the cleaning robot model are adjusted according to the real-time rotation angle to obtain a complete real-time panoramic view.
上述实施例提供的水下清洗机器人的实时全景成像方法,通过实时检测清洗机器人在管道上的姿态,并根据姿态实时调整纹理映射关系,以将图像纹理正确地映射到投影曲面上,实现在海洋导管架类场景的全景成像。The real-time panoramic imaging method of the underwater cleaning robot provided by the above embodiments detects the posture of the cleaning robot on the pipeline in real time, and adjusts the texture mapping relationship in real time according to the posture to correctly map the image texture onto the projection surface, thereby realizing the vision in the ocean. Panoramic imaging of jacket scenes.
图5是实施例提供的水下清洗机器人的实时全景成像装置的结构示意图。如图5所示,实施例提供的实时全景成像装置,包括:FIG. 5 is a schematic structural diagram of the real-time panoramic imaging device of the underwater cleaning robot provided by the embodiment. As shown in Figure 5, the real-time panoramic imaging device provided by the embodiment includes:
三维投影曲面构建模块,用于基于清洗机器人在海洋导管上的工作场景构建全景成像的三维投影曲面;The three-dimensional projection surface building module is used to construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline;
拼接全景图构建模块,用于实时获取清洗机器人上的相机采集的多角度图像,拼接多角度图像得到拼接全景图;The stitching panorama building module is used to obtain multi-angle images collected by the camera on the cleaning robot in real time, and stitch the multi-angle images to obtain a stitched panorama;
边缘检测模块,用于对拼接全景图进行导管边缘检测以得到实时导管边缘线;The edge detection module is used to perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
实时旋转角度计算模块,用于基于实时导管边缘线上的像素点、单应性矩阵以及基准导管边缘线上的像素点构建变换等式,求解变换等式以得到单应性矩阵包含的实时旋转角度;The real-time rotation angle calculation module is used to construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation contained in the homography matrix. angle;
全景成像模块,用于根据实时旋转角度从纹理映射库中调取与实时旋转角度对应的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。The panoramic imaging module is used to retrieve the texture mapping matrix corresponding to the real-time rotation angle from the texture mapping library according to the real-time rotation angle, and map the splicing map to the three-dimensional projection surface based on the texture mapping matrix to achieve panoramic imaging.
需要说明的是,上述实施例提供的水下清洗机器人的实时全景成像装置在进行实时全景成像时,应以上述各功能模块的划分进行举例说明,可以根据需要将上述功能分配由不同的功能模块完成,即在终端或服务器的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的水下清洗机器人的实时全景成像装置与水下清洗机器人的实时全景成像方法实施例属于同一构思,其具体实现过程详见水下清洗机器人的实时全景成像方法实施例,这里不再赘述。It should be noted that when the real-time panoramic imaging device of the underwater cleaning robot provided in the above embodiment performs real-time panoramic imaging, the division of the above functional modules should be used as an example. The above functions can be allocated to different functional modules as needed. Complete, that is, the internal structure of the terminal or server is divided into different functional modules to complete all or part of the functions described above. In addition, the real-time panoramic imaging device of the underwater cleaning robot provided in the above embodiments and the real-time panoramic imaging method embodiment of the underwater cleaning robot belong to the same concept. For details of the implementation process, please refer to the real-time panoramic imaging method embodiment of the underwater cleaning robot. I won’t go into details here.
以上所述的具体实施方式对本发明的技术方案和有益效果进行了详细说明,应理解的是以上所述仅为本发明的最优选实施例,并不用于限制本发明,凡在本发明的原则范围内所做的任何修改、补充和等同替换等,均应包含在本发明的保护范围之内。The above-described specific embodiments describe in detail the technical solutions and beneficial effects of the present invention. It should be understood that the above are only the most preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, additions, equivalent substitutions, etc. made within the scope of the invention shall be included in the protection scope of the present invention.

Claims (8)

  1. 一种水下清洗机器人的实时全景成像方法,其特征在于,包括以下步骤:A real-time panoramic imaging method for underwater cleaning robots, which is characterized by including the following steps:
    基于清洗机器人在海洋导管上的工作场景构建全景成像的三维投影曲面;Construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the marine pipeline;
    实时获取清洗机器人上的相机采集的多张图像,拼接多张图像得到拼接全景图;Acquire multiple images collected by the camera on the cleaning robot in real time, and stitch the multiple images to obtain a stitched panorama;
    对拼接全景图进行导管边缘检测以得到实时导管边缘线;Perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
    基于实时导管边缘线上的像素点、单应性矩阵以及基准导管边缘线上的像素点构建变换等式,求解变换等式以得到单应性矩阵包含的实时旋转角度;Construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation angle contained in the homography matrix;
    根据实时旋转角度从纹理映射库中调取与实时旋转角度对应的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。According to the real-time rotation angle, the texture mapping matrix corresponding to the real-time rotation angle is retrieved from the texture mapping library, and based on the texture mapping matrix, the splicing map is mapped to the three-dimensional projection surface to achieve panoramic imaging.
  2. 根据权利要求1所述的水下清洗机器人的实时全景成像方法,其特征在于,构建的投影曲面为以半球曲面为基准,利圆柱截取半球曲面形成的曲面,在截取时,圆柱高度与半球曲面的直径平行。The real-time panoramic imaging method of an underwater cleaning robot according to claim 1, characterized in that the constructed projection curved surface is a curved surface formed by intercepting the hemispherical curved surface with a cylinder. During the interception, the height of the cylinder is equal to the hemispherical curved surface. diameter is parallel.
  3. 根据权利要求1所述的水下清洗机器人的实时全景成像方法,其特征在于,采用EDLines算法对拼接全景图进行导管边缘检测,针对检测得到的线段采用阈值检测方式以筛选长的线段作为实时导管边缘线。The real-time panoramic imaging method of an underwater cleaning robot according to claim 1, characterized in that the EDLines algorithm is used to perform conduit edge detection on the spliced panorama, and a threshold detection method is used for the detected line segments to screen long line segments as real-time conduits. edge line.
  4. 根据权利要求1所述的水下清洗机器人的实时全景成像方法,其特征在于,构建的变换等式为:The real-time panoramic imaging method of underwater cleaning robots according to claim 1, characterized in that the constructed transformation equation is:
    q b=H baq a q b = H ba q a
    其中,q b表示实时导管边缘线上的像素点坐标,q a表示基准边缘线上的像素点坐标,H ba表示单应性矩阵,由像素平面b和像素平面a对应的两个相机的旋转矩阵R ba和平移矩阵t ab、两个相机内参数矩阵K a和K b、像素平面参数
    Figure PCTCN2022092839-appb-100001
    组成,其中,
    Figure PCTCN2022092839-appb-100002
    表示像素平面a的法向量的转置,d a表示极坐标中到极点的距离,单应性矩阵H ba为:
    Among them, q b represents the pixel coordinates on the real-time catheter edge line, q a represents the pixel coordinates on the reference edge line, H ba represents the homography matrix, and the rotation of the two cameras corresponding to pixel plane b and pixel plane a Matrix R ba and translation matrix t ab , two camera internal parameter matrices Ka and K b , pixel plane parameters
    Figure PCTCN2022092839-appb-100001
    consists of,
    Figure PCTCN2022092839-appb-100002
    Represents the transpose of the normal vector of the pixel plane a, d a represents the distance to the pole in polar coordinates, and the homography matrix H ba is:
    Figure PCTCN2022092839-appb-100003
    Figure PCTCN2022092839-appb-100003
  5. 根据权利要求4所述的水下清洗机器人的实时全景成像方法,其特征在于,在求解变换等式时,令t ab=(0,0,0),则单应性矩阵H ba简化为: The real-time panoramic imaging method of underwater cleaning robots according to claim 4, characterized in that when solving the transformation equation, let t ab = (0,0,0), then the homography matrix H ba is simplified to:
    Figure PCTCN2022092839-appb-100004
    Figure PCTCN2022092839-appb-100004
    简化后,旋转矩阵R ba为: After simplification, the rotation matrix R ba is:
    R ba=K b -1H baK a Rba Kb - 1HbaKa
    K a与K b为相机的内参矩阵,表示为: K a and K b are the internal parameter matrices of the camera, expressed as:
    Figure PCTCN2022092839-appb-100005
    Figure PCTCN2022092839-appb-100005
    f xa,f xb,f ya,f yb为相机的焦距参数,u 0a,v 0a,u 0b,v 0b为主点位移向量,进行投影变换矩阵时,两相机焦距参数f x,f y均等于1,位移向量u 0a,v 0a,u 0b,v 0b为拼接全景图长度和宽度的一半; f xa , f xb , f ya , f yb are the focal length parameters of the camera, u 0a , v 0a , u 0b , v 0b are the main point displacement vectors. When performing the projection transformation matrix, the focal length parameters f x and f y of the two cameras are both Equal to 1, the displacement vector u 0a , v 0a , u 0b , v 0b is half the length and width of the spliced panorama;
    又已知旋转矩阵的表达式为:It is also known that the expression of the rotation matrix is:
    Figure PCTCN2022092839-appb-100006
    Figure PCTCN2022092839-appb-100006
    则求解得到:Then the solution is:
    Figure PCTCN2022092839-appb-100007
    Figure PCTCN2022092839-appb-100007
    其中,α、β、γ分别表示x,y,z方向上的旋转角度。Among them, α, β, and γ represent the rotation angles in the x, y, and z directions respectively.
  6. 根据权利要求1所述的水下清洗机器人的实时全景成像方法,其特征在于,实时获取4个相机采集的4个方向的图像,拼接4个图像得到拼接全景图。The real-time panoramic imaging method of an underwater cleaning robot according to claim 1, characterized in that images in four directions collected by four cameras are acquired in real time, and the four images are spliced to obtain a spliced panorama.
  7. 根据权利要求1所述的水下清洗机器人的实时全景成像方法,其特征在于,所述三维投影曲面内还建有清洗机器人模型,在获得实时旋转角度后,根据实时旋转角度对清洗机器人模型进行位姿调整,以获得完整实时全景图。The real-time panoramic imaging method of an underwater cleaning robot according to claim 1, characterized in that a cleaning robot model is also built in the three-dimensional projection curved surface. After the real-time rotation angle is obtained, the cleaning robot model is imaged according to the real-time rotation angle. Position adjustment to obtain a complete real-time panorama.
  8. 一种水下清洗机器人的实时全景成像装置,其特征在于,包括:A real-time panoramic imaging device for an underwater cleaning robot, which is characterized by including:
    三维投影曲面构建模块,用于基于清洗机器人在海洋导管上的工作场景构建全景成像的三维投影曲面;The three-dimensional projection surface building module is used to construct a three-dimensional projection surface for panoramic imaging based on the working scene of the cleaning robot on the ocean pipeline;
    拼接全景图构建模块,用于实时获取清洗机器人上的相机采集的多角度图像,拼接多角度图像得到拼接全景图;The stitching panorama building module is used to obtain multi-angle images collected by the camera on the cleaning robot in real time, and stitch the multi-angle images to obtain a stitched panorama;
    边缘检测模块,用于对拼接全景图进行导管边缘检测以得到实时导管边缘线;The edge detection module is used to perform catheter edge detection on the stitched panorama to obtain real-time catheter edge lines;
    实时旋转角度计算模块,用于基于实时导管边缘线上的像素点、单应性矩阵以及基准导管边缘线上的像素点构建变换等式,求解变换等式以得到单应性矩阵包含的实时旋转角度;The real-time rotation angle calculation module is used to construct a transformation equation based on the pixels on the real-time catheter edge line, the homography matrix and the pixel points on the reference catheter edge line, and solve the transformation equation to obtain the real-time rotation contained in the homography matrix. angle;
    全景成像模块,用于根据实时旋转角度从纹理映射库中调取与实时旋转角度对应的纹理映射矩阵,基于该纹理映射矩阵将拼接图映射到三维投影曲面,实现全景成像。The panoramic imaging module is used to retrieve the texture mapping matrix corresponding to the real-time rotation angle from the texture mapping library according to the real-time rotation angle, and map the splicing map to the three-dimensional projection surface based on the texture mapping matrix to achieve panoramic imaging.
PCT/CN2022/092839 2022-03-17 2022-05-13 Real-time panoramic imaging method and device for underwater cleaning robot WO2023173572A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210264457.8 2022-03-17
CN202210264457.8A CN114742941A (en) 2022-03-17 2022-03-17 Real-time panoramic imaging method and device for underwater cleaning robot

Publications (1)

Publication Number Publication Date
WO2023173572A1 true WO2023173572A1 (en) 2023-09-21

Family

ID=82277040

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092839 WO2023173572A1 (en) 2022-03-17 2022-05-13 Real-time panoramic imaging method and device for underwater cleaning robot

Country Status (2)

Country Link
CN (1) CN114742941A (en)
WO (1) WO2023173572A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140192144A1 (en) * 2013-01-05 2014-07-10 Patrick A. St. Clair Spherical panoramic image camera rig
CN105023270A (en) * 2015-05-29 2015-11-04 汤一平 Proactive 3D stereoscopic panorama visual sensor for monitoring underground infrastructure structure
CN105894549A (en) * 2015-10-21 2016-08-24 乐卡汽车智能科技(北京)有限公司 Panorama assisted parking system and device and panorama image display method
CN106960442A (en) * 2017-03-01 2017-07-18 东华大学 Based on the infrared night robot vision wide view-field three-D construction method of monocular
CN107610213A (en) * 2017-08-04 2018-01-19 深圳市为美科技发展有限公司 A kind of three-dimensional modeling method and system based on panorama camera
CN108181896A (en) * 2017-11-21 2018-06-19 浙江大学 A kind of straight pipe robot operated on surface and its position and posture detection method
CN110782394A (en) * 2019-10-21 2020-02-11 中国人民解放军63861部队 Panoramic video rapid splicing method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140192144A1 (en) * 2013-01-05 2014-07-10 Patrick A. St. Clair Spherical panoramic image camera rig
CN105023270A (en) * 2015-05-29 2015-11-04 汤一平 Proactive 3D stereoscopic panorama visual sensor for monitoring underground infrastructure structure
CN105894549A (en) * 2015-10-21 2016-08-24 乐卡汽车智能科技(北京)有限公司 Panorama assisted parking system and device and panorama image display method
CN106960442A (en) * 2017-03-01 2017-07-18 东华大学 Based on the infrared night robot vision wide view-field three-D construction method of monocular
CN107610213A (en) * 2017-08-04 2018-01-19 深圳市为美科技发展有限公司 A kind of three-dimensional modeling method and system based on panorama camera
CN108181896A (en) * 2017-11-21 2018-06-19 浙江大学 A kind of straight pipe robot operated on surface and its position and posture detection method
CN110782394A (en) * 2019-10-21 2020-02-11 中国人民解放军63861部队 Panoramic video rapid splicing method and system

Also Published As

Publication number Publication date
CN114742941A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN110728715B (en) Intelligent inspection robot camera angle self-adaptive adjustment method
TWI555379B (en) An image calibrating, composing and depth rebuilding method of a panoramic fish-eye camera and a system thereof
CN109767474B (en) Multi-view camera calibration method and device and storage medium
CN110782394A (en) Panoramic video rapid splicing method and system
TWI555378B (en) An image calibration, composing and depth rebuilding method of a panoramic fish-eye camera and a system thereof
CN105243637B (en) One kind carrying out full-view image joining method based on three-dimensional laser point cloud
CN103971375B (en) A kind of panorama based on image mosaic stares camera space scaling method
CN104778656B (en) Fisheye image correcting method based on spherical perspective projection
CN105488766B (en) Fisheye image bearing calibration and device
WO2019047847A1 (en) Six degrees of freedom three-dimensional reconstruction method and system for virtual reality, and portable terminal
JP2009139246A (en) Device, method and program for processing image, position detecting device and moving body equipped with this
CN107274341A (en) Quick binocular flake Panorama Mosaic method based on fixed splicing parameter
CN109559355A (en) A kind of polyphaser global calibration device and method without public view field based on phase unit
CN103295231A (en) Method for geometrically correcting vertically mapped images of fisheye lenses in fisheye image mosaic
CN109769110B (en) Method and device for generating 3D asteroid dynamic graph and portable terminal
CN112734863A (en) Crossed binocular camera calibration method based on automatic positioning
CN206460515U (en) A kind of multichannel fisheye camera caliberating device based on stereo calibration target
CN108269234B (en) Panoramic camera lens attitude estimation method and panoramic camera
CN110335245A (en) Cage netting damage monitoring method and system based on monocular space and time continuous image
CN115841487B (en) Hidden danger positioning method and terminal along power transmission line
CN112837207A (en) Panoramic depth measuring method, four-eye fisheye camera and binocular fisheye camera
CN115330594A (en) Target rapid identification and calibration method based on unmanned aerial vehicle oblique photography 3D model
KR101233948B1 (en) Method and imaging system for obtaining digital pan·tilt images using rotationally symmetric wide-angle lens
CN115082617A (en) Pipeline three-dimensional reconstruction method and device based on multi-view optimization and storage medium
WO2023173572A1 (en) Real-time panoramic imaging method and device for underwater cleaning robot

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: 22931598

Country of ref document: EP

Kind code of ref document: A1