SlideShare a Scribd company logo
Arithmetic Operations
Image Arithmetic
For input images f1 and f2 and some function Op:
g(x, y) = Op (f1(x, y), f2(x, y))
The operator is applied pairwise to each pixel in the
images.
Pseudocode:
for all pixel positions x, y:
out[x,y] = func( image1[x,y] , image2[x,y]
)
Possibilities: addition, subtraction, and, or, ...
Arithmetic Operations
Addition/Blending
Used to create double-exposures or composites:
g(x, y) = f1(x, y) + f2(x, y)
+ =
Can also do a weighted blend:
g(x, y) = α1f1(x, y) + α2f2(x, y)
Arithmetic Operations
Subtraction
Useful for finding changes between two images
g(x, y) = f1(x, y) − f2(x, y)
Sometimes more useful to use absolute difference
g(x, y) = |f1(x, y) − f2(x, y)|
What’s changed?
- =
Arithmetic Operations
Digital Subtraction Angiography
1. Take an x-ray
2. Inject patient with a radio-opaque dye
(and tell them not to move!)
3. Take another x-ray
4. Subtract the two
Arithmetic Operations
Motion
Use differencing to identify motion in an otherwise
unchanging scene (object motion, not camera motion)
Basis for motion tracking techniques in computer vision
Use overall shift (minimum difference) for tracking
camera motion
Part of a larger process called a ”match move” in
film making
Essential for inserting computer-generated graphics into a
real scene with a moving camera
Useful for video compression
Only encode the difference between frames
Motion detection/prediction used extensively in video
compression such as MPEG
Arithmetic Operations
Image Averaging
Idea:
Average multiple pictures of the same scene to reduce noise
Similar in principle to acquiring the image for a longer duration.
+ + . . . =
Arithmetic Operations
Image Averaging
Top: original image, image with Gaussian additive noise
Middle and Bottom: 8, 16, 64, 128 images averaged
Arithmetic Operations
Bitwise AND and OR
Useful for masking
Arithmetic Operations
Alpha Blending
Addition of two images, each with (0..1) fractional masking
weights per pixel
g(x, y) = α1(x, y)f1(x, y) + α2(x, y)f2(x, y)
or quite often
g(x, y) = α1(x, y)f1(x, y) + [1 − α1(x, y)]f2(x, y)
Useful for transparency, compositing, etc.
Color images are often stored as RGBα or RGBA
Arithmetic Operations
Application: Blue Screening
Goal: composite people/things onto a background
Film against a blue (or green) background
Mask the blue parts
(use fractional alpha values for partial-pixel effect)
“Decontaminate” the blue halo
Store in RBGA format
Composite onto background using alpha blending

More Related Content

What's hot

6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2Gichelle Amon
 
Zooming an image in visual basic
Zooming an image in visual basicZooming an image in visual basic
Zooming an image in visual basic
Hotland Sitorus
 
Resize image vb.net
Resize image vb.netResize image vb.net
Resize image vb.net
Hotland Sitorus
 
Image Processing 2
Image Processing 2Image Processing 2
Image Processing 2jainatin
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
Shahbaz Alam
 
5 spatial filtering p1
5 spatial filtering p15 spatial filtering p1
5 spatial filtering p1Gichelle Amon
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
liba manopriya.J
 
Histogram Operation in Image Processing
Histogram Operation in Image ProcessingHistogram Operation in Image Processing
Histogram Operation in Image Processing
VARUN KUMAR
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Deep learning
Deep learningDeep learning
Deep learning
DrBaljitSinghKhehra
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement
Vivek V
 
Image transforms
Image transformsImage transforms
Image transforms
BCET, Balasore
 
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
Edge AI and Vision Alliance
 
Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalization
11mr11mahesh
 
Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++
Darshan Parsana
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
BCET, Balasore
 

What's hot (20)

6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
 
Zooming an image in visual basic
Zooming an image in visual basicZooming an image in visual basic
Zooming an image in visual basic
 
Resize image vb.net
Resize image vb.netResize image vb.net
Resize image vb.net
 
Image Processing 2
Image Processing 2Image Processing 2
Image Processing 2
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 
Test
TestTest
Test
 
5 spatial filtering p1
5 spatial filtering p15 spatial filtering p1
5 spatial filtering p1
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
 
Histogram Operation in Image Processing
Histogram Operation in Image ProcessingHistogram Operation in Image Processing
Histogram Operation in Image Processing
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
Deep learning
Deep learningDeep learning
Deep learning
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement
 
Image transforms
Image transformsImage transforms
Image transforms
 
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
 
Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalization
 
Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++Gaussian Image Blurring in CUDA C++
Gaussian Image Blurring in CUDA C++
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 

Similar to Week 6

image_enhancement_spatial
 image_enhancement_spatial image_enhancement_spatial
image_enhancement_spatial
honeyjecrc
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptx
AyeleFeyissa1
 
DIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptxDIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptx
NidhiSharma764884
 
