def generate_lbp_features(filename): radius = 3 n_points = 10 * radius image_arr = io.imread(filename, as_grey=True) return local_binary_pattern(image_arr, P=n_points, R=radius)