CSE1710. Big Picture. Reminder

Similar documents
CSE1710. Big Picture. Reminder

Brief Introduction to Vision and Images

Color & Graphics. Color & Vision. The complete display system is: We'll talk about: Model Frame Buffer Screen Eye Brain

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

Digital Image Processing. Lecture # 8 Color Processing

INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET

Image and video processing (EBU723U) Colour Images. Dr. Yi-Zhe Song

Images and Colour COSC342. Lecture 2 2 March 2015

Visual Perception. human perception display devices. CS Visual Perception

Visual Perception. Jeff Avery

Bettina Selig. Centre for Image Analysis. Swedish University of Agricultural Sciences Uppsala University

Multimedia Systems Color Space Mahdi Amiri March 2012 Sharif University of Technology

Mahdi Amiri. March Sharif University of Technology

Interactive Computer Graphics

Capturing Light in man and machine

Graphics and Image Processing Basics

Capturing Light in man and machine

Prof. Feng Liu. Winter /09/2017

Image Perception & 2D Images

Colors in Images & Video

Capturing Light in man and machine

Figure 1: Energy Distributions for light

LECTURE 07 COLORS IN IMAGES & VIDEO

Human Vision, Color and Basic Image Processing

Colour. Cunliffe & Elliott, Chapter 8 Chapman & Chapman, Digital Multimedia, Chapter 5. Autumn 2016 University of Stirling

Oversubscription. Sorry, not fixed yet. We ll let you know as soon as we can.

Color Image Processing

Introduction & Colour

Colour. Why/How do we perceive colours? Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!

The human visual system

Waitlist. We ll let you know as soon as we can. Biggest issue is TAs

Colour. Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!) Colour Lecture!

III: Vision. Objectives:

USE OF COLOR IN REMOTE SENSING

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

IMAGES AND COLOR. N. C. State University. CSC557 Multimedia Computing and Networking. Fall Lecture # 10

CS 565 Computer Vision. Nazar Khan PUCIT Lecture 4: Colour

Sampling and Reconstruction. Today: Color Theory. Color Theory COMP575

COLOR and the human response to light

Human Visual System. Digital Image Processing. Digital Image Fundamentals. Structure Of The Human Eye. Blind-Spot Experiment.

Digital Image Processing

IMAGE PROCESSING >COLOR SPACES UTRECHT UNIVERSITY RONALD POPPE

Astronomy and Image Processing. Many thanks to Professor Kate Whitaker in the physics department for her help

Computer Graphics: Graphics Output Primitives Primitives Attributes

Image Processing. Michael Kazhdan ( /657) HB Ch FvDFH Ch. 13.1

Unit 8: Color Image Processing

Colors in images. Color spaces, perception, mixing, printing, manipulating...

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Digital Image Processing

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

Color Image Processing

CS 544 Human Abilities

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Digital Image Processing Color Models &Processing

Chapter 3 Part 2 Color image processing

Capturing Light in man and machine

Technology and digital images

4/9/2015. Simple Graphics and Image Processing. Simple Graphics. Overview of Turtle Graphics (continued) Overview of Turtle Graphics

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

Additive Color Synthesis

TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES

Digital Image Processing (DIP)

Lecture 8. Color Image Processing

Wireless Communication

Digital Image Processing

Capturing Light in man and machine. Some figures from Steve Seitz, Steve Palmer, Paul Debevec, and Gonzalez et al.

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Visual Perception. Overview. The Eye. Information Processing by Human Observer

Digital Image Fundamentals. Digital Image Processing. Human Visual System. Contents. Structure Of The Human Eye (cont.) Structure Of The Human Eye

Introduction. The Spectral Basis for Color

Digital Image Processing

Exercise NMCGJ: Image Processing

COLOR. and the human response to light

University of British Columbia CPSC 414 Computer Graphics

Capturing Light in man and machine

Color Image Processing. Gonzales & Woods: Chapter 6

2. Color spaces Introduction The RGB color space

Color Perception and Applications. Penny Rheingans University of Maryland Baltimore County. Overview

Digital Image Processing

Color and perception Christian Miller CS Fall 2011

Lecture 3: Grey and Color Image Processing

Color, Vision, & Perception. Outline

Images. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 38

CSCE 763: Digital Image Processing

