lecture 6 color and texture

27
Lecture 6 Color and Texture Slides by: David A. Forsyth Clark F. Olson Linda G. Shapiro

Upload: kory

Post on 22-Feb-2016

42 views

Category:

Documents


0 download

DESCRIPTION

Lecture 6 Color and Texture. Slides by: David A. Forsyth Clark F. Olson Linda G. Shapiro. Color. Used heavily in human vision Color is a pixel property, making some recognition problems easy Visible spectrum for humans is 400nm (blue) to 700 nm (red) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Lecture 6 Color  and Texture

Lecture 6Color and Texture

Slides by:David A. Forsyth

Clark F. OlsonLinda G. Shapiro

Page 2: Lecture 6 Color  and Texture

2

Color

• Used heavily in human vision• Color is a pixel property, making

some recognition problems easy• Visible spectrum for humans is

400nm (blue) to 700 nm (red)• Machines can “see” much more; ex.

X-rays, infrared, radio waves

Page 3: Lecture 6 Color  and Texture

3

• The sensation of color is caused by the brain.

• Some ways to get this sensation include:– Pressure on the eyelids– Dreaming, hallucinations, etc.

• Main way to get it is the response of the visual system to the presence/absence of light at various wavelengths.

• Issues that affect perception of color:– Light sources with different

spectrums (compare the sun and a fluorescent light bulb)

– Differential reflection (e.g. some pigments) and absorption

– Differential refraction - (e.g. Newton’s prism)

– Different distance and angle of reflection

– Sensitivity of sensor

Causes of color

Page 4: Lecture 6 Color  and Texture

4

Some physics

• White light is composed of all visible frequencies (400-700)

• Ultraviolet and X-rays are of much smaller wavelength

• Infrared and radio waves are of much longer wavelength

Page 5: Lecture 6 Color  and Texture

5

Color varies along a linear scale (wavelength).

Different colors typically have different spectral albedo.

Measurements by E.Koivisto.

Violet Indigo Blue Green Yellow Orange Red

Spectral albedos for different leaves, with color names attached.

Albedos

Page 6: Lecture 6 Color  and Texture

6

The appearance of colors

Color appearance is strongly affected by (at least):other nearby colors,adaptation to previous views “state of mind”

Image from:http://web.mit.edu/persci/people/adelson/checkershadow_illusion.html

Page 7: Lecture 6 Color  and Texture

7

The appearance of colors

Color appearance is strongly affected by (at least):other nearby colors,adaptation to previous views “state of mind”

Image from:http://web.mit.edu/persci/people/adelson/checkershadow_illusion.html

Page 8: Lecture 6 Color  and Texture

8

Color spaces

• A choice of three primaries yields a linear color space - the coordinates of a color are given by the weights of the primaries used to match it.

• Choice of primaries is equivalent to choice of color space.

RGB: primaries are monochromatic (formally 645.2nm, 526.3nm, 444.4nm)CIE XYZ: Primaries are imaginary (negative spectral radiance), but have other convenient propertiesAlso:CMY: subtractive color space used for printingHSV: perceptually salient space for several applicationsYIQ: used for TV – good for compression

Page 9: Lecture 6 Color  and Texture

9

Comparing color spaces

Page 10: Lecture 6 Color  and Texture

10

Color cube

• R, G, B values normalized to (0, 1) interval

• humans perceive gray for triples on the diagonal

• “Pure colors” on corners

Page 11: Lecture 6 Color  and Texture

11

Color receptors and color deficiency

Trichromacy is justified - in most people, there are three types of color receptor, called cones, which vary in their sensitivity to light at different wavelengths (shown by molecular biologists).

Some people have fewer than three types of receptor; most common deficiency is red-green color blindness in men.

Page 12: Lecture 6 Color  and Texture

12

Texture

Texture is a description of the spatial arrangement of color or intensities in an image or a selected region of an image.

Structural approach: Texture is a set of primitive texels in some regular or repeated relationship.

Page 13: Lecture 6 Color  and Texture

13

Texture

Finding texels is difficult in most images:

Page 14: Lecture 6 Color  and Texture

14

Statistical texture

Most common approach in computer vision is to compute statistics in the image to represent texture.

- Computationally efficient- Can be used for classification and segmentation

Simplistic approach: apply edge detection- Number of edge pixels is one measure of texture- Orientation is another (average or histogram)

Page 15: Lecture 6 Color  and Texture

15

Co-occurrence matrix

A co-occurrence matrix is a 2D array N (or C) in which:• Both the rows and columns represent a set of possible image

values.• Nd(i,j) indicates how many times value i co-occurs with

value j in a particular spatial relationship d.• The spatial relationship is specified by a vector d = (dr,dc).

This is essentially a 2D histogram storing a particular spatial relationship between intensity values.

Page 16: Lecture 6 Color  and Texture

16

Co-occurrence matrix

1 1 0 01 1 0 00 0 2 20 0 2 20 0 2 20 0 2 2

ji

1

d = (0,1)

0 1 2

012

6 0 42 2 00 0 4

Cd

grayscale image

co-occurrence matrix

Page 17: Lecture 6 Color  and Texture

17

Co-occurrence features

Numeric features computed from the co-occurrence matrix can be used to represent and compare textures.

Page 18: Lecture 6 Color  and Texture

18

Co-occurrence matrix

How do you choose d?

Are the textures small, medium, large?

One suggestion (Zucker and Terzopoulos): use a statistical test to select value(s) that have the most “structure”.

Page 19: Lecture 6 Color  and Texture

19

Texture representation

Another method to represent image texture is by convolving the image with a set of filters.

• Each pixel is represented by a vector of filter responses, the “texture signature”

• Strong response when image is similar to filter• Weak response when not similar

The filters that are typically used look like:• Spots• Bars

Page 20: Lecture 6 Color  and Texture

20

Filters are templatesApplying a filter at some point can be seen as taking a dot-product between the image and the filter.

• Both are viewed as 1D vectors rather than 2D imagesFiltering the image is a set of dot products.

Insight:• filters look like the effects they are intended to find• filters find effects they look like• why?

Page 21: Lecture 6 Color  and Texture

21

Positive responses

Filters are templates

Page 22: Lecture 6 Color  and Texture

22

Positive responses

Filters are templates

Page 23: Lecture 6 Color  and Texture

23

Scaled representations

Big bars and little bars (elongated features like limbs or stripes) are both interesting features to detect in an image. - Also could be dots or other shapesIt is inefficient to detect big bars with big filters. - And there is superfluous detail in the filter kernel

Alternative:• Apply filters of fixed size to images of different sizes• Typically, a collection of images whose edge length changes by a factor of 2

(or the square root of 2)• This is a pyramid by visual analogy (sometimes called a Gaussian pyramid)

Page 24: Lecture 6 Color  and Texture

24

A bar in the biggest image is a hair on the zebra’s nose; in middle images, a stripe; in the smallest, the animal’s nose

Scaled representations

Page 25: Lecture 6 Color  and Texture

25

Representing textures

Real textures are made up of patterns of irregular subelements.

What are the subelements?• not well defined, in general• usually reduced to most basic shapes: spots and bars at various sizes and

orientations

How do we find them?• by applying filters

After applying bar and spot filters apply statistics locally:• mean• standard deviation • histograms

Page 26: Lecture 6 Color  and Texture

26

Representing textures

Page 27: Lecture 6 Color  and Texture

27

Original image: Filters (not to scale):

Filter responses:

Representing textures