SlideShare a Scribd company logo
1 of 7
Scan Conversion

The process of representing continuous
  graphics object as a collection of discrete
  pixels is called Scan Conversion.
For e.g a line is defined by its two end pts &
  the line equation, where as a circle is
  defined by its radius, center position &
  circle equation.
It is the responsibility of graphics system or
    the application program to convert each
    primitive from its geometric definition into
    a set of pixels that make up the primitive in
    image space. This conversion task is
    generally referred to as a scan conversion
    or rasterization.
In case of line, it can be possible that any
    pixel may have any floating value like
    (2.7,5) which will not be considered by the
    system.
Therefore, the process of making these
   coordinate according to system’s
   assumption i.e (3,5) to plot the pixel is scan
   conversion.
Points to be remember:-
1.) All the objects should be drawn with
   constant brightness.
2.) Object should be independent of length &
    orientation.
Scan converting a Point:-
A mathematical point (x,y) where x & y are
   real numbers within an image area, needs
   to be scan-converted to a pixel at location
   (x’,y’).
This may be done by making x’& y’ to be the
   integer part of x & y.
x’= Floor(x) and y’= Floor(y)
Floor is a function that returns the largest
   integer that is less than or equal to the
   argument.
The origin is at lower left corner of the pixel
  grid. All points that satisfy x’< x <x’+1 &
   y’<y <y’+1are mapped to pixel (x’,y’).
For e.g P1(1.7,0.8) is represented by pixel
  (1,0) P2(2.2,1.3) and P3(2.8,1.9) are both
  represented by pixel (2,1).

       2

       1
        0
        0,0   0   1   2
Another approach is to scan convert (x,y) by
  making x’ = Floor(x + 0.5) and y’ =
  Floor(y+0.5). This essentially places the
  origin of the coordinate system for (x,y) at
  the center of pixel(0,0). All point that
  satisfy x’-0.5<x<x’+0.5 & y’-
  0.5<y<y’+0.5
  are mapped to (x’,y’).This means that
  points P1 and P2 are now both represented
  by pixel (2,1) whereas point P3 is
  represented by pixel (3,2).
2                       P3
                   P2
1
              P1

0   0,0

     0    1   2         3

More Related Content

What's hot

Video display devices
Video display devicesVideo display devices
Video display devicesMohd Arif
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformationAnkit Garg
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithmPooja Dixit
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphicsSafayet Hossain
 
Overview of the graphics system
Overview of the graphics systemOverview of the graphics system
Overview of the graphics systemKamal Acharya
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
Computer graphics - bresenham line drawing algorithm
Computer graphics - bresenham line drawing algorithmComputer graphics - bresenham line drawing algorithm
Computer graphics - bresenham line drawing algorithmRuchi Maurya
 
Composite transformations
Composite transformationsComposite transformations
Composite transformationsMohd Arif
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithmnehrurevathy
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 
Log Transformation in Image Processing with Example
Log Transformation in Image Processing with ExampleLog Transformation in Image Processing with Example
Log Transformation in Image Processing with ExampleMustak Ahmmed
 
Raster scan systems with video controller and display processor
Raster scan systems with video controller and display processorRaster scan systems with video controller and display processor
Raster scan systems with video controller and display processorhemanth kumar
 
Graphics software and standards
Graphics software and standardsGraphics software and standards
Graphics software and standardsMani Kanth
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewingMohd Arif
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation pptGichelle Amon
 

What's hot (20)

Video display devices
Video display devicesVideo display devices
Video display devices
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
 
Dda algorithm
Dda algorithmDda algorithm
Dda algorithm
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphics
 
Overview of the graphics system
Overview of the graphics systemOverview of the graphics system
Overview of the graphics system
 
BRESENHAM’S LINE DRAWING ALGORITHM
BRESENHAM’S  LINE DRAWING ALGORITHMBRESENHAM’S  LINE DRAWING ALGORITHM
BRESENHAM’S LINE DRAWING ALGORITHM
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
Computer graphics - bresenham line drawing algorithm
Computer graphics - bresenham line drawing algorithmComputer graphics - bresenham line drawing algorithm
Computer graphics - bresenham line drawing algorithm
 
Composite transformations
Composite transformationsComposite transformations
Composite transformations
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
Log Transformation in Image Processing with Example
Log Transformation in Image Processing with ExampleLog Transformation in Image Processing with Example
Log Transformation in Image Processing with Example
 
Raster scan systems with video controller and display processor
Raster scan systems with video controller and display processorRaster scan systems with video controller and display processor
Raster scan systems with video controller and display processor
 
Graphics software and standards
Graphics software and standardsGraphics software and standards
Graphics software and standards
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewing
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 

Similar to Intro to scan conversion

Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2SanthiNivas
 
Lines and curves algorithms
Lines and curves algorithmsLines and curves algorithms
Lines and curves algorithmsMohammad Sadiq
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniyaTutorialsDuniya.com
 
Unit 2
Unit 2Unit 2
Unit 2ypnrao
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output PrimitivesPrathimaBaliga
 
Chapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxChapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxKokebe2
 
Computer graphic
Computer graphicComputer graphic
Computer graphicnusratema1
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cppAlamgir Hossain
 
2D Transformation
2D Transformation2D Transformation
2D TransformationShahDhruv21
 
Unit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsUnit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsAmol Gaikwad
 
Computer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.pptComputer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.pptAliZaib71
 
2d-transformation
2d-transformation2d-transformation
2d-transformationPooja Dixit
 
2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)Amit Kapoor
 

Similar to Intro to scan conversion (20)

Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
Lines and curves algorithms
Lines and curves algorithmsLines and curves algorithms
Lines and curves algorithms
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniya
 
Unit 2
Unit 2Unit 2
Unit 2
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output Primitives
 
Chapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxChapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptx
 
Computer graphics notes
Computer graphics notesComputer graphics notes
Computer graphics notes
 
CG-Lecture3.pptx
CG-Lecture3.pptxCG-Lecture3.pptx
CG-Lecture3.pptx
 
Computer graphic
Computer graphicComputer graphic
Computer graphic
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
 
Computer graphics notes watermark
Computer graphics notes watermarkComputer graphics notes watermark
Computer graphics notes watermark
 
10994479.ppt
10994479.ppt10994479.ppt
10994479.ppt
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
Unit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithmsUnit-2 raster scan graphics,line,circle and polygon algorithms
Unit-2 raster scan graphics,line,circle and polygon algorithms
 
Unit 3
Unit 3Unit 3
Unit 3
 
Computer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.pptComputer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.ppt
 
2d-transformation
2d-transformation2d-transformation
2d-transformation
 
2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)
 
N018219199
N018219199N018219199
N018219199
 

More from Mohd Arif

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcpMohd Arif
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarpMohd Arif
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
Project identification
Project identificationProject identification
Project identificationMohd Arif
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniquesMohd Arif
 
Presentation
PresentationPresentation
PresentationMohd Arif
 
Pointers in c
Pointers in cPointers in c
Pointers in cMohd Arif
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peerMohd Arif
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systemsMohd Arif
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdpMohd Arif
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgetingMohd Arif
 
Network management
Network managementNetwork management
Network managementMohd Arif
 
Networing basics
Networing basicsNetworing basics
Networing basicsMohd Arif
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformMohd Arif
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and sslMohd Arif
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psecMohd Arif
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardwareMohd Arif
 

More from Mohd Arif (20)

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcp
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Project identification
Project identificationProject identification
Project identification
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniques
 
Presentation
PresentationPresentation
Presentation
 
Pointers in c
Pointers in cPointers in c
Pointers in c
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peer
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systems
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdp
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgeting
 
Network management
Network managementNetwork management
Network management
 
Networing basics
Networing basicsNetworing basics
Networing basics
 
Loaders
LoadersLoaders
Loaders
 
Lists
ListsLists
Lists
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platform
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psec
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardware
 
Heap sort
Heap sortHeap sort
Heap sort
 

Intro to scan conversion

  • 1. Scan Conversion The process of representing continuous graphics object as a collection of discrete pixels is called Scan Conversion. For e.g a line is defined by its two end pts & the line equation, where as a circle is defined by its radius, center position & circle equation.
  • 2. It is the responsibility of graphics system or the application program to convert each primitive from its geometric definition into a set of pixels that make up the primitive in image space. This conversion task is generally referred to as a scan conversion or rasterization. In case of line, it can be possible that any pixel may have any floating value like (2.7,5) which will not be considered by the system.
  • 3. Therefore, the process of making these coordinate according to system’s assumption i.e (3,5) to plot the pixel is scan conversion. Points to be remember:- 1.) All the objects should be drawn with constant brightness. 2.) Object should be independent of length & orientation.
  • 4. Scan converting a Point:- A mathematical point (x,y) where x & y are real numbers within an image area, needs to be scan-converted to a pixel at location (x’,y’). This may be done by making x’& y’ to be the integer part of x & y. x’= Floor(x) and y’= Floor(y) Floor is a function that returns the largest integer that is less than or equal to the argument.
  • 5. The origin is at lower left corner of the pixel grid. All points that satisfy x’< x <x’+1 & y’<y <y’+1are mapped to pixel (x’,y’). For e.g P1(1.7,0.8) is represented by pixel (1,0) P2(2.2,1.3) and P3(2.8,1.9) are both represented by pixel (2,1). 2 1 0 0,0 0 1 2
  • 6. Another approach is to scan convert (x,y) by making x’ = Floor(x + 0.5) and y’ = Floor(y+0.5). This essentially places the origin of the coordinate system for (x,y) at the center of pixel(0,0). All point that satisfy x’-0.5<x<x’+0.5 & y’- 0.5<y<y’+0.5 are mapped to (x’,y’).This means that points P1 and P2 are now both represented by pixel (2,1) whereas point P3 is represented by pixel (3,2).
  • 7. 2 P3 P2 1 P1 0 0,0 0 1 2 3