The Science Seeing of process Digital Media. The Science of Digital Media Introduction

Review of concepts. What is a variable? Storage space to keep data used in our programs Variables have a name And also a type Example:

Prof. Feng Liu. Fall /02/2018

Color images C1 C2 C3

Introduction to Multimedia Computing

Overview of Human Cognition and its Impact on User Interface Design (Part 2)

VC 16/17 TP4 Colour and Noise

Reading. Foley, Computer graphics, Chapter 13. Optional. Color. Brian Wandell. Foundations of Vision. Sinauer Associates, Sunderland, MA 1995.

COLOR. Elements of color. Visible spectrum. The Human Visual System. The Fovea. There are three types of cones, S, M and L. r( λ)

Retina. Convergence. Early visual processing: retina & LGN. Visual Photoreptors: rods and cones. Visual Photoreptors: rods and cones.

MATH 5300 Lecture 3- Summary Date: May 12, 2008 By: Violeta Constantin

Using Color in Scientific Visualization

Colour (1) Graphics 2

DESIGN & DEVELOPMENT OF COLOR MATCHING ALGORITHM FOR IMAGE RETRIEVAL USING HISTOGRAM AND SEGMENTATION TECHNIQUES

Vision. The eye. Image formation. Eye defects & corrective lenses. Visual acuity. Colour vision. Lecture 3.5

Lecture 8. Human Information Processing (1) CENG 412-Human Factors in Engineering May

Transcription:

CSE1710 Click to edit Master Week text 10, styles Lecture 19 Second level Third level Fourth level Fifth level Fall 2013 Thursday, Nov 14, 2013 1 Big Picture For the next three class meetings, we will be covering Chapter 5 of the textbook. We will be using images to demonstrate the concepts of iterative and selection. Reminder On Thurs Nov 28/Fri Nov 29, we will have out final labtest. 2 1

Images Take good notes there is relatively little material in the textbook; most of the material will be provided in lecture 3 To work with images, we need to: 1. work with the file system 2. work with the operating system s window manager and the platform s graphics hardware 3. understand colour models and image representation formats 4. understand the services of the DigitalPicture and the Pixel classes 5. iterate and construct conditions REVIEW OF LECTURE12 4 4 2

A Code Segment, deconstructed VS 5 File pathnames are system dependent The file separator can be abstracted away as File.separator Windows Local File System (LFS): C:\USER\DOCS\LETTER.TXT! Windows Uniform Naming Convention (UNC) \\Server\Volume\File! Unix-like OS /home/user/docs/letter.txt! 6 6 3

The DigitalPicture class provides services to create and to manipulate digital pictures 7 7 The DigitalPicture class a little more info attributes are: filename : String (might be null) filenameextension : String (might be null) title : String width : int height : int bufferedimage : BufferedImage the BufferedImage object encapsulates all of the pixels the pixels are arranged in a rectangular grid! 8 8 4

A rectangular grid of pixels pixel a single point at a given coordinate that has specific colour attributes 9 9 A rectangular grid of pixels 10 10 5

A rectangular grid of pixels 11 11 A rectangular grid of pixels 12 12 6

A rectangular grid of pixels when the grid becomes large enough, the human eye ceases to see the pixels as individual 13 13 A rectangular grid of pixels pixel 14 14 7

The Rectangular Grid of Pixels each element has a (x,y) coordinate the convention is that (0,0) is in the upper left hand corner the x part of coordinate indicates the column the y part of the coordinate indicates the row in the door and down the stairs 15 15 The Rectangular Grid of Pixels the DigitalPicture class provides service to get all of the pixels from an instance of a DigitalPicture get a specific pixel from an instance of a DigitalPicture 16 16 8

The Rectangular Grid of Pixels thepixel.setcolor(new Color(255, 0. 0)); here we see the constructor for a instance of a object that encapsulates a particular colour that has RGB values of 255, 0, 0 17 17 Small digression: Two Color Models: RGB and HSV The RGB model is much more intuitive than HSV We ll first explain RGB, then show the mapping into HSV space First, we will discuss the basics of vision 18 18 9

The Retina the retina of the human eye is packed with photoreceptors the photoreceptors receive light stimulus via the lens of the eye 19 19 Areas of the Retina there are two types of photoreceptors in the retina! rods cones come in three types short-wavelength medium-wavelength long-wavelength the fovea is in the centre of the retina rods: none cones: completely and tightly packed the periphery of retina rods: more cones: fewer the proportion of rods to cones increase toward edge of retina! 20 20 10

