Hi everyone, i have a problem for running matlab in ubuntu with the path directory. I use this form:
Amoy=Average('./TestProcess/') (The function requires the path directory of the images to process)
So, this doesn't work in ubunto but the strange is that same function works perfectly in windows Xp.
The error shows
Error using => imread at 374
If Anyone can help me I will apreciate
Thanks to all

댓글 수: 5

Walter Roberson
Walter Roberson 2011년 11월 9일
What is the error message shown for imread() ?
Daniel Shub
Daniel Shub 2011년 11월 9일
REading from the source of imread line 374 in r2011a:
error('MATLAB:imread:fileOpen', 'File "%s" does not exist.', filename);
Walter Roberson
Walter Roberson 2011년 11월 9일
And which filename is it that it says does not exist?
Have you tried
cd('./TestProcess')
Amoy = Average('.')
Bhadange Mihir
Bhadange Mihir 2021년 5월 28일
Hey i can't install matlab on ubuntu. please help
Walter Roberson
Walter Roberson 2021년 5월 28일
Please open a question about installing matlab as it is not relevant to the current topic

댓글을 달려면 로그인하십시오.

답변 (3개)

Alex Taylor
Alex Taylor 2011년 11월 9일

0 개 추천

To get an answer to your question, you should set a breakpoint at the line where you are calling imread. Examine the full path and filename you are passing to imread. It is very likely be that when you do this, it will be a simple unix path vs. windows path issue.
I'd look at the functions fullfile and filesep for help generating platform agnostic paths.
help fullfile
help filesep
Hope this helps.
Alex.
Daniel Shub
Daniel Shub 2011년 11월 9일

0 개 추천

Are all your file separation slashes correct? You can use filesep to handle the / and \ differences. Is the directory your images in readable?
Alex Molina
Alex Molina 2011년 11월 10일

0 개 추천

>> Amoy = Average('./TestProcess/'); ??? Error using ==> imread at 374 File "./TestProcess/./TestProcess/CamA_2008_04_07_15_00_00_17.jpg ./TestProcess/CamA_2008_04_07_15_00_00_67.jpg ./TestProcess/CamA_2008_04_07_15_00_01_17.jpg ./TestProcess/CamA_2008_04_07_15_00_01_67.jpg ./TestProcess/CamA_2008_04_07_15_00_02_17.jpg ./TestProcess/CamA_2008_04_07_15_00_02_67.jpg ./TestProcess/CamA_2008_04_07_15_00_03_17.jpg ./TestProcess/CamA_2008_04_07_15_00_03_67.jpg ./TestProcess/CamA_2008_04_07_15_00_04_17.jpg ./TestProcess/CamA_2008_04_07_15_00_04_67.jpg " does not exist.
Error in ==> Average at 15 A = imread([ImgPath,lsrep(1,:)]);
This is the message, that appears when i try to ejecut the function. I try to change the slashes the point but doesn't works in ubuntu 10.04

댓글 수: 7

Daniel Shub
Daniel Shub 2011년 11월 10일
It looks like you are trying to read more than one file.
Alex Molina
Alex Molina 2011년 11월 10일
well in fact the function make a average of all images in the directory
Alex Molina
Alex Molina 2011년 11월 10일
And this function works perfectly in windows :S!!! So i don't understand why happend that..
Walter Roberson
Walter Roberson 2011년 11월 10일
imread() can only read one file at a time on any OS.
Your routine "Average" needs to read one file at a time and work that way.
I wonder, by the way, what Average() is intended to do if the images are different sizes?
Alex Molina
Alex Molina 2011년 11월 11일
This function was made to specif a group of images, captured from a camera
Alex Molina
Alex Molina 2011년 11월 11일
So this images are standard size
Walter Roberson
Walter Roberson 2011년 11월 11일
And if other images accidentally get put in to the same directory?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Search Path에 대해 자세히 알아보기

질문:

2011년 11월 9일

댓글:

2021년 5월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by