WO2019056306A1 - Robust depth information-based plane detection method and system - Google Patents

Robust depth information-based plane detection method and system Download PDF

Info

Publication number
WO2019056306A1
WO2019056306A1 PCT/CN2017/102947 CN2017102947W WO2019056306A1 WO 2019056306 A1 WO2019056306 A1 WO 2019056306A1 CN 2017102947 W CN2017102947 W CN 2017102947W WO 2019056306 A1 WO2019056306 A1 WO 2019056306A1
Authority
WO
WIPO (PCT)
Prior art keywords
plane
detection
growth
seed block
effective
Prior art date
Application number
PCT/CN2017/102947
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 深圳大学
Priority to PCT/CN2017/102947 priority Critical patent/WO2019056306A1/en
Publication of WO2019056306A1 publication Critical patent/WO2019056306A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the invention belongs to the field of image processing and computer vision, and in particular relates to a robust depth information based plane detection method and system.
  • the plane detection technique can be used for 3D reconstruction.
  • 3D reconstruction can be simply summarized as the process of plane detection of indoor and outdoor scenes and the establishment of a segmentation plane model.
  • planar inspection technology is also widely used for object detection in robot navigation systems and computer vision.
  • the texture information of the plane was mainly used, but when the plane color or texture is inconsistent, it will bring great challenges to this method.
  • the distance information of the depth map is used to solve the above problem, and the result also proves that the method can effectively cope with the complicated situation.
  • the depth map can be generated directly by a depth camera (such as SwissRanger SR40001, Microsoft Kinect) or synthesized by software.
  • the different values in the graph reflect the distance information of the object in the scene relative to the camera. Since the depth map represents spatial information for each point in the scene, points from the same plane will have similar spatial characteristics, such as gradients and normals.
  • the plane detection methods can be divided into three categories: iterative plane fitting method, based on Hough transform method and region growing method.
  • the iterative plane fitting method is a commonly used method for plane detection, and its typical representative is RANSAC, in which the fitting model is initialized according to several randomly selected points in RANSAC.
  • the method has better effect in detecting large planes and is robust to noise, but the calculation amount is too large, and Complex planes are oversimplified during the calculation process.
  • the Hough transform method is often used for parameterized target detection, especially for lines and circles in 2D planes. In order to make this type of method available in 3D space and reduce computational cost, a variety of Hough transform-based derivative algorithms have emerged.
  • the 3D Hough transform method uses the slope of the plane in the x-axis and y-axis directions and its distance from the origin of the coordinate to represent the plane, but it also has a higher computational cost when looking for the parameters of the fitted model, especially when This problem becomes more pronounced when the input data is large or the accumulator is sensitive.
  • the Random Hough Transform uses a probabilistic model to calculate parameters to avoid high computational costs when finding optimal parameters.
  • the main idea of the regional growth method is to use the correlation between adjacent points to construct the plane.
  • the work proposes an algorithm based on the growth of two seed points.
  • the plane parameters are gradually updated by the centroid and covariance matrix of the grown region, but the calculation is too big.
  • CORG Cached-Octree Region-Growing
  • two growth strategies are proposed: a sub-window growth algorithm and a hybrid growth algorithm in an unstructured environment in a point cloud of a structured environment. This algorithm is faster than point-based growth when the window size is set appropriately.
  • RPCA Robust Principle Component Analysis
  • the process of plane growth begins with a bin, and if the angle between the growing bin and its neighboring bin is less than a certain threshold, the neighboring bin is included in the currently growing plane.
  • the method works normally when the angle between adjacent bins is an acute angle, but the method may fail when the angle between adjacent bins is an obtuse angle.
  • the technical problem to be solved by the present invention is to provide a robust depth information based plane detection method and system, aiming at solving the problem that the existing plane detection algorithm has poor accuracy and robustness in complex scenarios.
  • the present invention is implemented in such a manner that a robust depth information based plane detection method includes:
  • a depth map detection plane containing the effective growth plane of the valid seed block is output.
  • the invention also provides a robust depth information based plane detection system, comprising:
  • An extracting unit configured to receive a depth map, and extract a number of valid seed blocks in the depth map
  • a growth unit for performing region growth according to the effective seed block to obtain a generation plane of the effective seed block
  • a correcting unit configured to perform growth correction or undergrowth correction on a generating plane of the effective seed block to obtain an effective growth plane of the effective seed block
  • an output unit configured to output a depth map detection plane including an effective growth plane of the effective seed block.
  • the present invention has the beneficial effects that the embodiment of the present invention obtains the growth plane of each effective seed block by extracting the effective seed block of the depth map and performing region growing according to the extracted effective seed block, for each effective seed.
  • the growth plane of the block undergoes growth correction or undergrowth correction to obtain an effective growth plane, and the depth map is detected according to the effective growth plane.
  • the embodiment of the invention improves the accuracy and robustness of the plane detection method by performing growth correction or undergrowth correction on the growth plane obtained by growing the effective seed block region.
  • FIG. 1 is a flowchart of a robust depth information based plane detection method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an adjacent point set according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of adjacent points of an effective seed block according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of an undergrowth correction method according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a robust depth information based plane detection system according to an embodiment of the present invention.
  • FIG. 1 shows a robust depth information based plane detection method provided by an embodiment of the present invention, including:
  • S101 Receive a depth map, and extract a number of valid seed blocks in the depth map.
  • S102 Perform area growing according to the effective seed block to obtain a generating plane of the effective seed block.
  • the embodiment of the present invention provides a robust Depth-driven Plane Detection (DPD) method. That is, the depth detection is used for plane detection.
  • the plane detection method includes two parts: plane detection based on seed block growth and post-processing process to further enhance the robustness of the algorithm.
  • the plane detection method starts from the seed block with the highest smoothness, and uses the plane equation of the fitting plane of the growth plane and the dynamic threshold function to guide the growth process. Under the action of this mechanism, when the seed block grows to the maximum extent, the next seed block begins to grow, and the growth process is iterated until all the planes are detected.
  • the accuracy and robustness of the proposed method can be improved by using the dynamic threshold function and the post-processing process of the enhancement mechanism. The latter is proposed for the planar overgrowth and undergrowth problems that are easy to occur based on the growth-based planar detection method.
  • a key step in region growth is to select growing seed pieces, ie, to select areas without holes.
  • an L ⁇ L rectangular window is slid one pixel at a time in a raster scan manner to traverse the depth map, and the rectangular window is checked at the position of each pixel point. Whether all the points are hole points, when there is no hole point in the rectangular window, the point set in the rectangular window is regarded as a valid seed block, and is calculated by linear least square plane fitting method (Linear Least Squares, LLS)
  • LLS Linear Least Squares
  • the plane can be represented by the usage vector n and the distance d from the origin of the coordinate system.
  • the fitting plane of the effective seed block can be obtained by linear least squares plane fitting method.
  • S the plane equation of the effective seed block
  • n i represents the normal vector of the fitting plane of the i-th effective seed block
  • d i represents the distance between the fitting plane of the i-th effective seed block and the origin of the coordinate system.
  • the root mean square fitting error ⁇ i is defined as:
  • P represents the set of points of all pixels in the valid seed block
  • represents the number of pixels in the valid seed block
  • the root mean square fitting error ⁇ i is used to represent the smoothness of the effective seed block, so a smaller root mean square fitting error ⁇ i means higher smoothness. Since the planar growth process starts with the most smooth effective seed block, accurate growth of the plane can be ensured, so in this embodiment, all the effective seed blocks are sorted from small to large according to the root mean square fitting error ⁇ i .
  • Regional growth process Regional growth is an iterative process that generates planes from an effective seed block. In the specific growth process, not all effective seed blocks will eventually have the opportunity to grow, because the regional growth begins with the smoothest effective seed block, and the growth of the effective seed block used for growth will result in the inclusion of growth planes. With some valid seed blocks that have not been used, these included effective seed blocks do not have the opportunity to grow.
  • the key to the region-based growth method is to distinguish the inner point and the outer point of the current growth plane, and the judgment is based on the threshold T, wherein the threshold T is the output of the dynamic threshold function proposed by the embodiment of the present invention.
  • the adjacent point set of the growth plane is an empty set, or there is no point in the adjacent point set suitable for the current growth plane, it is determined that the current plane growth reaches the maximum range, and the current plane ends the growth.
  • the adjacent point set refers to a set of all pixel points adjacent to the current growth plane, that is, points 1 to 16 constitute a set of adjacent points of the current growth plane.
  • the main contents of the growth process include:
  • the adjacent side of the effective seed block is taken as the center, and the adjacent side of the 3 ⁇ 3 rectangular window is taken.
  • Point a total of 8 adjacent points, point 1 to point 8.
  • the corresponding fitting error is obtained by p+d i
  • the fitting error is less than the threshold T, the adjacent point is merged into the current growth plane, and conversely, the adjacent point is regarded as the outer point of the current growth plane. In this phase, a fitting error needs to be calculated for each adjacent point.
  • the linear least squares plane fitting method LLS is used to update the parameters of the plane equation, and the root mean square fitting error is also updated.
  • a growth plane has been fitted and the fitting error is calculated.
  • LLS linear least squares plane fitting method
  • the planar plane can be optimally adjusted again and again during the growth process.
  • the plane equation is updated once after each growth, and a root mean square fitting error is also calculated for all points on the plane.
  • the embodiment of the present invention designs a dynamic threshold function based on a noise model and a plane size.
  • the dynamic threshold function is defined as follows:
  • I represents the depth map
  • I d represents a depth value of a point on the depth map that is substituted into a plane equation using a fitting error formula to calculate a fitting error.
  • the point is the adjacent of the current growth plane.
  • represents the maximum allowable roughness of the growth plane
  • determines the growth rate of the threshold
  • H and W represent the height and width of the depth map, respectively
  • ⁇ and k are constants
  • j represents the number of iterations of the plane during the growth process
  • initialization order j 1
  • the maximum threshold T of the output is determined by I d .
  • the dynamic threshold function can solve the problem based on the noise model well. For example, when the growth plane is the distal facet, the overgrowth caused by the large threshold can be avoided because the growth plane is considered; when the growth plane is parallel to the camera In the plane, the threshold will not be a fixed value due to the accumulation of noise taking into account the growth process.
  • the post-processing process of the mandatory mechanism includes an over-growth correction process and an under-growth correction process, and the over-growth correction process and the under-growth correction process are respectively described below:
  • one of the growth planes preferentially grows to its intersection with another growth plane.
  • Overgrowth refers to the phenomenon that the current growth plane erroneously grows onto the intersecting plane if the fitting error between the adjacent pixel points of the plane intersection line and the current plane is smaller than the current threshold.
  • the growth direction can be divided into longitudinal growth and lateral growth.
  • intersection line can be expressed as a parametric equation:
  • represents the cross product of the two vectors
  • t represents the unknown parameter
  • p 0 is a point on the intersection line, defined as:
  • the main contents of the correction process include:
  • the overgrowth region S 0 is accurately detected.
  • the degree of overgrowth depends mainly on the angle of the intersection plane, the accuracy of the depth data, and the threshold T, where the angle ⁇ is the inverse cosine of the two-plane normal vector point multiplication, and the threshold T is the output of the dynamic threshold function.
  • the theoretical width w of the overgrowth region is equal to the ratio of the threshold value T to the sine value of the angle ⁇ .
  • the embodiment of the present invention takes the actual width as [w] (1+). ⁇ ), where [w] represents a larger integer close to w, ⁇ >0, which ensures that the actual width is greater than the theoretical width.
  • Redistribution refers to the plane equation that substitutes the point on the farthest boundary of the overgrowth region S 0 into two planes, and calculates the fitting error of the point to the plane respectively, compares the two fitting error magnitudes, and merges the overgrowth region S 0 To the plane with a small fitting error.
  • the current detection plane S i is overgrowth according to the overgrowth region S 0 . If over growth, the overgrowth region S 0 is merged with the adjacent plane, and conversely, the overgrowth region S 0 is merged with the detection plane S i . In this step, if the point on the overgrowth region S o is substituted into the adjacent plane, it is found that the fitting error is smaller than the fitting error substituted into the current detection plane, indicating that the overgrowth region should belong to the adjacent plane, so the current A growth problem has occurred in the detection plane.
  • the overgrowth area S o may be broken into small isolated blocks to detect and redistribute these small isolated blocks.
  • a primary, secondary overgrowth region is created in the detection of the previous step (5), and after the main region has been reallocated, the secondary region may become an isolated region. Redistribution is based on substituting points in isolated regions into adjacent plane equations. The plane with the smallest root mean square fitting error is the plane to which the isolated region belongs.
  • the embodiment of the present invention proposes a method of plane merging, that is, when the two growth planes satisfy the three conditions of parallel, coplanar, and adjacent, they can be merged into one larger plane. These relationships are detected in sequence in the method of under-growth correction.
  • Coplanar Calculate the fitting error of each point on the two growth planes to the detection plane, that is, the fitting error of the point of the smaller growth plane in the two growth planes to the plane of the larger growth, and the larger growth plane From the point above to the fitting error of the self, when the calculated Hellinger distance of the two fitting errors is less than the threshold, the two growth planes are discriminated.
  • the Hellinger distance is usually used to measure the similarity of two probability distributions. However, if the size of the two growth planes is too different, even if the two growth planes are coplanar in real conditions, a large Hellinger distance can be obtained, so for the two growth planes with large differences in size, the judgment threshold Tm is used. Determine whether it is coplanar.
  • Adjacent After expanding the current growth plane by one pixel, it is detected that its edge has an intersection with the edge of another growth plane, and the two growth planes are adjacent planes.
  • the detection planes parallel to the detection plane S u are arranged in descending order according to the size of the area. Specifically, in over-growth correction and under-growth correction, the principle of correction is to start from a plane with a large area. The plane equation is more accurate due to the larger area.
  • S k denotes any detection plane parallel to S u , assuming that the plane pairs S k and S u are parallel, respectively calculating the fitting error of each pixel point on the detection plane S k and the detection plane S u Ku , and the fitting error e uu of each pixel point on the detection plane S u ;
  • the two fitting errors in the step (5) are represented by a histogram, and the Hellinger distance of the two curves in the histogram is calculated. Determining whether the hellinger distance is smaller than a hellinger distance determination threshold T h , and when it is smaller than a hellinger distance determination threshold T h , then S k is coplanar with S u , and if not smaller, S k and S u are not coplanar, the hellinger
  • the distance judgment threshold T h is a constant;
  • the fitting error e ku of each pixel point on the detection plane S k and the detection plane S u is calculated.
  • the fitting error e ku is smaller than the judgment threshold T m , then S k is coplanar with S u , and if not smaller, S k and S u are not coplanar, and the judgment threshold T m is constant.
  • the above embodiment provided by the present invention uses a depth information to drive a plane detection model to detect a depth map generated by a depth camera using a seed growth method, and post-processes a plane on which the seed block is grown, so that each Plane detection of indoor scenes and depth noise is more robust, improving the accuracy of plane detection.
  • the post-processing of the enhancement mechanism can re-allocate the correct boundary points to the plane.
  • the above embodiments provided by the present invention can be applied to fields such as robust planar detection (wall surface, desktop, etc.), indoor scene reconstruction and position recognition, robot navigation systems, and object recognition in the field of computer vision.
  • FIG. 6 shows a robust depth information based plane detection system provided by an embodiment of the present invention, including:
  • An extracting unit 601 configured to receive a depth map, and extract a number of valid seed blocks in the depth map
  • a growing unit 602 configured to perform region growing according to the effective seed block, to obtain a generating plane of the effective seed block
  • a correcting unit 603 configured to perform a growth correction or an undergrowth correction on a generating plane of the effective seed block to obtain an effective growth plane of the effective seed block;
  • the output unit 604 is configured to output a depth map detection plane including an effective growth plane of the effective seed block.
  • extracting unit 601 is specifically configured to:
  • the point set in the rectangular window is used as a valid seed block
  • the plane equation and smoothness of each of the effective seed blocks are calculated by a linear least squares plane fitting method.
  • the extraction unit is also used to:
  • n i denote the normal vector of the fitting plane of the i-th effective seed block
  • d i denote the distance between the fitting plane of the i-th effective seed block and the origin of the coordinate system
  • e i (p) represents the fitting error of the fitting plane of the i-th effective seed block and the point p on the i-th effective seed block
  • the order is sorted in order from small to large.
  • growth unit 602 is specifically configured to:
  • the growth is stopped, and a growth plane of the effective seed block is obtained;
  • the threshold T is an output of a dynamic threshold function
  • the dynamic threshold function is:
  • I denotes the depth map
  • I d denotes a depth value of a point on the depth map that is substituted into a plane equation using a fitting error formula to calculate a fitting error
  • denotes an allowable maximum roughness of the growth plane
  • determines a growth rate of the threshold
  • H and W represent the height and width of the depth map, respectively
  • ⁇ and k are constants
  • j represents the number of iterations of the growth plane during growth
  • the initialization order j 1
  • the maximum threshold T of the output is determined by I d .
  • step of correcting the growth plane of the effective seed block by the correcting unit 603 includes:
  • the step of correcting the under-growth correction of the generating plane of the effective seed block by the correcting unit 603 includes:
  • all the detection planes are arranged in descending order according to the size of the area, and the detection plane S u having the largest area is found;
  • S k and S u represents any of a parallel detection plane, respectively, calculated for each pixel on each pixel on the S k and S u fitting error e ku, S u and the fitting error itself e uu ;
  • the fitting error e ku and the fitting error e uu are represented by a histogram, and the hellinger distance of the two curves in the histogram is calculated;
  • a hellinger distance determination threshold T h Determining whether the hellinger distance is smaller than a hellinger distance determination threshold T h ; if less than, S k is coplanar with S u , if not less, then S k and S u are not coplanar, and the hellinger distance determination threshold T h is constant ;
  • the detection plane S u is a large plane, it is determined whether the fitting error e ku is smaller than the determination threshold T m , and if less than, S k is coplanar with S u , and if not smaller, S k is not shared with S u
  • the judgment threshold T m is a constant;
  • S k is coplanar with S u , it is necessary to further determine whether S k and S u are adjacent. If adjacent, then S k and S u are combined to obtain an effective growth plane, and the plane equation of S u is updated, and The parallel plane of S k is added to the parallel group of S u ;
  • the next detection plane is detected according to the order of the area of all the detection planes until all the detection planes are corrected.

