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
2020년 12월 23일
Read about double. uint8 can be converted to double using that.
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
2020년 12월 23일
Walter Roberson
2020년 12월 23일
what are you doing to do with the data, and what is its existing form?
Preetham Manjunatha
2020년 12월 23일
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, [])
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!