0% found this document useful (0 votes)
2 views11 pages

Module 1

Uploaded by

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

Module 1

Uploaded by

Ayush Subhash
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CONCEPTS IN COMPUTER GRAPHICS AND IMAGE PROCESSING (AIT322)

MODULE -1

Basics of Computer Graphics and its applications.


Computer Graphics is the branch of computer science that deals with the creation, storage,
manipulation, and display of pictorial information using computers.

Types of computer graphics are


1. INTERACTICE COMPUTER GRAPHICS
Interactive computer graphics involve a two-way communication channel between the computer
and the user. The system provides immediate visual feedback to user inputs, allowing the user to
control, manipulate, or change the displayed image or scene in real time using input devices (e.g.,
mouse, keyboard, touch screen).
2. NON INTERACTICE COMPUTER GRAPHICS
Non-interactive computer graphics, also known as passive graphics, involve only a one-way
communication from the computer to the user. The user has no control over the image generation
process or the final display; they can only view the pre-rendered content.
Eg: Movies and Television, Digital Art and Posters
Applications of Computer Graphics
Computer Graphics is the branch of computer science that deals with the creation, storage,
manipulation, and display of images using computers. It has a wide range of applications in
various fields.
1. Computer-Aided Design (CAD)
Computer graphics is extensively used in CAD systems for designing and drafting.
It is used in architecture, mechanical engineering, electrical engineering, and civil engineering.
Designers can create 2D and 3D models of objects with high accuracy.
Examples include AutoCAD, CATIA, and SolidWorks.
2. Entertainment and Animation
Computer graphics plays a major role in movies, television, and gaming.
It is used to create animated films, cartoons, video games, and visual effects.
3D animation and VFX improve realism and viewer experience.
Examples include animated movies, video games, and virtual characters.
3. Education and Training
Computer graphics helps in interactive learning and simulation-based training.
It is used in virtual classrooms, e-learning platforms, and training simulators.
Flight simulators and driving simulators are common examples.
It makes learning more visual and easier to understand.
4. Medical Applications
Computer graphics is used for medical imaging and diagnosis.
It helps visualize CT scans, MRI scans, X-rays, and ultrasound images.
Doctors use graphics for surgical planning and medical training.
It improves accuracy in diagnosis and treatment.
5. Scientific Visualization
Computer graphics is used to visualize complex scientific data.
It helps scientists understand large data sets through graphs and simulations.
Applications include weather forecasting, molecular modeling, and space research.
6. Graphical User Interface (GUI)
GUI is one of the most common applications of computer graphics.
It uses windows, icons, menus, and buttons to interact with users.
Operating systems and mobile applications use GUI for user-friendly interaction.
7. Business and Data Visualization
Computer graphics is used to present business data effectively.
Charts, graphs, dashboards, and reports are created using graphics.
It helps in decision-making and data analysis.
8. Virtual Reality (VR) and Augmented Reality (AR)
Computer graphics forms the backbone of VR and AR technologies.
It is used in gaming, training simulations, virtual tours, and architectural walkthroughs.
These technologies provide immersive user experiences.
9. Image Processing and Digital Art
Computer graphics is used for editing, enhancing, and restoring images.
It is widely used in photography, digital painting, and graphic design.
Examples include Photoshop and GIMP.
10. Geographic Information Systems (GIS)
Computer graphics is used to represent and analyze geographical data.
It is used in map generation, satellite image processing, and urban planning.

VIDEO DISPLAY DEVICES


Video display devices are the primary output devices in a graphics system, responsible for visually
presenting information generated by a computer. These are generally referred to as video
monitors or Visual Display Units (VDUs).
The Main Types Of Display Devices Studied In Computer Graphics Include
CRT
Raster Scan Display
Random Scan Display
Color CRT Monitor
Direct View Storage Tubes
Flat Panel Display
Liquid Crystal Display
3 D Viewing Devices
Stereoscopic And Virtual Reality Systems

REFRESH CATHODE RAY TUBES


The Cathode Ray Tube (CRT) was the dominant display technology for decades, used in early
television sets, oscilloscopes, and computer monitors. It is a large, sealed glass vacuum tube that
uses an electron beam to create images on a phosphorescent screen.

Key Components of a CRT

The basic CRT mechanism involves several core components:


