0% found this document useful (0 votes)
10 views15 pages

Unit 1

Computer graphics involves the creation and manipulation of visual content using digital technologies, impacting various fields such as entertainment, education, and medicine. The document outlines the history of computer graphics, detailing its evolution from simple line drawings in the 1950s to complex 3D simulations today, and highlights its applications in areas like education, biology, and entertainment. Additionally, it discusses image processing techniques, types of images, and various file formats used in computer graphics.

Uploaded by

75251102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

Unit 1

Computer graphics involves the creation and manipulation of visual content using digital technologies, impacting various fields such as entertainment, education, and medicine. The document outlines the history of computer graphics, detailing its evolution from simple line drawings in the 1950s to complex 3D simulations today, and highlights its applications in areas like education, biology, and entertainment. Additionally, it discusses image processing techniques, types of images, and various file formats used in computer graphics.

Uploaded by

75251102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Introduction to Computer Graphics

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

 Each pixel is stored as a single bit (0 or 1)


 A 640 x 480 monochrome image requires 37.5 KB of storage
Gray Scale Images
They contain brightness information only, no color information. The number
of different brightness level available. The typical image contains 8 bit/pixel , which
allows us to have (0-255) different brightness (gray) levels. The 8 bit representation is
typically due to the fact that the byte, which corresponds to 8-bit of data, is the
standard small unit in the world of digital computer.

 Each pixel is usually stored as a byte (value between 0 to 255)


 A 640 x 480 greyscale image requires over 300 KB of storage.
Figure 3 shows a grayscale image and a 6 × 6 detailed region, where brighter
pixels correspond to larger values.
FIGURE 3 A grayscale image and the pixel values in a 6 × 6 neighborhood.

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 ).

Example of 24-Bit Colors Image

 Each pixel is represented by three bytes (e.g., RGB)


 Supports 256 x 256 x 256 possible combined colors (16,777,216)
 A 640 x 480 24-bit color image would require 921.6 KB of storage

Indexed Color Images: A problem with 24-bit color representations is backward


compatibility with older hardware that may not be able to display the 16 million
colors simultaneously. A solution devised before 24-bit color displays and video cards
were widely available consisted of an indexed representation, in which a 2D array of
the same size as the image contains indices (pointers) to a color palette (or color map)
of fixed maximum size (usually 256 colors). The color map is simply a list of colors
used in that image. Figure 6 shows an indexed color image and a 4 × 4 detailed
region, where each pixel shows the index and the values of R, G, and B at the color
palette entry that the index points to.

 One byte for each pixel


 Supports 256 out of the millions s possible, acceptable color quality
 Requires Color Look-Up Tables (LUTs)
 A 640 x 480 8-bit color image requires 307.2 KB of storage (the same as
8-bit grayscale)

FIGURE 2.5 An indexed color image and the indices in a 4 × 4 neighborhood.


Original image
Digital Image File Format

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)).

Image File Formats :


1. BMP format:
It is the format used by the windows, it’s a compressed format and the data of
image are located in the field of data while there are two fields
, one for header (54 byte) that contains the image information such as (height ,width
, no. of bits per pixel, no of bands , the file type).
The second field is the color map or color palette for gray level image, where its
length is 0-255).
2. BIN file format:
It is the raw image data I(r,c) with no header information.
3. PPM (Portable Pix Map) file format :
It contain raw image data with simplest header, the PPM format, include
PBM(binary),PGM(gray),PPM (color), the header contain a magic number that
identifies the file.
4. TIFF(Tagged Image File Format) and GIF(Graphics Interchange Format):
They are used on World Wide Web (WWW). GIF files are limited to a maximum
of 8 bits/pixel and allows for a type of compression called LZW. The GIF image
header is 13 byte long & contains basic information.
5.JPEG (Joint photo Graphic Experts Group):
It is simply becoming standard that allows images compressed algorithms to be
used in many different computer platforms.
JPEG images compression is being used extensively on the WWW. It’s, flexible,
so it can create large files with excellent image equality.
Image analysis
Image analysis involves manipulating the image data to determine exactly the
information necessary to help solve a computer imaging problem.
System model
The image analysis process, illustrated in fig.(1), can be broken down into three
primary stages:
1. Preprocessing.
2. Data Reduction.
3. Features Analysis.
Frequency
domain

Feature
Input Preprocessing analysis
image

Spatial
domain

Fig.(1) image analysis domain

Preprocessing Is used to remove noise and eliminate irrelevant, visually


unnecessary information. Noise is unwanted information that can result from the
image acquisition process; other preprocessing steps might include Gray –level or
spatial quantization (reducing the number of bits per pixel or the image size).or
finding regions of interest for further processing.
The preprocessing algorithm, techniques and operators are used to perform initial
processing that makes the primary data reduction and analysis task easier. They
include operations related to:
• Extracting regions of interest.
• Performing basic algebraic operation on image.
• Enhancing specific image features.
• Reducing data in resolution and brightness.
Data Reduction Is the second stage of image analysis. It involves either reducing
the data in the spatial domain or transforming it into another domain called the
frequency domain, and then extraction features for the analysis process.
In the third stage, Features Analysis, The features extracted by the data
reduction process are examine and evaluated for their use in the application.

