From raw bits to jpeg without writing into a file
I have a real time application which receives jpg images coded in base64.
I do not know how to show the image in matlab without having to save the
image in the disk and open it afterwards.
This is the code I have so far, that saves the image in the disk before
showing it:
raw = base64decode(imageBase64, '', 'java');
fid = fopen('buffer.jpg', 'wb');
fwrite(fid, raw, 'uint8');
fclose(fid);
I = imread('buffer.jpg');
imshow(I);
Thanks!
No comments:
Post a Comment