Electron Gun: Located at the back of the tube, this component generates a high-speed stream
of electrons (cathode rays) by heating a cathode filament.
Focusing System: An anode assembly helps narrow the stream of electrons into a fine,
focused beam that hits a precise spot on the screen.
Deflection System: This system uses either electrostatic fields (charged metal plates) or magnetic
fields (deflection coils) to steer the electron beam horizontally and vertically across the screen.
Magnetic deflection was commonly used in larger devices like TVs and monitors.
Phosphor Screen: The inner surface of the front glass screen is coated with a phosphorescent
material. When the kinetic energy of the electrons hits the phosphor, the material becomes
excited and emits visible light at that specific location.
Vacuum Tube: The entire process occurs within a vacuum to prevent the electrons from colliding
with air molecules and scattering.
How a CRT Works
Emission: The electron gun emits electrons.
Acceleration and Focusing: High voltages draw the electrons forward and focus them into a
narrow beam.
Deflection: The beam is rapidly steered across the screen by the deflection system.
Illumination: The beam strikes the phosphor coating, causing it to glow and produce a spot of
light.
Persistence: The phosphor continues to glow for a very short period (persistence) after the beam
moves away, which necessitates a rapid and repeated "refresh" rate to maintain a stable image
without flicker.

RASTER SCAN DISPLAY


A raster scan display is a display technology that produces an image by sweeping an electron
beam across the screen in a systematic pattern, one line at a time, from top to bottom.
Working Principle of Raster Scan System
 The electron beam starts at the top-left corner of the screen
 It moves horizontally from left to right, lighting pixels (scan line)
A scan line is a single horizontal line of pixels on the display screen. In raster graphics, the image is
displayed by scanning the screen line by line, and each of these horizontal rows is called a scan
line.
 After completing one line, the beam returns to the left called horizontal retrace.
Horizontal retrace is the quick movement of the scanning beam from the end of one scan line
(right side) back to the beginning of the next scan line (left side).
 The beam moves down to the next line and repeats the process.
 After completing all scan lines, the beam returns to the top called vertical retrace.
Vertical retrace is the movement of the scanning beam from the bottom-right corner of the screen
back to the top-left corner to start a new frame.
 This process is repeated continuously
ARCHITECTURE OF RASTER SCAN SYSTEM

1. CPU (Central Processing Unit)


The CPU controls the overall operation of the computer system. The main functions are
o Executes the application program
o Generates graphics commands (draw line, draw polygon, etc.)
o Sends data and instructions to system memory and video controller
2. System Memory
System memory stores Application programs and Graphics data.
3. Video Controller (Display Controller)
 The video controller is responsible for displaying the image on the monitor and Sends the
processed signals to the monitor. The main functions are
o Reads pixel data from system memory
o Converts digital pixel values into video signals
o Controls the timing of raster scanning
 It continuously refreshes the screen to avoid flicker.
Flickering in display technology refers to the rapid and continuous fluctuation in screen
brightness that creates an unstable and distracting visual effect.

VIDEO CONTROLLER
The raster scan generator controls the scanning process of the display system by generating
the timing signals required for horizontal and vertical scanning, ensuring that the screen is
scanned from left to right and top to bottom.
The X register stores the horizontal coordinate of the current pixel and increments as the scanning
beam moves along a scan line, resetting to zero at the end of each line, while the Y register stores
the vertical coordinate and increments when the beam moves to the next scan line. The values from
the X and Y registers are combined by the memory address generator to produce the exact address
of the corresponding pixel in the frame buffer, usually calculated as the product of the Y coordinate
and screen width plus the X coordinate. The frame buffer stores pixel information for the entire
screen, with each memory location representing one pixel and holding either intensity values for
grayscale displays or RGB values for color displays. The pixel register temporarily stores the pixel
data read from the frame buffer and passes this information to the display circuitry. Finally, the
intensity output controls the brightness or color of the pixel on the screen, determining how each
pixel appears during the raster scanning process.
4. Monitor
The monitor displays the final output.
5. System Bus
The system bus connects all components such as CPU, system memory, video controller.
And I/O devices for Transfer data, address signals and control signals.
6. I/O Devices
 Input and output devices used for interaction.
 Examples:
o Keyboard
o Mouse
o Light pen
o Joystick

Raster scan display processor


Advantages of Raster Scan System
 Can display complex and realistic images
 Supports filled areas, shading, and colors
 Suitable for photographs and animations
 Widely supported by modern hardware
Disadvantages of Raster Scan System
 Requires large memory for frame buffer
 Flickering at low refresh rates
 Lower precision for line drawings compared to vector display

RANDOM SCAN DISPLAY

A random scan display, also known as a vector display or stroke-writing display.

A random scan display is a computer graphics technology that produces images by drawing lines
and shapes directly onto the screen, rather than scanning the entire screen in a fixed, pixel-by-pixel
pattern like a raster scan display.

In a random scan display, the electron beam is deflected only to the required positions to draw the
picture. The beam moves directly from one line segment to another based on the drawing
instructions stored in memory. Since the phosphor on the screen fades quickly, the image must be
redrawn repeatedly to remain visible.

