applications of linear algebra 3: colors and...
TRANSCRIPT
Applications of Linear Algebra 3:Colors and Images
October 31, 2011
Applications of Linear Algebra 3: Colors and Images
RGB
A color can be stored quantitatively by assigning a valuebetween 0 and 255 for each of red (r), green (g), and blue (b).
A value of 0 equals the absence of that color and a value of255 equals the full coloring of that value.
For example, (0, 0, 0) is black, (255, 255, 255) is white, and(255, 0, 0) is “reddest” red.
Applications of Linear Algebra 3: Colors and Images
RGB
A color can be stored quantitatively by assigning a valuebetween 0 and 255 for each of red (r), green (g), and blue (b).
A value of 0 equals the absence of that color and a value of255 equals the full coloring of that value.
For example, (0, 0, 0) is black, (255, 255, 255) is white, and(255, 0, 0) is “reddest” red.
Applications of Linear Algebra 3: Colors and Images
RGB
A color can be stored quantitatively by assigning a valuebetween 0 and 255 for each of red (r), green (g), and blue (b).
A value of 0 equals the absence of that color and a value of255 equals the full coloring of that value.
For example, (0, 0, 0) is black, (255, 255, 255) is white, and(255, 0, 0) is “reddest” red.
Applications of Linear Algebra 3: Colors and Images
RGB
A color can be stored quantitatively by assigning a valuebetween 0 and 255 for each of red (r), green (g), and blue (b).
A value of 0 equals the absence of that color and a value of255 equals the full coloring of that value.
For example, (0, 0, 0) is black, (255, 255, 255) is white, and(255, 0, 0) is “reddest” red.
Applications of Linear Algebra 3: Colors and Images
RGB
A color can be stored quantitatively by assigning a valuebetween 0 and 255 for each of red (r), green (g), and blue (b).
A value of 0 equals the absence of that color and a value of255 equals the full coloring of that value.
For example, (0, 0, 0) is black, (255, 255, 255) is white, and(255, 0, 0) is “reddest” red.
Applications of Linear Algebra 3: Colors and Images
A picture is a matrix
Any color can be described by a 3-vector, and any picture canbe thought of as being made up of m × n pixels each havingits own color.
So a picture can be stored in an m × n × 3 matrix, or anm × n matrix where each entry is a 3-vector (as opposed to anumber).
For example, consider the following 200 × 320 pixel image.
Applications of Linear Algebra 3: Colors and Images
A picture is a matrix
Any color can be described by a 3-vector, and any picture canbe thought of as being made up of m × n pixels each havingits own color.
So a picture can be stored in an m × n × 3 matrix, or anm × n matrix where each entry is a 3-vector (as opposed to anumber).
For example, consider the following 200 × 320 pixel image.
Applications of Linear Algebra 3: Colors and Images
A picture is a matrix
Any color can be described by a 3-vector, and any picture canbe thought of as being made up of m × n pixels each havingits own color.
So a picture can be stored in an m × n × 3 matrix, or anm × n matrix where each entry is a 3-vector (as opposed to anumber).
For example, consider the following 200 × 320 pixel image.
Applications of Linear Algebra 3: Colors and Images
A picture is a matrix
Any color can be described by a 3-vector, and any picture canbe thought of as being made up of m × n pixels each havingits own color.
So a picture can be stored in an m × n × 3 matrix, or anm × n matrix where each entry is a 3-vector (as opposed to anumber).
For example, consider the following 200 × 320 pixel image.
Applications of Linear Algebra 3: Colors and Images
A picture is a matrix
Any color can be described by a 3-vector, and any picture canbe thought of as being made up of m × n pixels each havingits own color.
So a picture can be stored in an m × n × 3 matrix, or anm × n matrix where each entry is a 3-vector (as opposed to anumber).
For example, consider the following 200 × 320 pixel image.
Applications of Linear Algebra 3: Colors and Images
Transformations
What will happen if we apply a transformation to each one ofthe vectors in the 200 × 320 matrix?
For example, define a transformation
C =
0 0 10 1 01 0 0
.
How will C act on the picture? Apply the transformation to ageneric pixel ~x :
C~x =
0 0 10 1 01 0 0
rgb
=
bgr
.
Applications of Linear Algebra 3: Colors and Images
Transformations
What will happen if we apply a transformation to each one ofthe vectors in the 200 × 320 matrix?
For example, define a transformation
C =
0 0 10 1 01 0 0
.
How will C act on the picture? Apply the transformation to ageneric pixel ~x :
C~x =
0 0 10 1 01 0 0
rgb
=
bgr
.
Applications of Linear Algebra 3: Colors and Images
Transformations
What will happen if we apply a transformation to each one ofthe vectors in the 200 × 320 matrix?
For example, define a transformation
C =
0 0 10 1 01 0 0
.
How will C act on the picture? Apply the transformation to ageneric pixel ~x :
C~x =
0 0 10 1 01 0 0
rgb
=
bgr
.
Applications of Linear Algebra 3: Colors and Images
Transformations
What will happen if we apply a transformation to each one ofthe vectors in the 200 × 320 matrix?
For example, define a transformation
C =
0 0 10 1 01 0 0
.
How will C act on the picture? Apply the transformation to ageneric pixel ~x :
C~x =
0 0 10 1 01 0 0
rgb
=
bgr
.
Applications of Linear Algebra 3: Colors and Images
Thus becomes
Applications of Linear Algebra 3: Colors and Images
Thus becomes
Applications of Linear Algebra 3: Colors and Images
Thus becomes
Applications of Linear Algebra 3: Colors and Images
Oops!
Can we undo this?Yes, in fact, with the same transformation.
Apply
0 0 10 1 01 0 0
to to obtain
Applications of Linear Algebra 3: Colors and Images
Oops!
Can we undo this?
Yes, in fact, with the same transformation.
Apply
0 0 10 1 01 0 0
to to obtain
Applications of Linear Algebra 3: Colors and Images
Oops!
Can we undo this?Yes, in fact, with the same transformation.
Apply
0 0 10 1 01 0 0
to to obtain
Applications of Linear Algebra 3: Colors and Images
Oops!
Can we undo this?Yes, in fact, with the same transformation.
Apply
0 0 10 1 01 0 0
to to obtain
Applications of Linear Algebra 3: Colors and Images
Now let C =
0 0 10 1 00 0 0
. Then C applied to the picture
yields
Can this be undone?
Applications of Linear Algebra 3: Colors and Images
Now let C =
0 0 10 1 00 0 0
. Then C applied to the picture
yields
Can this be undone?
Applications of Linear Algebra 3: Colors and Images
Now let C =
0 0 10 1 00 0 0
. Then C applied to the picture
yields
Can this be undone?
Applications of Linear Algebra 3: Colors and Images
Now let C =
0 0 10 1 00 0 0
. Then C applied to the picture
yields
Can this be undone?
Applications of Linear Algebra 3: Colors and Images