Abstract

The present invention is applicable to image processing. Provided is a robust depth information-based plane detection method, comprising: receiving a depth image, and extracting, from the depth image, a plurality of valid seed blocks; performing a region growing operation according to the valid seed block so as to obtain a grown plane of the valid seed block; performing overgrowth correction or undergrowth correction on the grown plane of the valid seed block so as to obtain a valid grown plane of the valid seed block; and outputting a depth image detection plane containing the valid grown plane of the valid seed blocks. In an embodiment of the present invention, overgrowth correction or undergrowth correction is performed on a grown plane obtained by performing a region growing operation on a valid seed block, thereby increasing accuracy and robustness of a plane detection method.

Description

一种鲁棒的基于深度信息的平面检测方法及系统Robust depth information based plane detection method and system 技术领域Technical field
本发明属于图像处理和计算机视觉领域,尤其涉及一种鲁棒的基于深度信息的平面检测方法及系统。The invention belongs to the field of image processing and computer vision, and in particular relates to a robust depth information based plane detection method and system.
背景技术Background technique
由于平面携带3D场景中物体的方向和尺寸信息,因此可利用平面检测技术进行3D重建。3D重建可以简单概括为室内外场景的平面检测及建立分段平面模型的过程。除此之外,平面检测技术也广泛用于机器人导航系统和计算机视觉中的物体检测。Since the plane carries the direction and size information of the object in the 3D scene, the plane detection technique can be used for 3D reconstruction. 3D reconstruction can be simply summarized as the process of plane detection of indoor and outdoor scenes and the establishment of a segmentation plane model. In addition, planar inspection technology is also widely used for object detection in robot navigation systems and computer vision.
在早期的平面检测工作中,主要利用平面的纹理信息,但当平面颜色或纹理不一致时,会给该类方法带来极大的挑战。现有技术中利用深度图的距离信息解决上述问题,结果也证明利用该方法可以有效应对复杂情形。深度图可由深度相机(如SwissRanger SR40001、Microsoft Kinect)直接生成也可通过软件合成,图中的不同数值反映场景中物体相对于拍摄相机的距离信息。由于深度图表示场景中每个点的空间信息,所以来自同一平面的点将具有相似的空间特征,如梯度和法向量。基于此,有工作提出利用局部梯度分割场景中显著物体的平面,再利用随机抽样一致性算法(Random Sample Consensus,RANSAC)分割地面。还有工作通过提取每个点的法向量的三个分量,并对具有相似方向的点进行聚类,实现实时平面检测,但它们的准确性和鲁棒性都较差。In the early plane inspection work, the texture information of the plane was mainly used, but when the plane color or texture is inconsistent, it will bring great challenges to this method. In the prior art, the distance information of the depth map is used to solve the above problem, and the result also proves that the method can effectively cope with the complicated situation. The depth map can be generated directly by a depth camera (such as SwissRanger SR40001, Microsoft Kinect) or synthesized by software. The different values in the graph reflect the distance information of the object in the scene relative to the camera. Since the depth map represents spatial information for each point in the scene, points from the same plane will have similar spatial characteristics, such as gradients and normals. Based on this, some work proposes to use a local gradient to segment the plane of significant objects in the scene, and then use the Random Sample Consensus (RANSAC) to segment the ground. There are also work to extract real-time plane detection by extracting the three components of the normal vector of each point and clustering points with similar directions, but their accuracy and robustness are poor.
根据工作原理,平面检测方法可以分为三大类:迭代平面拟合法,基于霍夫变换法和区域生长法。迭代平面拟合法是平面检测常用的方法,其典型代表是RANSAC,在RANSAC中根据几个随机选择的点初始化拟合模型。该方法在检测大平面时效果较好,对噪声具有较强的鲁棒性,但是计算量太大,且在 计算过程中会过度简化复杂平面。基于霍夫变换法常用于参数化目标检测,特别是2D平面的线和圆。为了使该类方法可用于3D空间中并且降低运算消耗,出现了多种基于霍夫变换的衍生算法。比如,3D霍夫变换法利用平面在x轴和y轴方向上的斜率及其与坐标原点的距离表示该平面,但在寻找拟合模型的参数时同样有着较高的计算成本,特别是当输入数据较大或累加器敏感时,该问题愈发突出。随机霍夫变换法(Random Hough Transform,RHT)利用概率模型计算参数从而避免寻找最优参数时的高计算成本。区域生长法的主要思想是利用相邻点间的关联性来构建平面,有工作提出基于两个种子点生长的算法,通过已生长区域的质心和协方差矩阵来逐步更新平面参数,但计算量过大。又有工作提出缓存八边形区域生长算法(Cached-Octree Region-Growing,CORG),将点云分割成若干个平面区域,但在相交平面区域可能出现平面过生长问题。另有工作中提出了两种生长策略:在结构化环境的点云中基于子窗口生长算法和在非结构化环境的混合生长算法。当窗口大小设置合适时,该算法比基于点生长的速度更快。此外,还有工作提出鲁棒性原理分量分析法(Robust Principle Component Analysis,RPCA),将所有3D点分成边界线点,角点和面元。平面增长的过程将从一个面元开始,如果该增长面元与其相邻面元的夹角小于某一特定阈值时,该相邻面元便会被包含在当前增长的平面中。该方法在相邻面元的夹角为锐角时可正常工作,但当相邻面元的夹角为钝角时,该方法则有可能失败。According to the working principle, the plane detection methods can be divided into three categories: iterative plane fitting method, based on Hough transform method and region growing method. The iterative plane fitting method is a commonly used method for plane detection, and its typical representative is RANSAC, in which the fitting model is initialized according to several randomly selected points in RANSAC. The method has better effect in detecting large planes and is robust to noise, but the calculation amount is too large, and Complex planes are oversimplified during the calculation process. The Hough transform method is often used for parameterized target detection, especially for lines and circles in 2D planes. In order to make this type of method available in 3D space and reduce computational cost, a variety of Hough transform-based derivative algorithms have emerged. For example, the 3D Hough transform method uses the slope of the plane in the x-axis and y-axis directions and its distance from the origin of the coordinate to represent the plane, but it also has a higher computational cost when looking for the parameters of the fitted model, especially when This problem becomes more pronounced when the input data is large or the accumulator is sensitive. The Random Hough Transform (RHT) uses a probabilistic model to calculate parameters to avoid high computational costs when finding optimal parameters. The main idea of the regional growth method is to use the correlation between adjacent points to construct the plane. The work proposes an algorithm based on the growth of two seed points. The plane parameters are gradually updated by the centroid and covariance matrix of the grown region, but the calculation is too big. Another work proposes the Cached-Octree Region-Growing (CORG) algorithm to divide the point cloud into several planar regions, but the planar overgrowth problem may occur in the intersecting planar region. In another work, two growth strategies are proposed: a sub-window growth algorithm and a hybrid growth algorithm in an unstructured environment in a point cloud of a structured environment. This algorithm is faster than point-based growth when the window size is set appropriately. In addition, there is work to propose the Robust Principle Component Analysis (RPCA), which divides all 3D points into boundary line points, corner points and bins. The process of plane growth begins with a bin, and if the angle between the growing bin and its neighboring bin is less than a certain threshold, the neighboring bin is included in the currently growing plane. The method works normally when the angle between adjacent bins is an acute angle, but the method may fail when the angle between adjacent bins is an obtuse angle.
发明内容Summary of the invention
本发明所要解决的技术问题在于提供一种鲁棒的基于深度信息的平面检测方法及系统,旨在解决现有平面检测算法在复杂场景下准确性和鲁棒性都较差的问题。The technical problem to be solved by the present invention is to provide a robust depth information based plane detection method and system, aiming at solving the problem that the existing plane detection algorithm has poor accuracy and robustness in complex scenarios.
本发明是这样实现的,一种鲁棒的基于深度信息的平面检测方法,包括:The present invention is implemented in such a manner that a robust depth information based plane detection method includes:
接收深度图,提取所述深度图中的若干有效种子块; Receiving a depth map, extracting a number of valid seed blocks in the depth map;
根据所述有效种子块进行区域生长,得到所述有效种子块的生成平面;Performing region growing according to the effective seed block to obtain a generating plane of the effective seed block;
对所述有效种子块的生成平面进行过生长纠正或欠生长纠正,得到所述有效种子块的有效生长平面;Performing growth correction or undergrowth correction on the generation plane of the effective seed block to obtain an effective growth plane of the effective seed block;
输出包含有所述有效种子块的有效生长平面的深度图检测平面。A depth map detection plane containing the effective growth plane of the valid seed block is output.
本发明还提供了一种鲁棒的基于深度信息的平面检测系统,包括:The invention also provides a robust depth information based plane detection system, comprising:
提取单元,用于接收深度图,提取所述深度图中的若干有效种子块;An extracting unit, configured to receive a depth map, and extract a number of valid seed blocks in the depth map;
生长单元,用于根据有效种子块进行区域生长,得到所述有效种子块的生成平面;a growth unit for performing region growth according to the effective seed block to obtain a generation plane of the effective seed block;
纠正单元,用于对所述有效种子块的生成平面进行过生长纠正或欠生长纠正,得到所述有效种子块的有效生长平面;a correcting unit, configured to perform growth correction or undergrowth correction on a generating plane of the effective seed block to obtain an effective growth plane of the effective seed block;
输出单元,用于输出包含有所述有效种子块的有效生长平面的深度图检测平面。And an output unit, configured to output a depth map detection plane including an effective growth plane of the effective seed block.
本发明与现有技术相比,有益效果在于:本发明实施例通过提取深度图的有效种子块,根据提取的有效种子块进行区域生长得到每一有效种子块的生长平面,对每一有效种子块的生长平面进行过生长纠正或者欠生长纠正,得到有效生长平面,根据该有效生长平面输出深度图检测平面。本发明实施例通过对有效种子块区域生长得到的生长平面进行过生长纠正或欠生长纠正,提高了平面检测方法的准确性和鲁棒性。Compared with the prior art, the present invention has the beneficial effects that the embodiment of the present invention obtains the growth plane of each effective seed block by extracting the effective seed block of the depth map and performing region growing according to the extracted effective seed block, for each effective seed. The growth plane of the block undergoes growth correction or undergrowth correction to obtain an effective growth plane, and the depth map is detected according to the effective growth plane. The embodiment of the invention improves the accuracy and robustness of the plane detection method by performing growth correction or undergrowth correction on the growth plane obtained by growing the effective seed block region.
附图说明DRAWINGS
图1是本发明实施例提供的一种鲁棒的基于深度信息的平面检测方法的流程图;1 is a flowchart of a robust depth information based plane detection method according to an embodiment of the present invention;
图2是本发明实施例提供的相邻点集的示意图;2 is a schematic diagram of an adjacent point set according to an embodiment of the present invention;
图3是本发明实施例提供的有效种子块的相邻点的示意图;3 is a schematic diagram of adjacent points of an effective seed block according to an embodiment of the present invention;
图4是本发明实施例提供的过生长纠正方法的流程图;4 is a flowchart of an over-growth correction method according to an embodiment of the present invention;
图5是本发明实施例提供的欠生长纠正方法的流程图; FIG. 5 is a flowchart of an undergrowth correction method according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的一种鲁棒的基于深度信息的平面检测系统的结构示意图。FIG. 6 is a schematic structural diagram of a robust depth information based plane detection system according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
图1示出了本发明实施例提供的一种鲁棒的基于深度信息的平面检测方法,包括:FIG. 1 shows a robust depth information based plane detection method provided by an embodiment of the present invention, including:
S101,接收深度图,提取所述深度图中的若干有效种子块;S101. Receive a depth map, and extract a number of valid seed blocks in the depth map.
S102,根据所述有效种子块进行区域生长,得到所述有效种子块的生成平面;S102: Perform area growing according to the effective seed block to obtain a generating plane of the effective seed block.
S103,对所述有效种子块的生成平面进行过生长纠正或欠生长纠正,得到所述有效种子块的有效生长平面;S103, performing growth correction or undergrowth correction on a generating plane of the effective seed block to obtain an effective growth plane of the effective seed block;
S104,输出包含有所述有效种子块的有效生长平面的深度图检测平面。S104. Output a depth map detection plane including an effective growth plane of the effective seed block.
为解决现有平面检测算法在复杂场景下准确性和鲁棒性都较差的问题,本发明实施例提出一种鲁棒的深度信息驱动平面检测的方法(Depth-driven Plane Detection,DPD),即利用深度信息进行平面检测,该平面检测方法包含两部分:基于种子块生长的平面检测和进一步增强算法鲁棒性的后处理过程。该平面检测方法从具有最高平滑度的种子块开始,利用生长平面的拟合平面的平面方程和动态阈值函数来引导生长过程。在此机制的作用下,当种子块生长达到最大范围时,下一个种子块才开始生长,不断迭代生长过程,直到所有平面被检测完。利用动态阈值函数和强化机制的后处理过程可以提高该方法的准确性和鲁棒性,其中后者是针对基于生长的平面检测方法易出现的平面过生长和欠生长问题而提出的。In order to solve the problem that the existing plane detection algorithm is inferior in accuracy and robustness in a complex scenario, the embodiment of the present invention provides a robust Depth-driven Plane Detection (DPD) method. That is, the depth detection is used for plane detection. The plane detection method includes two parts: plane detection based on seed block growth and post-processing process to further enhance the robustness of the algorithm. The plane detection method starts from the seed block with the highest smoothness, and uses the plane equation of the fitting plane of the growth plane and the dynamic threshold function to guide the growth process. Under the action of this mechanism, when the seed block grows to the maximum extent, the next seed block begins to grow, and the growth process is iterated until all the planes are detected. The accuracy and robustness of the proposed method can be improved by using the dynamic threshold function and the post-processing process of the enhancement mechanism. The latter is proposed for the planar overgrowth and undergrowth problems that are easy to occur based on the growth-based planar detection method.
具体地,拟合平面的平面方程,指生长平面通过线性最小二乘平面拟合方 法得到的平面方程,假设该拟合平面的平面方程为z=p00+p10x+p01y,有p00+p10x+p01y-z=0。对于平面上n个像素点:(xi,yi,zi),i=1,2…n,根据线性最小二乘平面拟合法用这n个像素点去拟合上述平面方程,则要使下面公式的值最小:Specifically, the plane equation of the fitted plane refers to the plane equation obtained by the linear least squares plane fitting method of the growth plane, assuming that the plane equation of the fitting plane is z=p 00 +p 10 x+p 01 y, p 00 +p 10 x+p 01 yz=0. For n pixel points on the plane: (x i , y i , z i ), i=1, 2...n, according to the linear least squares plane fitting method, the n pixel points are used to fit the above plane equation, then Minimize the value of the following formula:
Figure PCTCN2017102947-appb-000001
即应满足
Figure PCTCN2017102947-appb-000002
j=00,10,01,求出系数p00,p10,p01,所以得到平面方程z,平面的法向量ni=(p10,p01,-1),di=p00
Figure PCTCN2017102947-appb-000001
That should be satisfied
Figure PCTCN2017102947-appb-000002
j=00,10,01, find the coefficients p 00 , p 10 , p 01 , so the plane equation z is obtained, the normal vector n i = (p 10 , p 01 , -1), d i = p 00 .
下面对本发明实施例进行进一步地阐述:The embodiments of the present invention are further described below:
生成有效种子块:Generate a valid seed block:
受拍摄场景和拍摄相机的影响,由深度相机采集的深度图上有时会有孔洞产生,即没有深度值的像素点。若随机选择生长种子块,容易出现模型拟合失败和计算成本较高的问题。因此,区域生长的关键步骤是选择生长种子块,即选择没有孔洞的区域。Affected by the shooting scene and the camera, there are sometimes holes in the depth map acquired by the depth camera, that is, pixels with no depth value. If the growing seed block is randomly selected, the problem of model fitting failure and high computational cost is prone to occur. Therefore, a key step in region growth is to select growing seed pieces, ie, to select areas without holes.
因此在本步骤中,在输入的深度图上,将一个L×L的矩形窗以光栅扫描方式每次滑动一个像素点以遍历该深度图,且在每个像素点的位置时检查矩形窗内所有的点是否是孔洞点,当该矩形窗内没有孔洞点,则将该矩形窗内的点集视为有效种子块,并通过线性最小二乘平面拟合法(Linear Least Squares,LLS)计算出该有效种子块的平面方程和对应的平滑度,线性最小二乘平面拟合法是通过最小化误差的平方和寻找数据的最佳匹配函数。通过如此不断的扫描,提取出输入的深度图内所有的有效种子块。Therefore, in this step, on the input depth map, an L×L rectangular window is slid one pixel at a time in a raster scan manner to traverse the depth map, and the rectangular window is checked at the position of each pixel point. Whether all the points are hole points, when there is no hole point in the rectangular window, the point set in the rectangular window is regarded as a valid seed block, and is calculated by linear least square plane fitting method (Linear Least Squares, LLS) The plane equation of the effective seed block and the corresponding smoothness, the linear least squares plane fitting method is the best matching function for finding the data by minimizing the sum of the squares of the errors. Through such continuous scanning, all valid seed blocks in the input depth map are extracted.
在3D空间中,平面可以用法向量n和与坐标系原点的距离d表示。利用线性最小二乘平面拟合法可以得到有效种子块的拟合平面,其中,假设有效种子块的拟合平面为S,有效种子块的平面方程为f(t),有S=f(t),即平面方程是用数学方式来表示拟合平面。假设p是第i个有效种子块上的任一点,则第i个有效种子块的拟合平面与点p的拟合误差定义为:In 3D space, the plane can be represented by the usage vector n and the distance d from the origin of the coordinate system. The fitting plane of the effective seed block can be obtained by linear least squares plane fitting method. The plane of the effective seed block is assumed to be S, and the plane equation of the effective seed block is f(t), with S=f(t) , that is, the plane equation is mathematically used to represent the plane of fit. Assuming that p is any point on the i-th valid seed block, the fitting error of the fit plane of the i-th effective seed block to point p is defined as:
ei(p)=|ni·p+di|;e i (p)=|n i ·p+d i |;
其中,ni表示第i个有效种子块的拟合平面的法向量,di表示第i个有效种子 块的拟合平面与坐标系原点的距离。Where n i represents the normal vector of the fitting plane of the i-th effective seed block, and d i represents the distance between the fitting plane of the i-th effective seed block and the origin of the coordinate system.
均方根拟合误差δi定义为:The root mean square fitting error δ i is defined as:
Figure PCTCN2017102947-appb-000003
Figure PCTCN2017102947-appb-000003
其中,P表示有效种子块内所有像素的点集,|P|表示有效种子块内的像素点数。Where P represents the set of points of all pixels in the valid seed block, and |P| represents the number of pixels in the valid seed block.
在本发明中,均方根拟合误差δi用来表示有效种子块的平滑度,因此较小的均方根拟合误差δi意味着较高的平滑度。因为平面生长过程始于平滑度最高的有效种子块,可确保平面的准确生长,所以在本实施例中根据均方根拟合误差δi对所有的有效种子块进行由小到大的排序。In the present invention, the root mean square fitting error δ i is used to represent the smoothness of the effective seed block, so a smaller root mean square fitting error δ i means higher smoothness. Since the planar growth process starts with the most smooth effective seed block, accurate growth of the plane can be ensured, so in this embodiment, all the effective seed blocks are sorted from small to large according to the root mean square fitting error δ i .
区域生长过程:区域生长是指从一个有效种子块生成平面的迭代过程。在具体的生长过程中,并非所有的有效种子块最后都会得到生长的机会,因为区域生长是从平滑度最高的有效种子块开始,而先用来生长的有效种子块所生长得到生长平面会包含后面一些还未使用的有效种子块,这些被包含的有效种子块就不得到生长的机会。Regional growth process: Regional growth is an iterative process that generates planes from an effective seed block. In the specific growth process, not all effective seed blocks will eventually have the opportunity to grow, because the regional growth begins with the smoothest effective seed block, and the growth of the effective seed block used for growth will result in the inclusion of growth planes. With some valid seed blocks that have not been used, these included effective seed blocks do not have the opportunity to grow.
基于区域生长方法的关键是区分当前生长平面的内点和局外点,其判断的依据是阈值T,其中,阈值T为本发明实施例提出的动态阈值函数的输出。当检测到生长平面的相邻点集是空集,或者相邻点集内没有适合当前生长平面的点时,便认定当前平面生长达到最大范围,当前平面随即结束生长。如图2所示,相邻点集指与当前生长平面相邻的所有像素点的集合,即点1至点16组成当前生长平面的相邻点集。The key to the region-based growth method is to distinguish the inner point and the outer point of the current growth plane, and the judgment is based on the threshold T, wherein the threshold T is the output of the dynamic threshold function proposed by the embodiment of the present invention. When it is detected that the adjacent point set of the growth plane is an empty set, or there is no point in the adjacent point set suitable for the current growth plane, it is determined that the current plane growth reaches the maximum range, and the current plane ends the growth. As shown in FIG. 2, the adjacent point set refers to a set of all pixel points adjacent to the current growth plane, that is, points 1 to 16 constitute a set of adjacent points of the current growth plane.
具体地,生长过程主要内容包括:Specifically, the main contents of the growth process include:
第一阶段,检测平滑度最高的有效种子块的所有相邻点,在本步骤中,如图3所示,以有效种子块上的点A为中心,取3×3的矩形窗的相邻点,共8个相邻点,即点1至点8。当检测到相邻点不是孔洞点,且不属于之前所有已检测到的平面时,将该相邻点代入当前生长平面的平面方程,通过拟合误差公式 ei(p)=|ni·p+di|得到相应的拟合误差,将该相邻点代入拟合误差公式,是指将该相邻点的点坐标替换点p,计算得到拟合误差。当拟合误差小于阈值T时,将该相邻点合并到当前生长平面内,反之,该相邻点视为当前生长平面的局外点。在本阶段中,需要对每一个相邻点计算一次拟合误差。In the first stage, all adjacent points of the effective seed block with the highest smoothness are detected. In this step, as shown in FIG. 3, the adjacent side of the effective seed block is taken as the center, and the adjacent side of the 3×3 rectangular window is taken. Point, a total of 8 adjacent points, point 1 to point 8. When it is detected that the adjacent point is not the hole point and does not belong to all the previously detected planes, the adjacent point is substituted into the plane equation of the current growth plane by fitting the error formula e i (p)=|n i · The corresponding fitting error is obtained by p+d i |, and the adjacent point is substituted into the fitting error formula, which means that the point coordinate of the adjacent point is replaced by the point p, and the fitting error is calculated. When the fitting error is less than the threshold T, the adjacent point is merged into the current growth plane, and conversely, the adjacent point is regarded as the outer point of the current growth plane. In this phase, a fitting error needs to be calculated for each adjacent point.
第二阶段,利用线性最小二乘平面拟合方法LLS,更新平面方程的参数,均方根拟合误差也随之更新。具体地,在第一阶段时,已经拟合了一次生长平面,计算了拟合误差。当新的相邻点合并到当前生长平面时,要重新利用LLS来拟合出新的生长平面,计算新的拟合误差,这是个不断迭代的过程。使得平面在生长过程中可以一次次进行平面方程的优化调整。在本阶段中,每一次生长之后,平面方程都会更新一次,同时也会对平面上的所有点计算一个均方根拟合误差。In the second stage, the linear least squares plane fitting method LLS is used to update the parameters of the plane equation, and the root mean square fitting error is also updated. Specifically, at the first stage, a growth plane has been fitted and the fitting error is calculated. When new adjacent points are merged into the current growth plane, it is an iterative process to re-use LLS to fit the new growth plane and calculate a new fitting error. The planar plane can be optimally adjusted again and again during the growth process. In this phase, the plane equation is updated once after each growth, and a root mean square fitting error is also calculated for all points on the plane.
在现有技术中,大多平面检测算法采用固定值作为阈值,因此容易造成平面的过生长或者欠生长问题。后来有算法提出基于深度图拍摄相机噪声模型的阈值函数,但这些方法中提出的阈值会随着深度值增加而单调递增。然而,这与实际不完全符合,而且出现下面的三种情形:1)阈值较小时,生长平面容易欠生长;2)阈值较大时,远端的小平面容易造成过生长;3)当生长平面平行于相机平面时,由于平面的深度距离没有改变,阈值会成为固定值。In the prior art, most plane detection algorithms use a fixed value as a threshold value, and thus easily cause planar overgrowth or undergrowth problems. Later, an algorithm proposed a threshold function based on the depth map to capture the camera noise model, but the thresholds proposed in these methods will increase monotonically as the depth value increases. However, this is not completely consistent with the actual situation, and the following three situations occur: 1) when the threshold is small, the growth plane is prone to undergrowth; 2) when the threshold is large, the distal facet is prone to overgrowth; 3) when growing When the plane is parallel to the camera plane, the threshold becomes a fixed value because the depth of the plane does not change.
为克服上述缺点,本发明实施例设计一个基于噪声模型和平面大小的动态阈值函数。To overcome the above disadvantages, the embodiment of the present invention designs a dynamic threshold function based on a noise model and a plane size.
该动态阈值函数定义如下:The dynamic threshold function is defined as follows:
Figure PCTCN2017102947-appb-000004
Figure PCTCN2017102947-appb-000004
其中,I表示所述深度图,Id表示所述深度图上代入平面方程利用拟合误差公式计算拟合误差的点的深度值,在本实施例中,该点为当前生长平面的相邻点,τ表示生长平面的允许最大粗糙度,λ决定阈值的增长速度,H和W分别 表示深度图的高度和宽度,α和k为常数,j表示生长过程中平面的迭代次数,初始化令j=1,输出最大的阈值T由Id决定。Wherein, I represents the depth map, and I d represents a depth value of a point on the depth map that is substituted into a plane equation using a fitting error formula to calculate a fitting error. In this embodiment, the point is the adjacent of the current growth plane. Point, τ represents the maximum allowable roughness of the growth plane, λ determines the growth rate of the threshold, H and W represent the height and width of the depth map, respectively, α and k are constants, j represents the number of iterations of the plane during the growth process, initialization order j =1, the maximum threshold T of the output is determined by I d .
该动态阈值函数能很好解决基于噪声模型的问题,比如:当生长平面是远端的小平面时,由于考虑了生长平面的大小,可以避免大阈值造成的过生长;当生长平面平行于相机平面时,由于考虑了生长过程的噪声积累,阈值将不是固定值。The dynamic threshold function can solve the problem based on the noise model well. For example, when the growth plane is the distal facet, the overgrowth caused by the large threshold can be avoided because the growth plane is considered; when the growth plane is parallel to the camera In the plane, the threshold will not be a fixed value due to the accumulation of noise taking into account the growth process.
强化机制的后处理过程:Post-processing of the strengthening mechanism:
具体地,强制机制的后处理过程包括过生长纠正过程和欠生长纠正过程,下面分别对过生长纠正过程和欠生长纠正过程进行阐述:Specifically, the post-processing process of the mandatory mechanism includes an over-growth correction process and an under-growth correction process, and the over-growth correction process and the under-growth correction process are respectively described below:
1、过生长纠正过程:1. Over-growth correction process:
在平面生长过程中,其中一个生长平面会优先生长到其与另一个生长平面的相交线。过生长是指若平面交线的相邻像素点与当前平面的拟合误差小于当前的阈值,当前生长平面错误生长到相交平面上的现象。其中,生长方向可分为纵向生长和横向生长。During planar growth, one of the growth planes preferentially grows to its intersection with another growth plane. Overgrowth refers to the phenomenon that the current growth plane erroneously grows onto the intersecting plane if the fitting error between the adjacent pixel points of the plane intersection line and the current plane is smaller than the current threshold. Among them, the growth direction can be divided into longitudinal growth and lateral growth.
利用两平面的平面方程,相交线可用参数式方程表示为:Using the plane equations of the two planes, the intersection line can be expressed as a parametric equation:
Figure PCTCN2017102947-appb-000005
Figure PCTCN2017102947-appb-000005
其中,×表示两向量的叉乘,
Figure PCTCN2017102947-appb-000006
表示检测平面Si的法向量,
Figure PCTCN2017102947-appb-000007
表示最大平面Su的法向量,t表示未知参数,
Figure PCTCN2017102947-appb-000008
表示相交线的方向向量,p0为相交线上的一点,定义为:
Where × represents the cross product of the two vectors,
Figure PCTCN2017102947-appb-000006
Represents the normal vector of the detection plane S i ,
Figure PCTCN2017102947-appb-000007
Represents the normal vector of the largest plane S u , t represents the unknown parameter,
Figure PCTCN2017102947-appb-000008
Indicates the direction vector of the intersection line, p 0 is a point on the intersection line, defined as:
Figure PCTCN2017102947-appb-000009
Figure PCTCN2017102947-appb-000009
其中,
Figure PCTCN2017102947-appb-000010
表示Si与坐标系原点的距离,
Figure PCTCN2017102947-appb-000011
表示Si与坐标系原点的距离。
among them,
Figure PCTCN2017102947-appb-000010
Indicates the distance between S i and the origin of the coordinate system,
Figure PCTCN2017102947-appb-000011
Indicates the distance between S i and the origin of the coordinate system.
纠正过程主要内容包括:The main contents of the correction process include:
首先,准确检测出过生长区域S0First, the overgrowth region S 0 is accurately detected.
过生长的程度主要取决于相交平面的夹角、深度数据的精确度和阈值T,其中,夹角θ为两平面法向量点乘的反余弦值,阈值T为动态阈值函数的输出 最大值。过生长区域的理论宽度w等于阈值T与夹角θ的正弦值的比值,为了保证过生长区域内所有像素点都在扫描范围内,本发明实施例将实际宽度取为[w](1+ε),其中,[w]表示接近于w的较大整数,ε>0,这样可以保证实际宽度大于理论宽度。The degree of overgrowth depends mainly on the angle of the intersection plane, the accuracy of the depth data, and the threshold T, where the angle θ is the inverse cosine of the two-plane normal vector point multiplication, and the threshold T is the output of the dynamic threshold function. Maximum value. The theoretical width w of the overgrowth region is equal to the ratio of the threshold value T to the sine value of the angle θ. To ensure that all pixels in the overgrowth region are within the scan range, the embodiment of the present invention takes the actual width as [w] (1+). ε), where [w] represents a larger integer close to w, ε>0, which ensures that the actual width is greater than the theoretical width.
其次,重新分配。Second, redistribute.
重新分配指的是将过生长区域S0的最远边界上点代入两平面的平面方程,并分别计算点到平面的拟合误差,比较两个拟合误差大小,将过生长区域S0合并到具有较小拟合误差所属平面上。Redistribution refers to the plane equation that substitutes the point on the farthest boundary of the overgrowth region S 0 into two planes, and calculates the fitting error of the point to the plane respectively, compares the two fitting error magnitudes, and merges the overgrowth region S 0 To the plane with a small fitting error.
最后,错误生长的平面被纠正,并更新其平面方程。同样的,将该纠正过程用于其他已检测到的平面。Finally, the plane of erroneous growth is corrected and its plane equation is updated. Again, this correction process is used for other detected planes.
过生长纠正步骤的流程如图4所示,包括:The process of the overgrowth correction step is shown in Figure 4, including:
(1)以当前进行纠正的有效种子块的生长平面作为检测平面Si,找出检测平面Si的相邻平面;(1) finding the adjacent plane of the detection plane S i with the growth plane of the effective seed block currently corrected as the detection plane S i ;
(2)通过相交线的参数方程,找出检测平面Si与相邻平面的相交线;(2) Find the intersection line of the detection plane S i and the adjacent plane by the parametric equation of the intersection line;
(3)判断该相交线是否存在于当前深度图二维2D范围内,若存在,设置检测扫描条的宽度;反之,移动到下个相邻平面,再找出相交线并判断它是否存在当前深度图2D范围内;(3) judging whether the intersection line exists in the 2D 2D range of the current depth map, if present, setting the width of the detection scan bar; otherwise, moving to the next adjacent plane, and then finding the intersection line and determining whether it exists currently Depth map 2D;
(4)沿着相交线滑动该检测扫描条扫描像素点,获取过生长区域So(4) sliding the detection scan bar along the intersection line to scan the pixel points to obtain the overgrowth region S o ;
(5)根据过生长区域S0判断当前检测平面Si是否过生长,若过生长,则过生长区域S0与相邻平面合并,反之,过生长区域S0与检测平面Si合并。在本步骤中,即若过生长区域So上的点代入相邻平面时发现其拟合误差比代入当前检测平面的拟合误差小,就说明过生长区域应该属于相邻平面,因此推出当前检测平面发生了过生长问题。(5) It is judged whether or not the current detection plane S i is overgrowth according to the overgrowth region S 0 . If over growth, the overgrowth region S 0 is merged with the adjacent plane, and conversely, the overgrowth region S 0 is merged with the detection plane S i . In this step, if the point on the overgrowth region S o is substituted into the adjacent plane, it is found that the fitting error is smaller than the fitting error substituted into the current detection plane, indicating that the overgrowth region should belong to the adjacent plane, so the current A growth problem has occurred in the detection plane.
(6)在合并过程中,过生长区域So可能会碎化成一些小的孤立块,检测并重新分配这些小的孤立块。具体地,在上一步(5)的检测中产生了主要的、次要的过生长区域,并且在主要区域已经被重新分配后,次要的区域就可能成 为孤立区域。重新分配建立在将孤立区域中的点代入到相邻的平面方程中,均方根拟合误差最小的那个平面就是孤立区域属于的平面。(6) During the merging process, the overgrowth area S o may be broken into small isolated blocks to detect and redistribute these small isolated blocks. Specifically, a primary, secondary overgrowth region is created in the detection of the previous step (5), and after the main region has been reallocated, the secondary region may become an isolated region. Redistribution is based on substituting points in isolated regions into adjacent plane equations. The plane with the smallest root mean square fitting error is the plane to which the isolated region belongs.
(7)分别更新当前检测平面Si与其相邻平面的平面方程。因为每个平面具有属于自己的平面方程,因此在本步骤中需要分别更新二者的平面方程。(7) Updating the plane equation of the current detection plane S i and its adjacent plane, respectively. Since each plane has its own plane equation, it is necessary to update the plane equations of both in this step.
(8)迭代上面的纠正过程,直到所有有效种子块的生长平面都被检测完,完成过生长纠正。(8) Iterate the above correction process until the growth planes of all the valid seed blocks are detected, and the growth correction is completed.
2、欠生长纠正过程:2. Under-growth correction process:
为解决生长平面的欠生长情况,本发明实施例提出平面合并的方法,即当两个生长平面同时满足平行、共面、相邻这三个条件时,可合并成一个较大平面。在欠生长纠正的方法按顺序检测这些关系。In order to solve the undergrowth of the growth plane, the embodiment of the present invention proposes a method of plane merging, that is, when the two growth planes satisfy the three conditions of parallel, coplanar, and adjacent, they can be merged into one larger plane. These relationships are detected in sequence in the method of under-growth correction.
平行:由于实际情况中要考虑生长平面的拟合方程的误差和深度噪声,当两生长平面夹角小于当前平面的法向量与最大误差估计平面法向量的夹角时,判别两生长平面平行。Parallel: Since the error and depth noise of the fitting equation of the growth plane should be considered in the actual situation, when the angle between the two growth planes is smaller than the angle between the normal vector of the current plane and the maximum error estimation plane normal vector, the two growth planes are determined to be parallel.
共面:分别计算两个生长平面上每点与检测平面的拟合误差,即两个生长平面中较小的生长平面的点到较大生长的平面的拟合误差,和较大的生长平面上的点到自己的拟合误差,当计算得到的两个拟合误差的Hellinger距离小于阈值时,判别两个生长平面共面。Hellinger距离通常用来度量两个概率分布的相似度。但若两个生长平面的面积大小相差太大,即使真实情况下两个生长平面共面,也可以获得大的Hellinger距离,所以针对于大小相差大的两个生长平面,利用判断阈值Tm来判断是否共面。Coplanar: Calculate the fitting error of each point on the two growth planes to the detection plane, that is, the fitting error of the point of the smaller growth plane in the two growth planes to the plane of the larger growth, and the larger growth plane From the point above to the fitting error of the self, when the calculated Hellinger distance of the two fitting errors is less than the threshold, the two growth planes are discriminated. The Hellinger distance is usually used to measure the similarity of two probability distributions. However, if the size of the two growth planes is too different, even if the two growth planes are coplanar in real conditions, a large Hellinger distance can be obtained, so for the two growth planes with large differences in size, the judgment threshold Tm is used. Determine whether it is coplanar.
相邻:将当前生长平面膨胀一个像素后,检测到其边缘与另一生长平面的边缘有交点,则两生长平面为相邻平面。Adjacent: After expanding the current growth plane by one pixel, it is detected that its edge has an intersection with the edge of another growth plane, and the two growth planes are adjacent planes.
欠生长纠正步骤的流程如图5所示,包括:The process of the undergrowth correction step is shown in Figure 5, including:
(1)以所有生长平面作为检测平面,将所有的检测平面根据面积大小降序排列并存储,找出面积最大的检测平面Su,其中,以列表的形式保存降序排列后的检测平面的面积大小; (1) Using all the growth planes as the detection plane, all the detection planes are arranged and stored in descending order according to the area size, and the detection plane S u having the largest area is found, wherein the area of the detection plane after the descending arrangement is saved in the form of a list. ;
(2)计算出所有两两检测平面的夹角θij,并将θij放入一个上三角矩阵中;(2) Calculate the angle θ ij of all the two detection planes, and put θ ij into an upper triangular matrix;
(3)利用该上三角矩阵,找出所有与检测平面Su平行的检测平面。本步骤中,可以通过两检测平面的夹角是否小于检测平面Su法向量与最大误差估计平面法向量的夹角来判断平面平行,若小于,则两检测平面平行,反之,两检测平面不平行;(3) Using the upper triangular matrix, find all detection planes parallel to the detection plane S u . In this step, whether the angle between the two detection planes is smaller than the angle between the detection plane S u normal vector and the maximum error estimation plane normal vector determines whether the plane is parallel. If it is smaller, the two detection planes are parallel. Otherwise, the two detection planes are not parallel;
(4)将与检测平面Su平行的检测平面按照面积大小进行降序排列。具体地,在过生长纠正和欠生长纠正中,纠正的原则都是先从面积大的平面开始处理,由于面积越大的平面,其平面方程越准确。(4) The detection planes parallel to the detection plane S u are arranged in descending order according to the size of the area. Specifically, in over-growth correction and under-growth correction, the principle of correction is to start from a plane with a large area. The plane equation is more accurate due to the larger area.
(5)以Sk表示与Su相平行的任一检测平面,假设平面对Sk与Su平行,分别计算出检测平面Sk上每个像素点与检测平面Su的拟合误差eku,及检测平面Su上每点个像素点与自身的拟合误差euu(5) S k denotes any detection plane parallel to S u , assuming that the plane pairs S k and S u are parallel, respectively calculating the fitting error of each pixel point on the detection plane S k and the detection plane S u Ku , and the fitting error e uu of each pixel point on the detection plane S u ;
(6)判断检测平面Su是否为较大平面,较大平面指大小超过深度图的六分之一的平面;(6) determining whether the detection plane S u is a large plane, and the larger plane refers to a plane whose size exceeds one sixth of the depth map;
(7)若检测平面Su不是较大平面,将步骤(5)中的两个拟合误差用直方图表示,并计算该直方图中两曲线的Hellinger距离。判断所述hellinger距离是否小于hellinger距离判断阈值Th,当其小于hellinger距离判断阈值Th时,则Sk与Su共面,若不小于,则Sk与Su不共面,该hellinger距离判断阈值Th为常数;(7) If the detection plane S u is not a large plane, the two fitting errors in the step (5) are represented by a histogram, and the Hellinger distance of the two curves in the histogram is calculated. Determining whether the hellinger distance is smaller than a hellinger distance determination threshold T h , and when it is smaller than a hellinger distance determination threshold T h , then S k is coplanar with S u , and if not smaller, S k and S u are not coplanar, the hellinger The distance judgment threshold T h is a constant;
(8)若检测平面Su是较大平面,则计算检测平面Sk上每个像素点与检测平面Su的拟合误差eku。当拟合误差eku小于判断阈值Tm时,则Sk与Su共面,若不小于,则Sk与Su不共面,该判断阈值Tm为常数(8) If the detection plane S u is a large plane, the fitting error e ku of each pixel point on the detection plane S k and the detection plane S u is calculated. When the fitting error e ku is smaller than the judgment threshold T m , then S k is coplanar with S u , and if not smaller, S k and S u are not coplanar, and the judgment threshold T m is constant.
(9)若Sk与Su共面,则进一步判断Sk与Su是否相邻,相邻的共面对可以合并;(9) If S k and S u are coplanar, it is further determined whether S k and S u are adjacent, and adjacent common faces can be merged;
(10)若共面对Sk与Su相邻,则将检测平面Sk与检测平面Su合并,更新Su的平面方程;(10) If a total of S k is adjacent to S u , the detection plane S k is merged with the detection plane S u to update the plane equation of S u ;
(11)若Sk与Su平行,则Sk的平行平面也必然平行于检测平面Su,因此 将Sk的平行平面加入检测平面Su的平行组;(11) If S k is parallel to S u , the parallel plane of S k is also necessarily parallel to the detection plane S u , so the parallel plane of Sk is added to the parallel group of detection planes S u ;
(12)所有Su的平行平面是否都被检测,若检测完,则针对检测平面Su的欠生长纠正步骤结束,反之,则移动到下一个平行平面,从步骤(5)开始循环,直到所有平行平面被检测完。(12) Whether all parallel planes of S u are detected, if the detection is completed, the undergrowth correction step for the detection plane S u ends, otherwise, moves to the next parallel plane, and starts looping from step (5) until All parallel planes are detected.
(13)若针对检测平面Su的欠生长纠正完毕,则按照所有检测平面的面积大小排列顺序,检测下一检测平面,直至所有检测平面纠正完毕。(13) If the undergrowth correction for the detection plane S u is completed, the next detection plane is detected according to the order of the area of all the detection planes until all the detection planes are corrected.
本发明提供的上述实施例在检测复杂纹理的平面时,利用深度信息驱动平面检测模型对由深度相机生成的深度图采用种子生长方法,且对种子块生长完成的平面进行后处理,使得对各种室内场景和深度噪声的平面检测更加鲁棒,提高平面检测的准确率。此外,当相邻的平面需要精确边界时,强化机制的后处理过程可以重新给平面分配正确的边界点。The above embodiment provided by the present invention uses a depth information to drive a plane detection model to detect a depth map generated by a depth camera using a seed growth method, and post-processes a plane on which the seed block is grown, so that each Plane detection of indoor scenes and depth noise is more robust, improving the accuracy of plane detection. In addition, when adjacent planes require precise boundaries, the post-processing of the enhancement mechanism can re-allocate the correct boundary points to the plane.
本发明提供的上述实施例可以应用于如:鲁棒的平面检测(墙面,桌面等)、室内场景重建和位置识别、机器人导航系统、计算机视觉领域的物体识别等领域。The above embodiments provided by the present invention can be applied to fields such as robust planar detection (wall surface, desktop, etc.), indoor scene reconstruction and position recognition, robot navigation systems, and object recognition in the field of computer vision.
图6示出了本发明实施例提供的一种鲁棒的基于深度信息的平面检测系统,包括:FIG. 6 shows a robust depth information based plane detection system provided by an embodiment of the present invention, including:
提取单元601,用于接收深度图,提取所述深度图中的若干有效种子块;An extracting unit 601, configured to receive a depth map, and extract a number of valid seed blocks in the depth map;
生长单元602,用于根据所述有效种子块进行区域生长,得到所述有效种子块的生成平面;a growing unit 602, configured to perform region growing according to the effective seed block, to obtain a generating plane of the effective seed block;
纠正单元603,用于对所述有效种子块的生成平面进行过生长纠正或欠生长纠正,得到所述有效种子块的有效生长平面;a correcting unit 603, configured to perform a growth correction or an undergrowth correction on a generating plane of the effective seed block to obtain an effective growth plane of the effective seed block;
输出单元604,用于输出包含有所述有效种子块的有效生长平面的深度图检测平面。The output unit 604 is configured to output a depth map detection plane including an effective growth plane of the effective seed block.
进一步地,提取单元601具体用于:Further, the extracting unit 601 is specifically configured to:
以所述深度图的每一像素点为中心,将预置大小的矩形窗以光栅扫描方式遍历所述深度图; Centering on each pixel of the depth map, traversing the depth map in a raster scan manner with a preset size rectangular window;
在遍历所述深度图的每一像素点时,检查所述矩形窗内的所有点是否是孔洞点;When traversing each pixel of the depth map, checking whether all points in the rectangular window are hole points;
若所述矩形窗内不存在孔洞点,则将所述矩形窗内的点集作为有效种子块;If there is no hole point in the rectangular window, the point set in the rectangular window is used as a valid seed block;
通过线性最小二乘平面拟合法计算出每一所述有效种子块的平面方程和平滑度。The plane equation and smoothness of each of the effective seed blocks are calculated by a linear least squares plane fitting method.
其中,以数学方式的平面方程来表达拟合平面,则提取单元还用于:Where the mathematical plane equation is used to express the fitting plane, the extraction unit is also used to:
利用线性最小二乘平面拟合法得到所述有效种子块的拟合平面,所述拟合平面用法向量n和与坐标系原点的距离d表示;Obtaining a fitting plane of the effective seed block by using a linear least squares plane fitting method, where the fitting plane usage vector n and the distance d from the origin of the coordinate system are represented;
计算所述有效种子块的拟合平面与所述有效种子块上的点的拟合误差;Calculating a fitting error of a fitted plane of the effective seed block and a point on the effective seed block;
以p表示第i个有效种子块上的任一点,ni表示第i个有效种子块的拟合平面的法向量,di表示第i个有效种子块的拟合平面与坐标系原点的距离,ei(p)表示第i个有效种子块的拟合平面与第i个有效种子块上的点p的拟合误差,则ei(p)=|ni·p+di|;Let p denote any point on the i-th effective seed block, n i denote the normal vector of the fitting plane of the i-th effective seed block, and d i denote the distance between the fitting plane of the i-th effective seed block and the origin of the coordinate system , e i (p) represents the fitting error of the fitting plane of the i-th effective seed block and the point p on the i-th effective seed block, then e i (p)=|n i ·p+d i |
根据所述拟合误差求得均方根拟合误差,以所述均方根拟合误差表示所述有效种子块的平滑度;Calculating a root mean square fitting error according to the fitting error, and indicating a smoothness of the effective seed block by the root mean square fitting error;
以δi根据所述均方根拟合误差,则
Figure PCTCN2017102947-appb-000012
,其中P表示有效种子块内所有像素点的点集,|P|表示有效种子块内的像素点数;
Calculating the error according to the root mean square with δ i
Figure PCTCN2017102947-appb-000012
Where P represents the set of points of all pixels within the valid seed block, and |P| represents the number of pixels within the valid seed block;
根据有效种子块的均方根拟合误差,按照由小到大的顺序进行排序。According to the root mean square fitting error of the effective seed block, the order is sorted in order from small to large.
进一步地,生长单元602具体用于:Further, the growth unit 602 is specifically configured to:
检测平滑度最高的有效种子块的所有相邻点;Detecting all adjacent points of the most smooth effective seed block;
若当前检测的所述有效种子块的相邻点不是孔洞,且不属于其他有效种子块的生长平面,则将当前检测的所述有效种子块的相邻点代入所述有效种子块的平面方程中,通过拟合误差公式ei(p)=|ni·p+di|计算得到对应的拟合误差;If the currently detected adjacent points of the valid seed block are not holes and do not belong to the growth plane of other valid seed blocks, then the adjacent points of the currently detected effective seed block are substituted into the plane equation of the effective seed block. The corresponding fitting error is calculated by fitting the error formula e i (p)=|n i ·p+d i |
判断所述拟合误差是否小于阈值T,若小于,则将当前检测的有效种子块的相邻点合并到所述有效种子块当前生长的生长平面内,若大于,则将所述相 邻点视为当前生长的生长平面的局外点;Determining whether the fitting error is less than a threshold T, if less than, merging adjacent points of the currently detected effective seed block into a growth plane in which the effective seed block is currently growing, and if larger, the phase is The neighbor is considered to be the extraneous point of the growth plane of the current growth;
利用线性最小二乘平面拟合法,更新所述有效种子块的方程的参数,并据此更新均方根拟合误差;Updating the parameters of the equation of the effective seed block by using a linear least squares plane fitting method, and updating the root mean square fitting error accordingly;
当判断所述有效种子块的生长平面的相邻点集为空集,或相邻点集内没有适合当前生长的生长平面的相邻点时,停止生长,得到有效种子块的生长平面;When it is determined that the adjacent point set of the growth plane of the effective seed block is an empty set, or there is no adjacent point in the adjacent point set that is suitable for the currently growing growth plane, the growth is stopped, and a growth plane of the effective seed block is obtained;
其中,所述阈值T为动态阈值函数的输出,所述动态阈值函数为:Wherein the threshold T is an output of a dynamic threshold function, and the dynamic threshold function is:
Figure PCTCN2017102947-appb-000013
Figure PCTCN2017102947-appb-000013
I表示所述深度图,Id表示所述深度图上代入平面方程利用拟合误差公式计算拟合误差的点的深度值,τ表示生长平面的允许最大粗糙度,λ决定阈值的增长速度,H和W分别表示深度图的高度和宽度,α和k为常数,j表示生长过程中生长平面的迭代次数,初始化令j=1,输出最大的阈值T由Id决定。I denotes the depth map, I d denotes a depth value of a point on the depth map that is substituted into a plane equation using a fitting error formula to calculate a fitting error, τ denotes an allowable maximum roughness of the growth plane, and λ determines a growth rate of the threshold, H and W represent the height and width of the depth map, respectively, α and k are constants, j represents the number of iterations of the growth plane during growth, the initialization order j=1, and the maximum threshold T of the output is determined by I d .
进一步地,纠正单元603对所述有效种子块的生成平面进行过生长纠正的步骤包括:Further, the step of correcting the growth plane of the effective seed block by the correcting unit 603 includes:
以当前进行纠正的有效种子块的生长平面作为检测平面,查找所述检测平面的相邻平面;Finding an adjacent plane of the detection plane by using a growth plane of a valid seed block that is currently corrected as a detection plane;
通过相交线的参数方程,找到所述检测平面与当前检测的相邻平面的相交线;Finding a line of intersection of the detection plane and the currently detected adjacent plane by a parametric equation of the intersection line;
判断所述相交线是否存在于所述深度图的二维范围内,若不存在,检测下一相邻平面,并找出所述检测平面与当前检测的相邻平面的相交线;Determining whether the intersection line exists in a two-dimensional range of the depth map, and if not, detecting a next adjacent plane, and finding a line intersecting the detection plane with the currently detected adjacent plane;
若存在,则设置检测扫描条的宽度,将所述检测扫描条沿所述相交线进行像素点扫描,得到过生长区域;If yes, setting a width of the detection scan strip, and scanning the detection scan strip along the intersection line to obtain a super-growth region;
根据所述过生长区域判断所述检测平面是否过生长,若判断所述检测平面过生长,则将所述过生长区域与所述相邻平面合并,若判断所述检测平面未过生长,则将所述过生长区域与所述检测平面合并,得到有效生长平面;其中, 在合并过程中,检测并重新分配碎化产生的孤立块;Determining, according to the overgrowth region, whether the detection plane is overgrowth, and if it is determined that the detection plane is overgrowth, combining the overgrowth region with the adjacent plane, if it is determined that the detection plane has not grown, Combining the overgrowth region with the detection plane to obtain an effective growth plane; wherein Detecting and reallocating isolated blocks resulting from fragmentation during the merging process;
分别更新所述检测平面和所述相邻平面的平面方程;Updating a plane equation of the detection plane and the adjacent plane respectively;
迭代上述过生长纠正步骤,直到所有生长平面均完成过生长检测和纠正;Iterating through the above-mentioned overgrowth correction steps until all growth planes have completed growth detection and correction;
纠正单元603对所述有效种子块的生成平面进行欠生长纠正的步骤包括:The step of correcting the under-growth correction of the generating plane of the effective seed block by the correcting unit 603 includes:
以所有生长平面作为检测平面,将所有检测平面根据面积大小进行降序排列并保存,找出面积最大的检测平面SuTaking all the growth planes as the detection plane, all the detection planes are arranged in descending order according to the size of the area, and the detection plane S u having the largest area is found;
计算出所有两两检测平面的夹角θij,并将计算得到的所有夹角θij放入上三角矩阵中;Calculate the angle θ ij of all the two detection planes, and put all the calculated angles θ ij into the upper triangular matrix;
利用所述上三角矩阵,找出与检测平面Su平行的检测平面;Using the upper triangular matrix, finding a detection plane parallel to the detection plane S u ;
将与检测平面Su平行的检测平面按照面积大小进行降序排列;Detecting planes parallel to the detection plane S u in descending order according to the size of the area;
以Sk表示与Su相平行的任一检测平面,则分别计算出Sk上每个像素点与Su的拟合误差eku,及Su上每个像素点与自身的拟合误差euuTo S k and S u represents any of a parallel detection plane, respectively, calculated for each pixel on each pixel on the S k and S u fitting error e ku, S u and the fitting error itself e uu ;
判断检测平面Su是否为面积大小超过所述深度图的面积的六分之一的较大平面;Determining whether the detection plane S u is a larger plane whose area size exceeds one sixth of an area of the depth map;
若所述检测平面Su不是较大平面,则将所述拟合误差eku和拟合误差euu用直方图表示,并计算所述直方图中两曲线的hellinger距离;If the detection plane S u is not a large plane, the fitting error e ku and the fitting error e uu are represented by a histogram, and the hellinger distance of the two curves in the histogram is calculated;
判断所述hellinger距离是否小于hellinger距离判断阈值Th,若小于,则Sk与Su共面,若不小于,则Sk与Su不共面,所述hellinger距离判断阈值Th为常数;Determining whether the hellinger distance is smaller than a hellinger distance determination threshold T h ; if less than, S k is coplanar with S u , if not less, then S k and S u are not coplanar, and the hellinger distance determination threshold T h is constant ;
若所述检测平面Su是较大平面,则判断拟合误差eku是否小于判断阈值Tm,若小于,则Sk与Su共面,若不小于,则Sk与Su不共面,所述判断阈值Tm为常数;If the detection plane S u is a large plane, it is determined whether the fitting error e ku is smaller than the determination threshold T m , and if less than, S k is coplanar with S u , and if not smaller, S k is not shared with S u The judgment threshold T m is a constant;
若Sk与Su共面,则需进一步判断Sk与Su是否相邻,若相邻,则将Sk与Su合并,得到有效生长平面,并更新Su的平面方程,同时将Sk的平行平面加入Su的平行组;If S k is coplanar with S u , it is necessary to further determine whether S k and S u are adjacent. If adjacent, then S k and S u are combined to obtain an effective growth plane, and the plane equation of S u is updated, and The parallel plane of S k is added to the parallel group of S u ;
判断检测平面Su的所有平行平面是否检测完毕,若完毕,则结束针对检测 平面Su的欠生长纠正步骤,若未完毕,则检测下一平行平面,直至完成所有平行平面的检测;Determining whether all parallel planes of the detection plane S u are detected, and if so, ending the undergrowth correction step for the detection plane S u , if not, detecting the next parallel plane until all parallel planes are detected;
若检测平面Su的欠生长纠正完毕,则按照所有检测平面的面积大小排列顺序,检测下一检测平面,直至所有检测平面纠正完毕。If the undergrowth of the detection plane S u is corrected, the next detection plane is detected according to the order of the area of all the detection planes until all the detection planes are corrected.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims (10)

  1. 一种鲁棒的基于深度信息的平面检测方法,其特征在于,包括:A robust depth information based plane detection method, comprising:
    接收深度图,提取所述深度图中的若干有效种子块;Receiving a depth map, extracting a number of valid seed blocks in the depth map;
    根据所述有效种子块进行区域生长,得到所述有效种子块的生成平面;Performing region growing according to the effective seed block to obtain a generating plane of the effective seed block;
    对所述有效种子块的生成平面进行过生长纠正或欠生长纠正,得到所述有效种子块的有效生长平面;Performing growth correction or undergrowth correction on the generation plane of the effective seed block to obtain an effective growth plane of the effective seed block;
    输出包含有所述有效种子块的有效生长平面的深度图检测平面。A depth map detection plane containing the effective growth plane of the valid seed block is output.
  2. 如权利要求1所述的平面检测方法,其特征在于,所述提取所述深度图中的若干有效种子块包括:The method of detecting a plane according to claim 1, wherein the extracting the plurality of valid seed blocks in the depth map comprises:
    以所述深度图的每一像素点为中心,将预置大小的矩形窗以光栅扫描方式遍历所述深度图;Centering on each pixel of the depth map, traversing the depth map in a raster scan manner with a preset size rectangular window;
    在遍历所述深度图的每一像素点时,检查所述矩形窗内的所有点是否是孔洞点;When traversing each pixel of the depth map, checking whether all points in the rectangular window are hole points;
    若所述矩形窗内不存在孔洞点,则将所述矩形窗内的点集作为有效种子块;If there is no hole point in the rectangular window, the point set in the rectangular window is used as a valid seed block;
    通过线性最小二乘平面拟合法计算出每一所述有效种子块的平面方程和平滑度。The plane equation and smoothness of each of the effective seed blocks are calculated by a linear least squares plane fitting method.
  3. 如权利要求2所述的平面检测方法,其特征在于,以数学方式的平面方程来表达拟合平面,则所述通过线性最小二乘平面拟合法计算出每一所述有效种子块的平面方程和平滑度包括:The method of detecting a plane according to claim 2, wherein the plane of fit is expressed by a mathematical plane equation, and then the plane equation of each of the effective seed blocks is calculated by a linear least squares plane fitting method And smoothness includes:
    利用线性最小二乘平面拟合法得到所述有效种子块的拟合平面,所述拟合平面用法向量n和与坐标系原点的距离d表示;Obtaining a fitting plane of the effective seed block by using a linear least squares plane fitting method, where the fitting plane usage vector n and the distance d from the origin of the coordinate system are represented;
    计算所述有效种子块的拟合平面与所述有效种子块上的点的拟合误差;Calculating a fitting error of a fitted plane of the effective seed block and a point on the effective seed block;
    以p表示第i个有效种子块上的任一点,ni表示第i个有效种子块的拟合平面的法向量,di表示第i个有效种子块的拟合平面与坐标系原点的距离,ei(p)表示第i个有效种子块的拟合平面与第i个有效种子块上的点p的拟合误差,则 ei(p)=|ni·p+di|;Let p denote any point on the i-th effective seed block, n i denote the normal vector of the fitting plane of the i-th effective seed block, and d i denote the distance between the fitting plane of the i-th effective seed block and the origin of the coordinate system , e i (p) represents the fitting error of the fitting plane of the i-th effective seed block and the point p on the i-th effective seed block, then e i (p)=|n i ·p+d i |
    根据所述拟合误差求得均方根拟合误差,以所述均方根拟合误差表示所述有效种子块的平滑度;Calculating a root mean square fitting error according to the fitting error, and indicating a smoothness of the effective seed block by the root mean square fitting error;
    以δi根据所述均方根拟合误差,则
    Figure PCTCN2017102947-appb-100001
    其中P表示有效种子块内所有像素点的点集,|P|表示有效种子块内的像素点数;
    Calculating the error according to the root mean square with δ i
    Figure PCTCN2017102947-appb-100001
    Where P represents the set of points of all pixels in the valid seed block, and |P| represents the number of pixels in the valid seed block;
    按照有效种子块的均方根拟合误差由小到大的顺序,对所述有效种子块进行排序。The valid seed blocks are ordered in ascending order of the root mean square fitting error of the effective seed blocks.
  4. 如权利要求3所述的平面检测方法,其特征在于,所述根据所述有效种子块进行区域生长,得到所述有效种子块的生成平面包括:The method for detecting a plane according to claim 3, wherein the generating a region according to the effective seed block to obtain the effective seed block comprises:
    检测平滑度最高的有效种子块的所有相邻点;Detecting all adjacent points of the most smooth effective seed block;
    若当前检测的所述有效种子块的相邻点不是孔洞,且不属于其他有效种子块的生长平面,则将当前检测的所述有效种子块的相邻点代入所述有效种子块的平面方程中,通过拟合误差公式ei(p)=|ni·p+di|计算得到对应的拟合误差;If the currently detected adjacent points of the valid seed block are not holes and do not belong to the growth plane of other valid seed blocks, then the adjacent points of the currently detected effective seed block are substituted into the plane equation of the effective seed block. The corresponding fitting error is calculated by fitting the error formula e i (p)=|n i ·p+d i |
    判断所述拟合误差是否小于阈值T,若小于,则将当前检测的有效种子块的相邻点合并到所述有效种子块当前生长的生长平面内,若大于,则将所述相邻点视为当前生长的生长平面的局外点;Determining whether the fitting error is less than a threshold T. If less, merging adjacent points of the currently detected effective seed block into a growth plane in which the effective seed block is currently growing, if greater than, An outlier that is considered to be the growth plane of the current growth;
    利用最小二乘平面拟合法,更新所述有效种子块的方程的参数,并据此更新均方根拟合误差;Updating the parameters of the equation of the effective seed block by using a least squares plane fitting method, and updating the root mean square fitting error accordingly;
    当判断所述有效种子块的生长平面的相邻点集为空集,或相邻点集内没有适合当前生长的生长平面的相邻点时,停止生长,得到有效种子块的生长平面;When it is determined that the adjacent point set of the growth plane of the effective seed block is an empty set, or there is no adjacent point in the adjacent point set that is suitable for the currently growing growth plane, the growth is stopped, and a growth plane of the effective seed block is obtained;
    其中,所述阈值T为动态阈值函数的输出,所述动态阈值函数为:Wherein the threshold T is an output of a dynamic threshold function, and the dynamic threshold function is:
    Figure PCTCN2017102947-appb-100002
    Figure PCTCN2017102947-appb-100002
    I表示所述深度图,Id表示所述深度图上代入平面方程利用拟合误差公式计 算拟合误差的点的深度值,τ表示生长平面的允许最大粗糙度,λ决定所述阈值的增长速度,H和W分别表示深度图的高度和宽度,α和k为常数,j表示生长过程中生长平面的迭代次数,初始化令j=1,输出最大的阈值T由Id决定。I denotes the depth map, I d denotes a depth value of a point on the depth map that is substituted into a plane equation using a fitting error formula to calculate a fitting error, τ denotes an allowable maximum roughness of the growth plane, and λ determines an increase of the threshold value Speed, H and W represent the height and width of the depth map, respectively, α and k are constants, j represents the number of iterations of the growth plane during growth, the initialization order j = 1, and the maximum threshold T of the output is determined by I d .
  5. 如权利要求1所述的平面检测方法,其特征在于,对所述有效种子块的生成平面进行过生长纠正的步骤包括:The plane detecting method according to claim 1, wherein the step of performing growth correction on the generating plane of the effective seed block comprises:
    以当前进行纠正的有效种子块的生长平面作为检测平面,查找所述检测平面的相邻平面;Finding an adjacent plane of the detection plane by using a growth plane of a valid seed block that is currently corrected as a detection plane;
    通过相交线的参数方程,找到所述检测平面与当前检测的相邻平面的相交线;Finding a line of intersection of the detection plane and the currently detected adjacent plane by a parametric equation of the intersection line;
    判断所述相交线是否存在于所述深度图的二维范围内,若不存在,检测下一相邻平面,并找出所述检测平面与当前检测的相邻平面的相交线;Determining whether the intersection line exists in a two-dimensional range of the depth map, and if not, detecting a next adjacent plane, and finding a line intersecting the detection plane with the currently detected adjacent plane;
    若存在,则设置检测扫描条的宽度,将所述检测扫描条沿所述相交线进行像素点扫描,得到过生长区域;If yes, setting a width of the detection scan strip, and scanning the detection scan strip along the intersection line to obtain a super-growth region;
    根据所述过生长区域判断所述检测平面是否过生长,若判断所述检测平面过生长,则将所述过生长区域与所述相邻平面合并,若判断所述检测平面未过生长,则将所述过生长区域与所述检测平面合并,得到有效生长平面;其中,在合并过程中,检测并重新分配碎化产生的孤立块;Determining, according to the overgrowth region, whether the detection plane is overgrowth, and if it is determined that the detection plane is overgrowth, combining the overgrowth region with the adjacent plane, if it is determined that the detection plane has not grown, Combining the overgrowth region with the detection plane to obtain an effective growth plane; wherein, during the merging process, the isolated block generated by the fragmentation is detected and redistributed;
    分别更新所述检测平面和所述相邻平面的平面方程;Updating a plane equation of the detection plane and the adjacent plane respectively;
    迭代上述过生长纠正步骤,直到所有生长平面均完成过生长检测和纠正。The above-described overgrowth correction steps are iterated until all growth planes have completed growth detection and correction.
  6. 如权利要求1所述的平面检测方法,其特征在于,对所述有效种子块的生成平面进行欠生长纠正的步骤包括:The method of detecting a plane according to claim 1, wherein the step of performing undergrowth correction on a generation plane of the effective seed block comprises:
    以所有生长平面作为检测平面,将所有检测平面根据面积大小进行降序排列并保存,找出面积最大的检测平面SuTaking all the growth planes as the detection plane, all the detection planes are arranged in descending order according to the size of the area, and the detection plane S u having the largest area is found;
    计算出所有两两检测平面的夹角θij,并将计算得到的所有夹角θij放入上三角矩阵中;Calculate the angle θ ij of all the two detection planes, and put all the calculated angles θ ij into the upper triangular matrix;
    利用所述上三角矩阵,找出与检测平面Su平行的检测平面; Using the upper triangular matrix, finding a detection plane parallel to the detection plane S u ;
    将与检测平面Su平行的检测平面按照面积大小进行降序排列;Detecting planes parallel to the detection plane S u in descending order according to the size of the area;
    以Sk表示与Su相平行的任一检测平面,则分别计算出Sk上每个像素点与Su的拟合误差eku,及Su上每个像素点与自身的拟合误差euuTo S k and S u represents any of a parallel detection plane, respectively, calculated for each pixel on each pixel on the S k and S u fitting error e ku, S u and the fitting error itself e uu ;
    判断检测平面Su是否为面积大小超过所述深度图的面积的六分之一的较大平面;Determining whether the detection plane S u is a larger plane whose area size exceeds one sixth of an area of the depth map;
    若所述检测平面Su不是较大平面,则将所述拟合误差eku和拟合误差euu用直方图表示,并计算所述直方图中两曲线的hellinger距离;If the detection plane S u is not a large plane, the fitting error e ku and the fitting error e uu are represented by a histogram, and the hellinger distance of the two curves in the histogram is calculated;
    判断所述hellinger距离是否小于hellinger距离判断阈值Th,若小于,则Sk与Su共面,若不小于,则Sk与Su不共面,所述hellinger距离判断阈值Th为常数;Determining whether the hellinger distance is smaller than a hellinger distance determination threshold T h ; if less than, S k is coplanar with S u , if not less, then S k and S u are not coplanar, and the hellinger distance determination threshold T h is constant ;
    若所述检测平面Su是较大平面,则仅判断拟合误差eku是否小于判断阈值Tm,若小于,则Sk与Su共面,若不小于,则Sk与Su不共面,所述判断阈值Tm为常数;If the detection plane S u is a large plane, it is only judged whether the fitting error e ku is smaller than the determination threshold T m , and if it is smaller, S k is coplanar with S u , and if not smaller, S k and S u are not Coplanar, the judgment threshold T m is a constant;
    若Sk与Su共面,则需进一步判断Sk与Su是否相邻,若相邻,则将Sk与Su合并,得到有效生长平面,并更新Su的平面方程,同时将与Sk平行的平面加入Su的平行组;If S k is coplanar with S u , it is necessary to further determine whether S k and S u are adjacent. If adjacent, then S k and S u are combined to obtain an effective growth plane, and the plane equation of S u is updated, and a plane parallel to S k is added to the parallel group of S u ;
    判断检测平面Su的所有平行平面是否检测完毕,若完毕,则结束针对检测平面Su的欠生长纠正步骤,若未完毕,则检测下一平行平面,直至完成所有平行平面的检测。It is judged whether all parallel planes of the detection plane S u are detected, and if so, the undergrowth correction step for the detection plane S u is ended, and if not, the next parallel plane is detected until all parallel planes are detected.
    若检测平面Su的欠生长纠正完毕,则按照所有检测平面的面积大小排列顺序,检测下一检测平面,直至所有检测平面纠正完毕。If the undergrowth of the detection plane S u is corrected, the next detection plane is detected according to the order of the area of all the detection planes until all the detection planes are corrected.
  7. 一种鲁棒的基于深度信息的平面检测系统,其特征在于,包括:A robust depth information based plane detection system, comprising:
    提取单元,用于接收深度图,提取所述深度图中的若干有效种子块;An extracting unit, configured to receive a depth map, and extract a number of valid seed blocks in the depth map;
    生长单元,用于根据所述有效种子块进行区域生长,得到所述有效种子块的生成平面;a growing unit, configured to perform region growing according to the effective seed block, to obtain a generating plane of the effective seed block;
    纠正单元,用于对所述有效种子块的生成平面进行过生长纠正或欠生长纠 正,得到所述有效种子块的有效生长平面;a correcting unit, configured to perform growth correction or undergrowth correction on a generating plane of the effective seed block Positive, obtaining an effective growth plane of the effective seed mass;
    输出单元,用于输出包含有所述有效种子块的有效生长平面的深度图检测平面。And an output unit, configured to output a depth map detection plane including an effective growth plane of the effective seed block.
  8. 如权利要求7所述的平面检测系统,其特征在于,所述提取单元具体用于:The plane detecting system according to claim 7, wherein the extracting unit is specifically configured to:
    以所述深度图的每一像素点为中心,将预置大小的矩形窗以光栅扫描方式遍历所述深度图;Centering on each pixel of the depth map, traversing the depth map in a raster scan manner with a preset size rectangular window;
    在遍历所述深度图的每一像素点时,检查所述矩形窗内的所有点是否是孔洞点;When traversing each pixel of the depth map, checking whether all points in the rectangular window are hole points;
    若所述矩形窗内不存在孔洞点,则将所述矩形窗内的点集作为有效种子块;If there is no hole point in the rectangular window, the point set in the rectangular window is used as a valid seed block;
    通过线性最小二乘平面拟合法计算出每一所述有效种子块的平面方程和平滑度。The plane equation and smoothness of each of the effective seed blocks are calculated by a linear least squares plane fitting method.
    其中,以数学方式的平面方程来表达拟合平面,则提取单元还用于:Where the mathematical plane equation is used to express the fitting plane, the extraction unit is also used to:
    利用线性最小二乘平面拟合法得到所述有效种子块的拟合平面,所述拟合平面用法向量n和与坐标系原点的距离d表示;Obtaining a fitting plane of the effective seed block by using a linear least squares plane fitting method, where the fitting plane usage vector n and the distance d from the origin of the coordinate system are represented;
    计算所述有效种子块的拟合平面与所述有效种子块上的点的拟合误差;Calculating a fitting error of a fitted plane of the effective seed block and a point on the effective seed block;
    以p表示第i个有效种子块上的任一点,ni表示第i个有效种子块的拟合平面的法向量,di表示第i个有效种子块的拟合平面与坐标系原点的距离,ei(p)表示第i个有效种子块的拟合平面与第i个有效种子块上的点p的拟合误差,则ei(p)=|ni·p+di|;Let p denote any point on the i-th effective seed block, n i denote the normal vector of the fitting plane of the i-th effective seed block, and d i denote the distance between the fitting plane of the i-th effective seed block and the origin of the coordinate system , e i (p) represents the fitting error of the fitting plane of the i-th effective seed block and the point p on the i-th effective seed block, then e i (p)=|n i ·p+d i |
    根据所述拟合误差求得均方根拟合误差,以所述均方根拟合误差表示所述有效种子块的平滑度;Calculating a root mean square fitting error according to the fitting error, and indicating a smoothness of the effective seed block by the root mean square fitting error;
    以δi根据所述均方根拟合误差,则
    Figure PCTCN2017102947-appb-100003
    其中P表示有效种子块内所有像素点的点集,|P|表示有效种子块内的像素点数;
    Calculating the error according to the root mean square with δ i
    Figure PCTCN2017102947-appb-100003
    Where P represents the set of points of all pixels in the valid seed block, and |P| represents the number of pixels in the valid seed block;
    按照有效种子块的均方根拟合误差由小到大的顺序,对所述有效种子块进 行排序。According to the order of the root mean square fitting error of the effective seed block, the effective seed block is entered in the order of small to large Row sorting.
  9. 如权利要求8所述的平面检测系统,其特征在于,所述生长单元具体用于:The plane detecting system according to claim 8, wherein said growth unit is specifically configured to:
    检测平滑度最高的有效种子块的所有相邻点;Detecting all adjacent points of the most smooth effective seed block;
    若当前检测的所述有效种子块的相邻点不是孔洞,且不属于其他有效种子块的生长平面,则将当前检测的所述有效种子块的相邻点代入所述有效种子块的平面方程中,通过拟合误差公式ei(p)=|ni·p+di|计算得到对应的拟合误差;If the currently detected adjacent points of the valid seed block are not holes and do not belong to the growth plane of other valid seed blocks, then the adjacent points of the currently detected effective seed block are substituted into the plane equation of the effective seed block. The corresponding fitting error is calculated by fitting the error formula e i (p)=|n i ·p+d i |
    判断所述拟合误差是否小于阈值T,若小于,则将当前检测的有效种子块的相邻点合并到所述有效种子块当前生长的生长平面内,若大于,则将所述相邻点视为当前生长的生长平面的局外点;Determining whether the fitting error is less than a threshold T. If less, merging adjacent points of the currently detected effective seed block into a growth plane in which the effective seed block is currently growing, if greater than, An outlier that is considered to be the growth plane of the current growth;
    利用线性最小二乘平面拟合法,更新所述有效种子块的方程的参数,并据此更新均方根拟合误差;Updating the parameters of the equation of the effective seed block by using a linear least squares plane fitting method, and updating the root mean square fitting error accordingly;
    当判断所述有效种子块的生长平面的相邻点集为空集,或相邻点集内没有适合当前生长的生长平面的相邻点时,停止生长,得到有效种子块的生长平面;When it is determined that the adjacent point set of the growth plane of the effective seed block is an empty set, or there is no adjacent point in the adjacent point set that is suitable for the currently growing growth plane, the growth is stopped, and a growth plane of the effective seed block is obtained;
    其中,所述阈值T为动态阈值函数的输出,所述动态阈值函数为:Wherein the threshold T is an output of a dynamic threshold function, and the dynamic threshold function is:
    Figure PCTCN2017102947-appb-100004
    Figure PCTCN2017102947-appb-100004
    I表示所述深度图,Id表示所述深度图上代入平面方程利用拟合误差公式计算拟合误差的点的深度值,τ表示生长平面的允许最大粗糙度,λ决定阈值的增长速度,H和W分别表示深度图的高度和宽度,α和k为常数,j表示生长过程中生长平面的迭代次数,初始化令j=1,输出最大的阈值T由Id决定。I denotes the depth map, I d denotes a depth value of a point on the depth map that is substituted into a plane equation using a fitting error formula to calculate a fitting error, τ denotes an allowable maximum roughness of the growth plane, and λ determines a growth rate of the threshold, H and W represent the height and width of the depth map, respectively, α and k are constants, j represents the number of iterations of the growth plane during growth, the initialization order j=1, and the maximum threshold T of the output is determined by I d .
  10. 如权利要求7所述的平面检测系统,其特征在于,所述纠正单元对所述有效种子块的生成平面进行过生长纠正的步骤包括:The plane detecting system according to claim 7, wherein the step of the correction unit performing the growth correction on the generating plane of the effective seed block comprises:
    以当前进行纠正的有效种子块的生长平面作为检测平面,查找所述检测平面的相邻平面; Finding an adjacent plane of the detection plane by using a growth plane of a valid seed block that is currently corrected as a detection plane;
    通过相交线的参数方程,找到所述检测平面与当前检测的相邻平面的相交线;Finding a line of intersection of the detection plane and the currently detected adjacent plane by a parametric equation of the intersection line;
    判断所述相交线是否存在于所述深度图的二维范围内,若不存在,检测下一相邻平面,并找出所述检测平面与当前检测的相邻平面的相交线;Determining whether the intersection line exists in a two-dimensional range of the depth map, and if not, detecting a next adjacent plane, and finding a line intersecting the detection plane with the currently detected adjacent plane;
    若存在,则设置检测扫描条的宽度,将所述检测扫描条沿所述相交线进行像素点扫描,得到过生长区域;If yes, setting a width of the detection scan strip, and scanning the detection scan strip along the intersection line to obtain a super-growth region;
    根据所述过生长区域判断所述检测平面是否过生长,若判断所述检测平面过生长,则将所述过生长区域与所述相邻平面合并,若判断所述检测平面未过生长,则将所述过生长区域与所述检测平面合并,得到有效生长平面;其中,在合并过程中,检测并重新分配碎化产生的孤立块;Determining, according to the overgrowth region, whether the detection plane is overgrowth, and if it is determined that the detection plane is overgrowth, combining the overgrowth region with the adjacent plane, if it is determined that the detection plane has not grown, Combining the overgrowth region with the detection plane to obtain an effective growth plane; wherein, during the merging process, the isolated block generated by the fragmentation is detected and redistributed;
    分别更新所述检测平面和所述相邻平面的平面方程;Updating a plane equation of the detection plane and the adjacent plane respectively;
    迭代上述过生长纠正步骤,直到所有生长平面均完成过生长检测和纠正;Iterating through the above-mentioned overgrowth correction steps until all growth planes have completed growth detection and correction;
    所述纠正单元对所述有效种子块的生成平面进行欠生长纠正的步骤包括:The step of the correcting unit performing the undergrowth correction on the generating plane of the effective seed block includes:
    以所有生长平面作为检测平面,将所有检测平面根据面积大小进行降序排列并保存,找出面积最大的检测平面SuTaking all the growth planes as the detection plane, all the detection planes are arranged in descending order according to the size of the area, and the detection plane S u having the largest area is found;
    计算出所有两两检测平面的夹角θij,并将计算得到的所有夹角θij放入上三角矩阵中;Calculate the angle θ ij of all the two detection planes, and put all the calculated angles θ ij into the upper triangular matrix;
    利用所述上三角矩阵,找出与检测平面Su平行的检测平面;Using the upper triangular matrix, finding a detection plane parallel to the detection plane S u ;
    将与检测平面Su平行的检测平面按照面积大小进行降序排列;Detecting planes parallel to the detection plane S u in descending order according to the size of the area;
    以Sk表示与Su相平行的任一检测平面,则分别计算出Sk上每个像素点与Su的拟合误差eku,及Su上每个像素点与自身的拟合误差euuTo S k and S u represents any of a parallel detection plane, respectively, calculated for each pixel on each pixel on the S k and S u fitting error e ku, S u and the fitting error itself e uu ;
    判断检测平面Su是否为面积大小超过所述深度图的面积的六分之一的较大平面;Determining whether the detection plane S u is a larger plane whose area size exceeds one sixth of an area of the depth map;
    若所述检测平面Su不是较大平面,则将所述拟合误差eku和拟合误差euu用直方图表示,并计算所述直方图中两曲线的hellinger距离;If the detection plane S u is not a large plane, the fitting error e ku and the fitting error e uu are represented by a histogram, and the hellinger distance of the two curves in the histogram is calculated;
    判断所述hellinger距离是否小于hellinger距离判断阈值Th,若小于,则Sk 与Su共面,若不小于,则Sk与Su不共面,所述hellinger距离判断阈值Th为常数;Determining whether the hellinger distance is smaller than a hellinger distance determination threshold T h ; if less than, S k is coplanar with S u , if not less, then S k and S u are not coplanar, and the hellinger distance determination threshold T h is constant ;
    若所述检测平面Su是较大平面,则仅判断拟合误差eku是否小于判断阈值Tm,若小于,则Sk与Su共面,若不小于,则Sk与Su不共面,所述判断阈值Tm为常数;If the detection plane S u is a large plane, it is only judged whether the fitting error e ku is smaller than the determination threshold T m , and if it is smaller, S k is coplanar with S u , and if not smaller, S k and S u are not Coplanar, the judgment threshold T m is a constant;
    若Sk与Su共面,则需进一步判断Sk与Su是否相邻,若相邻,则将Sk与Su合并,得到有效生长平面,并更新Su的平面方程,同时将Sk的平行平面加入Su的平行组;If S k is coplanar with S u , it is necessary to further determine whether S k and S u are adjacent. If adjacent, then S k and S u are combined to obtain an effective growth plane, and the plane equation of S u is updated, and The parallel plane of S k is added to the parallel group of S u ;
    判断检测平面Su的所有平行平面是否检测完毕,若完毕,则结束针对检测平面Su的欠生长纠正步骤,若未完毕,则检测下一平行平面,直至完成所有平行平面的检测;Determining whether all parallel planes of the detection plane S u are detected, and if so, ending the undergrowth correction step for the detection plane S u , if not, detecting the next parallel plane until all parallel planes are detected;
    若检测平面Su的欠生长纠正完毕,则按照所有检测平面的面积大小排列顺序,检测下一检测平面,直至所有检测平面纠正完毕。 If the undergrowth of the detection plane S u is corrected, the next detection plane is detected according to the order of the area of all the detection planes until all the detection planes are corrected.
