How to convert MATLAB binary feature matrix to decimal?
Mostrar comentarios más antiguos
I have binary feature matrices from BRISK, FREAK and ORB descriptors with 512 number of bits.
I tried to use:
d = bi2de(featuresBRISK.Features(:,1),512);
But they are just converted to uint8. How can I convert them to decimal for image classification problem?
6 comentarios
KSSV
el 23 de Dic. de 2020
Read about double. uint8 can be converted to double using that.
Walter Roberson
el 23 de Dic. de 2020
I just read the paper about BRISK. The bitstream formed is just the concatenation of a number of local calculations, and the local calculations in turn produce bitstreams that are non-numeric. The order of bits for the local bitstreams is not important, and the order of concatenation is not important, as long as both are consistent between training and classification.
The bitstream is not, for example, a series of ieee half-precision numbers. There is no inherent significance to the first 8 bits being 00101101 or 11100010, and those do not mean 2+13/16 or -(6+2/16).YYou could permute the bit order and still get the same results as long as you did the same permutation for the recorded training features.
Therefore, converting it to decimal is not of benefit if that conversion is intended to group bits as if they had some original inherent hierarchy. The only possible benefit would be if you received the bitstream in byte form and wanted to split it into bits.
Preetham Manjunatha
el 23 de Dic. de 2020
Walter Roberson
el 23 de Dic. de 2020
what are you doing to do with the data, and what is its existing form?
Preetham Manjunatha
el 23 de Dic. de 2020
Walter Roberson
el 23 de Dic. de 2020
You can bitget() to extract bits from uint8 if you need to. Or use
bitstream = reshape((dec2bin(A,8) - '0').', 1, [])
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Computer Vision Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!