File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1818from .lapack import *
1919from .signal import *
2020from .image import *
21+ from .features import *
Original file line number Diff line number Diff line change 1+ #######################################################
2+ # Copyright (c) 2015, ArrayFire
3+ # All rights reserved.
4+ #
5+ # This file is distributed under 3-clause BSD license.
6+ # The complete license agreement can be obtained at:
7+ # http://arrayfire.com/licenses/BSD-3-Clause
8+ ########################################################
9+ from .library import *
10+ from .array import *
11+ import numbers
12+
13+ class features (object ):
14+
15+ def __init__ (self , num = None ):
16+ self .feat = c_longlong (0 )
17+ if num is not None :
18+ assert (isinstance (num , numbers .Number ))
19+ safe_call (clib .af_create_features (pointer (self .feat ), c_longlong (num )))
20+
21+ def num_features ():
22+ num = c_longlong (0 )
23+ safe_call (clib .af_get_features_num (pointer (num ), self .feat ))
24+ return num
25+
26+ def get_xpos ():
27+ out = array ()
28+ safe_call (clib .af_get_features_xpos (pointer (out .arr ), self .feat ))
29+ return out
30+
31+ def get_ypos ():
32+ out = array ()
33+ safe_call (clib .af_get_features_ypos (pointer (out .arr ), self .feat ))
34+ return out
35+
36+ def get_score ():
37+ out = array ()
38+ safe_call (clib .af_get_features_score (pointer (out .arr ), self .feat ))
39+ return out
40+
41+ def get_orientation ():
42+ out = array ()
43+ safe_call (clib .af_get_features_orientation (pointer (out .arr ), self .feat ))
44+ return out
45+
46+ def get_size ():
47+ out = array ()
48+ safe_call (clib .af_get_features_size (pointer (out .arr ), self .feat ))
49+ return out
You can’t perform that action at this time.
0 commit comments