Skip to content

Commit 2691077

Browse files
author
Tanbakuchi
committed
Added setMinMaxOpeningAngle and getMinMAxOpeningAngle to SACSSegmentationFromNormal for use with cone fitting.
1 parent 0fd7d52 commit 2691077

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

pcl/_pcl.pyx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -142,32 +142,6 @@ cdef class SegmentationNormal:
142142
return min_angle, max_angle
143143

144144

145-
cdef class SampleConsensusModelCylinder(SegmentationNormal):
146-
147-
cdef cpp.SampleConsensusModelCylinder_t *me
148-
# cdef cpp.ModelCoefficients *coeffs
149-
def __cinit__(self):
150-
self.me = new cpp.SACSegmentationNormal_t()
151-
152-
def get_distance_to_model(self, list model_coefficients):
153-
""" Compute all distances from the model. You must have already fit the model.
154-
:return: vector of distances
155-
"""
156-
157-
cdef vector[double] distances
158-
159-
self.me.getDistancesToModel(self._coeffs, distances)
160-
# def count_within_distance(self, list model_coefficients, double threshold):
161-
# cdef cpp.ModelCoefficients coeffs
162-
# cdef vector[float] vals = model_coefficients
163-
# coeffs.values = vals
164-
# #coeffs.values.resize(len(model_coefficients))
165-
# # for i, v in enumerate(model_coefficients):
166-
# # coeffs.value[i] = v
167-
# return self.me.countWithinDistance(vals, threshold)
168-
169-
170-
171145
# Empirically determine strides, for buffer support.
172146
# XXX Is there a more elegant way to get these?
173147
cdef Py_ssize_t _strides[2]

pcl/pcl_defs.pxd

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ cdef extern from "pcl/segmentation/sac_segmentation.h" namespace "pcl":
8080
void setInputCloud (shared_ptr[PointCloud[T]])
8181
void segment (PointIndices, ModelCoefficients)
8282

83-
cdef extern from "pcl/sample_consensus/sac_model_cylinder.h" namespace "pcl":
84-
85-
cdef cppclass SampleConsensusModelCylinder[T, N]:
86-
int countWithinDistance(vector[double], double)
87-
void getDistancesToModel(vector[double], vector[double])
88-
89-
90-
9183
ctypedef SACSegmentation[PointXYZ] SACSegmentation_t
9284
ctypedef SACSegmentationFromNormals[PointXYZ,Normal] SACSegmentationNormal_t
9385

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy