Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by hellyeah ( 17 years ago )
function t = enhancement(x,sigma,filtersize)
   %% enhancement takes a value x and filtersize. Because the aim actually is to apply filter matrix to nised image.
   fido = fopen('tmp.txt' ,'a+');
   %% i took noised matrix.
   t = gaussiannoise(x);
   p = GaussianFilter(sigma,filtersize);
   %% value of a is changable. I mean this is gerneral way to present expanded matrix. I will tell my way later on.
   a = (filtersize + filtersize / 2) -1; 
   %% it has changable length acdcording to value of filtersize. That surround the noised matrix.
   ex = zeros(length(t)+2,length(t)+2);  % ex is expanded matrix
   ex(2:length(x),2:length(x)) = x;
   [row column] =  size(ex);
   for(i=2:row-1)
    for(j=2:column-1)
     if(i==2)
        ex(i,j) = t(300,j-1);
        %%fprintf(fido,'%d \n',ex(i,j));
      end
      if(i==302)
       ex(i,j) = t(1,j-1);
       fprintf(fido,'%d \n',ex(i,j));
      
       end
     end
   end
    
   %% i check the value of endge in here because in my method you have to assign of edge manually.
   %%ex(302,302) =  t(1,1);
   %%ex(1, 1) =  t(300,300);
   %%ex(1,302) = t(300,1);
   %%ex(302,1) = t(1,300);
   %%fprintf(fido,'%i \n' , ex(302,302));
   %%fprintf(fido,'%i \n' , ex(1,1));
   %%fprintf(fido,'%i \n' , ex(1,302));
   %%fprintf(fido,'%i \n' , ex(302,1));
   fclose(fido);

 

Revise this Paste

Parent: 12548
Children: 12556
Your Name: Code Language: