Point Processing Image Arithmetic. Arithmetic Image Operations (blending) 2  Two source images can be added, multiplied, one subtracted from the other.

Slides:



Advertisements
Similar presentations
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Advertisements

Combinational Circuits
Digital Image Processing
Image Data Representations and Standards
Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Chapter 3 Image Enhancement in the Spatial Domain.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Regional Processing There goes the neighborhood. Overview  Under point processing a single input sample is processed to produce a single output sample.
Intensity Transformations
Digital Images in Java The structure of code and concept
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third & Fourth Edition Spring 2008:
Connecting with Computer Science, 2e
5. Halftoning Newspaper photographs simulate a greyscale, despite the fact that they have been printed using only black ink. A newspaper picture is, in.
Chapter # 5: Arithmetic Circuits Contemporary Logic Design Randy H
CS 3850 Lecture 5 Operators. 5.1 Binary Arithmetic Operators Binary arithmetic operators operate on two operands. Register and net (wire) operands are.
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Basic Rendering Techniques V Recognizing basic rendering techniques.
Color of (digital image) Raed S. Rasheed Agenda Color. Color Image. Color Models – RGB color model. – CMYK color model. – HSV and HSL color model.
02/14/02(c) University of Wisconsin 2002, CS 559 Last Time Filtering Image size reduction –Take the pixel you need in the output –Map it to the input –Place.
V Obtained from a summer workshop in Guildford County July, 2014
Operations on data CHAPTER 4.
CSC – Java Programming II Lecture 9 January 30, 2002.
Point Processing Point by Point by Point. Taxonomy  Images can be represented in two domains  Spatial Domain: Represents light intensity at locations.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Computers Organization & Assembly Language
Vector vs. Bitmap
Basic Image Manipulation Raed S. Rasheed Agenda Region of Interest (ROI) Basic geometric manipulation. – Enlarge – shrink – Reflection Arithmetic.
Filtering and Color To filter a color image, simply filter each of R,G and B separately Re-scaling and truncating are more difficult to implement: –Adjusting.
 In studying digital integrated circuits, one must start with the simplest group of circuit, the SSIs or Small Scale Integrated Circuits. Since these.
Lecture 4 Pixels, Images and Image Files 1. In this Lecture, you will learn the following concepts: Image files (in particular, the BMP file format) How.
Pixels, Images and Image Files 1 By Dr. HANY ELSALAMONY.
CSC Computing with Images
AdeptSight Image Processing Tools Lee Haney January 21, 2010.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
Fixed & Floating Number Format Dr. Hugh Blanton ENTC 4337/5337.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Phys 4330 Digital ElectronicsBinary System Digital circuits process signals that contain just two voltage levels or states, labeled logic "0" and logic.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
Arithmetic-logic units1 An arithmetic-logic unit, or ALU, performs many different arithmetic and logic operations. The ALU is the “heart” of a processor—you.
Chapter 4 Operations on Bits. Apply arithmetic operations on bits when the integer is represented in two’s complement. Apply logical operations on bits.
LECTURE 4 Logic Design. LOGIC DESIGN We already know that the language of the machine is binary – that is, sequences of 1’s and 0’s. But why is this?
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
(4-2) Adding and Subtracting Matrices Objectives: To Add and subtract Matrices To solve certain Matrix equations.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Com·pos·ite k ə m ˈ päz ə t/ verb Compositing is the combining of visual elements from separate sources into single images, often to create the illusion.
Computer Science Up Down Controls, Decisions and Random Numbers.
 Commutative Property of Addition  When adding two or more numbers or terms together, order is NOT important.  a + b = b + a  =
