To extract local binary pattern features without background
Mostrar comentarios más antiguos
Hi all I detect the foreground object and all zeros fro background, the sample image is attached. So how can I only apply the LBP. The original sample and the ROI that is defined with red lines ehich I want to extract features from only this area. HOw can do that. Is there any way and any suggestion and codes. Thanks.
Respuestas (2)
Image Analyst
el 30 de Ag. de 2016
0 votos
See attached demo.
7 comentarios
Image Analyst
el 31 de Ag. de 2016
The LBP is usually done on a binary image. Each of the 8 neighbors is either 1 or 0 and those can be made into a byte which is a number between 0 and 255. If you didn't have a binary image and used the original 8-bit gray levels then you'd have eight 8-bit numbers or a 64 bit pattern. You can't really deal with 64 bit numbers. You'd have to scale it down to 8 bits anyway just to visualize it on your monitor. And if you did that, the only way to do it would be to scale down each pixel value before constructing the LBP for that center pixel. It wouldn't make sense to scale down after making the LBP number. So then you're essentially back to picking a threshold like I did in the demo.
ali
el 1 de Sept. de 2016
Image Analyst
el 1 de Sept. de 2016
Editada: Image Analyst
el 2 de Sept. de 2016
That looks right.
To get the histogram of only non-zero pixels, do this:
histObject = histogram(grayImage(grayImage>= 0));
Image Analyst
el 2 de Sept. de 2016
To see what properties histObject has, set a breakpoint there and type histObject on the command line. You will see Value, BinEdges, etc.
Salma Hassan
el 7 de Mayo de 2017
you mean histObject = imhist(grayImage(grayImage>= 0));
ali
el 2 de Sept. de 2016
0 votos
2 comentarios
Image Analyst
el 2 de Sept. de 2016
I don't understand at all what this is trying to say.
ali
el 2 de Sept. de 2016
Categorías
Más información sobre LBP - Local Binary Patterns en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!