f

#### is this right?

```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
images:
%  f=fopen('filename','rb');
%  fclose(f);

Now  I compute the contrast for a 7x7 region for all 10 files
Nf=10;
SC=zeros(size(I));
for i=1:Nf,
SC(:,:,i)=colfilt(I(:,:,i),[7 7],'sliding',contrast);
end
Now I get the average the 10 files together
SCm=mean(SC,3);

why it does nor work, and how I can oppen all files,  i have 10 image,

``` 0 1/30/2005 3:18:59 PM comp.soft-sys.matlab  211264 articles. 25 followers. 1 Replies 402 Views Similar Articles

[PageSpeed] 32

```peter wrote:
> 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
> images:
> %  f=fopen('filename','rb');
> %  fclose(f);
>
> Now  I compute the contrast for a 7x7 region for all 10 files
> Nf=10;
> SC=zeros(size(I));
> for i=1:Nf,
>     SC(:,:,i)=colfilt(I(:,:,i),[7 7],'sliding',contrast);
> end
> Now I get the average the 10 files together
> SCm=mean(SC,3);
>
> why it does nor work, and how I can oppen all files,  i have 10 image,
>
>

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 ...
image10.gif):

SC=[];
for i=1:10
if size(Im,3)>1
Im=rgb2gray(Im); % convert to grayscale
end
SC(:,:,i) = colfilt(Im,[7 7],'sliding',@contrast);
end
SCm=mean(SC,3);

Good luck
Jorg

``` 0 1/30/2005 7:28:56 PM