• No results found

Talk Overview

N/A
N/A
Protected

Academic year: 2022

Share "Talk Overview"

Copied!
93
0
0

Loading.... (view fulltext now)

Full text

(1)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page1of65

Go Back

Full Screen

Spatial Data Structures for Computer Graphics

http://www.cse.iitb.ac.in/∼sharat November 2008

(2)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page1of65

Go Back

Full Screen

Close

Spatial Data Structures for Computer Graphics

http://www.cse.iitb.ac.in/∼sharat November 2008

Acknowledgements:

Joint work with Biswarup Choudhury and Rhushabh Goradia

(3)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page1of65

Go Back

Full Screen

Spatial Data Structures for Computer Graphics

http://www.cse.iitb.ac.in/∼sharat November 2008

Acknowledgements:

Joint work with Biswarup Choudhury and Rhushabh Goradia Most examples are from ViGIL IIT Bombay.

(4)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page2of65

Go Back

Full Screen

Close

Talk Overview

Exhibit B: Which picture do you like?

ß Background about this talk

(5)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page2of65

Go Back

Full Screen

Talk Overview

Exhibit B: Which picture do you like?

ß Background about this talk ß Application in Vision

• Exhibit A: kd-trees

(6)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page2of65

Go Back

Full Screen

Close

Talk Overview

Exhibit B: Which picture do you like?

ß Background about this talk ß Application in Vision

• Exhibit A: kd-trees

ß Application in Imaging

• Exhibit B: Octrees

(7)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page2of65

Go Back

Full Screen

Talk Overview

Exhibit B: Which picture do you like?

ß Background about this talk ß Application in Vision

• Exhibit A: kd-trees

ß Application in Imaging

• Exhibit B: Octrees

ß Application in Graphics

• Exhibit C: Space Filling Curves, Compressed Oc- trees

(8)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page3of65

Go Back

Full Screen

Close

Background

Level 2 Level 3

Level 1

Visible

Visible Visible

Visible NODE N

Exhibit C: Visibility Map

• Why this talk: Role of tradi- tional CS and CSE in graphics

(9)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page3of65

Go Back

Full Screen

Background

Level 2 Level 3

Level 1

Visible

Visible Visible

Visible NODE N

Exhibit C: Visibility Map

• Why this talk: Role of tradi- tional CS and CSE in graphics

• Not a theory talk (algorithms are correct, but may not be op- timal in a big-Oh sense)

(10)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page3of65

Go Back

Full Screen

Close

Background

Level 2 Level 3

Level 1

Visible

Visible Visible

Visible NODE N

Exhibit C: Visibility Map

• Why this talk: Role of tradi- tional CS and CSE in graphics

• Not a theory talk (algorithms are correct, but may not be op- timal in a big-Oh sense)

• Use of images, and points as primitives in computer graphics

(11)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page3of65

Go Back

Full Screen

Background

Level 2 Level 3

Level 1

Visible

Visible Visible

Visible NODE N

Exhibit C: Visibility Map

• Why this talk: Role of tradi- tional CS and CSE in graphics

• Not a theory talk (algorithms are correct, but may not be op- timal in a big-Oh sense)

• Use of images, and points as primitives in computer graphics

• Please feel free to interrupt and ask questions at any stage

(12)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page3of65

Go Back

Full Screen

Close

Background

Level 2 Level 3

Level 1

Visible

Visible Visible

Visible NODE N

Exhibit C: Visibility Map

• Why this talk: Role of tradi- tional CS and CSE in graphics

• Not a theory talk (algorithms are correct, but may not be op- timal in a big-Oh sense)

• Use of images, and points as primitives in computer graphics

• Please feel free to interrupt and ask questions at any stage

• Vision, Graphics, and Imaging: Forward and Inverse Problems

(13)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page4of65

Go Back

Full Screen

Talk Overview

4 Background about this talk ß Application in Vision

• Exhibit A: kd-trees ß Application in Imaging

• Exhibit B: Octrees ß Application in Graphics

• Exhibit C: Space Filling Curves, Compressed Oc- trees

(14)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page5of65

Go Back

Full Screen

Close

Problem Definition: Object Pose

Object Pose: Given images of a static object, how to create the illu- sion of realistic motion of the object along any arbitrary path — com- posed realistically in arbitrary environments?

(15)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page5of65

Go Back

Full Screen

