CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.

Slides:



Advertisements
Similar presentations
1 A L L A H. Command-Window Workspace & Directory Command- History The Matlab Command window - Finding your way around.
Advertisements

Laboratory of Image Processing Pier Luigi Mazzeo
Image Display MATLAB functions for displaying image Bit Planes
The Binary Numbering Systems
Chapter 14 Landsat 7 image of the retreating Malaspina Glacier, Alaska.
DIGITAL IMAGE PROCESSING CMSC 150: Lecture 14. Conventional Cameras  Entirely chemical and mechanical processes  Film: records a chemical record of.
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
Introduction to MATLAB and image processing. MATLAB and images The help in MATLAB is very good, use it! An image in MATLAB is treated as a matrix Every.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae & david streader, VUW Images and 2D Graphics COMP.
Insight Through Computing 22. Working with Image Files imread, imwrite, imshow, uint8, rgb2gray.
Connecting with Computer Science, 2e
Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-
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.
Two-week ISTE workshop on Effective teaching/learning of computer programming Dr Deepak B Phatak Subrao Nilekani Chair Professor Department of CSE, Kanwal.
CS110: Computers and the Internet Color and Image Representation.
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.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Department of Physics and Astronomy DIGITAL IMAGE PROCESSING
Color Names All standards-compliant browsers should handle these color names These color names can be used with the CSS properties of color and background-color.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Welcome Topic: Pixels A.M.Meshkatur Rahman Class: vii Roll: 07.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Shawlands Academy Higher Computing Data Representation.
Image and Video Processing in MATLAB Partly based on slides by Dmitri Roduy.
Introduction to MATLAB
Why does it matter how data is stored on a computer? Example: Perform each of the following calculations in your head. a = 4/3 b = a – 1 c = 3*b e = 1.
© 1999 Rochester Institute of Technology Introduction to Digital Imaging.
Images The Science of Images What is an Image on the computer? The Psychology of Images What do we use images for? What effect color has on our mood and.
7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report.
1 Imaging Techniques for Flow and Motion Measurement Lecture 2 Lichuan Gui University of Mississippi 2011 Digital Image & Image Processing.
CISC105 – General Computer Science Class 9 – 07/03/2006.
CS- 375 Graphics and Human Computer Interaction Lecture 1: 12/4/1435 Fundamental Techniques in Graphics Lecturer: Kawther Abas.
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
What Matlab can do for me? Matlab stands for MATrix LABoratory Matlab is a software package for high-performance numerical computation and visualization.
Introduction MATLAB stands for MATrix LABoratory.  Basics  Matrix Manipulations  MATLAB Programming  Graphics  Image types  Image Processing  Useful.
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Fractions in Binary.
Ch 6 Color Image processing CS446 Instructor: Nada ALZaben.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Color Web Design Professor Frank. Color Displays Based on cathode ray tubes (CRTs) or back- lighted flat-screen Monitors transmit light - displays use.
Programming Games Logic. Slide show. Range input. Storage. Datatypes. Binary numbers. Homework: Catch up. This includes uploading projects to your server.
CS 101 – Sept. 14 Review Huffman code Image representation –B/W and color schemes –File size issues.
CMPS1371 Introduction to Computing for Engineers IMAGES.
L23. Working with Image Files imread, imwrite, imshow, uint8, rgb2gray.
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Computer Science 121 Scientific Computing Winter 2014 Chapter 14 Images.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Lecture 27: Image Processing
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Image Representation Last update st March Heejune Ahn, SeoulTech.
Introduction to MATLAB Ehsan Adeli M. Iran University of Science and Technology, E-Learing Center, Fall 2008 (1387)
Scanner Scanner Introduction: Scanner is an input device. It reads the graphical images or line art or text from the source and converts.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 5.
การใช้งานโปรแกรม MATLAB ดร. อำนาจ ขาวเน. BASIC ELEMENTS OF MATLAB MATLAB Desktop MATLAB Editor Help System MATLAB (MATrix LABoratory)
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Floating Point Numbers
Computer Application in Engineering Design
Data Representation.
Images In Matlab.
How to Convert Pictures into Numbers
Digital Image Processing using MATLAB
Representing Images 2.6 – Data Representation.
Multimedia System Image
Fundamentals of Image Processing Digital Image Representation
Presentation transcript:

CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types

Color images21-2 Numb3rs All of our numbers so far have been of type double for double-precision floating point number x double numbers use 8 bytes (64 bits) to store each number for the mantissa (~ 16 significant digits), 11 bits for exponent, and one sign bit mantissa exponent base

Color images21-3 Other number types Name Size(bytes) Description uint81integers 0 to 255 uint162integers 0 to 65,535 uint324integers 0 to 4,294,967,295 int81integers -128 to 127 int162integers -32,768 to 32,767 int324integers -2,147,483,648 to 2,147,483,647 single4single-precision floating point (fewer bits for mantissa & exponent) There is also a logical type to represent binary values 0 (false) and 1 (true), stored in 1 byte

Color images21-4 For each number type there is a built-in function of the same name that converts its input to the desired type: >> bigNums = zeros(1, 100); >> smallNums = uint8(zeros(1, 100)); >> whos Name Size Bytes Class bigNums 1x double array smallNums 1x uint8 array zeros and ones can also be called with a third input: >> smallNums = zeros(1, 100, 'uint8'); * What happens if we try to store a number in smallNums that is less than 0 or greater than 255? How are fractional numbers handled?

Color images21-5 The silver screen Some of our images have been black and white images stored in matrices of double type values spanning range from 0.0 to 0.1 To conserve memory space, images are typically stored in files using formats that represent each image intensity using a small number of bits* (e.g., 1, 8, 16 bits) *note that the human eye can only distinguish about 100 shades of gray at one time

Color images21-6 MATLAB’s image processing toolbox MATLAB’s imread and imwrite read and write images in many possible formats, such as JPEG, GIF, TIFF, BMP, PNG Images are displayed using imshow >> mona = imread('monaLisa.jpg'); >> imshow(mona); >> imwrite(mona, 'monaLisa.png');

Color images21-7 Storing a masterpiece Recall that in a color image, each picture element (pixel) consists of three values: red green blue

Color images21-8 Mona is three-dimensional >> whos Name Size Bytes Class mona 864x560x uint8 array Third dimension has three indices, corresponding to the amount of red, green, and blue at each image location, specified as an integer between 0 and 255 RGB values at each location can be viewed with imtool(mona) mona’s third dimension

Color images21-9 Exercises How did I create this figure, where the gray-level images show red, green and blue components? Suppose you want to show the components in shades of red/green/blue?

Color images21-10 imshow with a colormap imshow can display an indexed image with a colormap: image = zeros(50,50, 'uint8'); for pos = 5:10:35 image(pos:pos+10, pos:pos+10) = 5*pos; end >> imshow(image, [0 175]) >> imshow(image, jet)

Color images21-11 When things are just black and white… Remember those random-dot stereograms? A “binary” image of two values can be stored in a matrix of logical values: 0(false) and 1 (true) left = false(50,50); for i = 1:50 for j = 1:50 if (rand(1) > 0.5) left(i,j) = 1; end right = left; right(10:40, 10:40) = left(10:40, 13:43); subplot(1,2,1), imshow(left) subplot(1,2,2), imshow(right)