Uniform LBP with scikit-image local_binary_pattern function

久未见 提交于 2019-12-05 08:22:40

Good question. Take a look at the LBP example in the gallery. Specifically, look at the following image:

  • Uniformity: Since you chose 'uniform', the result only includes patterns where all black dots are adjacent and all white dots are adjacent. All other combinations are labeled 'non-uniform'.
  • Rotation invariance: Note that you chose 'uniform', not 'nri_uniform' (see the API docs), where "nri" means non-rotation invariant. That means 'uniform' is rotation invariant. As a result, an edge that is represented as 00001111 (0s and 1s represent black and white dots in the pic above) is collected into the same bin as 00111100 (the 0s are adjacent because we wrap around from front to back).
  • Rotation-invariant, uniform combinations: Considering rotation invariance, there are 9 unique, uniform combinations:
    • 00000000
    • 00000001
    • 00000011
    • 00000111
    • 00001111
    • 00011111
    • 00111111
    • 01111111
    • 11111111
  • Non-uniform results: If you look at your result more closely, there are actually 10 bins, not 9. The 10th bin lumps together all non-uniform results.

Hope that helps! If you haven't already, the LBP example is worth a look. I hear that somebody spent a lot of time on it ;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!