Transmitting a compressed image

I have used a wavelet-based compression technique for compressing an image. The code is working successfully and three images are displayed: original, compressed and decompressed. I want to transmit the compressed image over wireless OFDM channel. For this purpose, the compressed image must be converted to ones and zeros. How can I do this?

Answers (1)

Walter Roberson
Walter Roberson on 17 Oct 2015
de2bi(X) or dec2bin(X)-'0'

6 Comments

These functions are for non-negative integer numbers only and thus can not be used in my case
And your data is represented as... ? Quadruple Precision Quaterions in Snake Notation?
floating numbers (non-integer plus and minus numbers). If I use float2bin function, the obtained number of bytes required to represent the compressed image will be much higher than the number of bits of the original image
Once you have the result of float2bin() what do you do with it?
I want to transmit them over wireless channel, but as I told you their size in bytes is larger than the size of the original image in bytes, thus there is no benefit from compression!!!
The result of the float2bin File Exchange contribution is a vector of characters '0' and '1'.
MATLAB has no "bit" datatype so there is no way in MATLAB to index individual bits in an array. Therefore when data is converted to bit vector, it is necessary to represent each bit as a storage element, potentially uint8 (one byte per bit represented) or char (two bytes per bit represented, but prints out more nicely) or double (8 bytes per bit represented). With any of these methods, there is only one bit of useful information represented per storage element.
When you go to do the transmission in OFDM, you need to arrange so that only the "useful" portion of the representation is transmitted. The method of doing that is going to depend upon how your OFDM routine expects the inputs that it translates to waveforms (or whatever it is that comes out the other side of an OFDM encoding.) And as we do not know what OFDM encoding code you are using, we can only give general advice on what you need to do.

Sign in to comment.

Asked:

on 17 Oct 2015

Commented:

on 21 Oct 2015

Community Treasure Hunt

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

Start Hunting!