Components of Random Scan Display

1. CPU (Central Processing Unit)


The CPU executes the application program and sends graphics commands to the system.
2. System Memory
Stores the application program, graphics package, and the display file (list of drawing
commands).
3. Display Processor
Reads the display file and converts the drawing commands into electrical signals to control
the beam movement.
4. Monitor (CRT Display)
Displays the image by drawing straight lines directly on the screen.

Advantages of Random Scan Display


 High quality and smooth line drawings
 Requires less memory compared to raster scan
 No aliasing effect
 Ideal for line-based graphics

Disadvantages of Random Scan Display


 Not suitable for filled images or shaded objects
 Complex pictures cause flickering
 Limited color capability
 Expensive hardware

LINE DRAWING ALGORITHM

A line drawing algorithm is used to determine which pixels should be selected to represent a
straight line between two given points on a raster display.
The two most common and fundamental algorithms are:
• DDA (Digital Differential Analyzer) Algorithm
• Bresenham's Line Algorithm

DDA (Digital Differential Analyzer) Algorithm

The Digital Differential Analyzer (DDA) algorithm is a line drawing algorithm used in computer
graphics to draw a straight line between two given points on a raster display. It works by
incrementally calculating intermediate points between the start and end points using floating-
point arithmetic.

A straight line between two points (x1,y1) and (x2,y2) is drawn by calculating successive points using
the slope of the line and plotting the nearest pixel.

ALGORITHM
1. Read the endpoints (x1,y1) and (x2,y2)
2. Compute: dx=x2−x1 and dy=y2−y1
3. Find the number of steps:
Steps = max(∣dx∣,∣dy∣)
4. Compute slop:

5. Calculate xnext and ynext


Case 1
If m<1
Xnext = x+1 and Ynext = y+m
Case 2
If m>1
Xnext = x+1/m and Ynext = y+1
Case 3
If m==1
Xnext =x+1 and Ynext = y+1
Plot points as rounded values of Xnext and Ynext
6. Repeat the step 5 to find all the X and Y coordinates till steps(Steps = max(∣dx∣,∣dy∣)).
Disadvantages of DDA Line Drawing Algorithm

1. Uses Floating-Point Arithmetic:


o DDA requires calculating fractional increments (X_inc, Y_inc) and rounding, which
makes it slower than integer-based algorithms like Bresenham’s line algorithm.
2. Rounding Errors:
o Continuous rounding can accumulate small errors, which might slightly affect the
line accuracy over long distances.
3. Less Efficient for Hardware Implementation:
o Because it relies on floating-point calculations, DDA is not ideal for older or simpler
graphics hardware that prefers integer operations.

BRESENHAM'S LINE ALGORITHM

The Bresenham's line drawing algorithm is a highly efficient and accurate method for drawing
lines on a raster display because it uses only incremental integer calculations, thereby avoiding slow
floating-point arithmetic and rounding errors found in algorithms like the DDA.

ALGORITHM

Step 1 : Input Endpoints

Step 2: calculate dx, dy

dx=x2−x1 and dy=y2−y1

Step 3: calculate decision parameter

Pk = 2 dy - dx

The decision parameter helps the algorithm decide which pixel to plot next so that the plotted
line is closest to the true mathematical line.

Step 4: Suppose current point is (xk,yk) then find the next point is, (xk+1,yk+1), and the next
parameter

Step 5: repeat step 4 until end point is reached.


MIDPOINT CIRCLE GENERATION ALGORITHM

The Mid-Point Circle Drawing Algorithm is a raster graphics algorithm used to draw a circle
efficiently on a pixel-based display.
Basic Idea
A circle with center (xc,yc) and radius r is defined by:
x2+y2=r2
The algorithm determines the next pixel by checking the mid-point between two possible pixels
and deciding which one is closer to the circle.

ALGORITHM

1. Input: Circle center (xc,yc) and radius r


2. Start from point (0,r)
3. Compute initial decision parameter:

4. Update X coordinate, Y coordinate and parameter.

5. Use symmetry to plot all 8 octants.


BRESENHAM’S CIRCLE DRAWING ALGORITHM

Bresenham’s circle drawing algorithm is an efficient raster algorithm used to draw a circle using
only integer arithmetic. It exploits the 8-way symmetry of a circle to reduce computation.

ALGORITHM

1. Input center (xc,yc) and radius r.


2. Initialize:

X = 0, y = r ,Pk = 3−2r

3. While x≤y
Plot the 8 way symmetric points and then update x coordinate , y coordinate and
parameter.

4. Stop when x>y.

You might also like