when i run the following code it gives me this error. "Error using Untitled5 (line 6) 'images' does not exist in 'C:\Users\​Administra​tor\Deskto​p\ImageDat​abase1.mat​'.

1 view (last 30 days)
when i run the following code it gives me this error. "Error using Untitled5 (line 6) 'images' does not exist in 'C:\Users\Administrator\Desktop\ImageDatabase1.mat'.
dataset = matfile('ImageDatabase1.mat');
%%Load pair of images
index = 1;
imgRgb = dataset.images(:, :, :, index);
imgDepthRaw = dataset.rawDepths(:, :, index);
croppedDepth = crop_image(imgDepthRaw);
figure(1);
imagesc(croppedDepth);
title('RGB'); axis off; axis image;
[filled, n] = maskedMeanHoleFill(croppedDepth);
figure(2);
imagesc(filled);
title('Filled'); axis off; axis image;
figure(3);
imagesc(imsubtract(filled, croppedDepth));
figure(4);
surfl(double(filled)); shading interp; colormap(bone)
rotate3d on, axis vis3d, axis off, title('Filled 3d');
  3 Comments
jehad ali
jehad ali on 3 Oct 2014
Edited: jehad ali on 3 Oct 2014
imgRgb=dataset.images(:,:,:,index); This is line 6. I have 10 images in ImageDatabase1.mat File
jehad ali
jehad ali on 3 Oct 2014
First i made ImageDatabase1.mat File from my Images. Now I am accessing those images from this code to apply the filter on those images through the above code.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 3 Oct 2014
Examine dataset in the variable editor. If you don't know how to do that see this: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/. You will see images is not in there. Perhaps it's Images - MATLAB is case sensitive.

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!