Răsfoiți Sursa

Added reading of the image to code.

Jayke Meijer 14 ani în urmă
părinte
comite
210391045a
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  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).
 # 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 
 # 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 
 # Optionally normalize the histogram. Concatenate normalized histograms of all 
 # cells. This gives the feature vector for the window.
 # cells. This gives the feature vector for the window.
+
+image = imread("../images/test.png")
+
+figure()
+imshow(image)
+show()