How can I change binary string to image?

I have binary data( in fact it is string). I want to show it as an image? help me. Thanks in advance.

 採用された回答

Walter Roberson
Walter Roberson 2011 年 5 月 26 日

0 投票

If you are using the generating code from your previous question then you cannot reconstruct arbitrary images.

Remember what I wrote there, "I advise, though, that you give more thought to what will be needed to reconstruct the image at the receiver."

10 件のコメント

Sean de Wolski
Sean de Wolski 2011 年 5 月 26 日
I was kind of thinking take a screen shot of the string ;)
The request is far from clear.
Walter Roberson
Walter Roberson 2011 年 5 月 26 日
Assuming that your modulation and demodulation work perfectly, you still cannot reconstruct arbitrary images from the binary vector produced in the previous discussion.
What information is needed to rebuild the binary vector in to the original numeric vector? Do you have all of that information or can it be derived from the binary vector ?
Ubaid Ullah
Ubaid Ullah 2011 年 5 月 26 日
Sorry, I don't have any information. I think I failed.
Walter Roberson
Walter Roberson 2011 年 5 月 26 日
The bit stream can easily be converted to a list of numbers that is equivalent to TheImage(:) . If you had TheImage(:) then what additional information would you need to recreate TheImage ? How could you convey that additional information as part of the bit stream?
Ubaid Ullah
Ubaid Ullah 2011 年 5 月 27 日
Basically, I have binary bit stream, and I think I can't reconstruct the image (which I modulated). So you were right that "what will be needed to reconstruct the arbitrary images.
Ubaid Ullah
Ubaid Ullah 2011 年 5 月 27 日
Leave it. Do you know how to implement ACM for image transmission?
Walter Roberson
Walter Roberson 2011 年 5 月 27 日
What is "ACM" for your purposes? ACM is most commonly the Association of Computing Machinery, which is not a transmission protocol.
You could reconstruct the image without difficulty if you transferred the image dimensions as the first thing in the bit stream. For generality, the first item sent should be a fixed number of bits that indicate the number of dimensions for what is being transferred; then you need to transfer each dimension, and _then_ you send the bits. For generality you should also send some kind of type information (i.e., whether the original array was uint8, uint16, double precision, and so on) so that you know how many bits per array element and so you can typecast() the reconstructed bytes back in to the original data type.
When you are transferring the dimension information, remember that the number of bits you send to indicate the dimension will limit the maximum array size you can reconstruct.
Hint: if you send the type information in a fixed number of bits, then the number of dimensions in a fixed number of bits, and if you have a fixed number of bits per dimension indicating the size information, then after you are finished reconstructing the size bits into numbers, you will be able to calculate exactly how many bits should follow for the array. If you read only that many bits and do the reconstruction of the original array and store it (or whatever), then you will be all ready to repeat the process for another array, thus allowing you to transmit multiple arrays (e.g., multiple images.) With what you had defined before, you need to rely upon some kind of indication that no more data would be transferred, which is something that QAM and so on have no inherent way of indicating.
Ubaid Ullah
Ubaid Ullah 2011 年 5 月 27 日
ACM in my case is adaptive code modulation. The data adapts modulation technique according to the environment or the nature of data. Actually, I am new to matlab. I am computer engineering student and doing a semester project on "Image Transmission through DVB-S2, using LDPC and ACM. I was expecting an idea from you related to my project. Bundle of thanks for your help.
Walter Roberson
Walter Roberson 2011 年 5 月 27 日
Related papers:
http://aias.iit.demokritos.gr/~gardikis/material/using_acm_for_sat3play.pdf
http://ieeexplore.ieee.org/ielx5/5484101/5496636/05496686.pdf?tp=&arnumber=5496686&isnumber=5496636
I am not familiar with that topic, and do not have any suggestions to offer at this time.
Ubaid Ullah
Ubaid Ullah 2011 年 5 月 27 日
Again thanks for your help.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by