Skip to content

Commit 6456d71

Browse files
Update parse.py
1 parent 88eb76d commit 6456d71

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

data_preparation/parse.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ def loadClassMap():
124124
pass
125125
return classMap, classLabelMap
126126

127-
127+
def fitPlane(points):
128+
if points.shape[0] == points.shape[1]:
129+
return np.linalg.solve(points, np.ones(points.shape[0]))
130+
else:
131+
return np.linalg.lstsq(points, np.ones(points.shape[0]), rcond=None)[0]
132+
128133
def mergePlanesNew(points, planes, planePointIndices, planeSegments, segmentNeighbors, numPlanes, planeDiffThreshold = 0.05, planeAngleThreshold = 30, inlierThreshold = 0.9, planeAreaThreshold = 10, orthogonalThreshold = np.cos(np.deg2rad(60)), parallelThreshold = np.cos(np.deg2rad(30)), debug=False):
129134

130135

0 commit comments

Comments
 (0)