-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior of skimage.feature.local_binary_pattern #2522
Comments
As mentioned on the S/O question: this is because of floating point differences. If you convert the image to ubyte first, it'll work fine. Still, I see this as a usability bug. Do you want to file a patch that issues a warning to the user if they do not use integer types with LBPs? |
@stefanv Add these lines to the function
|
Hi,
The local binary pattern method in skimage is producing unexpected results. For some flat regions, it correctly produces 255 (e.g. binary 11111111). But for some other flat regions in the same image, it produces noise (decimal 85, binary 01010101).
Here is a link with code example and images to reproduce the issue:
http://stackoverflow.com/questions/42322400/unexpected-behavior-in-local-binary-pattern-python-skimage
OS version: Mac OS X 10.9.5
python version: '3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) \n[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]'
skimage.version: '0.12.3'
The text was updated successfully, but these errors were encountered: