You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For v0.19.3 (latest), source code for the _local_binary_pattern function within _texture.pyx appears to have an error when calculating the number of sign changes between patterns. This may be the case for previous versions too. This is for lines 180-183. The loop for calculating 'changes' does not include comparing the first element of signed_texture with the last. It could be fixed by using modular arithmetic.
Way to reproduce
changes = 0
for i in range(P - 1):
changes += (signed_texture[i]
signed_texture[i + 1]) != 0
Version information
# Paste the output of the following python commandsscikit-imageversion: 0.19.3numpyversion: 1.20.3
# your output here
The text was updated successfully, but these errors were encountered:
There appears to be an error in the function _local_binary_pattern of _texture.pyx in lines 180-183, when calculating the number of sign changes. The calculation does not include comparing the first element of signed_texture with the last. This could be fixed by increasing the size of the loop by 1 and using modular arithmetic.
I tried posting this in the description but messed up, so it's a comment instead.
@maxcw, thanks for the report. Could you provide more information so that we can reproduce this? Your version information would probably be useful as well. Note that you can edit the issue description via GitHub's UI as well.
Hey, there hasn't been any activity on this issue for more than 180 days. For now, we have marked it as "dormant" until there is some new activity. You are welcome to reach out to people by mentioning them here or on our forum if you need more feedback! If you think that this issue is no longer relevant, you may close it by yourself; otherwise, we may do it at some point (either way, it will be done manually). In any case, thank you for your contributions so far!
Description
For v0.19.3 (latest), source code for the _local_binary_pattern function within _texture.pyx appears to have an error when calculating the number of sign changes between patterns. This may be the case for previous versions too. This is for lines 180-183. The loop for calculating 'changes' does not include comparing the first element of signed_texture with the last. It could be fixed by using modular arithmetic.
Way to reproduce
Version information
# your output here
The text was updated successfully, but these errors were encountered: