19
Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Embed Size (px)

Citation preview

Page 1: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Corner Detection & Color Segmentation

CSE350/450-0119 Sep 03

Page 2: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Administration

• Clarifications to Homework 1

• Questions?

Page 3: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Class Objectives

• Linear Algebra Review

• Review how corners can be extracted from computer images

• Review how color is represented and can be segmented in a computer image

Page 4: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Supporting References

• “A Tutorial on Linear Algebra” by Professor C. T. Abdallah, University of New Mexico

• Edge & Corner Detection: Introductory Techniques for 3-D Computer Vision, Trucco & Verri, 1998

• CVOnline “Color Image Processing” Lecture Notes

• Poynton's Color FAQ

Page 5: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Edge Detection Review

INPUT IMAGE

1) NoiseSmoothing

EDGE IMAGE

2) EdgeEnhancement

Horizontal [-1 0 1]

Vertical [-1 0 1]T

),( yxI

x

yxI

),(

y

yxI

),(

2

122 ),(),(

),(

y

yxI

x

yxIyxI

“GRADIENT” IMAGE

3)Threshold

16/

121

242

121

Page 6: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Linear Algebra Review

Page 7: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Corner Detection Motivation

• Corners correspond to point in the both the world and image spaces

• Tracking multiple point across consecutive images allows us to estimate the relative rotation and translation of the camera

– Hartley’s 8-point algorithm

• Since the camera moves with our robot, we can infer robot motion “simply” by tracking eight or more corners

Page 8: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Corner Detection AlgorithmTrucco & Verri, 1998

6160531918

5855531513

5555501313

1010101111

1012121110

y

yxII

x

yxII yx

),(,),(

1. Compute the image gradients

2. Define a neighborhood size as an area of interest around each pixel

3x3 neighborhood

Page 9: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

3. For each image pixel (i,j), construct the following matrix from it and its neighborhood values

e.g.

Corner Detection Algorithm (cont’d)

6160531918

5855531513

5555501313

1010101111

1012121110

xI

2

2

),(yyx

yxxji III

IIIC

22222

2222)3,3(

5553155550

13101011]1,1[

C

Page 10: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

3. For each matrix C(i,j), determine the 2 eigenvalues λ(i.j)= [λ1, λ2].

4. Construct Λ-image where Λ(i,j)=min(λ(i.j)).

5. Threshold Λ-image. Anything greater than threshold is a corner.

Corner Detection Algorithm (cont’d)

ISSUE: The corners obtained will be a function of the threshold !

Page 11: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Corner Detection Sample Results

Threshold=25,000 Threshold=10,000

Threshold=5,000

Page 12: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Color Segmentation Motivation

• Computationally inexpensive (relative to other features)

• “Contrived” colors are easy to track

• Combines with other features for robust tracking

Page 13: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

What is Color?

• Color is the perception of light in the visible region of the spectrum

• Wavelengths between 400nm - 700nm

• Imagers

– Retina (humans)

– CCD/CMOS (cameras)

Page 14: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

RGB Color Space• Motivated by human visual system

– 3 color receptor cells (rods) in the retina with different spectral response curves

• Used in color monitors and most video cameras

Page 15: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

YCbCr (YUV/YIQ) Color Space

“Greyscale”Y= 0.30*R+0.59*G+0.11*B

B

G

R

V

U

Y

081.0419.0500.0

500.0331.0169.0

114.0587.0299.0

• Separates luma (“brightness”) from the chroma (“color”) channels:

Y = 0.30*R+0.59*G+0.11*B, Cb = B-Y, Cr=R-Y

• YUV/YIQ are similar variants based upon NTSC/PAL television signals

Page 16: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Defining Colors in an RGB Image

Red Green Blue

Page 17: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

How do we represent a “single” color?

Sample set for orange hat

Page 18: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Simple RGB Color Segmentation

)1.1,5.254( )8.14,6.103( )07.6,1.45(

256),(251 yxIR 135),(73 yxIG 58),(32 yxIB

& &

Red Green Blue

SegmentedColor Image

Page 19: Corner Detection & Color Segmentation CSE350/450-011 9 Sep 03

Color Tracking Demo