No need to take the center of the results twice.

This commit is contained in:
Pietro Berkes
2014-04-01 21:28:12 +01:00
parent 1fbed8a8d0
commit 109efc5d0a
+1 -2
View File
@@ -203,8 +203,7 @@ class TestLBP():
# The LBP variance is biased (ddof=0), correct for that.
expected = target_std**2 * (P-1)/P
np.testing.assert_almost_equal(lbp[10:-10,10:-10].mean(),
expected, 4)
np.testing.assert_almost_equal(lbp.mean(), expected, 4)
def test_nri_uniform(self):
lbp = local_binary_pattern(self.image, 8, 1, 'nri_uniform')