PCT/CN2017/102947 2017-09-22 2017-09-22 Robust depth information-based plane detection method and system WO2019056306A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/102947 WO2019056306A1 (en) 2017-09-22 2017-09-22 Robust depth information-based plane detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/102947 WO2019056306A1 (en) 2017-09-22 2017-09-22 Robust depth information-based plane detection method and system

Publications (1)

Publication Number Publication Date
WO2019056306A1 true WO2019056306A1 (en) 2019-03-28

Family

ID=65810064

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102947 WO2019056306A1 (en) 2017-09-22 2017-09-22 Robust depth information-based plane detection method and system

Country Status (1)

Country Link
WO (1) WO2019056306A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120196679A1 (en) * 2011-01-31 2012-08-02 Microsoft Corporation Real-Time Camera Tracking Using Depth Maps
US8831336B2 (en) * 2011-11-11 2014-09-09 Texas Instruments Incorporated Method, system and computer program product for detecting an object in response to depth information
CN105359187A (en) * 2013-06-11 2016-02-24 微软技术许可有限责任公司 High-performance plane detection with depth camera data
CN105631868A (en) * 2015-12-25 2016-06-01 清华大学深圳研究生院 Depth information extraction method based on image classification
CN106060529A (en) * 2016-06-01 2016-10-26 十二维度(北京)科技有限公司 Video 2d-to-3d depth map tracking generation method and device
WO2017023456A1 (en) * 2015-08-05 2017-02-09 Intel Corporation Method and system of planar surface detection for image processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120196679A1 (en) * 2011-01-31 2012-08-02 Microsoft Corporation Real-Time Camera Tracking Using Depth Maps
US8831336B2 (en) * 2011-11-11 2014-09-09 Texas Instruments Incorporated Method, system and computer program product for detecting an object in response to depth information
CN105359187A (en) * 2013-06-11 2016-02-24 微软技术许可有限责任公司 High-performance plane detection with depth camera data
WO2017023456A1 (en) * 2015-08-05 2017-02-09 Intel Corporation Method and system of planar surface detection for image processing
CN105631868A (en) * 2015-12-25 2016-06-01 清华大学深圳研究生院 Depth information extraction method based on image classification
CN106060529A (en) * 2016-06-01 2016-10-26 十二维度(北京)科技有限公司 Video 2d-to-3d depth map tracking generation method and device

