Is there no difference between logical and uint8 regarding disk space (or memory)?

Hi,
I am conducting image processing and I have one question about disk space occupied by logical (binary) data.
I understand that binary means 1-bit which consists of 1 and 0.
So I thought that binary image will take smaller amount of memory than 8-bit data.
However when I check the size('bytes' using 'whos' function) there is no difference between binary and uint8 data.
Could you tell me why there is no difference? is there any wrong?
If the matlab cannot handle binary data as it is, I think there could be better manner to handle binary data

 Réponse acceptée

Stephen23
Stephen23 le 26 Avr 2019
Modifié(e) : Stephen23 le 26 Avr 2019
"I understand that binary means 1-bit which consists of 1 and 0."
Nope, binary data is stored with one byte per element:
"I think there could be better manner to handle binary data "
I doubt it. Accessing one single bit of memory is much slower:

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by