CS代写 JPEG2000,MPEG..

Lecture 1-Image filtering

Reading • Szeliski, Chapter 3.1-3.2

Copyright By PowCoder代写 加微信 powcoder

What is an image?

What is an image?
Digital Camera
We’ll focus on these in this course Also image formation
Source: A. Efros

What is an image? • A grid (matrix) of intensity values
(common to use one byte per value: 0 = black, 255 = white)

What is an image?
• We can think of a (grayscale) image as a
function, f, from R2 to R:
– f (x,y) gives the intensity at position (x,y)
f (x, y) x
– A digital image is a discrete (sampled, quantized) version of this function

Image transformations
• As with any function, we can apply operators to an image
g (x,y) = f (x,y) + 20
• We’ll talk about a special kind of operator, convolution (linear filtering)

Filters • Filtering
– Form a new image whose pixels are a combination of the original pixels
– To get useful information from images
• E.g., extract edges or contours (to understand shape)
– To enhance the image
• E.g., to remove noise
• E.g., to sharpen or to “enhance image”

Image Processing problems
• Image Restoration – denoising
– deblurring
• Image Compression
– JPEG,JPEG2000,MPEG..
• Computing Field Properties – opticalflow
– disparity
• Locating Structural Features – corners

Question: Noise reduction
• Given a camera and a still scene, how can you reduce noise?
Take lots of images and average them! What’s the next best thing?
Source: S. filtering
• Modify the pixels in an image based on some function of a local neighborhood of each pixel
Some function
Local image data
Modified image data
Source: L. filtering
• One simple version of filtering: linear filtering (cross-correlation, convolution)
– Replace each pixel by a linear combination (a weighted sum) of its neighbors
• Theprescriptionforthelinearcombinationiscalled the “kernel” (or “mask”, “filter”)
Local image data kernel Modified image data
Source: L. Zhang

Cross-correlation
Let be the image, be the kernel (of size 2k+1 x 2k+1), and be the output image
This is called a cross-correlation operation:
• Can think of as a “dot product” between local neighborhood and kernel for each pixel

Convolution
• Same as cross-correlation, except that the kernel is “flipped” (horizontally and vertically)
This is called a convolution operation:
• Convolution is commutative and associative -F*G = G*F (commutative)
– F*(G*I) = (F*G)*I (associative)

Mean filtering =

Mean filtering/Moving average

Mean filtering/Moving average

Mean filtering/Moving average

Mean filtering/Moving average

Mean filtering/Moving average

Mean filtering/Moving average

Linear filters: examples
Identical image
Source: D. filters: examples
Shifted left By 1 pixel
Source: D. filters: examples
Blur (with a mean filter)
Source: D. Lowe

Linear filters: examples
Sharpening filter
Source: D.
Source: D. Kernel
5 x 5, s = 1
• Constant factor at front makes volume sum to 1 (can be ignored, as
we should re-normalize weights to sum to 1 in any case)
0.003 0.013 0.022 0.013 0.003 0.013 0.059 0.097 0.059 0.013 0.022 0.097 0.159 0.097 0.022 0.013 0.059 0.097 0.059 0.013 0.003 0.013 0.022 0.013 0.003
Source: C. Kernel
Source: C. filters
Increasing

Mean vs. Gaussian filtering
Mean filter may garble high-frequency signal

Gaussian filter
• Removes “high-frequency” components from the image (low-pass filter)
• Convolution with self is another Gaussian
Source: K. Grauman

Sharpening revisited • What does blurring take away?
smoothed (5×5)
Let’s add it back:
original detail
Source: S. Lazebnik

Filters: Thresholding

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com