Similar Documents

Publication Publication Date Title
CN110443836B (en) Point cloud data automatic registration method and device based on plane features
Oehler et al. Efficient multi-resolution plane segmentation of 3D point clouds
CN111899334B (en) Visual synchronous positioning and map building method and device based on point-line characteristics
CN106530347B (en) Stable high-performance circle feature detection method
Tazir et al. CICP: Cluster Iterative Closest Point for sparse–dense point cloud registration
CN104040590A (en) Method for estimating pose of object
CN111612728B (en) 3D point cloud densification method and device based on binocular RGB image
CN107610174B (en) Robust depth information-based plane detection method and system
CN108647580B (en) Improved SIFT-based ISAR image feature point extraction and matching method
CN110807781A (en) Point cloud simplification method capable of retaining details and boundary features
US11506755B2 (en) Recording medium recording information processing program, information processing apparatus, and information processing method
US8270730B2 (en) Target orientation
CN116740072B (en) Road surface defect detection method and system based on machine vision
CN111178193A (en) Lane line detection method, lane line detection device and computer-readable storage medium
CN111783722B (en) Lane line extraction method of laser point cloud and electronic equipment
Wang Automatic extraction of building outline from high resolution aerial imagery
CN111354047B (en) Computer vision-based camera module positioning method and system
CN114004894A (en) Method for determining space relation between laser radar and binocular camera based on three calibration plates
CN107765257A (en) A kind of laser acquisition and measuring method based on the calibration of reflected intensity accessory external
US9916663B2 (en) Image processing method and process simulation apparatus
CN117029870A (en) Laser odometer based on road surface point cloud
Novacheva Building roof reconstruction from LiDAR data and aerial images through plane extraction and colour edge detection
WO2019056306A1 (en) Robust depth information-based plane detection method and system
KR102547333B1 (en) Depth Image based Real-time ground detection method
Kim et al. New approach for planar patch segmentation using airborne laser data

Legal Events

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

Ref document number: 17925646

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 25.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17925646

Country of ref document: EP

Kind code of ref document: A1