Compare commits
1 Commits
d3d3cdfa96
...
326ff3f667
Author | SHA1 | Date | |
---|---|---|---|
326ff3f667 |
16
kshape.py
16
kshape.py
@ -77,14 +77,14 @@ def _ncc_c(x,y):
|
||||
|
||||
|
||||
def _sbd(x, y):
|
||||
"""
|
||||
>>> _sbd([1,1,1], [1,1,1])
|
||||
(-2.2204460492503131e-16, array([1, 1, 1]))
|
||||
>>> _sbd([0,1,2], [1,2,3])
|
||||
(0.043817112532485103, array([1, 2, 3]))
|
||||
>>> _sbd([1,2,3], [0,1,2])
|
||||
(0.043817112532485103, array([0, 1, 2]))
|
||||
"""
|
||||
#"""
|
||||
#>>> _sbd([1,1,1], [1,1,1])
|
||||
#(-2.2204460492503131e-16, array([1, 1, 1]))
|
||||
#>>> _sbd([0,1,2], [1,2,3])
|
||||
#(0.043817112532485103, array([1, 2, 3]))
|
||||
#>>> _sbd([1,2,3], [0,1,2])
|
||||
#(0.043817112532485103, array([0, 1, 2]))
|
||||
#"""
|
||||
ncc = _ncc_c(x, y)
|
||||
idx = ncc.argmax()
|
||||
dist = 1 - ncc[idx]
|
||||
|
Loading…
Reference in New Issue
Block a user