Matlab Blues

Help with Editing Multiple Images in Matlab

Page 1 of 1

1 Replies - 3991 Views - Last Post: 23 September 2007 - 04:59 AM Rate Topic: -----

#1 ltoops  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-January 07

Matlab Blues

Post icon  Posted 26 January 2007 - 09:45 AM

Hi,

I am 19 secs new and already have a problem. I have been trying to edit a sequence of images in matlab. The problem isn't that I haven't already figured out the right functions I need to use to edit the images, but that I can't seem to get matlab to read the images into its system. It keeps saying crazy things like file does not exist. Also get a warning that says: Assignment has more non-singleton rhs dimensions than non-singleton
subscripts. (?) But, to truly understand what I am talking about I am going to post the script that I wrote. I know there must be a lot of things wrong with it, and I could really use some expert advice.

testpath = ('/home/ltoops/test1')
dirOutput = dir(fullfile(testpath, 'frame.*.jpg'));
fileNames = {dirOutput.name};
numFrames = numel(fileNames);

I = imread([testpath, '/', fileNames{1}]);

%Preallocate the array
sequence = zeros([size(I) numFrames],class(I));
sequence(:,:,:,1) = I;

%Create image sequence array
for p = 1:numFrames
sequence(:,:,p) = imread(fileNames{p});
end

figure;
for k = 1:numFrames

im1_bw = im2bw(i,.3);
se = strel('disk', 1);
im1_close = imclose(im1_bw, se);
imshow(im1_close)

end

What I want is to read all the images in a file into matlab, then convert the images to a binary images, based on a threshold, and finally fill in any spots on my image with the imclose function. I can't do any of these because it won't read my images.

I would really appreciate any help.

Thanks so much,
L

Is This A Good Question/Topic? 0
  • +

Replies To: Matlab Blues

#2 Predictor  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 90
  • Joined: 20-September 07

Re: Matlab Blues

Posted 23 September 2007 - 04:59 AM

What happens when you execute this code? Do you get an error message?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1