How to decompress a Jpeg compressed data?

7 views (last 30 days)
JAI PRAKASH
JAI PRAKASH on 8 Dec 2018
Commented: JAI PRAKASH on 9 Dec 2018
Hi
I have JPEG compressed data, as shown in below figure.
How original image can be recovered, if Height & Width of original image is known.
BTW, below is how the original image should look like.
My final intension to perform this on GPU, to speed it up for live streaming. (every millisec is important)
I am also attaching the compressed data in '.mat' format

Answers (1)

Jan
Jan on 9 Dec 2018
Edited: Jan on 9 Dec 2018
I strongly recommend to ask an internet search engine for "Matlab jpeg decompress". You will find many solutions and such a short research is much faster than waiting for the forum to answer.
I speed matters, do not use Matlab for this task but one of the many libraries written in faster languages. Doing this on a GPU might have the drawback, that the data transfere might be the bottleneck.
  1 Comment
JAI PRAKASH
JAI PRAKASH on 9 Dec 2018
Thanks for replying.
I didn't get any satisfying result from internet search. That's why i tried posting on portal.
Actually the above jpeg compressed data is inside a ros message.
which can be easily decompressed with following command
im = readImage(ROSmsg);
It takes 60-200ms to get the image depends on image resolution.
I am trying to use GPU computing to get it quick.
I went inside the 'readImage()' and found it is using java objects. e.g.
imjava = javax.imageio.ImageIO.read(inputStream); % inside robotics.ros.msg.sensor_msgs.internal.ImageReader
So I am not able to analyse and then reprogram it for GPU.
Is there any way to reprogram it using matlab commands and then use GPU coder to build a .mex ?
OR
perform directly readImage() on GPU?
Thanks for consideration again.

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!