Hank Childs, University of Oregon

Slides:



Advertisements
Similar presentations
CSE Lecture 6 – Complex Numbers & Images
Advertisements

ISYS 3074 Graphics File Formats File formats have developed with applications. At least 50 currently in use. Examples include: GIF, JPEG, TIFF, BMP, DIB,
Eleven colors and rasters. Color objects Meta represents colors with color objects You can create a color by saying: [color r g b] r: amount of red (0-255)
Graphics in the web Digital Media: Communication and Design
How Images are Represented Bitmap images (Dots used to draw the image) Monochrome images 8 bit grey scale images 24 bit colour Colour lookup tables Vector.
Bitmapped Images 27 th November 2014 With Mrs
Data starts with width and height of image Then an array of pixel values (colors) The number of elements in this array is width times height Colors can.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Images and 2D Graphics COMP # 16.
WEB GRAPHICS. The Pixel Computer displays are comprised of rows and columns of pixels. Pixels are indivisible. Some common screen resolutions are:, 600.
Hank Childs, University of Oregon April 24 th, 2015 CIS 330: _ _ _ _ ______ _ _____ / / / /___ (_) __ ____ _____ ____/ / / ____/ _/_/ ____/__ __ / / /
Digital Images Chapter 8, Exploring the Digital Domain.
Image Processing & Perception Sec 9-11 Web Design.
Image Storage Bitmapped Graphics – in which an image is represented as a collection of dots Vector Graphics – in which an image is represented as a set.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Images Data Representation. Objectives  Understand the terms bitmap & pixel  Understand how bitmap images are stored using binary in a computer system.
Photoshop & Fireworks Helps & Hints Visual Design for the Web March 2007.
1 Ethics of Computing MONT 113G, Spring 2012 Session 10 HTML Tables Graphics on the Web.
Hank Childs, University of Oregon October 3, 2014 CIS 441/541: Intro to Computer Graphics Lecture 2: The Scanline Algorithm.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
44212: Web-site Development Optimising Images for Web-pages Ian Perry Room:C49 Extension:7287
ADOBE PHOTOSHOP VECTOR VS RASTER. Pixel A pixel is the fundamental unit of an image in Photoshop. It is a small square block of color. An image often.
(59003)
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
VTE File Creation By: Ricardo Veguilla Vazjier Rosario WALSAIP July 2008.
CS 101 – Sept. 14 Review Huffman code Image representation –B/W and color schemes –File size issues.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
Efficient Game Graphics From Flash MX 2004 Game Design Demystified.
Hank Childs, University of Oregon April 13 th, 2016 CIS 330: _ _ _ _ ______ _ _____ / / / /___ (_) __ ____ _____ ____/ / / ____/ _/_/ ____/__ __ / / /
Hank Childs, University of Oregon April “29 th”, 2015 CIS 330: _ _ _ _ ______ _ _____ / / / /___ (_) __ ____ _____ ____/ / / ____/ _/_/ ____/__ __ / /
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
Multidimensional Arrays
Representation of image data
DESKTOP PUBLISHING - GRAPHICS -
Images Data Representation.
Graphics 1 Graphics 2 Color 2 I Spy 1pt 1 pt 1 pt 1pt 1 pt 2 pt 2 pt
Data Representation Images.
Images and 2D Graphics COMP
Representing images.
Sampling, Quantization, Color Models & Indexed Color
Image Processing CS177.
Binary Representation in Audio and Images
Computer Science Higher
The Colour of Light: Additive colour theory.
Chapter 3 Graphics and Image Data Representations
Image Processing & Perception
Digital Image Formation
Hank Childs, University of Oregon
Reading Netpbm Images.
DIP 9 65 Original 210 Eye Zoomed.
Week 13 - Monday CS 121.
COMS 161 Introduction to Computing
Colors.
Information in Computers
Representing Images 2.6 – Data Representation.
MED 2001 Advanced Media Production
Nuts and Bolts of Digital Imaging
Fourth Year – Software Engineering
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Colors Computers build colors from Red, Green, and Blue; not Red, Blue, and Yellow. RGB = Red Green Blue Creating Colors Red + Blue = Purple No Red, No.
What Color is it?.
Computer Systems Nat 4.5 Computing Science Data Representation
Basic Concepts of Digital Imaging
timo. fi (59003) www. biocenter
Visuals are analog signals...
Non-numeric Data Representation
Binary pixel challenge 1
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
WJEC GCSE Computer Science
Presentation transcript:

Hank Childs, University of Oregon      _______.___________..______       __    __    ______ .___________. __    __  .______       _______     _______.     /       |           ||   _  \     |  |  |  |  /      ||           ||  |  |  | |   _  \     |   ____|   /       |    |   (----`---|  |----`|  |_)  |    |  |  |  | |  ,----'`---|  |----`|  |  |  | |  |_)  |    |  |__     |   (----`     \   \       |  |     |      /     |  |  |  | |  |         |  |     |  |  |  | |      /     |   __|     \   \     .----)   |      |  |     |  |\  \----.|  `--'  | |  `----.    |  |     |  `--'  | |  |\  \----.|  |____.----)   |    |_______/       |__|     | _| `._____| \______/   \______|    |__|      \______/  | _| `._____||_______|_______/     Lecture 11: Images Hank Childs, University of Oregon October 27, 2018

Background on Images Definitions: Image: 2D array of pixels Pixel: A minute area of illumination on a display screen, one of many from which an image is composed. Pixels are made up of three colors: Red, Green, Blue (RGB) Amount of each color scored from 0 to 1 100% Red + 100% Green + 0% Blue = Yellow 100% Red + 0% Green + 100 %Blue = Purple 0% Red + 100% Green + 100% Blue = Cyan 100% Red + 100% Blue + 100% Green = White

Background on Images Colors are 0->1, but how much resolution is needed? How many bits should you use to represent the color? Can your eye tell the difference between 8 bits and 32 bits?  No. Human eye can distinguish ~10M colors. 8bits * 3 colors = 24 bits = ~16M colors. 1 byte  unsigned char in C  0 to 255 Red = (255,0,0) Green = (0,255,0) Blue = (0,0,255)

How to organize a struct for an Image (i.e., 3D arrays) 3D array: width * height * 3 color channels Color: Choice 1: RGB struct (*) Choice 2: just 3 unsigned chars Pixels: Choice 1: pointer per row Choice 2: just index it (*)

Many image file formats PNG GIF TIFF JPEG PNM

Tradeoffs Most image formats are hard to read and write So people use libraries to encapsulate reading and writing These libraries are problematic for this class Some will strike out with installing these Different for different platforms Differences in storing them may lead to problems later

What is PNM? PNM is part of the Netpbm library http://netpbm.sourceforge.net/doc//pnm.html Key advantage: very easy to write and read Key disadvantage: not supported by many tools However: package that can convert PNM to PNG, JPEG, etc., is easy to work with.

PNM Format There are actually many We will always use “P6” Binary starts here

sscanf like printf, but it parses from a string sscanf(str, "%s\n%d %d\n%d\n", magicNum, &width, &height, &maxval); assuming str has been read in previously as: str=“P6\n1000 1000\n255\n”; sscanf would give: magicNum = “P6”, width = 1000, height = 1000, maxval = 255

Project 2G Prompt posted today, Oct 27th Due on Saturday November 3rd Tasks: Struct to contain image Read image from file (simplified format) Write image to file (simplified format) 2 functions to modify image