This document discusses the concept of dimensions and how they relate to images. It begins by using an example of providing coordinates to a friend on the moon to illustrate that three coordinates (longitude, latitude, altitude) are needed to define a position in 3D space on Earth. An image is then described as a 2D signal that only has height and width dimensions, with no depth. Different types of images are discussed, including binary, grayscale, and color images of various bit depths. Higher dimensional signals involving time as a fourth dimension are also covered.
This document discusses the concept of dimensions and how they relate to images. It begins by using an example of providing coordinates to a friend on the moon to illustrate that three coordinates (longitude, latitude, altitude) are needed to define a position in 3D space on Earth. An image is then described as a 2D signal that only has height and width dimensions, with no depth. Different types of images are discussed, including binary, grayscale, and color images of various bit depths. Higher dimensional signals involving time as a fourth dimension are also covered.
Original Description:
Concept of Dimensions of Image and Speech Processing
This document discusses the concept of dimensions and how they relate to images. It begins by using an example of providing coordinates to a friend on the moon to illustrate that three coordinates (longitude, latitude, altitude) are needed to define a position in 3D space on Earth. An image is then described as a 2D signal that only has height and width dimensions, with no depth. Different types of images are discussed, including binary, grayscale, and color images of various bit depths. Higher dimensional signals involving time as a fourth dimension are also covered.
This document discusses the concept of dimensions and how they relate to images. It begins by using an example of providing coordinates to a friend on the moon to illustrate that three coordinates (longitude, latitude, altitude) are needed to define a position in 3D space on Earth. An image is then described as a 2D signal that only has height and width dimensions, with no depth. Different types of images are discussed, including binary, grayscale, and color images of various bit depths. Higher dimensional signals involving time as a fourth dimension are also covered.
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 20
Concept of Dimensions
We will look at this example in order to understand the concept of dimension.
Consider you have a friend who lives on moon, and he wants to send you a gift on your birthday present. He ask you about your residence on earth. The only problem is that the courier service on moon doesnot understand the alphabetical address, rather it only understand the numerical co-ordinates. So how do you send him your position on earth? Thats where comes the concept of dimensions. Dimensions define the minimum number of points required to point a position of any particular object within a space. So lets go back to our example again in which you have to send your position on earth to your friend on moon. You send him three pair of co-ordinates. The first one is called longitude , the second one is called latitude, and the third one is called altitude. These three co-ordinates define your position on the earth. The first two defines your location , and the third one defines your height above the sea level. So that means that only three co-ordinates are required to define your position on earth. That means you live in world which is 3 dimensional. And thus this not only answers the question about dimension , but also answers the reason , that why we live in a 3d world. Since we are studying this concept in reference to the digital image processing, so we are now going to relate this concept of dimension with an image. Dimensions of image So if we live in the 3d world , means a 3 dimensional world, then what are the dimensions of an image that we capture. An image is a two dimensional, thats why we also define an image as a 2 dimensional signal. An image has only height and width. An image doesnot have depth. Just have a look at this image below.
If you would look at the above figure , it shows that it has only two axis which are the height and width axis. You cannot perceive depth from this image. Thats why we say that an image is two dimensional signal. But our eye is able to perceive three dimensional objects , but this would be more explained in the next tutorial of how the camera works , and image is perceived. This discussion leads to some other questions that how 3 dimension systems is formed from 2 dimension. How does television works? If we look the image above , we will see that it is a two dimensional image. In order to convert it into three dimension , we need one other dimension. Lets take time as the third dimension , in that case we will move this two dimensional image over the third dimension time. The same concept that happens in television, that helps us perceive the depth of different objects on a screen. Does that mean that what comes on the T.V or what we see in the television screen is 3d. Well we can yes. The reason is that, in case of T.V we if we are playing a video. Then a video is nothing else but two dimensional pictures move over time dimension. As two dimensional objects are moving over the third dimension which is a time so we can say it is 3 dimensional. Different dimensions of signals 1 DIMENSION SIGNAL The common example of a 1 dimension signal is a waveform. It can be mathematically represented as F(x) = waveform Where x is an independent variable. Since it is a one dimension signal , so thats why there is only one variable x is used. Pictorial representation of a one dimensional signal is given below:
The above figure shows a one dimensional signal. Now this lead to another question, which is, even though it is a one dimensional signal ,then why does it have two axis?. The answer to this question is that even though it is a one dimensional signal , but we are drawing it in a two dimensional space. Or we can say that the space in which we are representing this signal is two dimensional. Thats why it looks like a two dimensional signal. Perhaps you can understand the concept of one dimension more better by looking at the figure below.
Now refer back to our initial discussion on dimension, Consider the above figure a real line with positive numbers from one point to the other. Now if we have to explain the location of any point on this line, we just need only one number, which means only one dimension. 2 dimensions signal The common example of a two dimensional signal is an image , which has already been discussed above.
As we have already seen that an image is two dimensional signal, i-e: it has two dimensions. It can be mathematically represented as: F (x , y) = Image Where x and y are two variables. The concept of two dimension can also be explained in terms of mathematics as:
Now in the above figure, label the four corners of the square as A,B,C and D respectively. If we call , one line segment in the figure AB and the other CD , then we can see that these two parallel segments join up and make a square. Each line segment corresponds to one dimension , so these two line segments correspond to 2 dimensions. 3 dimension signal Three dimensional signal as it names refers to those signals which has three dimensions. The most common example has been discussed in the beginning which is of our world. We live in a three dimensional world. This example has been discussed very elaborately. Another example of a three dimensional signal is a cube or a volumetric data or the most common example would be animated or 3d cartoon character. The mathematical representation of three dimensional signal is: F(x,y,z) = animated character. Another axis or dimension Z is involved in a three dimension, that gives the illusion of depth. In a Cartesian co-ordinate system it can be viewed as:
4 dimension signal In a four dimensional signal , four dimensions are involved. The first three are the same as of three dimensional signal which are: (X, Y, Z), and the fourth one which is added to them is T(time). Time is often referred to as temporal dimension which i s a way to measure change. Mathematically a four d signal can be stated as: F(x,y,z,t) = animated movie. The common example of a 4 dimensional signal can be an animated 3d movie. As each character is a 3d character and then they are moved with respect to the time, due to which we saw an illusion of a three dimensional movie more like a real world. So that means that in reality the animated movies are 4 dimensional i-e: movement of 3d characters over the fourth dimension time. 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. The binary image The binary image as it name states , contain only two pixel values. 0 and 1. In our previous tutorial of bits per pixel , we have explained this in detail about the representation of pixel values to their respective colors. 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 whi te 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:
FORMAT The format of these images are PGM ( Portable Gray Map ). This format is not supported by default from windows. In order to see gray scale image , you need to have an image viewer or image processing toolbox such as Matlab. BEHIND GRAY SCALE IMAGE: As we have explained it several times in the previous tutorials , that an image is nothing but a two di mensional function , and can be represented by a two dimensional array or matrix. So in the case of the image of Einstein shown above , there would be two dimensional matrix in behind with values ranging between 0 and 255. But thats not the case with the color images. 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.
Now the question arises , that how would you distribute 16 into three. If you do it like this, 5 bits for R , 5 bits for G , 5 bits for B Then there is one bit remains in the end. So the distribution of 16 bit has been done like this. 5 bits for R , 6 bits for G , 5 bits for B. The additional bit that was left behind is added into the green bit. Because green is the color which is most soothing to eyes in all of these three colors. Note this is distribution is not followed by all the systems. Some have introduced an alpha channel in the 16 bit. 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. Or some distribute it like this 5 bits for R , 5 bits for G , 5 bits for B , 1 bits for alpha channel. 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.
FORMAT It is the most common used format. Its format is PPM ( Portable pixMap) which is supported by Linux operating system. The famous windows has its own format for it which is BMP ( Bitmap ). Concept of Pixel Pixel Pixel is the smallest element of an image. Each pixel correspond to any one value. In an 8-bit grayscale image, the value of the pixel between 0 and 255. The value of a pixel at any point correspond to the intensity of the light photons striking at t hat point. Each pixel store a value proportional to the light intensity at that particular location. PEL A pixel is also known as PEL. You can have more understanding of the pixel from the pictures given below. In the above picture, there may be thousands of pixels, that together make up this image. We will zoom that image to the extent that we are able to see some pixels division. It is shown in the image below.
In the above picture, there may be thousands of pixels, that together make up this image. We will zoom that image to the extent that we are able to see some pixels division. It is shown in the image below.
Relation ship with CCD array We have seen that how an image is formed in the CCD array. So a pixel can also be defined as The smallest division the CCD array is also known as pixel. Each division of CCD array contains the value against the intensity of the photon striking to it. This value can also be called as a pixel
CALCULATION OF TOTAL NUMBER OF PIXELS We have define an image as a two dimensional signal or matrix. Then in that case the number of PEL would be equal to the number of rows multiply with number of columns. This can be mathematically represented as below: Total number of pixels = number of rows ( X ) number of columns Or we can say that the number of (x,y) coordinate pairs make up the total number of pixels. We will look in more detail in the tutorial of image types , that how do we calculate the pixels in a color image. Gray level The value of the pixel at any point denotes the intensity of image at that location , and that is also known as gray level. We will see in more detail about the value of the pixels in the image storage and bits per pixel tutorial, but for now we will just look at the concept of only one pixel value. PIXEL VALUE.(0) As it has already been define in the beginning of this tutorial , that each pixel can have only one value and each value denotes the intensity of light at that point of the image. We will now look at a very unique value 0. 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 colorwould be formed. Have a look at this image matrix 0 0 0 0 0 0 0 0 0 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 = 3 X 3 = 9. It means that an image would be formed with 9 pixels, and that image would have a dimension of 3 rows and 3 column and most importantly that image would be black. The resulting image that would be made would be something like this
Now why is this image all black. Because all the pixels in the image had a value of 0. Pixel Resolution Pixel We have already defined a pixel in our tutorial of concept of pixel, in which we define a pixel as the smallest element of an image. We also defined that a pixel can store a value proportional to the light intensity at that particular location. Now since we have defined a pixel, we are going to define what is resolution. Resolution The resolution can be defined in many ways. Such as pixel resolution , spatial resolution , temporal resolution , spectral resolution. Out of which we are going to discuss pixel resolution. You have probably seen that in your own computer settings , you have monitor resolution of 800 x 600 , 640 x 480 e.t.c In pixel resolution , the term resolution refers to the total number of count of pixels in an digital image. For example. If an image has M rows and N columns , then its resolution can be defined as M X N. If we define resolution as the total number of pixels , then pixel resolution can be defined with set of two numbers. The first number the width of the picture , or the pixels across columns , and the second number is height of the picture , or the pixels across its width. We can say that the higher is the pixel resolution , the higher is the quality of the image. We can define pixel resolution of an image as 4500 X 5500. Megapixels We can calculate mega pixels of a camera using pixel resolution. Column pixels (width ) X row pixels ( height ) / 1 Million. The size of an image can be defined by its pixel resolution. Size = pixel resolution X bpp ( bits per pixel ) Calculating the mega pixels of the camera Lets say we have an image of dimension: 2500 X 3192. Its pixel resolution = 2500 * 3192 = 7982350 bytes. Dividing it by 1 million = 7.9 = 8 mega pixel (approximately). Aspect ratio Another important concept with the pixel resolution is aspect ratio. Aspect ratio is the ratio between width of an image and the height of an image. It is commonly explained as two numbers separated by a colon (8:9). This ratio differs in different images , and in different screens. The common aspect ratios are: 1.33:1, 1.37:1, 1.43:1, 1.50:1, 1.56:1, 1.66:1, 1.75:1, 1.78:1, 1.85:1, 2.00:1, e.t.c ADVANTAGE: Aspect ratio maintains a balance between the appearance of an image on the screen , means it maintains a ratio between horizontal and vertical pixels. It does not let the image to get distorted when aspect ratio is increased. FOR EXAMPLE: This is a sample image , which has 100 rows and 100 columns. If we wish to make is smaller, and the condition is that the quality remains the same or in other way the image does not get distorted , here how it happens. ORIGINAL IMAGE:
Changing the rows and columns by maintain the aspect ratio in MS Paint.
RESULT
Smaller image , but with same balance. You have probably seen aspect ratios in the video players, where you can adjust the video according to your screen resolution. Finding the dimensions of the image from aspect ratio: Aspect ratio tells us many things. With the aspect ratio, you can calculate the dimensions of the image along with the size of the image. For example If you are given an image with aspect ratio of 6:2 of an image of pixel resolution of 480000 pixels given the image is an gray scale image. And you are asked to calculate two things. 1. Resolve pixel resolution to calculate the dimensions of image 2. Calculate the size of the image SOLUTION: GIVEN: Aspect ratio: c:r = 6:2 Pixel resolution: c * r = 480000 Bits per pixel: grayscale image = 8bpp FIND: Number of rows = ? Number of cols = ? SOLVING FIRST PART:
SOLVING 2ND PART: Size = rows * cols * bpp Size of image in bits = 400 * 1200 * 8 = 3840000 bits Size of image in bytes = 480000 bytes Size of image in kilo bytes = 48 kb (approx). Applications and Usage Since digital image processing has very wide applications and almost all of the technical fields are impacted by DIP, we will just discuss some of the major applications of DIP. Digital Image processing is not just limited to adjust the spatial resolution of the everyday images captured by the camera. It is not just limited to increase the brightness of the photo, e.t.c. Rather it is far more than that. Electromagnetic waves can be thought of as stream of particles, where each particle is moving with the speed of light. Each particle contains a bundle of energy. This bundle of energy is called a photon. The electromagnetic spectrum according to the energy of photon is shown below.
In this electromagnetic spectrum, we are only able to see the visible spectrum. Visible spectrum mainly includes seven different colors that are commonly term as (VIBGOYR). VIBGOYR stands for violet , indigo , blue , green , orange , yellow and Red. But that doesnot nullify the existence of other stuff in the spectrum. Our human eye can only see the visible portion, in which we saw all the objects. But a camera can see the other things that a naked eye is unable to see. For example: x rays , gamma rays , e.t.c. Hence the analysis of all that stuff too is done in digital image processing. This discussion leads to another question which is why do we need to analyze all that other stuff in EM spectrum too? The answer to this question lies in the fact, because that other stuff such as XRay has been widely used in the field of medical. The analysis of Gamma ray is necessary because it is used widely innuclear medicine and astronomical observation. Same goes with the rest of the things in EM spectrum. Applications of Digital Image Processing Some of the major fields in which digital image processing is widely used are mentioned below Image sharpening and restoration Medical field Remote sensing Transmission and encoding Machine/Robot vision Color processing Pattern recognition Video processing Microscopic Imaging Others Image sharpening and restoration Image sharpening and restoration refers here to process images that have been captured from the modern camera to make them a better image or to manipulate those images in way to achieve desired result. It refers to do what Photoshop usually does. This includes Zooming, blurring , sharpening , gray scale to color conversion, detecting edges and vice versa , Image retrieval and Image recognition. The common examples are: The original image
The zoomed image
Blurr image
Sharp image
Edges
Medical field The common applications of DIP in the field of medical is 1. Gamma ray imaging 2. PET scan 3. X Ray Imaging 4. Medical CT 5. UV imaging UV imaging In the field of remote sensing , the area of the earth is scanned by a satellite or from a very high ground and then it is analyzed to obtain information about it. One particular application of digital image processing in the field of remote sensing is to detect infrastructure damages caused by an earthquake. As it takes longer time to grasp damage, even if serious damages are focused on. Since the area effected by the earthquake is sometimes so wide , that it not possible to examine it with human eye in order to estimate damages. Even if it is , then it is very hectic and time consuming procedure. So a solution to this is found in digital image processing. An image of the effected area is captured from the above ground and then it is analyzed to detect the various types of damage done by the earthquake.
The key steps include in the analysis are 1. The extraction of edges 2. Analysis and enhancement of various types of edges Transmission and encoding The very first image that has been transmitted over the wire was from London to New York via a submarine cable. The picture that was sent is shown below.
The picture that was sent took three hours to reach from one place to another. Now just imagine , that today we are able to see live video feed , or live cctv footage from one continent to another with just a delay of seconds. It means that a lot of work has been done in this field too. This field doesnot only focus on transmission , but also on encoding. Many different formats have been developed for high or low bandwith to encode photos and then stream it over the internet or e.t.c. Machine/Robot vision Apart form the many challenges that a robot face today , one of the biggest challenge still is to increase the vision of the robot. Make robot able to see things , identify them , identify the hurdles e.t.c. Much work has been contributed by this field and a complete other field of computer vision has been introduced to work on it. Hurdle detection Hurdle detection is one of the common task that has been done through image processing, by identifying different type of objects in the image and then calculating the distance between robot and hurdles.
Line follower robot Most of the robots today work by following the line and thus are called line follower robots. This help a robot to move on its path and perform some tasks. This has also been achieved through image processing.
Color processing Color processing includes processing of colored images and different color spaces that are used. For example RGB color model , YCbCr, HSV. It also involves studying transmission , storage , and encoding of these color images. Pattern recognition Pattern recognition involves study from image processing and from various other fields that includes machine learning ( a branch of artificial intelligence). In pattern recognition , image processing is used for identifying the objects in an images and then machine learning is used to train the system for the change in pattern. Pattern recognition is used in computer aided diagnosis , recognition of handwriting , recognition of images e.t.c Video processing A video is nothing but just the very fast movement of pictures. The quality of the video depends on the number of frames/pictures per minute and the quality of each frame being used. Video processing involves noise reduction , detail enhancement , motion detection , frame rate conversion , aspect ratio conversion , color space conversion e.t.c.