ADD_CVIP

add_cvip() - Adds two images or adds a constant to an image.

Contents

SYNTAX

OutputImage = add_cvip(inputImage1, inputImage2);

Input parameters include:

Output parameters include:

DESCRIPTION

This function performs bitwise addition of two images. Adds each element from inputImage1 to the corresponding element in inputImage2 and returns the sum in the corresponding element of the outputImage. If inputImage1 and inputImage2 are numeric arrays of the different size, smaller size arrays are zero padded and added to larger size arrays.

To view the 8-bit image of type double, divide outputImage by 255.

To view the 16-bit image of type double, divide outputImage by 65535.

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read Image

  ipImage1=imread('cam.bmp');
  ipImage2 =imread('CheckCircle.bmp');

% Call function

  outputImage = add_cvip( ipImage1, ipImage2);

% Display Input Image

  figure;imshow(ipImage1);title('Input Image 1');
  figure;imshow(ipImage2);title('Input Image 2');

% Display Output Image

  figure;imshow(outputImage,[]);title('Output Image');

CREDITS

Author: Deependra Mishra, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website