To extract local binary pattern features without background
古いコメントを表示
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.
回答 (2 件)
Image Analyst
2016 年 8 月 30 日
0 投票
See attached demo.
7 件のコメント
Image Analyst
2016 年 8 月 31 日
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
2016 年 9 月 1 日
Image Analyst
2016 年 9 月 1 日
編集済み: Image Analyst
2016 年 9 月 2 日
That looks right.
To get the histogram of only non-zero pixels, do this:
histObject = histogram(grayImage(grayImage>= 0));
Image Analyst
2016 年 9 月 2 日
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
2017 年 5 月 7 日
you mean histObject = imhist(grayImage(grayImage>= 0));
ali
2016 年 9 月 2 日
0 投票
2 件のコメント
Image Analyst
2016 年 9 月 2 日
I don't understand at all what this is trying to say.
ali
2016 年 9 月 2 日
カテゴリ
ヘルプ センター および File Exchange で LBP - Local Binary Patterns についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!