0% found this document useful (0 votes)
59 views

Lecture 7

There are two primary categories of operations that can be applied to images: arithmetic operations and logic operations. Arithmetic operations include addition, subtraction, multiplication and division, which are performed on a pixel-by-pixel basis. Logic operations include AND, OR and NOT, and are used for binary images. Examples of applications include image enhancement through brightness adjustment, detecting motion through image subtraction, masking regions of interest, and comparing images to find similarities and differences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Lecture 7

There are two primary categories of operations that can be applied to images: arithmetic operations and logic operations. Arithmetic operations include addition, subtraction, multiplication and division, which are performed on a pixel-by-pixel basis. Logic operations include AND, OR and NOT, and are used for binary images. Examples of applications include image enhancement through brightness adjustment, detecting motion through image subtraction, masking regions of interest, and comparing images to find similarities and differences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Arithmetical and Logic Operations

There are two primary categories of algebraic operations applied to image:

• Arithmetic operations.
• Logic operations.

Addition, subtraction, division and multiplications comprise the arithmetic


operations, while AND, OR and NOT makeup the logic operations. These
operations which require only one image, and are done on a pixel –by-pixel basis.
To apply the arithmetic operations to two images, we simply operate on
corresponding pixel values. For example, to add image I1 and I2 to create I3:

Addition is used to combine the information in two images .Applications include


development of image restoration algorithm for molding additive noise, and
special effects, such as image morphing in motion pictures.

Subtraction of two images is often used to detect motion ,consider the case where
nothing has changed in a sense ;the image resulting from subtraction of two
sequential image is filled with zero-a black image .If something has moved in the
scene, subtraction produces a nonzero result at the location of movement.
Applications include Object tracking ,Medical imaging ,Law enforcement and
Military applications

A .First Original image B .Second Original C. Addition of two images

IMAGE ADDITION

1|Marwa R.
A .Original scene B .Same scene later

C .Subtraction of scene a from scene

IMAGE SUBTRACTION

Multiplication and Division are used to adjust the brightness of an image .One
image typically consists of a constant number greater than one .Multiplication of
the pixel values by a number greater than one will darken the image (Brightness
adjustment is often used as a processing step in image enhancement)

A.Cameraman image B.X-ray image of hand


C.Multiplication of two
images
IMAGE MULTIPLICATION

2|Marwa R.
A.Original image B.Image divided by value1> C. Image divided by value1<

IMAGE DIVISION

Logical operations apply only to binary images ,whereas arithmetic operations


apply to multi-valued pixels .Logical operations are basic tools in binary image
processing, where they are used for tasks such as masking ,feature detection ,and
shape analysis .Logical operations on entire image are performed pixel–by–pixel .
Because the AND operation of two binary variablesis1only when both variables
are ,1 the result at any location in a resulting AND image is1 only if the
corresponding pixels in the two input images are .1 As logical operation involve
only one pixel location at a time ,they can be done in place ,as in the case of
arithmetic operations .The XOR( exclusive OR) operation yields a 1 when one or
other pixel (but not both) is 1,and it yields a 0 otherwise .The operation is unlike
the OR operation ,which is1 ,when one or the other pixel is1,or both pixels are1.

3|Marwa R.
Logical AND& OR operations are useful for the masking and compositing of
images .For example ,if we compute the AND of a binary image with some other
image, then pixels for which the corresponding value in the binary image is 1 will
be preserved ,but pixels for which the corresponding binary value is 0 will be set
to0 (erased).Thus the binary image acts as a“ mask ”that removes information
from certain parts of the image.

On the other hand ,if we compute the OR of a binary image with some other
image, the pixels for which the corresponding value in the binary image is 0 will
be preserved ,but pixels for which the corresponding binary value is ,1 will be set
to(1 cleared.) So ,masking is a simple method to extract a region of interest) ROI) from
an image

IMAGE MASKING.

4|Marwa R.
In addition to masking, logical operation can be used in feature detection. Logical
operation can be used to compare between two images ,as shown below:

AND^

This operation can be used to find the similarity white regions of two different
images (it required two images)

g (x,y) = a (x,y) ^ b (x,y)

Exclusive OR

This operator can be used to find the differences between white regions of two
different images(it requires two images).

NOT

NOT operation can be performed on grey-level images, it’s applied on only one
image, and the result of this operation is the negative of the original image.

g(x,y) =255- f (x,y)

5|Marwa R.
OR

NOT-AND

6|Marwa R.

You might also like