Anyone with matlab installed - Read here.
Is there anyone here who have matlab installed in their computer? I need a little help. I need a couple of images to be converted into hex array and stored in text file.
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.
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.
Replies
-
[Prototype]Nvm... Sorted out.
-
Kaustubh KatdareIt'd be great if you could post the solution to the problem. It'll definitely help others with similar problem.
-
[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.The_Big_KIt'd be great if you could post the solution to the problem. It'll definitely help others with similar problem.
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);
-
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...
-
Jeffrey Arulraj
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...
If I have a .jpeg file then what will I have to do ? -
[Prototype]
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... -
EktaHitixaim[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]
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
I was actually designing a median filter with some new sort algorithm as presented one of the IEEE paper. -
aruncharyopen an image in Mspaint in windows then save in the format of 24bit format ,then it can be accessed by matrices format as rows and columns...in C language and other languages to operate in hex format also..
You are reading an archived discussion.
Related Posts
Microsoft's released the latest Windows 8 operating system and those who've upgraded their computers with the latest Windows will definitely want to free up some space on the hard disks....
I peeking out of office window, it was raining and then noticed how people were getting wet inspite of having an umbrella. There was a design flaw in the umbrella...
Hi i need help for paper publish topic related to dbms
is there any thumb rule for assuming the thickness of walls and percentage of steel required for construction of .1mgd capacity service reservior
guys getting problem with java installation in windows 7..
post the process for installing and path setting for win7 32- bit only