[CV] 3. Image Sampling and Pyramids

실버버드·2025년 10월 14일

Computer Vision

목록 보기
3/14

Week 3-1. Image Sampling and Pyramids

1. Image Sampling

Image Sub-Sampling
Throw away every other row and column to create 1/2 size image
Good and Bad Sampling

Aliasing
해상도의 한계로 우둘투둘하게 됨, 노이즈
a false or assumed identity
not enough samples

  • Wagon-wheel effect: spoked wheel moving clockwise, camera shutter open for fraction of a frame time
    -> appears to be rotating slowly backward(counterclockwise)

  • Stroboscopic effect: rotational motion, short samples
    -> appears to be slow-moving, or stationary

Sampling Theorem

sampled function only if umax<=12x0u_{max} <= \frac{1}{2x_0}
Nyquist Frequency
if umax>12x0u_{max} > \frac{1}{2x_0}

Sub-Sampling with Gaussian Pre-Filtering
Filter the image, then subsample

2. Image Pyramids: Gaussian and Laplacian

Multi-Resolution Image Pyramids
다중 해상도
human visual encoding, efficient
space required for pyramids: N2+14+...=43N2N^2 + \frac{1}{4} + ... = \frac{4}{3}N^2

Gaussian Pyramid
Smooth with Gaussian and downsample:
suppress high frequencies, low-pass filter Gaussians

Laplacian Pyramid
second derivative L(x,y)=δ2I\deltax2+δ2Iδy2\displaystyle L(x,y)=\frac{\delta^2I}{\deltax^2} + \frac{\delta^2I}{\delta y^2}
I(x,y): intensity, edge detection, interest point
Problem: sensitive to noise, computationally burdensome

Difference of Gaussians (DoG)

3. Applications of Image Pyramids

Multi-Resolution Template Matching

  • Algorithm:
    image pyramid 만들면서 template, image 해상도 줄임
    이미지에 match, match 위치 확인, expand image and template, match, iterate higher and higher 해상도 이미지
    level 3 search entire image with correlation template
    level 2 search constrained to a neighbor several pixels x, y direction
    level 1 search same as 2
    level 0 serach same template match 얻는 데 total time 31 to 0.5sec걸림

Image Blending
Laplacian pyramidLA,LBL_A, L_B from image A and B, Gaussian pyramid
GRG_R from selected region R, combined pyramid LSL_S from LA,LBL_A, L_B using nodes of GRG_R as weights:
Ls(i,j)=GR(i,j)LA(i,j)+(1GR(i,j))LB(i,j)L_s(i,j) = G_R(i,j) * L_A(i,j) + (1 - G_R(i,j)) * L_B(i,j)
Sum all levels of the LsL_s pyramid -> final blended image

Week 3-2. Edge Detection

1. Edges

Line segments where the image brightness changes sharply (or has discontinuities)
Convert a 2D image into a set of curves
• Extracts salient features of the scene 두드러진 특징
• More compact than pixels

  • Edge Types: step, roof, line
  • Ideal Edge Operator
    Edge operator that produces Edge Magnitude 크기, Orientation 방향, High Detection Rate and Good Localization
    Gradient
    rapid change in intensity 방향 알림, edge strength- gradient magnitude

Theory of Edge Detection

ideal edge, unit step function?

image intensity. x.y로 편미분, 제곱해서 더함- edge magnitude, orientation

Laplacian(2차 미분)

2. Edge Detection in Image

Finite Differences
For discrete signals,
f(x)=f(x+1)f(x1)2\displaystyle f'(x) = \frac{f(x+1)-f(x-1)}{2}

Discrete Edge Filters

Differentiation is very sensitive to noise
Sobel Filter

  • Laplacian
    2차 편미분

  • Comparing Edge Operators
    gradient - Roberts 2x2 - Sobel 3x3 - 5x5
    Good Localization, Noise Sensitive, Poor Detection -> Poor Localization, Less Noise Sensitive, Good Detection

Computing Image Gradients
convolve filter with image -> derivatives

Derivative of Gaussian (DoG) Filter
f, h'

Laplacian of Gaussian (LoG) Filter

Zero-crossing point - edge

  • LoG vs DoG Filtering
    LoG localize edges more accurately but less convenient

  • 2D Gaussian Edge Operators

3. Canny Edge Detector

  1. Smooth image with 2D Gaussian: G * I
  2. find the gradient magnitude and direction for each pixel

  1. Run non-maximum suppression (NMS)
    :Check if a pixel is local maximum along the gradient direction
    compare the edge strength of pixel q with neighboring pixels p, r
    if not largest, suppress it p(i.e., set to 0)

  1. Double thresholding and Edge tracking by hysteresis 자기 이력 현상

Thresholding

  • Standard Thresholding: only strong edge, not coninuity

  • Hysteresis based Thresholding: neighboring pixel is strong edge - "maybe" edges are edges

Canny Edge Detector
σ\sigma large detects large-scale edges,
small detects find features
high threshold, low

  • Parameter setting is critical- not easy

0개의 댓글