Installing toolboxes and setting up the path.

You need to unzip these toolboxes in your working directory, so that you have toolbox_signal and toolbox_general in your directory.

For Scilab user: you must replace the Matlab comment '%' by its Scilab counterpart '//'.

Recommandation: You should create a text file named for instance numericaltour.sce (in Scilab) or numericaltour.m (in Matlab) to write all the Scilab/Matlab command you want to execute. Then, simply run exec('numericaltour.sce'); (in Scilab) or numericaltour; (in Matlab) to run the commands.

Exercice 1: (check the solution) Histogram equalization is an orthogonal projector that maps the values of one signal onto the values of the other signal.
This is achieved by assiging the sorted of ont signal to the sorted values of the other signla. Implement this for the two
images.

exo1;

Statistics of the Wavelets Coefficients of Natural Images

Although the histograms of images are flat, the histogram of their wavelet coefficients are usually highly picked at zero,
resulting in a low entropy.

Load an image.

n = 256*2;
M = rescale( load_image('lena', n) );

Compute its wavelet coefficients.

Jmin = 4;
MW = perform_wavelet_transf(M,Jmin, +1);

Extract the fine horizontal details and display histograms. Take care at computing a centered histogram.

Higher Order Statistics

In order to analyse higher order statistics, one needs to consider couples of wavelet coefficients. For instance, we can consider
the joint distribution of a coefficient and of one of its neighbors. The interesting quantities are the joint histogram and
the conditional histogram (normalized so that row sum to 1).

Conditional coding

Since the neighboring coefficients are typically un-correlated but dependant, one can use this dependancy to build a conditional
coder. In essence, it amouts to using several coder, and coding a coefficient with the coder that corresponds to the neighbooring
value. Here we consider 3 coder (depending on the sign of the neighbor).