help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with images loading


From: olga_kruglova
Subject: Problem with images loading
Date: Tue, 8 Mar 2011 01:41:32 -0800 (PST)

Hi everybody,

I am very new to octave and programming. So, I need to write a program to
subtract images from each other. I was reading different advices and wrote
some routine but it keeps giving me an error and I can't see why it happens.
If somebody would point out what is wrong and where I should correct I would
be very grateful. So, here is the routine:

filePaths =dir( 'E:\data\EHD_flow\Particle_1µm6µl\01m_nacl_4v_100hz\*.tif');
fileNames = {filePaths.name};
numberOfImageFiles = numel(fileNames);
rows=2;
columns=2;

subtractedSequence = zeros(rows, columns, numberOfImageFiles-1, 1);
for i = 1 : numberOfImageFiles
        priorImage{i} = imread(fileNames{i});
        currentImage{i+1} = imread(fileNames(i+1));
        subtractedSequence(:,:, i-1, :) = currentImage - priorImage;
        priorImage = currentImage;
        outputFileName = sprintf('Subtraction.tif',i);
                           imwrite(subtractedSequence, outputFileName ); 
        end
And here is error I get:

>>>error: imread: cannot find 0000001.tif
error: called from:
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\image\imread.m at
line 
53, column 5
error:   Images.m at line 10, column 17
 Thank you very much in advance!!!

Olga

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-with-images-loading-tp3340938p3340938.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]