Problem Definition: Object Pose

Object Pose: Given images of a static object, how to create the illu- sion of realistic motion of the object along any arbitrary path — com- posed realistically in arbitrary environments?

[Play Video]

(16)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page6of65

Go Back

Full Screen

Close

Problem Definition: Object Pose

Object Pose: Given images of a static object, how to create the illu- sion of realistic motion of the object along any arbitrary path — com- posed realistically in arbitrary environments?

(17)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page7of65

Go Back

Full Screen

1. Object Pose Solution

Image Acquisition (Studio) Path specification (Run-Time)

Computing Shape Computing Color

(18)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page7of65

Go Back

Full Screen

Close

1. Object Pose Solution

Image Acquisition (Studio) Path specification (Run-Time)

Computing Shape Computing Color

Clearly, we need to compute the shape and color from previously ac- quired close by images .... nearest neighbour computation in two dimensions

(19)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page7of65

Go Back

Full Screen

1. Object Pose Solution

Image Acquisition (Studio) Path specification (Run-Time)

Computing Shape Computing Color

Clearly, we need to compute the shape and color from previously ac- quired close by images .... nearest neighbour computation in two dimensions [Play Video]

(20)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page8of65

Go Back

Full Screen

Close

View Interpolation via Visual Hull

Start

(21)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page9of65

Go Back

Full Screen

The Visual Hull

Carve Carve again

(22)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page10of65

Go Back

Full Screen

Close

2. Computer Vision In Action

Hull Compared to the real thing

(23)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page11of65

Go Back

Full Screen

More details on the method

Question: Can we use the studio pictures ALSO for color computa- tion?

(24)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page12of65

Go Back

Full Screen

Close

Color Computation

Requires solution to: Given images of an object captured under a set of lighting conditions, how to efficiently render the scene under new illumination configurations?

(25)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page13of65

Go Back

Full Screen

Color Computation

Requires solution to: Nearest Neighbors, and Bi-chromatic Nearest Neighbors

(26)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page14of65

Go Back

Full Screen

Close

Output Frame

(27)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page15of65

Go Back

Full Screen

3. kd-trees

• Dimension of data is k (but common to say k-d tree of dimension 3 instead of 3d-tree).

• kd-trees are binary trees

• Designed to handle spatial data in a simple way

• For n points, O(n) space, O(logn) height (if balanced), supports range and nearest-neighbor queries.

• Node consists of

Two child pointers,

Satellite information (such as name).

A key: Either a single float representing a coordinate value, or a pair of floats (representing a dimension of a rectangle)

(28)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page16of65

Go Back

Full Screen

Close

Basic Idea Behind kd-trees

Construct a binary tree

• At each step, choose one of the coordinate as a basis of dividing the rest of the points

• For example, at the root, choose x as the basis

Like binary search trees, all items to the left of root will have the x-coordinate less than that of the root

All items to the right of the root will have the x-coordinate greater than (or equal to) that of the root

• Choose y as the basis for discrimination for the root’s children

• And choose x again for the root’s grandchildren

Note: Equality (corresponding to right child) is significant

(29)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page17of65

Go Back

Full Screen

Example: Construct kd-tree Given Points

• Coordinates of points are (35,90), (70,80), (10,75) (80,40), (50,90), (70,30), (90,60), (50,25), (25,10), (20,50), and (60,10)

• Points may be given one a time, or all at once.

• Data best visual- ized as shown be- low

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(30)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page18of65

Go Back

Full Screen

Close

Example: kdtree Insertion

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90)

(60,10) (10,75)

(35,90)

(31)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page19of65

Go Back

Full Screen

Nearest Neighbors: The scenario

• “Find the nearest Pizza Hut.” (Compare with the McDonald prob- lem).

• Assume kd-tree T given, and C is the region associated with a node.

• Input p is a point

• Searching for point p in T helps

In one dimension, T is very useful: the closest neighbor is from the set of nodes visited (MANY nodes are pruned)

In higher dimensions, T is not as useful (the closest neighbor may be far away).

• Nevertheless, pruning is possible.

• General strategy: Collect partial results, judicial traversal, and prune.

(32)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page20of65

Go Back

Full Screen

Close

What If We Locate Point?

00 11

00 11 00 11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(25,10)

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90)

(60,10) (10,75)

(35,90)

We visit (35,90) , (70,80), . . . , and fall off (70,30)

