Open3d: EstimateNormals not working for flat patches

Created on 27 Mar 2019  路  3Comments  路  Source: intel-isl/Open3D

It appears the EstimateNormals function does not work properly for completely flat patches, also somehow depending on the orientation.

To reproduce:

import numpy as np
import open3d

X,Y = np.mgrid[0:1:0.1,0:1:0.1]
X = X.flatten()
Y = Y.flatten()

pts = np.zeros((3, X.size))
pts[0] = X
pts[1] = Y

shape  = open3d.PointCloud()
shape.points = open3d.Vector3dVector(pts.T)
shape.paint_uniform_color([0, 0.651, 0.929]) # blue

open3d.estimate_normals(shape, open3d.KDTreeSearchParamHybrid(radius = 0.5, max_nn = 30))

# show the shape
open3d.draw_geometries([shape])

If you write

pts[1] = X
pts[2] = Y

instead - it works as expected; if you use 0 and 1 or 0 and 2 as indices - it no longer works.

Expected:
Screenshot from 2019-03-26 23-56-53
Got:
Screenshot from 2019-03-26 23-57-29

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Python version: 3.6.7
  • Open3D version: 0.5 release (also tested on the commit 6f493ef149f1360796709127312e1ff692bcf316)
  • Is this remote workstation?: no
  • How did you install Open3D?: pip for the release; build myself the newer version
possible bug

All 3 comments

Good catch. Looks like a numerical issue of this function:
https://github.com/IntelVCL/Open3D/blob/377fc7d6a47ea47681c25a1e07a5383d62a612aa/src/Open3D/Geometry/EstimateNormals.cpp#L40

I will dig into it when I got time.

Fun fact: adding minimal noise to the points fixes the problem.

Fixed in #1011

Was this page helpful?
0 / 5 - 0 ratings