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 件のコメント

KSSV
KSSV 2020 年 12 月 23 日
Read about double. uint8 can be converted to double using that.
Walter Roberson
Walter Roberson 2020 年 12 月 23 日
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
Preetham Manjunatha 2020 年 12 月 23 日
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?
Walter Roberson
Walter Roberson 2020 年 12 月 23 日
what are you doing to do with the data, and what is its existing form?
Preetham Manjunatha
Preetham Manjunatha 2020 年 12 月 23 日
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.
Walter Roberson
Walter Roberson 2020 年 12 月 23 日
You can bitget() to extract bits from uint8 if you need to. Or use
bitstream = reshape((dec2bin(A,8) - '0').', 1, [])

サインインしてコメントする。

 採用された回答

Image Analyst
Image Analyst 2020 年 12 月 23 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImage Processing and Computer Vision についてさらに検索

製品

リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by