3
저는 Matlab을 사용하여 Local Binary Patterns를 구현하고 있습니다. 저는 약간 혼란 스럽습니다. num_cels 이미지의 16x16 픽셀 세포의 수입니다 Local Binary Patters matlab의 원본 코드 및 참조
1- Divide the examined window into cells (e.g. 16x16 pixels for each cell).
2- For each pixel in a cell, compare the pixel to each of its 8 neighbors (on its left-top, left-middle, left-bottom, right-top, etc.). Follow the pixels along a circle, i.e. clockwise or counter-clockwise.
3- Where the center pixel's value is greater than the neighbor's value, write "1". Otherwise, write "0". This gives an 8-digit binary number (which is usually converted to decimal for convenience).
4- Compute the histogram, over the cell, of the frequency of each "number" occurring (i.e., each combination of which pixels are smaller and which are greater than the center).
5- Optionally normalize the histogram.
6- Concatenate (normalized) histograms of all cells. This gives the feature vector for the window.
이 알고리즘을보고 나는, 각 LBP의 특징 벡터가 num_cels * 256 크기있을 것이라는 점을 결론 지을 수 있습니다
위키 백과는 basic LBP 작품이 방법을 설명합니다. 각 셀에는 256 개의 가능한 값 (0 ~ 255)이 있으므로 특성 벡터 크기가 크게 다를 수 있습니다.
그러나 일부 LBP 구현을 보면 VLFEAT_LBP은 특성 벡터 대신 매트릭스를 반환합니다. this implementation에서 LBP는 (확실하지 않은) 모든 셀의 모든 히스토그램의 합계라고 생각되는 256 특징 벡터로 반환됩니다. 내가 알고 싶은 것은 : 고전적인 LBP 설명과 MATLAB 소스 코드입니다. 감사.
Canonical = [Ojala, et al.] (http://www.cse.oulu.fi/CMV/Downloads/LBPMatlab). – chappjc
@chappjc 정보를 제공해 주셔서 감사합니다. 내가 소스 코드에서 본 것은 위키피디아 (6 단계)의 정보가 사실이 아니라는 것입니다. LBP에 대한 결과 이미지는 각 픽셀에서 이웃 픽셀에 따라 픽셀이 어떻게 작동하는지 나타내는 8 비트 2 진수입니다. 십진수로 변환 된 이진수는 최대 값 255와 최소값 0을 가질 수 있습니다. 각 픽셀이 이렇게 표시되면 256 개의 빈을 가진 막대 그래프가 구성됩니다. 각 셀에서 히스토그램의 연결은 수행되지 않습니다. 내가 맞습니까? – mad