> hello! I'm trying to add many images, in the same figure then I try to
> get the standard deviation & contast....
> I began with this:
> To read in the raw image data, For example, a 640x480 set of 10
> % f=fopen('filename','rb');
> % I=reshape(fread(fp,640*480*10,'uchar'),[640 480 10]);
> % fclose(f);
> Now I compute the contrast for a 7x7 region for all 10 files
> for i=1:Nf,
> SC(:,:,i)=colfilt(I(:,:,i),[7 7],'sliding',contrast);
> Now I get the average the 10 files together
> why it does nor work, and how I can oppen all files, i have 10 image,
> Please help....
I think you forgot that you have to pass a function handle (so you need
the @-character, see help colfilt) try (for files image1.gif ...
Im=imread(['image' num2str(i) '.gif']);
Im=rgb2gray(Im); % convert to grayscale
SC(:,:,i) = colfilt(Im,[7 7],'sliding',@contrast);