CG Unit 1
CG Unit 1
Unit ‘1’
Prepared by: Abhishek Dewan
Lecturer, Computer Graphics
Trinity Int’l College
• Computer Graphics is a field related to the
generation of graphics using computers.
• It includes the creation, storage, and
manipulation of images of objects.
• These objects come from diverse fields such
as physical, mathematical, engineering,
architectural, abstract structures and natural
phenomenon.
• Computer graphics today is largely interactive,
that is , the user controls the contents,
structure, and appearance of images of the
objects by using input devices.
• Until the early 1980's computer graphics was a
small, specialized field,
• largely because the hardware was expensive
and graphics-based application programs that
were easy to use and cost-effective were few.
• Personal computers with built-in raster
graphics displays-such as Apple Macintosh and
the IBM PC- popularized the use of bitmap
graphics for user-computer interaction.
• A bitmap is a ones and zeros representation of
the rectangular array points on the screen.
• Once bitmap graphics became affordable, and
explosion of easy-to-use and inexpensive
graphics-based applications followed.
• This allowed user to represent data files,
application program, file cabinets, mailboxes,
printers, recycle bin using different icons.
• By pointing and clicking the icons, users could
activate the corresponding programs or
objects, which replaced much of the typing of
the commands used in earlier operating
systems and computer applications.
• Today, almost all interactive application
programs, even those for manipulating
text(e.g.. word processor) or numerical data
(e.g. spreadsheet programs), use graphics
extensively in the user interface and for
visualizing and manipulating the application-
specific objects
• Even people who do not use computers
encounter computer graphics in TV
commercials and as cinematic special effects.
• Thus computer graphics is and integral part of
all computer user interfaces, and is
indispensable for visualizing 2D, 3D objects in
all most all areas such as education, science,
engineering, medicine, commerce, the
military, advertising, and entertainment.
Pixel
a) Bitmap graphics
b) Vector graphics
Bitmap graphics can be created and edited using packages such as:
MS Paint
Adobe Photoshop
Vector graphics software
Adobe Illustrator
Adobe FreeHand
CorelDRAW
Pro/DESKTOP
Computer Graphics v/s Image
Processing
• Image processing is a method to perform some
operations on an image, in order to get an
enhanced image or to extract some useful
information from it.
• It is a type of signal processing in which input is
an image and output may be image or
characteristics/features associated with that
image.
• Nowadays, image processing is among rapidly
growing technologies.
Image processing basically includes the
following three steps:
• Importing the image via image acquisition
tools;
• Analyzing and manipulating the image;
• Output ----- can be altered image or report
that is based on image analysis.
Fundamental Image Processing Steps:
• Image Acquisition (Preprocessing)
the action of retrieving an image from
some source.
• Image Enhancement
the action of enhancing components of
an image.
• Image Restoration
the action of restoring lost or damaged
components of an image.
• Color Image Processing
the action of enhancing color components
of an image.
• Information extraction
the action of extracting information and
pattern from an image.
There are five main types of image processing:
• Visualization - Find objects that are not visible
in the image
• Recognition - Distinguish or detect objects in
the image
• Sharpening and restoration - Create an
enhanced image from the original image
• Pattern recognition - Measure the various
patterns around the objects in the image
• Retrieval - Browse and search images from a
large database of digital images that are
similar to the original image
Applications of Computer Graphics
1. User interfaces
• Most applications have user interfaces that
rely on desktop windows systems to manage
multiple simultaneous activities , and on
point-and click facilities to allow users perform
various functions in just a click.
• User interfaces have menu items, icons and
objects on the screen designed with the help
of graphics.
2. Plotting
Solution:
Size of screen = 8 inch *10 inch.
Pixel per inch(Resolution) = 100.
Then,
Total no of pixels = 8*100 * 10 * 100 pixels
Bit per pixel storage = 8
Therefore,
Total storage required in frame buffer
= (800 *1000*8) bits
= (800 *1000*8)/8 Bytes
= 800000 Bytes.
Classwork??
?? Consider two different raster systems with
resolutions of 640 x 480, 1280 x 1024.
a) what size is frame buffer(in bytes) for
each system to store 12 bits per pixel?
b) how much storage (in bytes) is required
for each system if 24 bits per pixel are to be
stored?
Architecture of Raster Scan System:
• Consists of several processing units.
• CPU is the main processing unit of computer
systems.
• Besides CPU, graphics system consists of a
special purpose processor called video
controller or display processor.
• The display processor controls the operation
of the display device.
• A fixed area of system memory is reserved for
the frame buffer.
• The video controller cycles through the frame
buffer, one scan line at a time, typically at 60
times per second or higher.
• The contents of frame buffer are used to
control the CRT beam's intensity or color.
The video controller
• The raster-scan generator produces deflection signals
that generate the raster scan and also controls the X
and Y address registers, which in turn defines memory
location to be accessed next.