Просмотр исходного кода

Added reading of the image to code.

Jayke Meijer 14 лет назад
Родитель
Сommit
210391045a
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/LBP.py

+ 8 - 0
src/LBP.py

@@ -1,3 +1,5 @@
+from pylab import imread, figure, show, imshow
+
 # Divide the examined window to cells (e.g. 16x16 pixels for each cell).
 
 # For each pixel in a cell, compare the pixel to each of its 8 neighbors 
@@ -14,3 +16,9 @@
     
 # Optionally normalize the histogram. Concatenate normalized histograms of all 
 # cells. This gives the feature vector for the window.
+
+image = imread("../images/test.png")
+
+figure()
+imshow(image)
+show()