How can write names of image / file in excel sheet using matlab ?
Afficher commentaires plus anciens
I need to print name of an image or current browsed file in specific position in excel using matlab Here is the code of what I tried so far
Image2 = imread('D:\ahmed','jpeg');
xlswrite('D:\aa.xls',image2,'Sheet1','A1');
OR ..
when i need to print name of browse image in GUI .. how can i print name of this upload image in excel sheet ...
filename=handles.filename;
[X2] = imread(filename);
xlswrite('D:\aa.xls',[X2],'Sheet1','A1');
both codes don't write the name of image ... its give me name of variable (image2 or X2 ) and do not write name of image ahmed or name of image in X2 which i browsed ... any help please .
hope to get the following output :
excel sheet1 cell [A1] contain (( name of my image or browsed image name like wilyam or browsed image name ).
6 commentaires
Image Analyst
le 2 Août 2015
Yeah, so.....?
ahmed obaid
le 2 Août 2015
shi long liu
le 2 Août 2015
Modifié(e) : Walter Roberson
le 2 Août 2015
If you want to write the image's attribute in xls,you can write follow as:
Image1= 'D:\ahmed.jpeg'; % we make Image be an string variable
Image2={Image1}; % cell array is necessary
xlswrite('D:\aa.xls',image2,'Sheet1','A1');% if aa.xls don't exist ,some error will appear.
ahmed obaid
le 2 Août 2015
Image Analyst
le 2 Août 2015
Did you even TRY my answer below? It works, even if the file already exists, and doesn't give any error.
ahmed obaid
le 2 Août 2015
Réponse acceptée
Plus de réponses (3)
munah alhatmi
le 27 Mar 2016
0 votes
please, could you help me in something similar....
I am working with image enhancement based soft computing using matlab...
I got the result of some filters and i had stored the result in excel file to be used later as input in neural network....
however, I need to save the result from neural stage and display again as image.
i mean how to store the result of xls file to jpg file.
i am looking for your help..
thanks in advance.
5 commentaires
Image Analyst
le 27 Mar 2016
What is in the xls file? Is it image intensity values? Can you attach the workbook and tell me what cells you want to display as an image?
munah alhatmi
le 28 Mar 2016
Modifié(e) : Walter Roberson
le 28 Mar 2016
Thank you for reply..
actually i am working in image enhancement using matlab.
the excle file has the pixel values of result image.
my project has two parts:
first loading input image and enhanced by one of matlab filters then save the output image as excle file to use in next stage.
second stage is using genetic algorithm to reduce the mean sequare error to be much better than before. also, i am facing problem of display MSE & PSNR.
pleae see the attachements.
I would be too much thankful if you could help me.
Image Analyst
le 28 Mar 2016
There is no attachment.
Why does the image need to be saved to a file at all in between stages?
And if it does need to be saved, I can't find any reason at all to save it as an Excel workbook.
munah alhatmi
le 28 Mar 2016
i don't know why doesn't attached.i had selected the file!
can i send it by email?
I saved in excel file because i want to do training for data. I don't have an idea about other ways because i am beginner in using matlab.
Image Analyst
le 28 Mar 2016
After you click Choose File, and Open, you have to click Attach File.
You can use imwrite to save the image
imwrite(yourImage, 'temporary image.png');
You can make the filename whatever you want instead of 'temporary image.png'. To read it back in:
rgbImage = imread('temporary image.png');
munah alhatmi
le 29 Mar 2016
0 votes
Dear Image Analyst,
i applied your method but the image appeared empty.
i feel the problem in passing the parameter.
i had attached my project.
my problem in second stage with MSE & PSNR and the resulted image.
i will appreciate your help.
many thanks,
munah alhatmi
le 29 Mar 2016
0 votes
the attachment of second stage ( genetic algorithm using machine learning)
2 commentaires
ahmed obaid
le 30 Mar 2016
munah alhatmi
le 30 Mar 2016
Dear ahmed..
thank you for your advice.
sure, i will do it.
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!