Hue Hue corresponds to what we typically refer to as colour. It is determined by the light s wavelength Blue perceived by short-wavelength cones Green perceived by medium-wavelength cones Red perceived by long-wavelength cones 21 21 Specialized photoreceptors fovea specialized for acute detailed vision periphery does not provide acuity, but does detect change in scene (e.g., movement) something happened, but not what rods are attuned to a broad spectrum of light not specialized to particular wavelengths more sensitive than cones (the threshold is lower) 22 22 11

Colour is complicated perception based on 2 types of receptors (hue and intensity) our brain does more seeing than our eyes what we call colour is more accurately described as hue and brightness 23 23 A Key Fact the combination of red, blue and green is indistinguishable from white to the human eye this is exploited by computer displays 24 24 12

Pixels and Subpixels Many displays have a cluster of R, G, B sub-pixels for each pixel max intensity for R, G, B = seen as white min intensity for R, G, B = seen as black and other saturated colours 25 25 RGB Colour Space white cyan green yellow magenta blue red black 26 26 13

Color Red Green Blue Red 255 0 0 Green 0 255 0 Blue 0 0 255 Yellow 255 255 0 Cyan 0 255 255 Magenta 255 0 255 White 255 255 255 Black 0 0 0 27 27 Other cases if the RGB intensities are all the same this gets perceived as shade of grey if the RGB intensities are different then perception depends on relative difference between strongest and weakest intensities Bottom line: Given a colour out in the world (that we see), it can be very difficult to determine the corresponding RGB values typically easier to select via the HSV chooser 28 28 14

Hue-Saturation-Value (HSV) Model Each of hue, saturation, and brightness individually specified similarities to the way humans perceive and describe colour 29 29 Small digression: End of digression. back to regular programming 30 30 15

Let s talk about two forms of iteration! one form: built upon a boolean condition another form: built around a collection! 31 31 The Collection Form of Iteration! a collection is simply a bunch of elements, possibly in a particular order, but not necessarily the elements must have a type (e.g., int, Pixel, etc) a set is a collection in which duplicates are not permitted a list is a collection in which the elements are ordered an array is a specific kind of list collection, set, list : abstractions, not specific to Java array : a Java programming element 32 32 16

The Collection Form of Iteration!! for ( Type-of-Element e : Identifier-of-Collection ) { // here is the body of the loop } } FOR EXAMPLE: Pixel[] thepixels = mypict.getpixels(); // here we obtain an array 33 33 The Collection Form of Iteration! Pixel[] thepixels = mypict.getpixels(); for (Pixel p : thepixels) { } // here is the body of the loop 34 34 17

The Condition Form of Iteration! for (; boolean expression ;) { } // here is the body of the loop 35 35 The Condition Form of Iteration! for ( initial ; boolean expression ; bottom ) { } // here is the body of the loop 36 36 18

5.2.1 Flow of Control! I t e r a t i o n loop body S B 1 B 2 X 37 Copyright 5.2.2 The for statement! Flow: Syntax : false { } 38 Copyright S for X initial condition { body } bottom condition true Statement -S for (initial; condition; b ottom) { body; } Statement -X Algorithm: 1. Start the for scope 2. Execute initial 3. If condition is false go to 9 4. Start the body scope { 5. Execute the body 6. End the body scope } 7. Execute bottom 8. If condition is true go to 4 9. End the for scope 19

Example! final int MAX = 10; final double SQUARE_ROOT = 0.5; for (int i = 0; i < MAX; i = i + 1) { double sqrt = Math.pow(i, SQUARE_ROOT); output.print(i); output.print(\t); // tab output.println(sqrt); } 39 Copyright for (initial; condition; bottom)! for (int i = 0; i < MAX; i = i + 1) {... } int i; for (; i < MAX; i = i + 1) {... } 40 Copyright 20

for (initial; condition; bottom)! Can it be omitted?! Can it be set to the literal true?! What if it were false at the beginning?! Is it monitored throughout the body?! 41 Copyright for (initial; condition; bottom)! Can it be any statement?! Will the loop be infinite if it is omitted?! 42 21