Main Page File List File Members
GaussLUT.cpp File Reference
Program for the histogram dynamic adaptation of image time-series.
More...
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <ctime>
Go to the source code of this file.
Defines |
#define | inf 1e7 |
#define | MIN(x, y) (((x) < (y)) ? (x) : (y)) |
#define | MAX(x, y) (((x) > (y)) ? (x) : (y)) |
#define | PIX unsigned short |
| format of the input images.
|
Functions |
void | usage (std::string argv0) |
| Usage function. More...
|
float | gaussian_distribution (float x) |
| Gaussian distribution function. More...
|
float | qromb (float(*func)(float), float a, float b) |
| Numerical recepies imported function.
|
int | main (int argc, char *argv[]) |
| Main procedure of the program. More...
|
Detailed Description
Program for the histogram dynamic adaptation of image time-series.
This procedure transforms, one after the other, the histograms of the different images (or a patial window in the images) composing the time-series into a Gaussian distribution. For a given spectral band, each image is processed independently from the others.
The algorithm iterates for each image band , the followinng procédures :
- first the histogram of reflectances related to the current image is equalized using the inverse repartition function of this image; by this procédure the image is requantized from 10 bits (unsigned short) to 16 bits
- then the equalized histogram is transformed into a Normal distribution centered and reduced;
- finally, the formed Gaussian histogram defined on 16 bits is rescaled on 8 bits (unsigned char). Finally, it saves multispectral (3 bands) raw images
-
Author:
-
P.Héas (IRIT / ENSAE / DLR / CNES)
-
Since:
-
January 2005
Definition in file GaussLUT.cpp.
Function Documentation
float gaussian_distribution |
( |
float |
x |
) |
|
|
|
Gaussian distribution function.
Normal distribution function of mean equal to 3 (instead of a zero mean in order to avoid considering negative values) and of standard deviation equal to 1.
Definition at line 291 of file GaussLUT.cpp. |
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
|
|
|
Main procedure of the program.
The algorithms reads first the input parameters and the input and output files. Then the imput image time-series is read. The histogram transformations is then done simultaneously for all the images bands by the following processing steps:
- the repartition function of the image is calculated in order to equalized the image
- the range of the reflectance values is calculated ( Maximum )
- the inverse Gaussian repartition function is the calculated using the Numerical recepies function 'qromb(...)'
- the Gaussian adaptation is then performed
- the results (3 bands images) are saved on the disk
-
Parameters:
-
argv0 |
[1] input text file name containing on each line the paths of the monospectral image bands to convert |
argv0 |
[2] output text file name containing on each line the paths of the 3 bands multispectral images to save on the disk |
argv0 |
[3] number of spectral bands x number of images |
argv0 |
[4] Number of lines of the images |
argv0 |
[5] Number of columns of the images |
Optional parameters for selecting a spatial window : -
Parameters:
-
argv0 |
[6] Column offset when reading the image file |
argv0 |
[7] Line offset when reading the image file |
argv0 |
[8] Number of columns of the image file |
Definition at line 78 of file GaussLUT.cpp. |
void usage |
( |
std::string |
argv0 |
) |
|
|
|
Usage function.
-
Parameters:
-
argv0 |
String containing the imput output file/paramters |
Definition at line 41 of file GaussLUT.cpp. |
Generated on Thu Feb 17 11:04:22 2005 for Histogram dynamic adaptation of image time-series by
1.2.14 written by Dimitri van Heesch,
© 1997-2002