File: HarrisKeypoint3D.pxi

package info (click to toggle)
python-pcl 0.3.0~rc1%2Bdfsg-14
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 31,828 kB
  • sloc: python: 3,094; cpp: 283; makefile: 181; sh: 24; ansic: 12
file content (51 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- coding: utf-8 -*-
from libc.stddef cimport size_t

from libcpp.vector cimport vector
from libcpp.string cimport string
from libcpp cimport bool

# main
cimport pcl_defs as cpp
cimport pcl_keypoints as keypt

# boost
from boost_shared_ptr cimport shared_ptr


###############################################################################
# Types
###############################################################################

### base class ###

cdef class HarrisKeypoint3D:
    """
    HarrisKeypoint3D class for 
    """
    cdef keypt.HarrisKeypoint3D_t *me

    def __cinit__(self, PointCloud pc not None):
        self.me = new keypt.HarrisKeypoint3D_t()
        self.me.setInputCloud(pc.thisptr_shared)
        # pass

    def __dealloc__(self):
        del self.me

    def set_NonMaxSupression(self, bool param):
        self.me.setNonMaxSupression (param)

    def set_Radius(self, float param):
        self.me.setRadius (param)

    def set_RadiusSearch(self, double param):
        self.me.setRadiusSearch (param)

    def compute(self):
        keypoints = PointCloud_PointXYZI()
        sp_assign(keypoints.thisptr_shared, new cpp.PointCloud[cpp.PointXYZI]())
        cdef cpp.PointCloud_PointXYZI_t *ckeypoints = <cpp.PointCloud_PointXYZI_t*>keypoints.thisptr()
        self.me.compute (<cpp.PointCloud[cpp.PointXYZI]&> deref(ckeypoints))
        return keypoints