Anyone with matlab installed - Read here.
I am attaching the files, so if you could do it, I would greatly appreciate it. If you want help with code, let me know. Its just 2 lines but I just forgot to bring matlab from home.
Thanks in advance.
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
@prototype-G9Gn5k • Nov 1, 2012
@thebigk • Nov 1, 2012
@prototype-G9Gn5k • Nov 1, 2012
Uh well, it wasn't a problem. I just didn't had matlab installed, that's why I wanted someone to read those image in matlab and convert the image vectors to hex and give it to me, so I can port it in the algorithm I am trying to implement in Verilog.The_Big_KIt'd be great if you could post the solution to the problem. It'll definitely help others with similar problem.
A = imread('lenna_noise.gif'); % Read image
z = dec2hex(A); %Convert to hex
fid = fopen('lenna_noise.txt','w');
fprintf(fid, [repmat('%x ', 1, size(z,256)), '\n'], z'); %write to text file in 255 X 255 fashion.
fclose(fid);
@arunchary-VtqB3c • Nov 1, 2012
@jeffrey-xA7lUP • Nov 2, 2012
Can you pls explain I am a little confused herearuncharyconsider the image in to 24bit format in Mspaint in your system then go for using this file k.just load the picture and save in 24bit format k...
@prototype-G9Gn5k • Nov 2, 2012
My image is grayscale and not rgb. Besides, how will it convert the image into vectors?aruncharyconsider the image in to 24bit format in Mspaint in your system then go for using this file k.just load the picture and save in 24bit format k...
@ektahitixa-eX1zHu • Nov 2, 2012
[Prototype]Uh well, it wasn't a problem. I just didn't had matlab installed, that's why I wanted someone to read those image in matlab and convert the image vectors to hex and give it to me, so I can port it in the algorithm I am trying to implement in Verilog.
Below is the code (I've commented it) for doing so. I just downloaded a lite version for Matlab 2006 and it did my work.
A = imread('lenna_noise.gif'); % Read image z = dec2hex(A); %Convert to hex fid = fopen('lenna_noise.txt','w'); fprintf(fid, [repmat('%x ', 1, size(z,256)), '\n'], z'); %write to text file in 255 X 255 fashion. fclose(fid);[/quote
image should have .tif extension .jpg wont work
@prototype-G9Gn5k • Nov 2, 2012
Why not? I am not interested in raw image. I just wanted matrix form of my image for further processing. I am not trying to do compressions or similar hence raw image is not required for me.EktaHitixaim
@arunchary-VtqB3c • Nov 2, 2012