Unit 1
Unit 1
Computer graphics refers to the creation, manipulation, and display of visual content
using digital technologies. It encompasses a wide range of techniques and applications,
from simple 2D graphics to complex 3D simulations and animations. Computer graphics
have revolutionized fields such as entertainment, gaming, education, science,
engineering, and medicine, among others. The process of creating computer graphics
involves several stages, including modeling, texturing, lighting, rendering, and
compositing. These stages require specialized software and hardware tools, including 3D
modeling software, graphics processing units (GPUs), and rendering engines. The future
of computer graphics is exciting, with advances in virtual and augmented reality,
machine learning, and artificial intelligence paving the way for new and innovative
applications.
History of Computer Graphics
1. The origins of computer graphics can be traced back to the early 1950s when
researchers began experimenting with cathode ray tubes (CRTs) and other early
computer technologies to create simple line drawings and graphics.
2. In the 1960s, computer graphics started to take off with the development of the
first computer graphics software, such as Sketchpad and Ivan Sutherland's
groundbreaking "Sword of Damocles" display system.
3. In the 1970s and 1980s, computer graphics continued to evolve with the
introduction of more advanced hardware and software systems that enabled the
creation of 3D graphics and animations.
4. In the 1980s, the introduction of affordable personal computers and graphics
software packages such as AutoCAD and Adobe Illustrator led to a surge in
interest in computer graphics among artists, designers, and architects.
5. The 1990s saw further advances in computer graphics, with the development of
new hardware technologies such as graphics processing units (GPUs) and new
software tools for modeling, rendering, and animation.
6. In the early 2000s, computer graphics began to play an increasingly important
role in industries such as entertainment, gaming, education, science, engineering,
and medicine, with new applications such as virtual and augmented reality
emerging.
7. Today, computer graphics continues to evolve, with advances in hardware and
software technologies driving new and innovative applications in fields such as
machine learning, artificial intelligence, and computer vision.
Application of Computer Graphics
1. Education and Training: Computer-generated model of the physical, financial and
economic system is often used as educational aids. Model of physical systems,
physiological system, population trends or equipment can help trainees to understand the
operation of the system.
For some training applications, particular systems are designed. For example Flight
Simulator.
Flight Simulator: It helps in giving training to the pilots of airplanes. These pilots spend
much of their training not in a real aircraft but on the ground at the controls of a Flight
Simulator.
Advantages:
1. Fuel Saving
2. Safety
3. Ability to familiarize the training with a large number of the world's airports.
2. Use in Biology: Molecular biologist can display a picture of molecules and gain
insight into their structure with the help of computer graphics.
3. Computer-Generated Maps: Town planners and transportation engineers can use
computer-generated maps which display data useful to them in their planning work.
4. Architect: Architect can explore an alternative solution to design problems at an
interactive graphics terminal. In this way, they can test many more solutions that would
not be possible without the computer.
5. Presentation Graphics: Example of presentation Graphics are bar charts, line graphs,
pie charts and other displays showing relationships between multiple parameters.
Presentation Graphics is commonly used to summarize
o Financial Reports
o Statistical Reports
o Mathematical Reports
o Scientific Reports
o Economic Data for research reports
o Managerial Reports
o Consumer Information Bulletins
o And other types of reports
6. Computer Art: Computer Graphics are also used in the field of commercial arts. It is
used to generate television and advertising commercial.
7. Entertainment: Computer Graphics are now commonly used in making motion
pictures, music videos and television shows.
8. Visualization: It is used for visualization of scientists, engineers, medical personnel,
business analysts for the study of a large amount of information.
9. Educational Software: Computer Graphics is used in the development of educational
software for making computer-aided instruction.
10. Printing Technology: Computer Graphics is used for printing technology and textile
design.
Example of Computer Graphics Packages:
1. LOGO
2. COREL DRAW
3. AUTO CAD
4. 3D STUDIO
5. CORE
6. GKS (Graphics Kernel System)
7. PHIGS
8. CAM (Computer Graphics Metafile)
9. CGI (Computer Graphics Interface)
Interactive and Passive Graphics
(a) Non-Interactive or Passive Computer Graphics:
In non-interactive computer graphics, the picture is produced on the monitor, and the
user does not have any controlled over the image, i.e., the user cannot make any change
in the rendered image. One example of its Titles shown on T.V.
Non-interactive Graphics involves only one-way communication between the computer
and the user, User can see the produced image, and he cannot make any change in the
image.
(b) Interactive Computer Graphics:
In interactive Computer Graphics user have some controls over the picture, i.e., the user
can make any change in the produced image. One example of it is the ping-pong game.
Interactive Computer Graphics require two-way communication between the computer
and the user. A User can see the image and make any change by sending his command
with an input device.
Advantages:
1. Higher Quality
2. More precise results or products
3. Greater Productivity
4. Lower analysis and design cost
5. Significantly enhances our ability to understand data and to perceive trends.
What is Image Processing?
Image processing is a method to convert an image into digital form and perform some
operations on it, in order to get an enhanced image or to extract some useful information
from it. It is a type of signal dispensation in which input is image, like video frame or
photograph and output may be image or characteristics associated with that image.
Usually Image Processing system includes treating images as two dimensional signals
while applying already set signal processing methods to them.
It is among rapidly growing technologies today, with its applications in various aspects
of a business. Image Processing forms core research area within engineering and
computer science disciplines too.
Image processing basically includes the following three steps.
· Importing the image with optical scanner or by digital photography.
· Analyzing and manipulating the image which includes data compression and image
enhancement and spotting patterns that are not to human eyes like satellite photographs.
· Output is the last stage in which result can be altered image or report that is based on
image analysis.
Purpose of Image processing
The purpose of image processing is divided into 5 groups. They are:
1. Visualization – Observe the objects that are not visible.
2. Image sharpening and restoration – To create a better image.
3. Image retrieval – Seek for the image of interest.
4. Measurement of pattern – Measures various objects in an image.
5. Image Recognition – Distinguish the objects in an image.
Types
The two types of methods used for Image Processing are Analog and Digital Image
Processing. Analog or visual techniques of image processing can be used for the hard
copies like printouts and photographs. Image analysts use various fundamentals of
interpretation while using these visual techniques. The image processing is not just
confined to area that has to be studied but on knowledge of analyst. Association is
another important tool in image processing through visual techniques. So analysts apply
a combination of personal knowledge and collateral data to image processing.
Digital Processing techniques help in manipulation of the digital images by using
computers. As raw data from imaging sensors from satellite platform contains
deficiencies. To get over such flaws and to get originality of information, it has to
undergo various phases of processing. The three general phases that all types of data
have to undergo while using digital technique are Pre- processing, enhancement and
display, information extraction.
Fig. 1: Flow Chart Showing Diffrent Phases in Digital Image Processing
Image Types
The image types we will consider are:
1. Binary Images
Binary images are the simplest type of images and can take on two values,
typically black and white, or ‘0’ and ‘1’. A binary image is referred to as a 1 bit/pixel
image because it takes only 1 binary digit to represent each pixel. These types of
images are frequently used in computer vision application where the only information
required for the task is general shapes, or outlines information. For example, to
position a robotics gripper to grasp an object or in optical character recognition
(OCR).
Binary images are often created from gray-scale images via a threshold value is turned
white (‘1’), and those below it are turned black (‘0’). We define the characteristic
function of an object in an image to be
(a) (b)
Figure(1) (a) binary image representation (b) binary Lenna image
3. Color Images
Representation of color images is more complex and varied. The two most common
ways of storing color image contents are:
1) RGB representation—in which each pixel is usually represented by a 24-bit
number containing the amount of its red (R), green (G), and blue
(B) components.
2) Indexed representation—where a 2D array contains indices to a color palette (or
lookup table - (LUT)).
24- Bit (RGB) Color Images Color images can be represented using three 2D arrays
of same size, one for each color channel: red (R), green (G), and blue (B) (Figure 4).
Each array element contains an 8-bit value, indicating the amount of red, green, or
blue at that point in a [0, 255] scale. The combination of the three 8-bit values into a
24-bit number allows 224 (16,777,216 usually referred to as 16 million or 16 M) color
combinations. An alternative representation uses 32 bits per pixel and includes a
fourth channel, called the alpha channel, that provides a measure of transparency for
each pixel and is widely used in image editing effects. In the figure 4 we see a
representation of a typical RGB color image.
Illustrate that in addition to referring to arrow or column as a vector, we can
refer to a single pixel red ,green, and blue values as a color pixel vector –
(R,G,B ).
Note: Many image format types can be converted to one of other type by easily
available image conversion software. Field related to computer imaging is that
computer graphics.
Computer graphics is a specialized field within that refers to the computer science
realm that refers to the reproduction of visual data through the use of computer.
In computer graphics, types of image data are divided into two primarily categories:
1. Bitmap image (or raster image): can represented by our image model I(r, c),
where we have pixel data and corresponding brightness values stored in some
file format.
2. Vector images: refer to the methods of representing lines, curves shapes by
storing only the key points. These key points are sufficient to define the shapes,
and the process of turning theses into an image is called rending after the image
has been rendered, it can be thought of as being in bit map format where each
pixel has specific values associated with it.
Most the type of file format fall into category of bitmap images. In general,
these types of images contain both header information and the raw pixel data. The
header information contain information regarding:
(1) The number of rows(height),
(2) The number of columns(Width),
(3)The number of bands,
(4) The number of bit per pixel,
(5) the file type , Additionally, with some of the more complex file formats, the
header may contain information about the type of compression used and other
necessary parameters to create the image, I(r,c)).
Feature
Input Preprocessing analysis
image
Spatial
domain
Properties of Lights
Light is an electromagnetic wave that travels through space and has several properties
that make it unique and useful for various applications. These properties include
intensity, wavelength, frequency, polarization, speed, reflection, refraction, diffraction,
and interference. Intensity determines the brightness of the light, while wavelength
determines its color. Frequency is inversely proportional to wavelength and corresponds
to the energy of the light. Polarization determines how light interacts with polarizing
filters, and speed varies depending on the medium. Reflection, refraction, diffraction,
and interference are all phenomena that light can undergo, and they are crucial for
creating realistic images in computer graphics and other fields. Understanding these
properties of light is essential for designing and optimizing devices that use light and for
creating visually appealing and realistic images.
The properties of light that are most relevant in computer graphics include:
1. Color: Light can have a variety of colors depending on its wavelength, which can
be used to create different visual effects and mood in an image.
2. Intensity: The intensity of light determines how bright or dim a scene will be. In
computer graphics, this property can be adjusted to create different lighting
effects and emphasize specific areas of an image.
3. Direction: The direction of light affects the shadows and highlights in an image.
By changing the direction of the light source, an artist can create different
lighting conditions, such as front lighting, side lighting, or back lighting.
4. Shadows: Shadows are the areas where light does not reach, and they are
essential for creating depth and dimension in an image. In computer graphics,
shadows can be generated automatically using ray tracing or other techniques.
5. Reflection: Reflections are the way that light bounces off a surface and can create
a realistic appearance in an image. In computer graphics, reflections can be
simulated using ray tracing, which calculates the path of light rays as they bounce
off surfaces.
6. Refraction: Refraction is the bending of light as it passes through a transparent
material, such as glass or water. This property is important for creating realistic
images of transparent objects, such as a glass of water or a diamond.
7. Specularity: Specularity is the property of a surface that determines how much
light is reflected in a specific direction. In computer graphics, specularity can be
used to simulate shiny or reflective surfaces, such as metal or polished wood.
As shown in the figure above, the addition of red, green and blue light will cause us to
perceive different colors. For example, if we combine blue and green light in some
proportions, it will result in the formation of cyan. And if we combine red and green
light, it results in yellow light.
Advantages
No transformations required to display data on the screen.
It is considered as the base color space for various applications
It is a computationally practical system.
With the help of additive property, it is used in video displays
It relates simply to CRT applications.
This model is very easy to implement
DisAdvantages
RGB values are commonly not transferable between devices
Not perceptually uniform.
Not perfect for identification of colors
Difficult to determine specific color
The difference between colors is not linear
CMYK Colour Model
The CMYK color model is a subtractive color model used in printing and graphic design.
It consists of four primary colors: Cyan, Magenta, Yellow, and Key (black). In this
model, colors are created by subtracting varying amounts of these ink colors from white
light. Cyan absorbs red light, Magenta absorbs green light, Yellow absorbs blue light,
and Key (black) absorbs all colors. By combining these four colors in different
proportions, a wide range of colors can be achieved. The CMYK model is primarily used
in printing because it accurately represents the ink colors used in the printing process,
allowing designers to create and reproduce colors effectively for printed materials.
In additive color models (RGB), white is the ‘’additive’’ combination of all primary
colored lights, black is the absence of light. In the CMYK model, it is the opposite: white
is the natural color of the paper or the background, black results from a full combination
of colored inks. To save cost on ink and to produce deeper black tones, unsaturated and
dark colors are produced by using black ink instead of the combination of cyan, magenta
and yellow.
Advantages:
1. Accurate representation for printing.
2. Wide color gamut.
3. Cost-effective for mass printing.
Disadvantages:
1. Limited color range compared to RGB.
2. Inaccurate representation for digital displays.
3. Can result in color shifts and variations during printing.
HSL Color Model
The HSL (Hue, Saturation, Lightness) color model is a representation of colors based on
their hue, saturation, and lightness attributes. Hue refers to the type of color, such as red,
blue, or green, and it is measured as an angle around a color wheel. Saturation represents
the intensity or purity of a color, with higher saturation values indicating more vivid and
vibrant colors, while lower values result in less saturated or pastel-like colors. Lightness
determines the perceived brightness of a color, ranging from black at 0% lightness to
white at 100% lightness. By manipulating the HSL values, users can easily adjust the
overall color, make colors more vibrant or muted, or change the brightness of an image.
The HSL color model is widely used in graphic design, image editing software, and
digital art due to its intuitive nature and ease of color adjustment. Hue works circular, so
it can be represented on a circle instead. A hue of 360° looks the same again as a hue of
0°.
https://www.youtube.com/watch?v=x0-qoXOCOow