.. _Arithmetic:

***************************************
Arithmetic Operations
***************************************

.. topic:: Reading Assignment

   Please read section 12.3 of [RVC]_, chapters 6 and 8 and sections 9.4 and
   15.2 of [PIVP]_.

Arithmetic operations are performed on a pixel-by-pixel basis independent of
both the location of each pixel in the image and other nearby pixels.
Such operations are fundamental to many image processing applications, but
are, in general, less important to machine vision. Thus, we will attempt
to fairly quickly cover this material. 

.. _monadic:

Monadic Operations
===================

.. index:: Histogram Normalization, Gamma Correction 

.. figure:: fig12_7.png
   :align: center
   :width: 40%

   Figure 12.7 from [RVC]_. Monadic operations process the intesity levels 
   of the pixels of one input image producing one output image.


.. topic:: Video Resources

   * `Introduction to Monadic Image Processing
     <https://robotacademy.net.au/masterclass/image-processing/?lesson=650>`_

   * `Monadic Functions
     <https://robotacademy.net.au/masterclass/image-processing/?lesson=651>`_

   * `Histogram Normalization
     <https://robotacademy.net.au/masterclass/image-processing/?lesson=652>`_

   * `Gamma Correction
     <https://robotacademy.net.au/masterclass/image-processing/?lesson=653>`_

   * `Image Thresholding
     <https://robotacademy.net.au/masterclass/image-processing/?lesson=655>`_

..   * `Multiply by a Scalar Demo
     <https://classroom.udacity.com/courses/ud810/lessons/3452628581/concepts/34027789720923>`_

Diadic Operations
===================

.. figure:: fig12_9.png
   :align: center
   :width: 40%

   Figure 12.9 from [RVC]_. Diadic operations process two input images with one
   output image based on a pixel by pixel combination of the two images.


.. topic:: Video Resource

   * `Diadic Image Processing
     <https://robotacademy.net.au/masterclass/image-processing/?lesson=656>`_
     shows how to combine two images using the green screen effect.

..   * `Add 2 Images Demo
     <https://classroom.udacity.com/courses/ud810/lessons/3452628581/concepts/34027789670923>`_