

.. _sphx_glr_auto_examples_color_exposure:

Manipulating exposure and color channels
----------------------------------------



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example converts an image with RGB channels into an image with a single grayscale channel.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_rgb_to_gray_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_rgb_to_gray.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">RGB to grayscale</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how RGB to HSV (Hue, Saturation, Value) conversion [1]_ can be used to facilitate segmentation processes.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_rgb_to_hsv_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_rgb_to_hsv.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">RGB to HSV</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the feature of histogram matching. It manipulates the pixels of an input image so that its histogram matches the histogram of the reference image. If the images have multiple channels, the matching is done independently for each channel, as long as the number of channels is equal in the input image and the reference.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_histogram_matching_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_histogram_matching.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Histogram matching</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="There are many filters that are designed to work with gray-scale images but not with color images. To simplify the process of creating functions that can adapt to RGB images, scikit-image provides the adapt_rgb decorator.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_adapt_rgb_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_adapt_rgb.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Adapting gray-scale filters to RGB images</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Here, we use morphological reconstruction to create a background image, which we can subtract from the original image to isolate bright features (regional maxima).">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_regional_maxima_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_regional_maxima.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Filtering regional maxima</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Color deconvolution consists in the separation of features by their colors.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_ihc_color_separation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_ihc_color_separation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Separate colors in immunohistochemical staining</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example adjusts image contrast by performing a Gamma and a Logarithmic correction on the input image.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_log_gamma_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_log_gamma.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gamma and log contrast adjustment</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This examples enhances an image with low contrast, using a method called histogram equalization, which &quot;spreads out the most frequent intensity values&quot; in an image [1]_. The equalized image has a roughly linear cumulative distribution function.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_equalize_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_equalize.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Histogram Equalization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="It can be useful to artificially tint an image with some color, either to highlight particular regions of an image or maybe just to liven up a grayscale image. This example demonstrates image-tinting by scaling RGB values and by adjusting colors in the HSV color-space.">

.. only:: html

  .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_tinting_grayscale_images_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_color_exposure_plot_tinting_grayscale_images.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Tinting gray-scale images</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/color_exposure/plot_rgb_to_gray
   /auto_examples/color_exposure/plot_rgb_to_hsv
   /auto_examples/color_exposure/plot_histogram_matching
   /auto_examples/color_exposure/plot_adapt_rgb
   /auto_examples/color_exposure/plot_regional_maxima
   /auto_examples/color_exposure/plot_ihc_color_separation
   /auto_examples/color_exposure/plot_log_gamma
   /auto_examples/color_exposure/plot_equalize
   /auto_examples/color_exposure/plot_tinting_grayscale_images

