Samuel Schmidt commited on
Commit
287f384
·
1 Parent(s): c4eb027

Intendation error

Browse files
Files changed (1) hide show
  1. src/LBP.py +3 -6
src/LBP.py CHANGED
@@ -9,15 +9,12 @@ class LBPImageEncoder:
9
  self.radius = radius
10
 
11
  def describe(self, image, eps=1e-7):
12
- # compute the Local Binary Pattern representation
13
  # of the image, and then use the LBP representation
14
  # to build the histogram of patterns
15
  gray_img = imgage.convert('L')
16
- lbp = feature.local_binary_pattern(image, self.numPoints,
17
- self.radius, method="uniform")
18
- (hist, _) = np.histogram(lbp.ravel(),
19
- bins=np.arange(0, self.numPoints + 3),
20
- range=(0, self.numPoints + 2))
21
  # normalize the histogram
22
  hist = hist.astype("float")
23
  hist /= (hist.sum() + eps)
 
9
  self.radius = radius
10
 
11
  def describe(self, image, eps=1e-7):
12
+ # compute the Local Binary Pattern representation
13
  # of the image, and then use the LBP representation
14
  # to build the histogram of patterns
15
  gray_img = imgage.convert('L')
16
+ lbp = feature.local_binary_pattern(image, self.numPoints, self.radius, method="uniform")
17
+ (hist, _) = np.histogram(lbp.ravel(), bins=np.arange(0, self.numPoints + 3), range=(0, self.numPoints + 2))
 
 
 
18
  # normalize the histogram
19
  hist = hist.astype("float")
20
  hist /= (hist.sum() + eps)