pub fn count_transitions(byte: u8) -> u32 {
    (byte ^ byte.rotate_right(1)).count_ones()
}
Number of bit transitions in a byte, counting the last and final bits as adjacent.

# Examples
```
use imageproc::local_binary_patterns::count_transitions;

let a = 0b11110000;
assert_eq!(count_transitions(a), 2);
let b = 0b00000000;
assert_eq!(count_transitions(b), 0);
let c = 0b10011001;
assert_eq!(count_transitions(c), 4);
let d = 0b10110010;
assert_eq!(count_transitions(d), 6);
```
src/local_binary_patterns.rs