Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements •...

29
Final Exam Schedule Final exam has been scheduled 12:30 pm – 3:00 pm, May 7 Location: INNOVA 1400 It will cover all the topics discussed in class One page double-sided cheat sheet is allowed A calculator is allowed for +-*/

Transcript of Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements •...

Page 1: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Final Exam Schedule

Final exam has been scheduled

12:30 pm – 3:00 pm, May 7

Location: INNOVA 1400

It will cover all the topics discussed in class

One page double-sided cheat sheet is allowed

A calculator is allowed for +-*/

Page 2: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Today’s Agenda

Morphological operations • Skeleton

Texture

Page 3: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Morphological Skeleton

Skeleton (Defined by centers of maximal disks):

Applications: an abstract shape representation for high level image understanding, e.g. Optical Character Recognition (OCR)

If a point Z belongs to the skeleton of A, we can find a maximal disk that has the center at Z and entirely lies in A and touches the boundary of A at no less than two positions.

Page 4: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Morphological Skeleton

𝑆 𝐴 = �𝑆𝑘(𝐴)𝐾

𝑘=0

𝑆𝑘 𝐴 = 𝐴⊝ 𝑘𝑘 − 𝐴⊝ 𝑘𝑘 ∘ 𝑘

𝐾 = 𝑚𝑚𝑚 𝑘| 𝐴⊝ 𝑘𝑘 ≠ ∅

𝐴 = � 𝑆𝑘 𝐴 ⨁𝑘𝑘𝐾

𝑘=0

Reconstruct A from its skeleton

The kth erosion

Page 5: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Examples

http://homepages.inf.ed.ac.uk/rbf/HIPR2/skeleton.htm

Potential issues with skeleton?

Maragos and Schafer, “Morphological Skeleton Representation and Coding of Binary Images”, IEEE Trans. on Acoustics, Speech, and Signal Processing, Vol. 34, No. 5, 1986.

Sensitive to noise

Page 6: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

What are the main difference between different textured surfaces?

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Texture

Change in • pattern elements • repetitions

Page 7: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Page 8: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Texture

Patterns of structure from • changes in surface albedo (eg printed cloth) • changes in surface shape (eg bark) • many small surface patches (eg leaves on a bush)

Texture tells us • what a surface is like • (sometimes) object identity • (sometimes) surface shape

Page 9: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Texture

Core problems: • Texture segmentation • Texture based recognition

– Objects, materials, textures • Texture synthesis

– Create synthetic images, fill in holes, image editing using computer graphics

• Shape from texture

Key issue: representing texture

Page 10: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Representing Textures

Textures are made up of • stylized subelements • spatially repeated in meaningful ways

Representation: • find the subelements • represent their statistics

Examples of texture images by a google search

Page 11: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Representing Textures - Subelements

What are the subelements, and how do we find them? • Find subelements by applying filters, looking

at the magnitude of the response

• Extreme case – template matching by normalized cross correlation 1𝑀𝑀

∑ 𝑓 𝑥,𝑦 −𝑓̅ 𝑇 𝑥,𝑦 −𝑇�𝜎𝑓𝜎𝑇𝑥,𝑦

Page 12: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Representing Textures

What filters? • experience suggests spots and oriented bars at a

variety of different scales • Each filter corresponds to one pattern element

What statistics? • The more the merrier • At least, mean and standard deviation • better, various conditional histograms.

Page 13: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Page 14: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Squared response

Page 15: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

squared response

What happen if scale changes?

Page 16: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Fine

Coarse

Page 17: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Final Texture Representation

Form an oriented pyramid (or equivalent set of responses to filters at different scales and orientations).

Square the output

Take statistics of responses • mean of each filter output • Standard deviation of each filter output

Page 18: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Example based Texture Representations

How does one choose the filters?

Solution • build a dictionary of subelements from pictures • describe the image using this dictionary

Page 19: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Building a Dictionary

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Cut region into patches

Page 20: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Clustering the Examples K-means • represent patches with

– intensity vector –vector of filter responses over patch

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Page 21: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Representing a Region Cut region into patches

Vector Quantization • Represent a high-dimensional data item with a single

number –Find and use the index of the nearest cluster center in dictionary

• Visual words – a vector of quantized image patches

Build histogram of resulting numbers

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Page 22: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Representing a Region

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

𝑚𝑖

𝑗

Page 23: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Forsyth and Ponce, “Computer Vision – A Modern Approach 2e”

Page 24: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Texture Synthesis

Problem: • Take a small example image of pure texture • Use this to produce a large domain of “similar” texture

Why: • Computer graphics demands lots of realistic texture • Fill in holes in images created by removing objects

Page 25: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Texture synthesis

Simple case -- Fill holes • Synthesize a single pixel in a large image • Approach:

–Match the window around that pixel to other windows in the image –Choose a value from the matching windows

• most likely, uniformly and at random

Expand to large images • Start: take a piece of the example image • Fill in pixels on the boundary • Each time you fill in a pixel, you can use that to match

Page 26: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Small blocks are examples, large are synthesized. Notice how (for example) synthesized text looks like actual text.

Efros and Leung 1999

Page 27: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Efros and Leung 1999

Neighborhood size

Page 28: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

Wilczkowiak et al., BMVC 2005

Page 29: Final Exam Scheduletongy/csce763/lectures/lect21.pdfTexture Change in • pattern elements • repetitions . Forsyth and Ponce, ... Final Texture Representation Form an oriented pyramid

State-of-the-art in image fill-in combines texture synthesis, coherence, and smoothing by Bugeau et al., IEEE TIP.