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!