Invitation to Computer Science, C++ Version, Fourth Edition
Chapter 4 Operations on Bits.
Decision Table Testing
Week 7 - Monday CS361.
Vector vs. Bitmap.
Fundamentals of Spatial Filtering:
Invitation to Computer Science, Java Version, Third Edition
Basic Rendering Techniques
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Copyright © Cengage Learning. All rights reserved.
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
Half & Full Subtractor Half Subtractor Full Subtractor.
Half & Full Subtractor Half Subtractor Full Subtractor.
Histogram The histogram of an image is a plot of the gray _levels values versus the number of pixels at that value. A histogram appears as a graph with.
Image Enhancement in Spatial Domain: Neighbourhood Processing
Image Enhancement in Spatial Domain: Point Processing
Presentation transcript:

Point Processing Image Arithmetic

Arithmetic Image Operations (blending) 2  Two source images can be added, multiplied, one subtracted from the other or one divided by the other to produce a single destination (other types are also discussed later)  These operations are known as image arithmetic or image blending.  Each of these methods is a point processing operation where corresponding samples from the two source images are arithmetically combined to generate the output.  These operations are not single-source operations!

Arithmetic Image Operations (blending) 3  Two complications:  Color depth – when adding two 8-bit grayscale images, the output may fall into the range [0, 510] thus exceeding the color depth of either source. This is typically solved by truncation or rescaling.  Image size – If the images are not the same size then we can  Forbid the operation  Perform the operation only on the intersection of the two images  Define image addition (with rescaling). Given source images I a and I b of dimensions W a xH a and W b xH a then image addition is given by (5.13) where x ranges over [0, min(W a, W b )] and y ranges over [0, min(H a, H b )].

Example of Image Addition 4

Image Subtraction  Image subtraction is useful for visualizing the difference between two images.  One way of telling whether two images are identical is to subtract one from the other and if the maximum sample value of the result is zero then the images are identical.  Example: A source image is equalized in intensity. The equalized image is subtracted from the source to highlight areas of change.

Image multiplication  Consider multiplying a full color source with an image having only white and black.  The binary image is known as a mask where the white pixels pass the source image to the output while the black pixels erase the corresponding source images pixels.  Multiplication is a good technique for either adding color to a line drawing or for emphasizing edges in a full color image.  In part (a) of this figure, a source image is multiplied by the mask of (b) to obtain the output of (c). Many image processing applications use image multiplication to create artistic filters for digital artists.

Image Arithmetic Implementation  The BufferedImageOp class is not well designed to represent the arithmetic operations since there are two source images.  Nonetheless we can implement image arithmetic as a single source operation by currying. Currying refers to the transformation of a function that has multiple arguments into a function that has only a single argument.  We develop an abstract base class called BinaryImageOp that is partially shown in Listing  Named “BinaryImageOp” since this class corresponds to a binary operator on images.  The filter method iterates over corresponding samples of the two source and blends them using the abstract combine function.  The combine method is abstract since subclassess will use this method to define the blending mode. 7

Concrete Subclass  The BinaryImageOp class is subclassed to implement image addition: 9

Logical Image Operations  Binary images can be combined using logical operators  Under these operations, each sample is a logical value where white is “true” and black is “false”.  The logical truth tables then become “colors” as shown below 10

11

Logical Image Operations  These logical operators can also be extended to grayscale and color images.  Corresponding bits of the two source samples serve as logical values where a 1 bit represents true and a 0 bit represents false.  Each of the two sources must use the same color model, color depth and dimension.  Java’s logical operators are overloaded to accept either boolean or integer valued operands  true | false == true  2 | 3 == 5 12

Logical Or 13

Alpha Blending  In alpha blending two sources are added together after being proportionally scaled with an alpha value which is in [0, 1].  Alpha blending is akin to transparency  A value of 0 corresponds to complete transparency  A value of 1 corresponds to completely opaque  Java supports the RGBA color model where the alpha channel is a per-pixel alpha value rather than a single alpha value for an entire image. 14

Other blending modes  Besides arithmetic, logical, and blending modes are others:  Darken only: The minimum of two samples is taken  Lighten only: The maximum of two samples is taken  Diffusion: Take one of the samples at random  Screen blending: Defined below where the samples are normalized to be in [0, 1]. Try screen blending an image with itself.  Hard light blending: 15