Preprocessing: Region –of-Interest Image Geometry


Often, for image analysis we want to investigate more closely a specific area
within the image, called region of interest (ROI). To do this we need operation
that modifies the spatial coordinates of the image, and these are categorized as
image geometry operations. The image geometry operations discussed here
include:
Crop, Zoom, enlarge, shrink, translate and rotate.
The image crop process is the process of selecting a small portion of the image,
a sub image and cutting it away from the rest of the image. Example:
Lenna.bmp image was cropped at points
p1(40,40),p2(100,100)

Lenna.bmp Cropped part

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.

Colour Model in Computer Graphics


A color model is a system used to represent colors in computer graphics. There are
several color models, including RGB (Red, Green, Blue), CMYK (Cyan, Magenta,
Yellow, Black), HSL (Hue, Saturation, Lightness), and HSV (Hue, Saturation, Value).
The RGB model is additive and is based on combining red, green, and blue light to
create a wide range of colors. The CMYK model is subtractive and is used primarily in
printing, where colors are created by subtracting cyan, magenta, yellow, and black ink
from a white background. The HSL and HSV models are based on the perception of
color by the human eye and allow for more intuitive adjustments of color properties such
as hue, saturation, and lightness or value. Each color model has its strengths and
weaknesses, and the choice of which to use depends on the specific application and
intended output.
What is RGB Color Model?
RGB color model is an additive color model in which red, green and blue colors are
mixed together in various proportions to form a different array of colors. The name was
given with the first letters of three primary colors red, green and blue. In this model,
colors are prepared by adding components, with white having all colors in it and black
without the presence of any color. RGB color model is used in various digital displays
like TV and video displays, Computer displays, digital cameras, and other light-based
display devices.
Understanding RGB Color Model
A color model is a process for creating more colors using a few primary colors. There
are two types of color models: the Additive color model and the subtractive color model.
In the additive color, model light is used to display colors. While in the subtractive color
model, printing inks are used to produce color. The most common additive color model
used is an RGB color model, and a CMYK color model is used for printing.
RGB color model is the additive color model using Red, green and blue colors. The main
use of the RGB color model is for displaying images on electronic devices. In this
process of the RGB color model, if the three colors are superimposed with the least
intensity, then the black color is formed, and if it is added with the full intensity of light,
then the white color is formed. To make a different array of colors, these primary colors
should be superimposed in different intensities. According to some studies, the intensity
of each primary colour can vary from 0 to 255, resulting in the creation of almost
16,777,216 colors.
Working for RGB Color Model
As we already discussed above, the basic principle behind the working of the RGB color
model is additive color mixing. It is the process of mixing 3 primary colors, red, green
and blue, together in different proportions to make more different colors.
For each primary color, it is possible to take 256 different shades of that color. So by
adding 256 shades of 3 primary colors, we can produce over 16 million different colors.
Cone cells or photoreceptors are part of the human eye that is responsible for color
perception. In the RGB color model, the combination of primary colors creates different
colors that we perceive by stimulating the different cone cells simultaneously.

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°.

HSV Colour Model


The HSV (Hue, Saturation, Value) color model is a representation of colors based on
their hue, saturation, and value attributes. Hue represents the type of color and is
measured as an angle around a color wheel, encompassing the entire spectrum of colors.
Saturation determines the intensity or purity of a color, with higher values indicating
more vivid colors and lower values representing desaturated shades. Value represents the
brightness or lightness of a color, ranging from black at 0% value to the maximum
brightness at 100% value. The HSV model provides an intuitive way to select and
manipulate colors, allowing users to independently adjust hue, saturation, and value to
explore different color variations and control brightness. It is widely used in computer
graphics, image processing, and color selection tools due to its simplicity and
compatibility with RGB-based systems.

XYZ Colour Model


The XYZ color model is a standardized, device-independent color space used to
represent colors based on human perception of color vision. It is derived from the CIE
1931 XYZ color space, developed by the International Commission on Illumination
(CIE). The XYZ model defines a three-dimensional coordinate system where colors are
represented by three components: X, Y, and Z. These components are calculated by
transforming the linear RGB color values or through spectral measurements. The X, Y,
and Z values represent the color's tristimulus values, with X corresponding to the red-
green axis, Y representing luminance or brightness, and Z representing the blue-yellow
axis. The XYZ color model is widely used in color science, color management, and
color-related applications to ensure accurate color representation and consistency across
different devices, lighting conditions, and color spaces.

https://www.youtube.com/watch?v=x0-qoXOCOow

You might also like