Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: add gdalenhance.rst (fix #8137) #8732

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file may be used to create an environment using:
# $ pip install --upgrade -r <this file>
sphinx
sphinx < 7.0.0
breathe
sphinx_bootstrap_theme
sphinxcontrib-bibtex
Expand All @@ -9,3 +9,4 @@ recommonmark
sphinx-markdown-tables
sphinxcontrib-spelling
sphinxcontrib-jquery

1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#
html_theme_path = ["."]
html_theme = "gdal_rtd"
# html_theme = "classic"

html_context = {
"display_github": True,
Expand Down
76 changes: 76 additions & 0 deletions doc/source/programs/gdalenhance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.. _gdalenhance:

================================================================================
gdalenhance
================================================================================

.. only:: html

Enhance raster images with LUT-based contrast enhancement.

.. Index:: gdalenhance

Synopsis
--------

.. code-block::

gdalenhance [--help-general]
[-of format] [-co "NAME=VALUE"]*
[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}]
[-equalize]
[-config filename]
<src_raster> <dst_raster>

Description
-----------

The :program:`gdalenhance` utility enhances the contrast of raster
images using the GDAL library. It reads the input_file and writes
the output to output_file.

.. program:: gdalenhance

.. include:: options/help_and_help_general.rst

.. option:: -of format

Select the output format. The default is GeoTIFF (GTiff).

.. include:: options/co.rst

.. include:: options/ot.rst

.. option:: -equalize

Get source image histogram, and compute equalization luts from
it, apply lut to the source image.

.. option:: -config <filename>

Apply custom LUT(look up table) to enhance the contrast of the image.
The number of lines in the LUT file should be equal to the number of bands
of the images.
Exmaple of LUT file:

.. code-block::

1:Band 0.0:ScaleMin 1.0:ScaleMax
2:Band 0.0:ScaleMin 1.0:ScaleMax
3:Band 0.0:ScaleMin 1.0:ScaleMax

Example
--------

.. code-block::

gdalenhance -equalize rgb.tif rgb_equalize_enhance.tif

apply equalization histogram to enhance the contrast of the image.

.. code-block::

gdalenhance -config enhance_config rgb.tif rgb_custom_enhance.tif

apply custom LUT (look up-table) to enhance the contrast of the image.
2 changes: 2 additions & 0 deletions doc/source/programs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Raster programs
gdalbuildvrt
gdal_contour
gdaldem
gdalenhance
rgb2pct
pct2rgb
gdalattachpct
Expand Down Expand Up @@ -72,6 +73,7 @@ Raster programs
- :ref:`gdalbuildvrt`: Builds a VRT from a list of datasets.
- :ref:`gdal_contour`: Builds vector contour lines from a raster elevation model.
- :ref:`gdaldem`: Tools to analyze and visualize DEMs.
- :ref: `gdalenhance`: Performs image enhancement on raster.
- :ref:`rgb2pct`: Convert a 24bit RGB image to 8bit paletted.
- :ref:`pct2rgb`: Convert an 8bit paletted image to 24bit RGB.
- :ref:`gdalattachpct`: Attach a color table to a raster file from an input file.
Expand Down