I'am implementing image transmission using USRP interfaced with Labview. in the transmitter I compress the image and I transmit the content of the binary file which result from the image compression. In the receiver, I received the content of the binary file. my question is how to read and display the compressed image again in the receiver?
this is my problem, how I will decompress it. in the transmitter I compressed it using imwrite command. but I dont know how I will decompress it in the receiver
Well _how_ do you compress it? A normal zip? Some custom code? Since we know nothing about how you compress it only you can answer how to uncompress it. 🙂
What is "an image"? A jpg or png file? They are already compressed.
Do you want to display them on screen or save them to file?
To transfer them using an USRP you probably also need to encode them in some way, after optional compressing, and decode them before decompressing.
How to encode is really up to you. There are tons of ways to do that...
It might be easiest to write the contents of that compressed binary stream to disk with the appropriate name and then use the appropriate function in LabVIEW (eg Read JPEG File) to read and display it in a Picture control. LabVIEW does not have built-in functions for decompressing the image in-memory.
thank you for your answer..
Actually I tried it but still not working with me ..my received array is uint8 4101x1..how to save it as binary file then read it.when I tried to write this file, it keeps give me loop because the usrp always receiving.. I think its not practical for every image transmission..
Do you have any idea?
thank you for your answer
actually my code is here
I = imread('cameraman.png');
fileID = fopen('cameraman1.bin');
A = fread(fileID);
I read the image first, then i rewrite it as a compressed binary file, then I open it and read it,the I took A and I did some modification on it then I transmitted it..
In the receiver I received the stream of bits then I modified it to reach A format but I couldnt know how to decode it so I can be able to get the image..
can you please help me in way to do that or propose for me other simple coding and decoding technique.
Thank you again
LabVIEW does not have built-in functions for decompressing the image in-memory.
Yes, LabVIEW has those.
They're just hidden.
NI_WebServices.lvlib:LV Image to PNG Data.vi
NI_WebServices.lvlib:PNG Data to LV Image.vi
Note that the export functions used for PNGs are also available for JPGs, but there are no VIs for it.