2 introduction to computer vision course
Post on 11-Dec-2021
1 Views
Preview:
TRANSCRIPT
Last lecture covered
� Images and pictures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . � What is image processing? . . . . . . . . . . . . . . . . . . . . . . . .� Image Acquisition and sampling . . . . . . . . . . . . . . . . . . . � Images and digital images . . . . . . . . . . . . . . . . . . . . . . . .� Some applications . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . � Aspects of image processing . . . . . . . . . .. . . . . . . . . . . . . � An image processing task . . . . . . . . . . . . . . . . . . . . . . . . .� Types of digital images . . . . . . . . . . . . . . . . . . . . . . . . . . . � Image File Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . � Spatial Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . � Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Content
� Point Processing
2.1 Introduction . . . . . . . . . . . . . . . . . . . .
2.2 Arithmetic operations . . . . . . . . . . . .
2.3 Histograms . . . . . . . . . . . . . . . . . . . .
2.4 Lookup tables . . . . . . . . . . . . . . . . . .
� Exercises
Neighborhood processing vs. Point
operations
�� Neighborhood processing. Neighborhood processing.
� To change the grey level of a given pixel we
need only know the value of the grey levels
in a small neighborhood of pixels around the
given pixel.
�� Point operations. Point operations.
� A pixel's grey value is changed without any
knowledge of its surrounds.
What is the aim of “Point Operations”?
� Although point operations are the simplest, they contain some of the most powerful and widely used of all image processing operations.
� They are especially useful in image pre-processing, where an image is required to be modified before the main job is attempted.
2.2 Arithmetic operations
� These operations act by applying a simple function
y = f(x)
� Types of operations:
1. Addition/Subtraction
2. Multiplications/Division
3. Complementary
1. Addition/Subtraction
� To add /subtract a constant from each pixel in the image.
y = x ± C
0…………………..….255
Old image (x)
ne
w im
ag
e f
(x)
0…
……
……
……
….2
55
0…………………..….255
Old image (x)
ne
w im
ag
e f
(x)
0…
……
……
……
….2
55
C
y = f(x)
� To multiply /divide each pixel in the
image x in/by a constant c.
y = x × C , y = x ÷ C
2. Multiplications/Division
0…………………..….255
Old image (x)
ne
w im
ag
e f
(x)
0…
……
……
……
….2
55
0…………………..….255
Old image (x)
ne
w im
ag
e f
(x)
0…
……
……
……
….2
55
�
y = f(x)
Color Images Operations
� Possible channel operations:
� Changing the image lighting color.
� Swapping image channels.
� Eliminating color channels.
Changing the image lighting color
� To change the intensity of one or more channel by adding or subtracting a constant.
� R + C => the image will be reddish
� G + C => the image will be greenish
� B + C => the image will be bluish
� R,G + C => the image will be yellowish
� ….
Swapping image channels
� To exchange the intensity between the image channels.
� R , G => the image will be GRB
� G , B => the image will be RBG
� B , R => the image will be BGR
� Other spaces could be obtained by swapping 2 channels at once like; GBR and BRG
Eliminating color channels
� To set one or more color channels by zero values.
� Eliminating R => image will be in cyan
� Eliminating G => image will be in magenta
� Eliminating B => image will be in yellow
� Eliminating R,G => image will be in blue
� Eliminating G,B => image will be in red
� Eliminating B,R => image will be in green
Multiple Image Operations
� One can perform operations between two images or more for:
� Enhance the image visual appeal.
� Getting specific part of image between
similar images.(eg. motion tracking)
� For some preprocessing purposes.
Multiple Image Operations
� Assume two images x1 and x2: the possible operations between x1 and x2:
• y = x1 + x2
• y = x1 – x2• y = x1 × x2
• y = x1 ÷ x2
• y = diff(x1, x2)• y = max(x1,x2)• y = min(x1,x2)• y = avg(x1,x2)
• y = x1 AND x2• y = x1 OR x2• y = x1 XOR x2
top related