浏览代码

Clearified some comments.

Taddeus Kroes 14 年之前
父节点
当前提交
5771077053
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/LBP.py

+ 1 - 1
src/LBP.py

@@ -47,7 +47,7 @@ def features(image):
 
 
         # Walk around the pixel in counter-clokwise order, shifting 1 bit less
         # Walk around the pixel in counter-clokwise order, shifting 1 bit less
         # at each neighbour starting at 7 in the top-left corner. This gives a
         # at each neighbour starting at 7 in the top-left corner. This gives a
-        # 8-bitmap
+        # 8-bit feature number of a pixel
         features[y, x] = byte(cmp_pixels(y - 1, x - 1, p)) << 7 \
         features[y, x] = byte(cmp_pixels(y - 1, x - 1, p)) << 7 \
                          | byte(cmp_pixels(y - 1, x, p)) << 6 \
                          | byte(cmp_pixels(y - 1, x, p)) << 6 \
                          | byte(cmp_pixels(y - 1, x + 1, p)) << 5 \
                          | byte(cmp_pixels(y - 1, x + 1, p)) << 5 \