Closest point is nowhere near this path. We must visit both subtrees.

(33)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page21of65

Go Back

Full Screen

Nearest Neighbor: Pruned version

• Maintain the rectangle r associated with a node

• Compute a lower bound on the distance from the query q to the rectangle

Distance between q and any point in r is at least lowerbound(r, q)

Do not compute all distances between q and every point in r

• lowerbound() helps because if the lower bound is larger than the distance computed so far, we do not consider many points

• Must compute lowerbound() quickly

(34)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page22of65

Go Back

Full Screen

Close

Nearest Neighbor: Pruned Version

f l o a t lowerbound ( Rectangle r , P o i n t p ) {

i f ( r . i n s i d e ( p ) ) r e t u r n 0 ;

i f ( r . l e f t ( p ) ) r e t u r n r . minX − p . x ; . . .

}

R e s u l t process ( KDNode k , i n t cd , Rectangle r , R e s u l t r e s ) { i f ( k == n u l l ) r e t u r n r e s ;

i f ( lowerbound ( r , query ) >= r e s . d i s t a n c e ) r e t u r n r e s ; . . .

}

• If the lower bound is larger than the distance computed so far, exit!

• Otherwise compute the distance with the current node

• Process the two children in order!

(35)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page23of65

Go Back

Full Screen

Pruned Version: Root (35,90)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(40,50))

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(36)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page24of65

Go Back

Full Screen

Close

Pruned Version: (70,80)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(37)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page25of65

Go Back

Full Screen

Pruned Version: (80,40)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(38)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page26of65

Go Back

Full Screen

Close

Pruned Version: (70,30)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(39)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page27of65

Go Back

Full Screen

Pruned Version: (50,25)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(40)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page28of65

Go Back

Full Screen

Close

Pruned Version: (60,10)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90)

(60,10) (10,75)

(35,90)

(41)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page29of65

Go Back

Full Screen

Pruned Version: (10,75)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(42)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page30of65

Go Back

Full Screen

Close

Pruned Version: (25,10)

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(43)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page31of65

Go Back

Full Screen

Pruned Version: Answer

00 11

00 11 00

11

00 11

00 11 00

11

00 11

00 11

00 11

00 11

00 11

(10,75)

(20,50)

(25,10)

(70,30)

(35,90) (50,90)

(70,80)

(60,10) (50,25)

(80,40) (90,60)

(70,80)

(80,40)

(70,30) (20,50)

(25,10)

(90,60) (50,90) (10,75)

(35,90)

(44)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page32of65

Go Back

Full Screen

Close

Which Nodes Are Processed?

(70,80)

(80,40)

(70,30)

(50,25) (20,50)

(25,10)

(90,60)

(50,90)

(60,10) (10,75)

(35,90)

(45)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page33of65

Go Back

Full Screen

Any Improvement Possible?

• Nine nodes examined. Can we do better?

• Yes, if decision to pick a node is based on dynamic changing costs instead of initial left-right decision.

• Use a priority queue. (Seven nodes examined instead of nine)

(46)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page34of65

Go Back

Full Screen

Close

Talk Overview

4 Background about this talk 4 Application in Vision

• Exhibit A: kd-trees ß Application in Imaging

• Exhibit B: Octrees ß Application in Graphics

• Exhibit C: Space Filling Curves, Compressed Oc- trees

Exhibit B: Which picture do you like?

(47)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page35of65

Go Back

Full Screen

4. Color Quantization

• By “quantization,” here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors.

(48)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page35of65

Go Back

Full Screen

Close

4. Color Quantization

• By “quantization,” here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors.

• Why? Lightweight; thus easy to transmit, store, share

(49)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page35of65

Go Back

Full Screen

4. Color Quantization

• By “quantization,” here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors.

• Why? Lightweight; thus easy to transmit, store, share

• Mechanics? Create as output a lookup table

• Can be done in any color space

(50)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page35of65

Go Back

Full Screen

Close

4. Color Quantization

• By “quantization,” here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors.

• Why? Lightweight; thus easy to transmit, store, share

• Mechanics? Create as output a lookup table

• Can be done in any color space

• Basic challenge: Efficient implementation of reverse lookup table,

(51)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page36of65

Go Back

Full Screen

Digression: Web Safe Colors

• 216 colors have been ac- cepted as “safe” to display.

