f



MATLAB Image processing toolbox problem

Hi,
I'm using MATLAB 7.1.0.183 (R14) on Linux.I'm trying the histogram
equalization using this code:

Img7=imread('pollen.tif');
Img7=im2double(Img7);
NormHist=imhist(Img7)/numel(Img7);
Points=1:10:256;
subplot(221)
imshow(Img7);
subplot(222)
bar(Points,NormHist(Points));
HistEqualized=histeq(Img7);
HistEqualizedNormHist=imhist(HistEqualized)/numel(HistEqualized);
subplot(223)
imshow('HistEqualized');
subplot(224)
bar(Points,HistEqualizedNormHist(Points));

Pretty simple,but MATLAB gives this error:
??? Error using ==> imuitools/private/
imageDisplayParseInputs>getImageFromFile
Cannot find the specified file: "HistEqualized"

Error in ==> imuitools/private/imageDisplayParseInputs at 128
        [cdata,map] = getImageFromFile(filename);

Error in ==> imshow at 151
  [cdata, cdatamapping, clim, map, xdata, ydata, ...




Tried a simpler script :

Img=imread('pollen.tif')
imshow(Img);
figure;
imhist(Img);
ylim('Auto');
g=histeq(Img,256);
figure;imhist(g);
ylim('Auto');

But this time MATLAB gives a different error:
??? Attempt to execute SCRIPT histeq as a function.

Error in ==> histeq at 6
g=histeq(Img,256);

0
10/4/2007 10:12:05 PM
comp.soft-sys.matlab 211264 articles. 26 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
1012 Views

Similar Articles

[PageSpeed] 10

I'm not sure about the first one, but for your simpler
example, you will need to change the name of your script to
something other than histeq.m to avoid filename clash with
the already existing histeq function.

Volkan
> 
> Error in ==> histeq at 6
> g=histeq(Img,256);
> 

0
volkan (92)
10/4/2007 11:43:25 PM
Reply: