How do I read an image from a different folder into my .m file using Matlab in Ubuntu?
Mostrar comentarios más antiguos
I am able to access images from a folder using Matlab in Windows. I use Matlab 2010a with Ubuntu 14.04. How do I read an image from a folder which is outside the current folder into my .m file?
Respuestas (4)
Sreeram Mohan
el 24 de Abr. de 2015
0 votos
Hi Deepa,
Did you try adding the folder that your image exists into path and try out ?
You could programatically add the folder to the MATLAB path as well using
>> addpath(folderName);
hope this helps !!
Thanks,
Sreeram Mohan
Michael Haderlein
el 24 de Abr. de 2015
0 votos
Possibly the file separator you use is wrong? In Unix systems you use "/" while in Windows you use "\". However, you write "dir(fullfile('home\Deepa\Documents\reading_DB\images\*.jpg'))", so I guess you have chosen the wrong one. You can use filesep to get the correct separator.
1 comentario
Deepa Nair
el 27 de Abr. de 2015
Sreeram Mohan
el 28 de Abr. de 2015
0 votos
Hi Deepa,
First off could you please first reduce the problem to a simple one so that we can see what is the real issue ?
1) Could you please copy 1 jpg file into the present working directory wherever the script is being run and then verify without path if imread and the imshow work ? 2) Next once that is working could you please try putting the image in a location that is smaller in length and try ? may be less than 64 characters ? If even this work then proceed to 3rd step 3) Try using a longer path name and see if that works !
Hope this will give a better insight into where the issue is popping in from ?
--sreeram
1 comentario
Deepa Nair
el 29 de Abr. de 2015
sruthi N
el 13 de Dic. de 2017
0 votos
In image processing i have real time image. but its read only the specific software like that Radiant Dicom viewer, so how will i read the image from this software in m.file
Categorías
Más información sobre Get Started with Image Processing Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!