Some of these colors are gray

• Each channel can take only values 00, 33, 66, 99, CC, and FF

• Figures shows the colors organized in descending RGB values. Value at top left is FFFFFF; first item in the second row has the value FFCCFF

(52)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page37of65

Go Back

Full Screen

Close

Uniform Quantization

• First find the maximum and minimum range and allo- cate numbers R, G, and B such that R*G*B<=K

• Uniformly divide the range.

For example, the range [rmin,rmax] is divided into R parts.

• Map these R values to ac- tual colors. For example, if R=4, then we might chose 1, 2, 4 and 8

(53)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page37of65

Go Back

Full Screen

Uniform Quantization

• First find the maximum and minimum range and allo- cate numbers R, G, and B such that R*G*B<=K

• Uniformly divide the range.

For example, the range [rmin,rmax] is divided into R parts.

• Map these R values to ac- tual colors. For example, if R=4, then we might chose 1, 2, 4 and 8

• Advantages:

(54)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page37of65

Go Back

Full Screen

Close

Uniform Quantization

• First find the maximum and minimum range and allo- cate numbers R, G, and B such that R*G*B<=K

• Uniformly divide the range.

For example, the range [rmin,rmax] is divided into R parts.

• Map these R values to ac- tual colors. For example, if R=4, then we might chose 1, 2, 4 and 8

• Advantages: Easy to implement

• Drawbacks:

(55)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page37of65

Go Back

Full Screen

Uniform Quantization

• First find the maximum and minimum range and allo- cate numbers R, G, and B such that R*G*B<=K

• Uniformly divide the range.

For example, the range [rmin,rmax] is divided into R parts.

• Map these R values to ac- tual colors. For example, if R=4, then we might chose 1, 2, 4 and 8

• Advantages: Easy to implement

• Drawbacks: Distribution of colors is ignored resulting in banding

(56)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Close

Popularity Algorithm

• Multi-pass algorithm

(57)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

(58)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Close

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

• But first quantize the colors (232→ 215)

(59)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

• But first quantize the colors (232→ 215)

• Second pass: For each pixel, find the “closest” color

(60)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Close

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

• But first quantize the colors (232→ 215)

• Second pass: For each pixel, find the “closest” color

• Advantages:

(61)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

• But first quantize the colors (232→ 215)

• Second pass: For each pixel, find the “closest” color

• Advantages: Easy to implement, popular colors show up in the resulting image

(62)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Close

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

• But first quantize the colors (232→ 215)

• Second pass: For each pixel, find the “closest” color

• Advantages: Easy to implement, popular colors show up in the resulting image

• Disadvantages:

(63)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page38of65

Go Back

Full Screen

Popularity Algorithm

• Multi-pass algorithm

• Count number of cells having a particular set of color, and take the top K colors

• But first quantize the colors (232→ 215)

• Second pass: For each pixel, find the “closest” color

• Advantages: Easy to implement, popular colors show up in the resulting image

• Disadvantages: Expensive; clusters of ‘unpopular’ but significant colors are ignored

(64)

Object Pose Solution Computer Vision In Action kd-trees

Color Quantization Point Models Visibility Map Space Filling Curves

Home Page

Title Page

JJ II

J I

Page39of65

Go Back

Full Screen

Close

Median-Cut Algorithm

• Goal: Adaptively subdivide color block into K parts so that each sub-block has the same number of colors

References

Related documents

The lack of surface information in point models creates difficulties in operations like generating global illumination effects and computing point-pair visibility

 Define color for each point on object surface.  Map 2D texture to

● Each data point (or small sample of points) votes for all models (here, planes) that it supports. ● The vote is cast in the space of

• Thus the three primary colors get mixed in different proportions by the color sensitive cones of the human eye to perceive different colors.. • Though the electronics of an

Scattering in particular, which is a product of fog, haze, or low clouds, causes large variation in the received optical power and markedly limits the

Abbreviations ... Conventional communication system ... Point-to-Point connection ... Crossbar connection ... Organization of the thesis ... Overview of NoC... Design specifications

3.4 Example-1 : (a) original image, (b) input image in YCbCr color space, (c) bright- ness compensated image of the input image, (d) skin map of input image, (e) skin map of input

Then uses this property of space- filling curves to arrive at a light-weight and partial encryption approach for image encryption.. Light-weight implies that the encryption