% 
%  Aufruf: >> num = bild100( 'Katze.bmp', 'KS.bmp' ) 
%
function num = bild100( fn_in, fn_out )  

   A = imread( fn_in );
   
   sz = size( A );
   nZ = sz( 1 );
   nS = sz( 2 );
   num = nZ * nS;
   
   B = A; 
   for( z=1:nZ )
      for( s =1:nS ) 
         if( B(z,s,1) < 100 && B(z,s,3) < 100 )
            B(z,s,1) = 0; 
            B(z,s,2) = 0; 
            B(z,s,3) = 0; 
         end
      end    
   end
   
   imwrite( B, fn_out ); 
   
   subplot( 1,2,1 );
   image( A )
   axis image;
   subplot( 1,2,2 );
   image( B )
   axis image;
   
end
