CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
CSE4203: Computer Graphics Chapter 3 Raster Images
Transcript of CSE4203: Computer Graphics Chapter 3 Raster Images
![Page 1: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/1.jpg)
CSE4203: Computer Graphics
Chapter – 3
Raster Images
Mohammad Imrul Jubair
M. I. Jubair 1
![Page 2: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/2.jpg)
Outline
• Raster and Raster Images
• Display Devices
• Pixel Values
• RGB Color
• Alpha Compositing
M. I. Jubair 2
![Page 3: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/3.jpg)
Credit
M. I. Jubair 3
CS4620: Introduction to Computer GraphicsCornell UniversityInstructor: Steve Marschnerhttp://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 4: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/4.jpg)
Raster (1/1)
• Most computer graphics images are presented on raster display.
• i.e. television
– has rectangular array of small light-emitting pixels
• individually set to different colors to create desired image.
M. I. Jubair 4Image Source: Internet
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image source: https://commons.wikimedia.org/wiki/File:Bresenham_line.png
![Page 5: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/5.jpg)
Storing Images (1/2)
• Raster Image:
– used to store and process images, as rasters are common in devices
M. I. Jubair
• simply a 2D array
• stores the pixel value for each pixel
• usually a color stored as three numbers (r, g, b)
Image Source: Internet
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image source: https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/what-is-raster-data.htm
![Page 6: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/6.jpg)
Storing Images (2/2)
• Vector Image:– storing descriptions of shapes
– areas of color bounded by lines or curves
– no reference to any pixel grid.
M. I. Jubair 6
• Need to store instructions for displaying the image rather than the pixels needed to display it.
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image source: https://signalizenj.wordpress.com/2015/01/29/vector-vs-raster/
![Page 7: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/7.jpg)
Storing Images (2/2)
M. I. Jubair 7
• Vector Image:– Example
![Page 8: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/8.jpg)
Storing Images (2/2)
• Vector Image:
M. I. Jubair 8
• Q: Advantage/ Disadvantage?
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image source: https://signalizenj.wordpress.com/2015/01/29/vector-vs-raster/
![Page 9: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/9.jpg)
Display Devices (1/1)
• Transmissive Displays:
– require a light source to illuminate them
– backlight behind the array
• i.e. in a projector, a lamp emits light projected onto the screen after passing through the array.
• Emissive Display:
– it is its own light source.
M. I. Jubair 9
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 10: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/10.jpg)
Emissive Displays (1/2)
• Emissive Displays:• Example: light-emitting diode (LED)
– Each pixel is composed of one or more LEDs (semiconductor devices)• emit light with intensity ↔ electrical current passing through them
M. I. Jubair 10
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 11: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/11.jpg)
• Sub-pixel:
―Pixels divided into three independently controlled sub-pixels (R, G, B)
• each with own LED (different materials)
• emit light of different colors
Emissive Displays (2/2)
M. I. Jubair 11
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 12: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/12.jpg)
– Molecular structure of liquid crystal rotates the polarization of light that passes through it
– LCDs also have sub-pixels.
Transmissive Displays (1/3)
M. I. Jubair 12
• Transmissive Displays:• Example: light crystal
display (LCD)
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 13: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/13.jpg)
Transmissive Displays (2/3)
M. I. Jubair 13
• Degree of rotation ↔ applied voltage
OFF state
ON state
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 14: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/14.jpg)
youtu.be/k7xGQKpQAWw?t=77
M. I. Jubair 14
Transmissive Displays (3/3)
![Page 15: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/15.jpg)
Pixel Values (1/1)
• Coordinate system for raster screen:– Convention:
M. I. Jubair 15
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
![Page 16: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/16.jpg)
RGB Color (1/1)
M. I. Jubair 16
black = (0, 0, 0), red = (1, 0, 0), green = (0, 1, 0),
blue = (0, 0, 1), yellow = (1, 1, 0), magenta = (1, 0, 1),
cyan = (0, 1, 1), white = (1, 1, 1)
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image Source: https://www.geeksforgeeks.org/computer-graphics-the-rgb-color-model/
![Page 17: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/17.jpg)
Alpha Compositing (1/3)
M. I. Jubair
• Partially overwriting the contents of a pixel.
– Where we have a background and want to insert a foreground image over it.
• Transparent
• Opaque (not transparent)
• Partially Transparent
Image Source: Internet
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image source: http://www.graphicalweb.org/2005/papers/abstractsvgopen/index.html
14
![Page 18: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/18.jpg)
Alpha Compositing (2/3)
M. I. Jubair 18
• foreground and background must be blended.
c = cf + (1 − )cb
Credit: Fundamentals of Computer Graphics 3rd Edition by Peter Shirley, Steve Marschner | http://www.cs.cornell.edu/courses/cs4620/2019fa/
Image source: http://www.graphicalweb.org/2005/papers/abstractsvgopen/index.html
![Page 19: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/19.jpg)
Additional Reading
• 3.1.2: Hardcopy Devices.
• 3.2.1: Pixel formats with typical applications.
• 3.2.2: Monitor Intensities and Gamma.
• Frequently Asked Questions
M. I. Jubair 19
![Page 20: CSE4203: Computer Graphics Chapter 3 Raster Images](https://reader030.fdocuments.in/reader030/viewer/2022012623/61a26b9b5dc5141f4124da9f/html5/thumbnails/20.jpg)
Thank You
M. I. Jubair 20