How to convert MATLAB binary feature matrix to decimal?

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
KSSV el 23 de Dic. de 2020
Read about double. uint8 can be converted to double using that.
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.
Thank you, Walter! So can I just use the binary features as it is as a feature matrix? Or do I need to convert binary -> uint8 -> double?
what are you doing to do with the data, and what is its existing form?
When I use the BRISK features, currently, it is in a matix form of uint8. I am going to use it for a classifcation problem.
You can bitget() to extract bits from uint8 if you need to. Or use
bitstream = reshape((dec2bin(A,8) - '0').', 1, [])

Iniciar sesión para comentar.

 Respuesta aceptada

If you want/need d to be double instead of uint8, for other purposes like feature analysis, do this:
d = double(d);

Más respuestas (0)

Categorías

Más información sobre Computer Vision Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by