I am using local_binary_pattern from skimage.feature with uniform mode like this:
>>> from skimage.feature import local_binary_pattern >>> lbp_image=local_binary_pattern(some_grayscale_image,8,2,method='uniform') >>> histogram=scipy.stats.itemfreq(lbp_image) >>> print histogram [[ 0.00000000e+00 1.57210000e+04] [ 1.00000000e+00 1.86520000e+04] [ 2.00000000e+00 2.38530000e+04] [ 3.00000000e+00 3.23200000e+04] [ 4.00000000e+00 3.93960000e+04] [ 5.00000000e+00 3.13570000e+04] [ 6.00000000e+00 2.19800000e+04] [ 7.00000000e+00 2.46530000e+04] [ 8.00000000e+00 2.76230000e+04] [ 9.00000000e+00 4.88030000e+04]]
Since I take 8 pixels in the neighborhood, it is expected that he will get 59 different LBP codes (because it is a single method), but instead he gives me only 9 different LBP codes. In a more general case, always return P + 1 labels (where P is the number of neighbors).
Is this a different kind of unified method, or am I not understanding something?
source share