Skip to content
Snippets Groups Projects
Commit f791da1b authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

DOC: cookbook recipe improvement

parent beba601e
No related branches found
No related tags found
No related merge requests found
...@@ -2,17 +2,17 @@ Visual product and contrast enhancement ...@@ -2,17 +2,17 @@ Visual product and contrast enhancement
======================================================== ========================================================
Sensor images have often a wide dynamic range. Whereas it is very helpful Sensor images have often a wide dynamic range. Whereas it is very helpful
to have high precision to do complex processing, it is pretty hard to display to have high precision to do complex processing, it is pretty hard to display
wide range of dynamic, even on modern screen. The dynamic range for basic high dynamic images, even on modern screen. The dynamic range for basic
screen is of 8 bits. Data can contain 12 or 16 bits (or even more!). screen is of 8 bits. Images can contain 12 or 16 bits (or even more!) of data.
The contrast enhancement application is aiming at reducing this dynamic The contrast enhancement application is aiming at reducing this dynamic
by compressing it in a smarter way than just linear compression. by reorganizing it in a smarter way than just linear compression.
In a linear compression, compression changes the dynamic range (for instance In a linear compression, compression changes the dynamic range (for instance
from 12 to 8 bits) but does not change the repartition of the pixel. from 12 to 8 bits) but does not change the repartition of the pixel.
|image1| |image2| |image1| |image2|
Here the equalization of histogram is creating a look up table in order to Here the equalization of histogram is creating a look up table in order to
maximize the use of dynamics. The target histogram is perfectly flat one. maximize the use of dynamic. The target histogram is a perfectly flat one.
The gain applied on each pixel comes from the computation of the transfer The gain applied on each pixel comes from the computation of the transfer
function :math:`T` such that : function :math:`T` such that :
...@@ -34,11 +34,14 @@ following use : ...@@ -34,11 +34,14 @@ following use :
-out output_image.tif -out output_image.tif
-spatial global -spatial global
You can then compress your dynamic without loosing too much detail and
contrast.
Advanced parameters Advanced parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can see that more parameter are available in the application. Let us see You can see that more parameters are available in the application. Let us see
what there are for. what there are for.
First what you want to equalize. There is two modes : First what you want to equalize. There are two modes :
* luminance : you provide the application with a 3 bands image and the * luminance : you provide the application with a 3 bands image and the
equalization will be done on a single band which will be a composition of equalization will be done on a single band which will be a composition of
the original bands. The computed gain will then be applied on the different the original bands. The computed gain will then be applied on the different
...@@ -47,8 +50,8 @@ different color, conserve the hue. ...@@ -47,8 +50,8 @@ different color, conserve the hue.
* channel : you provide the application with a n bands image and each of * channel : you provide the application with a n bands image and each of
them are equalized independently. them are equalized independently.
The other main mode is the local equalization. You can choose a window The other option is the local equalization. You can choose a window size
size that will be use to split the image in tiles and histograms will be that will be use to split the image in tiles and histograms will be
computed over those tiles. Gain will be interpolated between the adjacent computed over those tiles. Gain will be interpolated between the adjacent
tiles in order to give a smooth result. tiles in order to give a smooth result.
...@@ -69,8 +72,8 @@ height". ...@@ -69,8 +72,8 @@ height".
|image4| |image4|
Finally you have the choice to ignore a particular value with the "nodata" Finally you have the choice to ignore a particular value with the "nodata"
parameter, and also the choice to put manually your minimum and maximum value. parameter, and also the choice to put manually your minimum and maximum value,
Any value out of bound will be ignored. which can be a gain of time. Any value out of bound will be ignored.
.. |image1| image:: ../Art/contrast1.png .. |image1| image:: ../Art/contrast1.png
:scale: 30% :scale: 30%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment