Removing hard-coding in BRIEF code

This commit is contained in:
Ankit Agrawal
2013-06-18 03:18:38 +08:00
parent a1df85d511
commit 566006bdaf
+2 -2
View File
@@ -32,9 +32,9 @@ def brief(image, keypoints, descriptor_size=32, mode='uniform'):
if mode == 'uniform':
np.random.seed(1)
first = np.random.randint(-24, 25, (descriptor_size * 8, 2))
first = np.random.randint(-PATCH_SIZE / 2, (PATCH_SIZE / 2) + 1, (descriptor_size * 8, 2))
np.random.seed(2)
second = np.random.randint(-24, 25, (descriptor_size * 8, 2))
second = np.random.randint(-PATCH_SIZE / 2, (PATCH_SIZE / 2) + 1, (descriptor_size * 8, 2))
else:
#TODO mode='normal'
pass