Some Terms
Some Terms
Some Terms
2
• The function f(x, y) may be characterized by two
components:
3
• The two functions combine as a product to
form f(x, y):
4
• The intensity of a monochrome image f at any
coordinates (x, y) the gray level (l) of the image at
that point.
5
GRAY SCALE
• The interval [Lmin , Lmax ] is called the gray scale.
• Pixel value.(0)
• that each pixel can have only one value and each value denotes the
intensity of light at that point of the image.
• The value 0 means absence of light. It means that 0 denotes dark, and it
further means that when ever a pixel has a value of 0, it means at that
point, black color would be formed.
Terminology
• Look at this image matrix
• 000
• 000
• 000
• Now this image matrix has all filled up with 0. All the pixels have a value of
0. If we were to calculate the total number of pixels form this matrix, this is
how we are going to do it.
• Total no of pixels = total no. of rows X total no. of columns
• =3X3
• = 9.
Terminology
• Bpp or bits per pixel denotes the number of bits per pixel.
• The number of different colors in an image is depends on the depth of
color or bits per pixel.
Some terms
• its in mathematics:
• Its just like playing with binary bits.
• How many numbers can be represented by one bit.
• 0
• 1
• How many two bits combinations can be made.
• 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.
• Where bpp denotes bits per pixel. Put 1 in the formula you get 2, put 2 in the formula, you get 4. It grows
exponentially.
Some terms
• Number of different colors:
• Now as we said it in the beginning, that the number of different colors depend on the number of bits per pixel.
• The table for some of the bits and their color is given below.
• Bits per pixel
• Number of colors 1 bpp2 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 bpp1024 colors16 bpp65536 colors24 bpp16777216 colors (16.7 million colors)32 bpp4294967296 colors
(4294 million colors)
Some terms
• Shades
• You can easily notice the pattern of the exponentional growth. The famous gray scale
image is of 8 bpp , means it has 256 different colors in it or 256 shades.
• After the discussion of bits per pixel, now we have every thing that we
need to calculate a size of an image.
• Image size
• The size of an image depends upon three things.
• Number of rows
• Number of columns
• Number of bits per pixel
• The formula for calculating the size is given below.
• Size of an image = rows * cols * bpp
The binary image
• The binary image as it name states, contain only two pixel values.
• 0 and 1.
• Here 0 refers to black color and 1 refers to white color. It is also known as
Monochrome.
• 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.
• No gray level
• One of the interesting this about this binary image that there is no gray
level in it. Only two colors that are black and white are found in it.
• Format
• Binary images have a format of PBM ( Portable bit map )
• 2, 3, 4,5, 6 bit color format
• The images with a color format of 2, 3, 4, 5 and 6 bit are not widely used today.
They were used in old times for old TV displays, or monitor displays.
• But each of these colors have more then two gray levels, and hence has gray
color unlike the binary image.
• 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.
• 8 bit color format
• 8 bit color format is one of the most famous image format. It has 256 different
shades of colors in it. It is commonly known as Grayscale image.
• The range of the colors in 8 bit vary from 0-255. Where 0 stands for black, and
255 stands for white, and 127 stands for gray color.
• This format was used initially by early models of the operating systems UNIX and
the early color Macintoshes.
• A grayscale image of Einstein is shown below:
• 16 bit color format
• It is a color image format. It has 65,536 different colors in it. It is also known
as High color format.
• It has been used by Microsoft in their systems that support more then 8 bit
color format. Now in this 16 bit format and the next format we are going to
discuss which is a 24 bit format are both color format.
• The distribution of color in a color image is not as simple as it was in
grayscale image.
• A 16 bit format is actually divided into three further formats which are Red ,
Green and Blue. The famous (RGB) format.
• It is pictorially represented in the image below.
• 24 bit color format
• 24 bit color format also known as true color format. Like 16 bit color
format, in a 24 bit color format, the 24 bits are again distributed in
three different formats of Red, Green and Blue.
• 24 bit color format
• 24 bit color format also known as true color format. Like 16 bit color
format, in a 24 bit color format, the 24 bits are again distributed in
three different formats of Red, Green and Blue.
• Since 24 is equally divided on 8, so it has been distributed equally
between three different color channels.
• Their distribution is like this.
• 8 bits for R, 8 bits for G, 8 bits for B.
• Behind a 24 bit image.
• 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.
• Different color codes
• All the colors here are of the 24 bit format, that means each color has
8 bits of red, 8 bits of green, 8 bits of blue, in it. Or we can say each
color has three different portions. You just have to change the
quantity of these three portions to make any color.
• Binary color format
• Color:Black
• Image:
• Decimal Code:
• (0,0,0)
• Color:White
• Image:
• Decimal Code:
• (255,255,255)
• RGB color model:
• Color:Red
• Image:
• Decimal Code:
• (255,0,0)
• Color:Green
• Image:
• green
• Decimal Code:
• (0,255,0)
• Color: Blue
• Image:
• Decimal Code:
• (0,0,255)
Digital Image Representation
A digital image can be
represented as a two-dimensional n
matrix.
.
Digital Image Size
The size of a digital image is determines by its
dimensions ( M x N ) multiplied by the number of
bits b required to store the intensity levels (L = 2b).
.
• L = 2b
Terminology
• Bpp or bits per pixel denotes the number of bits per pixel.
• The number of different colors in an image is depends on the depth of
color or bits per pixel.
Digital Image Size
The size of a digital image is determines by its
dimensions ( M x N ) multiplied by the number of
bits b required to store the intensity levels (L = 2b).
.
GRAY SCALE
• The interval [Lmin , Lmax ] is called thegray scale.
.
Digital Image Size
The size of a digital image is determines by its
dimensions ( M x N ) multiplied by the number of
bits b required to store the intensity levels (L = 2b).
.
Digital Image size
Digital image resolution is determined by the
number of pixels (samples) in the image.
Digital Image Resolution
Digital image with low resolution has low
quality.
.
Digital Image Acquisition
Effect of Quantization
256 128 16 8
64 32 4 2
Digital image Types
RGB (Color) Images
In normalized values:
R,G,B = {0-1, 0-1, 0-1}
0 = Black
1 = White
Digital image Types
Grayscale (Intensity) Images
We need 8 bits to
store a
grayscale value.
.
Digital image Types
Black and white (Binary) Images
• Each pixel has one of two gray levels either black (0) or white (1).
• We need 8 bits to store a grayscale value.
Types of Pixel Neighborhoods
•Image sampling:
•Rectangular sampling - In most cases, images are sampled by laying
a rectangular grid over an image.
•Hexagonal sampling - An alternative sampling scheme is shown.
•Pixel Neighborhoods:
•4-connected and 8-connected neighborhood (Rectangular sampling)
• Each pixel is a unit distance from (x, y), and some of the
neighbors of p lie outside the digital image if (x, y) is on
the border of the image.
62
ND(p) and N8(p)
• The four diagonal neighbors of p have coordinates
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
and are denoted by ND(p).
• If some of the points in ND(p) and N8(p) fall outside the image if
(x, y) is on the border of theimage.
63
Distance Measures
If pixels p and q have coordinates (x, y) and (s, t),
respectively.
The Euclidean distance between p and
q
D4(p, q) = |x – s| + |y – t|
D (p, q) = max(
. |x – s| , |y – t| )
Distance Measures
Results of D4 and D8 distances
•For instance, in a binary image with values 0 and 1, two pixels may be
4-neighbors,
•but they are said to be connected only if they have the same value
• Let V be the set of gray-level values used todefine
connectivity. In a binary image, V={1} for the connectivity
of pixels with value 1.
• For example,
(b) 8-adjacency.
Two pixels p and q with values from V are 8-adjacent if q is in the
set N8(p).
69
.
• Two pixels p and q are said to be connected in S if
there exists a path between them consisting entirely
of pixels in S.
70