Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Perspective Transformation
The human eye perceives objects closer to it as being bigger than
those farther away
...
Unlike transformation, which entails transferring a subject,
object, etc
...
In its broadest sense, perspective transformation entails
reducing a three-dimensional scene to a two-dimensional
representation
...
We will look more closely at the reasons why objects close to you
seem bigger and those far away seem smaller, even if they seem
bigger when you approach them
...
5 frames of reference
In order to analyze a 3d world/image/scene, 5 different frame of
references are required
...
For instance,
figuring out whether a certain item is appropriately positioned in
relation to another object
...
World coordinate frame
World coordinate frame is used for co-relating objects in a 3
dimensional world
...
Camera coordinate frame
Camera co-ordinate frame is used to relate objects with respect
of the camera
...
Image coordinate frame
It is not a 3d coordinate system, rather it is a 2d system
...
Pixel coordinate frame
It is also a 2d coordinate system
...
Transformation between these 5 frames
Thats how a 3d scene is transformed into 2d, with image of
pixels
...
Where
Y = 3d object
y = 2d Image
f = focal length of the camera
Z = distance between object and the camera
Now there are two different angles formed in this transform
which are represented by Q
...
The second angle
that is formed is:
Comparing these two equations we get
From this equation, we can see that when the rays of light reflect
back after striking from the object, passed from the camera, an
invert image is formed
...
For example
Calculating the size of image formed
If a picture of a person 5 meters tall and 50 meters away from
the camera was taken, how big would the image of that person
be? This would require a camera with a 50mm focal length
...
So,
Y = 5000 mm
...
Z = 50000 mm
...
Again, the minus sign indicates that the image is inverted
...
The
number of different colors in an image is depends on the depth
of color or bits per pixel
...
How many numbers can be represented by one bit
...
00
01
10
11
If we devise a formula for the calculation of total number of
combinations that can be made from bit, it would be like this
...
Put 1 in the formula you get
2, put 2 in the formula, you get 4
...
Number of different colors:
As we stated at the outset, the number of distinct colors is
dependent on the number of bits used to represent each pixel
...
Bits per pixel
Number of colors
1 bpp
2 colors
2 bpp
4 colors
3 bpp
8 colors
4 bpp
16 colors
5 bpp
32 colors
6 bpp
64 colors
7 bpp
128 colors
8 bpp
256 colors
10 bpp
1024 colors
16 bpp
65536 colors
24 bpp
16777216 colors (16
...
Shades
The exponential development pattern is clearly seen
...
Shades can be represented as:
Color images are usually of the 24 bpp format, or 16 bpp
...
Color values:
We have previously seen in the tutorial of concept of pixel, that
0 pixel value denotes black color
...
But there
is no fixed value that denotes white color
...
In case 8 bpp, 0 denotes black, and 255 denotes white
...
Gray color is actually the mid point of black and white
...
Image storage requirements
After the discussion of bits per pixel, now we have every thing
that we need to calculate a size of an image
...
•
•
•
Number of rows
Number of columns
Number of bits per pixel
The formula for calculating the size is given below
...
And since it
is a gray scale image, it has 256 different shades of gray or it has
bits per pixel
...
But since its not a standard answer that we recognize, so will
convert it into our format
...
Converting into kilo bytes = 1048576 / 1024 = 1024kb
...
Thats how an image size is calculated and it is stored
...
Types of Images
There are many type of images, and we will look in detail about
different types of images, and the color distribution in them
...
0 and 1
...
Here 0 refers to black color and 1 refers to white color
...
Black and white image:
The resulting image that is formed hence consist of only black
and white color and thus can also be called as Black and White
image
...
Only two colors that are black and white are
found in it
...
They were used in old times for old TV
displays, or monitor displays
...
In a 2 bit 4, in a 3 bit 8, in a 4 bit 16, in a 5 bit 32, in a 6 bit 64
different colors are present
...
It has
256 different shades of colors in it
...
The range of the colors in 8 bit vary from 0-255
...
This format was used initially by early models of the operating
systems UNIX and the early color Macintoshes
...
This format is not supported by default from windows
...
Behind gray scale image:
As we have explained it several times in the previous tutorials,
that an image is nothing but a two dimensional function, and can
be represented by a two dimensional array or matrix
...
But thats not the case with the color images
...
It has 65,536 different colors in it
...
It has been used by Microsoft in their systems that support more
then 8 bit color format
...
The distribution of color in a color image is not as simple as it was
in grayscale image
...
The famous (RGB) format
...
Now the question arises, that how would you distribute 16 into
three
...
So the distribution of 16 bit has been done like this
...
The additional bit that was left behind is added into the green
bit
...
Note this is distribution is not followed by all the systems
...
Another distribution of 16 bit format is like this:
4 bits for R, 4 bits for G, 4 bits for B, 4 bits for alpha channel
...
24 bit color format
24 bit color format also known as true color format
...
Since 24 is equally divided on 8, so it has been distributed equally
between three different color channels
...
8 bits for R, 8 bits for G, 8 bits for B
...
Unlike a 8 bit gray scale image, which has one matrix behind it, a
24 bit image has three different matrices of R, G, B
...
Its format is PPM ( Portable
pixMap) which is supported by Linux operating system
...
Color Codes Conversion
In this tutorial, we will see that how different color codes can be
combined to make other colors, and how we can covert RGB
color codes to hex and vice versa
...
Or we can
say each color has three different portions
...
Binary color format
Color:Black
Image:
Decimal Code:
(0,0,0)
Explanation:
As it has been explained in the previous tutorials, that in an 8-bit
format, 0 refers to black
...
Color:White
Image:
Decimal Code:
(255,255,255)
Explanation:
Since each portion of R, G, B is an 8 bit portion
...
It is explained in the tutorial of
pixel
...
By setting each of the
value to 255, we get overall value of 255, thats make the color
white
...
Color:Green
Image:
Decimal Code:
(0,255,0)
Explanation:
Since we need only green color, so we zero out the rest of the
two portions which are red and blue, and we set the green
portion to its maximum which is 255
...
In an 8-bit format, the mid point is 128
or 127
...
So we set each of the portion
to its mid point which is 128, and that results in overall mid value
and we got gray color
...
CMYK model is
commonly used in color printers in which there are two carters
of color is used
...
The colors of CMY can also made from changing the quantity or
portion of red, green and blue
...
So we set those two to
maximum and we zero out the portion of red
...
Color: Magenta
Image:
Decimal Code:
(255,0,255)
Explanation:
Magenta color is formed from the combination of two different
colors which are Red and Blue
...
And we get magenta color
...
So we set those two to
maximum and we zero out the portion of blue
...
Conversion
Now we will see that how color are converted are from one
format to another
...
E
...
Take the first portion e
...
Divide it by 16
...
In this case it is 15 � 15 which is FF
...
Combine all the hex code into one
...
Take a hex number
...
g: #FFFFFF
Break this number into 3 parts: FF FF FF
Take the first part and separate its components: F F
Convert each of the part separately into binary: (1111) ( 1111)
Now combine the individual binaries into one: 11111111
Convert this binary into decimal: 255
Now repeat step 2, two more times
...
Answer: ( 255 , 255 , 255 )
Common colors and their Hex code has been given in this table
...
Now we will convert an
color image into a grayscale image
...
Both has their own merits and demerits
...
You just have to take
the average of three colors
...
Its done in this way
...
The
following result would appear
...
It means that our average method works
...
We wanted to convert the image
into a grayscale, but this turned out to be a rather black image
...
Since the three different colors have three different
wavelength and have their own contribution in the formation of
image, so we have to take average according to their
contribution, not done it averagely using average method
...
But in reality thats not the case
...
Weighted method or luminosity method
You have seen the problem that occur in the average method
...
Since red color
has more wavelength of all the three colors, and green is the
color that has not only less wavelength then red color but also
green is the color that gives more soothing effect to the eyes
...
So the new equation that form is:
New grayscale image = ( (0
...
59 * G) + (0
...
According to this equation, Red has contribute 30%, Green has
contributed 59% which is greater in all three colors and Blue has
contributed 11%
...
As compare to
the result of average method, this image is more brighter