The LBP tests the relation between pixel and it's neighbors, encoding this relation into a binary word. This allows detection of patterns/features, while being immune to contrast changes.
Current submission presents pixel-wise implementation, and filtering based implementation, achieving much shorter run-times. Both implementations achieve same results, while running at different passes. Do not use ‘pixelwiseLBP’ unless for educational or debugging purposes.
Current implementation is aligned with "Gray Scale and Rotation Invariant Texture Classification with Local Binary Patterns" from http://www.ee.oulu.fi/mvg/files/pdf/pdf_6.pdf.
This implementation supports multi-color inputs (RGB).
Rotation invariance can be same for all channels, or channel wise manner.
Good evening Nicola Franzoso.
You'r comment is in place- thank you. I plan to add relevant functionality to the submission. The histogram is easy to achieve using "imhist" or "hist" with bins 1:(2^p-1) where p is the number of filter elements, applied to the LBP matrix converted to "single". What prevents me form posting this, it the Rotation Invariant (RI) case, where the histogram becomes very sparse. I failed to find an analytic way (an equation) to predict the indexes of obsolete bins. I can find the indexes of those bins for each case by applying the LBP minimization procedure, but this is inefficient and nasty. So i'm working on it. If you're not using RI-LBP, or you're fine with sparse histogram, please use my advice above.
Unfortunately this function does not compute the LBP correctly.
To fix it you need to change 'sign(currNieghDiff)' to 'currNieghDiff > 0'.
You should also change 'if nNeigh<=8' to 'if nNeigh<=9', as nNeigh = number of neighbours + 1.
Finally in the Primitive pixelwise solution you need to change
neighMat( ceil(nNeigh/2)+ 1 )=false;
i wanted to know how to implement the basic concept of LBP operator with uniform patterns
i have implemented the basic concept of LBP operator in matlab
now i am using the concept of uniform pattern
the problem is that i am not able to understand the basic concept of LBP with uniform patterns
How exactly it has to be done
is there any documentation available which can help me
Hello Fa Fa.
As far as I'm concerned, this comments are here for feedback, errors reporting , ratings, thanks, and code related question. Your question (and similar ones) should be be addressed via other media (directly via email, etc..).
Now, to your issue:
I don't quiet understand the question/. As far as I can see you have an interesting project ahead of you. If by "help" you mean "will I do the project for you", the answer is definitely NO.
If you wish to get some assistance with the topics of your project, that's better, but again I'm not the address in this case. I'd help you if were carrying this project under my supervision, but you aren't. I would help you nevertheless, if I was proficient in the above topics, and had some spare time, but unfortunately this is also net the case.
To conclude, it seems I can not assist you.
Many thanks goes to Chris Forne for his sharp eye. Bugs fixed, and some modification introduced.
28 Aug 2012
A Helix/Snail indexing function was аdded to scan neighborhood pixels as spiral.
09 Jan 2014
- Support Circular filter, as in M. Pietikäinen papers.
- Works on multiple color channels (gray-scale, RGB, La*b and even spectral images).
- Support Rotation Invariant mode.
- Two LBP version- pixels wise, and efficient.
16 Jan 2014
Changed filter direction (to CCW), starting point (3 o'clock instead of 12), support pixels interpolation.