Docsity

Computer Vision Lecture Notes: Filtering and Moments, Slides of Computer Vision

Toggle sidebar
bg1
1
CSE152, Spr. 2011 Intro Computer Vision
Filtering
Introduction to Computer Vision
CSE 152
Lecture 8
CSE152, Spr. 2011 Intro Computer Vision
• 
• 
• 
• 
CSE152, Spr 2010 Intro Computer Vision
Binary System Summary
1. Acquire images and binarize (tresholding, color
labels, etc.).
2. Possibly clean up image using morphological
operators.
3. Determine regions (blobs) using connected
component exploration
4. Compute position, area, and orientation of each
blob using moments
5. Compute features that are rotation, scale, and
translation invariant using Moments (e.g.,
Eigenvalues of normalized moments).
CSE152, Spr 2010 Intro Computer Vision
P-Tile Method
• If the size of the object is approx. known, pick T
s.t. the area under the histogram corresponds to the
size of the object:
CSE152, Spr 2010 Intro Computer Vision
“Peakiness” Detection Algorithm
• Find the two
HIGHEST LOCAL MAXIMA
that
MINIMUM DISTANCE APART
: g
i
and g
j
• Find lowest point between them: g
k
• Measure “peakiness”:
– min(H(g
i
),H(g
j
))/H(g
k
)
• Find (g
i
,g
j
,g
k
) with highest peakiness
CSE152, Spr 2010 Intro Computer Vision
Four & Eight Connectedness
Eight Connected Four Connected
Docsity.com
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Computer Vision Lecture Notes: Filtering and Moments and more Slides Computer Vision in PDF only on Docsity!

CSE152, Spr. 2011 Intro Computer Vision

Filtering

Introduction to Computer Vision

CSE 152

Lecture 8

CSE152, Spr. 2011 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision

Binary System Summary

1. Acquire images and binarize (tresholding, color

labels, etc.).

2. Possibly clean up image using morphological

operators.

3. Determine regions (blobs) using connected

component exploration

4. Compute position, area, and orientation of each

blob using moments

5. Compute features that are rotation, scale, and

translation invariant using Moments (e.g.,

Eigenvalues of normalized moments).

CSE152, Spr 2010 Intro Computer Vision

P-Tile Method

  • If the size of the object is approx. known, pick T

s.t. the area under the histogram corresponds to the

size of the object:

CSE152, Spr 2010 Intro Computer Vision

“Peakiness” Detection Algorithm

  • Find the two HIGHEST LOCAL MAXIMA that MINIMUM DISTANCE APART : g (^) i and gj
  • Find lowest point between them: gk
  • Measure “peakiness”:
    • min(H(gi),H(g (^) j))/H(g (^) k )
  • Find (gi,gj,gk) with highest peakiness

CSE152, Spr 2010 Intro Computer Vision

Four & Eight Connectedness

Four Connected Eight Connected

CSE152, Spr 2010 Intro Computer Vision

Recursive Labeling

Connected Component Exploration

CSE152, Spr 2010 Intro Computer Vision

Properties extracted from binary image

  • A tree showing containment of regions
  • Properties of a region

1. Genus – number of holes

2. Centroid

3. Area

4. Perimeter

5. Moments (e.g., measure of elongation)

6. Number of “extrema” (indentations, bulges)

7. Skeleton

CSE152, Spr 2010 Intro Computer Vision

Moments

(related to moments of intertia)

B(x,y)

  • Fast way to implement computation over n by m image or window
  • One object

The order of the Mjk moment is j +k.

CSE152, Spr 2010 Intro Computer Vision

Area: Moment M 00

M 0 , 0 = B ( x , y )

y = 1

m ∑ x = 1

n ∑

  • Fast way to implement computation over n by m image or window
  • One object

CSE152, Spr 2010 Intro Computer Vision

Moments: Centroid

CSE152, Spr 2010 Intro Computer Vision

Shape recognition by Moments

Recognition could be done by comparing moments

However, moments Mjk are not invariant under:

  • Translation
  • Scaling
  • Rotation
  • Skewing

CSE152, Spr 2010 Intro Computer Vision

Binarization using Color

  • Object’s in robocup are

distinguished by color.

  • How do you binarize the

image so that pixels where

ball is located are labeled

with 1, and other locations

are 0?

  • Let Cb=(r g b)T^ be the color

of the ball.

CSE152, Spr 2010 Intro Computer Vision

Binarization using Color

  • Let c(u,v) be the color of pixel (u,v)
  • Simple method
  • Better alternative (why?)
    • Convert c (u,v) to HSV space H(u,v), S(u,v) V(u,v)
    • Convert c b to HSV
    • Check that HS distance is less than threshold ε and

brightness (V) is greater than a treshold V>τ

b ( u , v ) =

1 if (|| c ( u , v ) − cb ||)

2

0 otherwise

CSE152, Spr 2010 Intro Computer Vision

Color Blob tracking

  • Color-based tracker gets lost on white knight: Same Color CSE152, Spr 2010 Intro Computer Vision

(From Bill Freeman)

CSE152, Spr 2010 Intro Computer Vision

(Freeman) CSE152, Spr 2010 Intro Computer Vision

Smoothing by Averaging

Kernel:

CSE152, Spr 2010 Intro Computer Vision

Convolution

Image (I)

Kernel (K)

Note: Typically Kernel

is relatively small in

vision applications.

CSE152, Spr 2010 Intro Computer Vision

Convolution: R= K*I

I R

Kernel size

is m+1 by m+

m=

CSE152, Spr 2010 Intro Computer Vision

Convolution: R= K*I

I R

Kernel size

is m+1 by m+

m=

CSE152, Spr 2010 Intro Computer Vision

Convolution: R= K*I

I R

Kernel size

is m+1 by m+

m=

CSE152, Spr 2010 Intro Computer Vision

Convolution: R= K*I

I R

Kernel size

is m+1 by m+

m=

CSE152, Spr 2010 Intro Computer Vision

Convolution: R= K*I

I R

Kernel size

is m+1 by m+

m=

CSE152, Spr 2010 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision

Shifted one Pixel to the left

CSE152, Spr 2010 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision CSE152, Spr 2010 Intro Computer Vision

CSE152, Spr 2010 Intro Computer Vision

Practice with linear filters

Original

Source: D. Lowe CSE152, Spr 2010 Intro Computer Vision

Practice with linear filters

Original

Sharpening filter

  • Accentuates differences with local average

Source: D. Lowe

CSE152, Spr 2010 Intro Computer Vision CSE152, Spr 2010 Intro Computer Vision