README file for random_phase_noise.c v1.3:
    random phase noise texture synthesis 


Content of this README file:
1. Authors
2. URLs
3. Requirements
4. Folders
5. Compilation
6. Usage
7. Test
8. Releases
9. Generate HTML Documentation


1. Authors

This software is written by Bruno Galerne <bruno.galerne@cmla.ens-cachan.fr>
and distributed under the terms of the GPLv3 licence.

2. URLs

This source code is an ANSI C implementation of the random phase noise
texture synthesis algorithm describes in the IPOL webpage "Random
Phase Texture Synthesis"
http://www.ipol.im/pub/algo/ggm_random_phase_texture_synthesis/

The last release should be available at:
    http://www.ipol.im/pub/algo/ggm_random_phase_texture_synthesis/

This code is provided with an HTML documentation produced by doxygen:
    http://www.ipol.im/pub/algo/ggm_random_phase_texture_synthesis/srcdoc/


3. Requirements:
 - ANSI C compiler
 - getopt
 - libpng
 - libfftw3
 - (optional) doxygen (to reproduce the HTML documentation)


4. Folders

The archive rpn_v1.3.zip has two subfolders:
 - src/ contains the ANSI C source code and the Makefile for
   compilation (see paragraph 5)
 - doc/ contains the necessary files to reproduce the HTML
   documentation with doxygen (see paragraph 9)


5. Compilation: 

Execute the provided Makefile from the folder src/ (function make).


6. Usage: (displayed in executing ./random_phase_noise -h)

random_phase_noise -r ratio -x nxout -y nyout -a alpha -s seed \
    image_in.png image_out.png 

Required parameters:
   image_in.png    :   name of the input PNG image
   image_out.png   :   name of the output PNG image

Optionnal parameters:
   ratio           :   float > 1 that specifies the increase of size
                       of image_out.png relatively to the size of
                       image_in.png
   nxout           :   int to specify the width of image_out.png.
   		       Must be greater than the width of image_in.png 
   nyout           :   int to specify the height of
                       image_out.png. Must be greater than the height
                       of image_in.png
   alpha           :   float in (0,0.5) that specifies the proportion
                       of the smoothing zone for the spot extension
                       (alpha = 0.1 by default) 
   seed            :   unsigned int to specify the seed for the random
                       number generator (seed = time(NULL) by default)


7. Test:

To test the module run:
    ./random_phase_noise -s 1 sample.png output.png
from the folder src/. output.png should be the same as the image
sample_rpn.png provided with the source code. 


8. Releases:

 - version 1.0:
		first version

 - version 1.1:
		(optimization) Use the FFTW functions
		fftw_plan_dft_r2c_2d and fftw_plan_dft_c2r_2d for
		discrete Fourier transforms computation 
		(reduce the size of all complex arrays).
 - version 1.2:
		New version of the spot extension technique (see the
		@ref spot_extension_color function):
		For the smooth transition the cumulative histogram of
		a standard molifier is used instead of a Gaussian
		decay.
		This is mathematically more coherent, but does not
		lead to significant changes for the produced
		textures.
		In addition, the new option -s enables to specify the
		seed for the random number generator.
		This permits to use the same random phase with
		different input images.

 - version 1.21:
		The source files have been reorganized: all the
		relevant functions are now in the file @ref
		random_phase_noise_lib.c.
		Besides, the source code for png input/output is a
		more recent version due to Nicolas Limare
		<nicolas.limare@cmla.ens-cachan.fr>.

 - version 1.3:
		Minor bug fixed thanks to the reviewer (unsigned int
		different from size_t for 64 bits).
		A small png image and its corresponding output are
		added to the release to enable a quick test of the
		module.
		Change of input/output routines: input and output
		images have now the .png image format.


9. Generate HTML Documentation

This code is provided with an HTML documentation produced by doxygen:
    http://www.ipol.im/pub/algo/ggm_random_phase_texture_synthesis/srcdoc/
If doxygen is installed on your system, you can generate the HTML
documentation by running 
    doxygen rpn_doxygen.conf
from the subdirectory doc/. The main page of the documentation is the
file doc/dochmtl/index.html 



