# Logical Operations on Images Boolean logic is a system of logical operations defined by George Boole in the mid 19th century to apply algebraic operations.

## Presentation on theme: "Logical Operations on Images Boolean logic is a system of logical operations defined by George Boole in the mid 19th century to apply algebraic operations."— Presentation transcript:

Logical Operations on Images Boolean logic is a system of logical operations defined by George Boole in the mid 19th century to apply algebraic operations on binary values.  Course Name: Digital Image Processing Level(UG/PG): UG  Author(s) : Phani Swathi Chitta  Mentor: Prof. Saravanan Vijayakumaran *The contents in this ppt are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 2.5 India license

Learning Objectives After interacting with this Learning Object, the learner will be able to: Explain the performance of logical operations on images

Definitions of the components/Keywords: 5 3 2 4 1 Logic operations provide a powerful complement to implementation of image processing algorithms based on morphology. These operations consist of 4 basic binary operations: AND, OR, and XOR and a unary operator NOT. Secondary operators can be created by combining the three binary operators with the unary operator, yielding: NAND, NOR, and XNOR. Logic operations are performed on a pixel by pixel basis between corresponding pixels of two or more images(except NOT, which operates on the pixels of a single image).

Definitions of the components/Keywords: 5 3 2 4 1 Truth Table for basic Logical Operations:

Master Layout 1 5 3 2 4 1 Give a dropdown box to select the operation The operations are: NOT, AND, OR, XOR, NOT-AND Give Start, Pause, Reset buttons Image after logical operation is done Original Images

Step 1: 1 5 3 2 4 NOT I nstruction for the animator T ext to be displayed in the working area (DT) Show the original image first then when the user selects NOT operation and clicks Start show the second image The text in DT should appear in parallel to the figures The original binary image The resulting image after performing a logical NOT operation on the original image

Step 2: 1 5 3 2 4 AND I nstruction for the animator T ext to be displayed in the working area (DT) Show the image1 and 2 first then when the user selects AND operation and clicks Start show the third image After start is pressed, slowly move the two images(triangle and circle) such that the two outlines of the images come on one another The text in DT should appear in parallel to the figures The original binary images The resulting image after performing a logical AND operation on the binary images

Step 3: 1 5 3 2 4 OR I nstruction for the animator T ext to be displayed in the working area (DT) Show the image1 and 2 first then when the user selects OR operation and clicks Start show the third image After start is pressed, slowly move the two images(triangle and circle) such that the two outlines of the images come on one another The text in DT should appear in parallel to the figures The original binary images The resulting image after performing a logical OR operation on the binary images

Step 4: 1 5 3 2 4 v XOR I nstruction for the animator T ext to be displayed in the working area (DT) Show the image1 and 2 first then when the user selects XOR operation and clicks Start show the third image After start is pressed, slowly move the two images(triangle and circle) such that the two outlines of the images come on one another The text in DT should appear in parallel to the figures The original binary images The resulting image after performing a logical XOR operation on the binary images

Step 6: 1 5 3 2 4 NOT-AND I nstruction for the animator T ext to be displayed in the working area (DT) Show the image1 and 2 first then when the user selects NOT-AND operation and clicks Start show the third image After start is pressed, slowly move the two images(triangle and circle) such that the two outlines of the images come on one another The text in DT should appear in parallel to the figures The original binary images The resulting image after performing a logical NOT-AND operation on the binary images

Introduction Credits 11 Definitions Test your understanding (questionnaire) ‏ Lets Sum up (summary) ‏ Want to know more… (Further Reading) ‏ Try it yourself Interactivity: Analogy Slide 1 Slide 3 Slide 23, 24,25 Slide 26 Electrical Engineering  Select any one of the figures a b c d  Select the Images  Select the operation

Questionnaire 1.Suppose two images have N>0 black pixels and the result of ANDing those images also have N>0 black pixels. Will the images be same? Answers: a) Sometimes b) Always c) Never d) None 1 5 2 4 3

Questionnaire 2. In an image, if total # of pixels is M and # of black pixels is N then what is the # of black pixels in NOT image? Answers: a) M-N b) N-M c) M d) N 3. In two images, first image has N 1 black pixels, second image has N 2 black pixels and AND of the two images has N 3 black pixels. What is the # of black pixels in OR of two images? Answers: a) N1+N2-N3 b) N1+N2 c) N1-N2 d) N1+N2+N3 1 5 2 4 3

Links for further reading Reference websites: http://homepages.inf.ed.ac.uk/rbf/HIPR2/logic.htm Books: Digital Image Processing – Rafael C. Gonzalez, Richard E. Woods, second edition, Prentice Hall

Similar presentations