Adding Two Images (Image Addition in C#)

Basic Working Mechanism
In its most straightforward implementation, this operator takes as input two identically sized images and produces as output a third image of the same size as the first two, in which the intensity of each pixel is the sum of the values of the corresponding pixels from each of the two input images. More sophisticated versions allow more than two images to be combined with a single operation.
A common variant of the operator simply allows a specified constant to be added to every pixel.
Histogram equalization redistributes intensity distributions. If the histogram of any image has many peaks and valleys, it will still have peaks and valley after equalization, but peaks and valley will be shifted. Because of this, "spreading" is a better term than "flattening" to describe histogram equalization. In histogram equalization, each pixel is assigned a new intensity value based on the its previous intensity level.
How Nature Produces Colors:
in fact, the basic colors present in the nature are three Red, Green and blue. The rest of the colors are the combination of these basic colors. The following figures illustrate the basic mechanism performed by the addition of these colors.
we can see here that how the addition of colors are changing them to some other colors. That is the basic reason due to which we say that we can make 224 =16777216 different colors.
General Working
Q(i,j)=P1(i,j)+ P2(i,j)
Or if it is simply desired to add a constant value C to a single image then:
Q(i,j)=P(i,j)+ C
If the pixel values in the input images are actually vectors rather than scalar values then the individual components (e.g. red, blue and green components) are simply added separately to produce the output value.
If the image format being used only supports, say 8-bit integer pixel values, then it is very easy for the result of the addition to be greater than the maximum allowed pixel value. The effect of this depends upon the particular implementation. The overflowing pixel values might just be set to the maximum allowed value, an effect known as saturation. Alternatively the pixel values might wrap around from zero again. If the image format supports pixel values with a much larger range, e.g. 32-bit integers or floating point numbers, then this problem does not occur so much.
The next step is to replace the previous intensity level with the new intensity level. This is accomplished by putting the value of Oi in the image for all the pixels, where Oi represents the new intensity value, whereas i represents the previous intensity level.
Guidelines for Use
To understand the working of the Image Addition, take the example of the following images:
the Resultant Image Obtained by the addition of the above images is as:
Sample Project
Please Review other articles based on Logical Operators to get the better understanding of the project. The application seems to be in this GUI
The project is a part of the series of the image processing articles written just for the prosperity and help for the students searching for Image Processing free stuff.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Basic Image Processing in Csharp

The C# provides a good support for processing on the image, and the purpose of this article...

Implementation Of Branch And Bound Algorithm

What is Branch and Bound Algorithm? These notes follow the discussion of branch and...

Implementation of Calculating the RTS Invariant Moments Of Area

Why Using Moments of Area? It is seen that the usage of moments of area highly...

Conversion of a Color Image to a Grayscale Image

What is a Color Image? It is possible to construct (almost) all visible colors by...

GrayLevel Image Contras Stretching in C#

Overview Contrast stretching (often called normalization) is a simple image...