Image Degradation & Resoration
Image Degradation & ResorationImage Degradation & Resoration
Image Degradation & Resoration
Sanjay Saha
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
Mohammed Kamel
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
shabanam tamboli
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlabAnkur Tyagi
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
Moe Moe Myint
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_i
ankit_ppt
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
IJMER
 
matlab.docx
matlab.docxmatlab.docx
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
Shajun Nisha
 
Dip 2
Dip 2Dip 2
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
Ashok Kumar
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
Manas Mantri
 

Similar to Week 6 (20)

image_enhancement_spatial
 image_enhancement_spatial image_enhancement_spatial
image_enhancement_spatial
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptx
 
DIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptxDIP-Enhancement-Spatial.pptx
DIP-Enhancement-Spatial.pptx
 
point operations in image processing
point operations in image processingpoint operations in image processing
point operations in image processing
 
Otsu
OtsuOtsu
Otsu
 
Image Degradation & Resoration
Image Degradation & ResorationImage Degradation & Resoration
Image Degradation & Resoration
 
Point Processing
Point ProcessingPoint Processing
Point Processing
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
 
present
presentpresent
present
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlab
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_i
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
 
matlab.docx
matlab.docxmatlab.docx
matlab.docx
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Introduction to OpenCV
Introduction to OpenCVIntroduction to OpenCV
Introduction to OpenCV
 
Dip 2
Dip 2Dip 2
Dip 2
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
 

Recently uploaded

UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
GOWSIKRAJA PALANISAMY
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Mansi Shah
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
taqyed
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
ameli25062005
 
Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
Alan Dix
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
PoojaSaini954651
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
7sd8fier
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
jyz59f4j
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
7sd8fier
 
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
kecekev
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
h7j5io0
 
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With DesignsGame Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
184804
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
9a93xvy
 
White wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva TschoppWhite wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva Tschopp
Mansi Shah
 
Impact of Fonts: in Web and Apps Design
Impact of Fonts:  in Web and Apps DesignImpact of Fonts:  in Web and Apps Design
Impact of Fonts: in Web and Apps Design
contactproperweb2014
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
h7j5io0
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
RTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,DRTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,D
cy0krjxt
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 

Recently uploaded (20)

UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
 
Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
 
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
一比一原版(UW毕业证)西雅图华盛顿大学毕业证如何办理
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
 
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With DesignsGame Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
 
White wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva TschoppWhite wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva Tschopp
 
Impact of Fonts: in Web and Apps Design
Impact of Fonts:  in Web and Apps DesignImpact of Fonts:  in Web and Apps Design
Impact of Fonts: in Web and Apps Design
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
RTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,DRTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,D
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 

Week 6

  • 1. Arithmetic Operations Image Arithmetic For input images f1 and f2 and some function Op: g(x, y) = Op (f1(x, y), f2(x, y)) The operator is applied pairwise to each pixel in the images. Pseudocode: for all pixel positions x, y: out[x,y] = func( image1[x,y] , image2[x,y] ) Possibilities: addition, subtraction, and, or, ...
  • 2. Arithmetic Operations Addition/Blending Used to create double-exposures or composites: g(x, y) = f1(x, y) + f2(x, y) + = Can also do a weighted blend: g(x, y) = α1f1(x, y) + α2f2(x, y)
  • 3. Arithmetic Operations Subtraction Useful for finding changes between two images g(x, y) = f1(x, y) − f2(x, y) Sometimes more useful to use absolute difference g(x, y) = |f1(x, y) − f2(x, y)| What’s changed? - =
  • 4. Arithmetic Operations Digital Subtraction Angiography 1. Take an x-ray 2. Inject patient with a radio-opaque dye (and tell them not to move!) 3. Take another x-ray 4. Subtract the two
  • 5. Arithmetic Operations Motion Use differencing to identify motion in an otherwise unchanging scene (object motion, not camera motion) Basis for motion tracking techniques in computer vision Use overall shift (minimum difference) for tracking camera motion Part of a larger process called a ”match move” in film making Essential for inserting computer-generated graphics into a real scene with a moving camera Useful for video compression Only encode the difference between frames Motion detection/prediction used extensively in video compression such as MPEG
  • 6. Arithmetic Operations Image Averaging Idea: Average multiple pictures of the same scene to reduce noise Similar in principle to acquiring the image for a longer duration. + + . . . =
  • 7. Arithmetic Operations Image Averaging Top: original image, image with Gaussian additive noise Middle and Bottom: 8, 16, 64, 128 images averaged
  • 8. Arithmetic Operations Bitwise AND and OR Useful for masking
  • 9. Arithmetic Operations Alpha Blending Addition of two images, each with (0..1) fractional masking weights per pixel g(x, y) = α1(x, y)f1(x, y) + α2(x, y)f2(x, y) or quite often g(x, y) = α1(x, y)f1(x, y) + [1 − α1(x, y)]f2(x, y) Useful for transparency, compositing, etc. Color images are often stored as RGBα or RGBA
  • 10. Arithmetic Operations Application: Blue Screening Goal: composite people/things onto a background Film against a blue (or green) background Mask the blue parts (use fractional alpha values for partial-pixel effect) “Decontaminate” the blue halo Store in RBGA format Composite onto background using alpha blending