function image_denoise_test ( )

%*****************************************************************************80
%
%% image_denoise_test tests image_denoise.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 February 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../image_denoise' );

  timestamp ( )
  fprintf ( 1, '\n' );
  fprintf ( 1, 'image_denoise_test:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test image_denoise.\n' );

  gray = imread ( 'glassware_noisy.png' );
  gray_3x3 = image_denoise_gray_3x3 ( gray );
  filename = 'glassware_3x3.png';
  imwrite ( gray_3x3, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 1 )
  imshow ( gray_3x3 )

  gray = imread ( 'glassware_noisy.png' );
  gray_news = image_denoise_gray_news ( gray );
  filename = 'glassware_news.png';
  imwrite ( gray_news, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 2 )
  imshow ( gray_news )

  rgb = imread ( 'balloons_noisy.png' );
  rgb_3x3 = image_denoise_rgb_3x3 ( rgb );
  filename = 'balloons_3x3.png';
  imwrite ( rgb_3x3, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 3 )
  imshow ( rgb_3x3 )

  rgb = imread ( 'balloons_noisy.png' );
  rgb_news = image_denoise_rgb_news ( rgb );
  filename = 'balloons_news.png';
  imwrite ( rgb_news, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 4 )
  imshow ( rgb_news )
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'image_denoise_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( )

  rmpath ( '../image_denoise' );

  return
end

