Finalized changes. Added reference for non rotation-invariant uniform patterns. Added test case. Modified comments to clarify the process, and changed the code to make it more consistent with explanations and actuall encoding

This commit is contained in:
Alexis Mignon
2013-08-25 14:56:13 +02:00
parent eae691cf21
commit 7b022c8b5f
3 changed files with 52 additions and 21 deletions
+11
View File
@@ -199,5 +199,16 @@ class TestLBP():
np.testing.assert_array_almost_equal(lbp, ref)
def test_nri_uniform(self):
lbp = local_binary_pattern(self.image, 8, 1, 'nri_uniform')
ref = np.array([[ 0, 54, 0, 57, 12, 57],
[34, 0, 58, 58, 3, 22],
[58, 57, 15, 50, 0, 47],
[10, 3, 40, 42, 35, 0],
[57, 7, 57, 58, 0, 56],
[ 9, 58, 0, 57, 7, 14]])
np.testing.assert_array_almost_equal(lbp, ref)
if __name__ == '__main__':
np.testing.run_module_suite()