There is a bug in the previous code (the < comparison should have read
). As written, it uses the maximum as the pivot. Of course, it doesn't
ones, but the same number of equivalent classes).
Hi,
For 8 bit codes, 36 is just what comes out from the rotation invariant
condition.
The rule is that the binary codes are invariant to rotation. One way of
implementing this is to normalize all the codes to the minimal value of
all rotations (this value is called the pivot and aggregates all values
it represents). That is, you take each value, you try all possible
binary rolls and you take the minimal value. So, code 1 will actually
represent 1, 2, 4, 8, 16...; code 3 (0000 0011) will also represent 6
(0000 0110), 12 (0000 1100)...; code 5(000 0101) will also represent 10
(0000 1010)...
Now, we can just count how many of these pivots there are.
return ((i << 1) & 0xff) + bool(i & 128)
Now, we can check whether a binary value is a pivot using this basic
i = v
i = roll1(i)
return False
return True
Ok, so how many pivots are there?
n_pivots = sum([is_min(i) for i in range(256)])
It's 36.
HTH
--
Luis Pedro Coelho | EMBL | http://luispedro.org
My blog: http://metarabbit.wordpress.com
Post by GouthamWhy the LBP histogram in mahotas gives 36 bins instead of 59.Sorry,I can't
follow the previous post regarding this.Can anybody explain me further?
--
You received this message because you are subscribed to the Google Groups
"pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.