COGS 119/219 MATLAB for Experimental Research. Fall 2017 Image Processing in Matlab

Similar documents
Downloads from:

!"#"$%& Some slides taken shamelessly from Prof. Yao Wang s lecture slides

Nintendo. January 21, 2004 Good Emulators I will place links to all of these emulators on the webpage. Mac OSX The latest version of RockNES

Fundamentals of Multimedia. Lecture 3 Color in Image & Video

Chattahoochee Triathlon Club Brand Guidelines

Logo Guidelines. Contents. About the Identity 2 Logo Variations 4 Minimum Logo Size 5 Logo Clear Space 6 Logo Don ts 7 Brand Architecture

LOGO USAGE GUIDELINES OCTOBER 2016

Understanding Human Color Vision

Part 1: Introduction to Computer Graphics

MATLAB Programming. Visualization

Computer Graphics. Raster Scan Display System, Rasterization, Refresh Rate, Video Basics and Scan Conversion

one M2M Logo Brand Guidelines

Graphics Devices and Visual Perception. Human Vision. What is visual perception? Anatomy of the Eye. Spatial Resolution (Rods) Human Field of View

Processing. Electrical Engineering, Department. IIT Kanpur. NPTEL Online - IIT Kanpur

Using the NTSC color space to double the quantity of information in an image

Joseph Wakooli. Designing an Analysis Tool for Digital Signal Processing

Ch. 1: Audio/Image/Video Fundamentals Multimedia Systems. School of Electrical Engineering and Computer Science Oregon State University

CURIE Day 3: Frequency Domain Images

Screens; media that use additive primaries

Version 3:0 September 2015

Essence of Image and Video

Pixel LED SPI Digital Controller

1 Overview. 1.1 Digital Images GEORGIA INSTITUTE OF TECHNOLOGY. ECE 2026 Summer 2018 Lab #5: Sampling: A/D and D/A & Aliasing

KRAMER ELECTRONICS LTD. USER MANUAL

1 Overview. 1.1 Digital Images GEORGIA INSTITUTE OF TECHNOLOGY. ECE 2026 Summer 2016 Lab #6: Sampling: A/D and D/A & Aliasing

L O G O G U I D E L I N E S J A N U A R Y

Part 1: Introduction to computer graphics 1. Describe Each of the following: a. Computer Graphics. b. Computer Graphics API. c. CG s can be used in

Logo and Brand Standards Manual. Copyright November 2013

Introduction & Colour

Chapt er 3 Data Representation

High-resolution screens have become a mainstay on modern smartphones. Initial. Displays 3.1 LCD

Specification of colour bar test pattern for high dynamic range television systems

Getting Images of the World

Visual Style Guide April 2016

Copyright Jack R Pease - not to be reproduced without permission. COMPOSITION LIBRARY

CS2401-COMPUTER GRAPHICS QUESTION BANK

How to use the NATIVE format reader Readmsg.exe

Graphic Standards Manual. Okanagan College. Version 1

2.4.1 Graphics. Graphics Principles: Example Screen Format IMAGE REPRESNTATION

7thSense Design Delta Media Server

ColorBurst RIP Ver. 7.0 Linearization, Ink-Limit and Profile Creation Process on Windows Machines

LOGO MANUAL. Definition of the basic use of the logo

INTRODUCTION SELECTIONS. STRAIGHT vs PREMULTIPLIED Alpha Channels

ColorBurst RIP Proofing System for GRACoL Coated #1 proofs

Algorithm User Guide: Colocalization

Various Applications of Digital Signal Processing (DSP)

DICOM Correction Proposal

USING MATLAB CODE FOR RADAR SIGNAL PROCESSING. EEC 134B Winter 2016 Amanda Williams Team Hertz

Ultra 4K Tool Box. Version Release Note

Professor Henry Selvaraj, PhD. November 30, CPE 302 Digital System Design. Super Project

To show the Video Scopes, click on the down arrow next to View located in the upper- right corner of your playback panel.

Aurora: Colour Separation with PostScript Devices

A Study on the Psychology of Color Perception In Color Palettes & Color Pickers

Package spotsegmentation

Programmable Micro Remote LED Controller for RGB LED Strips - 12 or 24 VDC Part number: PMRC

Reading. 1. Displays and framebuffers. History. Modern graphics systems. Required

CHAPTER 7 BASIC GRAPHICS, EVENTS AND GLOBAL DATA

Chapter 4 Color in Image and Video. 4.1 Color Science 4.2 Color Models in Images 4.3 Color Models in Video

I D E N T I T Y G U I D E L I N E S

Achieve Accurate Critical Display Performance With Professional and Consumer Level Displays

High-Definition, Standard-Definition Compatible Color Bar Signal

Displays and framebuffers

QuasarBrite Dot Matrix LED Display

Overview of Graphics Systems

3. Displays and framebuffers

Minimizing the Perception of Chromatic Noise in Digital Images

ColorBurst RIP Proofing System for SWOP Coated #3 proofs

The theory of data visualisation

LOGO GUIDELINES. A guide for partners

Stimulus presentation using Matlab and Visage

HP Indigo Press at a Glance. User Guide

Graphics Concepts. David Cairns

CHARGERS ROWING CLUB

Review. What about images? What about images? Slides04 - RGB-Pixels.key - September 22, 2015

IHE. Display Consistency Test Plan for Image Displays HIMMS and RSNA. Integrating the Healthcare Enterprise

ABCDEFGHIJKLMNOPQRSTUV abcdefghijklmnopqrstuvwxyz. ABCDEFGHIJKLMNOPQRST abcdefghijklmnopqrstuvwx. Campaign elements Section 1

ICC Color Symposium. Soft Proofing Revisit and Reborn. Chris Bai Senior Color Expert BenQ. 22/10/2018 Hong Kong. Organizers

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 5 CRT Display Devices

Package schoenberg. June 26, 2018

TITLE MASTER GARDENER PROGRAMS STYLE GUIDE MASTER GARDENER STYLE GUIDE

[source unknown] Cornell CS465 Fall 2004 Lecture Steve Marschner 1

Graphic standards for the Electric Circuit logo

CSE 166: Image Processing. Overview. Representing an image. What is an image? History. What is image processing? Today. Image Processing CSE 166

ILDA Image Data Transfer Format

Discreet Logic Inc., All Rights Reserved. This documentation contains proprietary information of Discreet Logic Inc. and its subsidiaries.

VeriLUM 5.2. Video Display Calibration And Conformance Tracking. IMAGE Smiths, Inc. P.O. Box 30928, Bethesda, MD USA

Cisco College Style Guide

Peace4Youth Brand Guidelines

Programmer s Reference

A guide to using your Star Rating

Package colorpatch. June 10, 2017

BASCOM-TV. TV Code Features: ICs supported: BASCOM versions:

Reading. Display Devices. Light Gathering. The human retina

Data Encoding CTPS 2018

Visual Imaging and the Electronic Age Color Science

How do I know which logo/mark to use? Basic Style Guide

GRAPHIC STANDARDS GUIDE What you need to know to use the college logo, symbol and slogan for every occasion.

Graphic Identity Manual MARKETING DEPARTMENT

Visual Imaging and the Electronic Age Color Science

Logo Standards. Use of the Logo. The Salem Identity

Transcription:

COGS 119/219 MATLAB for Experimental Research Fall 2017 Image Processing in Matlab

What is an image? An image is an array, or a matrix of square pixels (picture elements) arranged in rows and columns.

8-bit grey scale image In a (8-bit) grey scale image, each picture element has an assigned intensity that ranges from 0 to 255. A grey scale image includes many shades of grey. Each pixel has a value from 0 (black) to 255 (white). The possible range of the pixel values depend on the color depth of the image, here 8-bit = 256 tones or grey scales.

True-color A true-color image has 24 bit color depth ~= 16 million colors. A true color image assembled from three grey scale images colored red, green and blue.

16 bit grey scale image Some grey scale images have more grey scales, e.g. 16 bits = 65536 grey scales. In principle, three grey scale images can be combined to form an image with 281,474,976,710,656 grey scales ( = 65536 x 65536 x 65536)

Image formats There are two general groups of images: vector graphics (or line art) and bitmaps (pixel-based). Some of the most common file formats are:

Colors - RGB The RGB color model relates very closely to the way we perceive color with the r, g and b receptors in or retinas. RGB uses additive color mixing. RGB is the basic color model used in television, computers, for web graphics, and in any medium that projects color with light. The secondary colors of RGB cyan, magenta and yellow are formed by mixing the two of the primary colors (red, green or blue) and excluding the third color.

RGB Red and green combine to make yellow, green and blue to make cyan, blue and red form magenta. The combination of red, green and blue in full intensity makes white.

CMYK The 4-color CMYK model used in printing lays down overlapping layers of varying percentages of transparent cyan (C), magenta (M), and yellow (Y) inks. In addition, a layer of black (B) ink can be added. CMYK color model uses subtractive color model.

Figures and Images >> help figure figure(): creates a figure window figure(h): makes H the current figure, forces it to become visible, and raises it above all other figures on the screen. If Figure H does not exist, and H is an integer, a new figure is created with handle H. >> help image image(x): displays matrix X as an image. Each element of X specifies the color of a rectilinear patch in the image.

Figures and Images >> x = [1 5 26 10 4]; >> figure(1) >> image(x) >> x = [1 5 10 26 4 ; 4 26 5 1 10]; >> figure(2) >> image(x) How do the colors refer to numbers?

Indexed images in Matlab An indexed image consists of a data matrix X and a colormap matrix, which is N x 3 array of class double containing values in the range [0,1]. Each row of the map specifies red, blue and green components of a single color. The color of each image pixel is determined by using the corresponding value of X as an index into the map. The value 1 points to the first row in the map, 2 points to the second row, and so on. Values of X must be integers.

Colormap You can use defaults or make your own. >> help colormap colormap(map) sets the current figure's colormap to MAP. Some built-in colormaps are: Jet: Default colormap

Colormap >> figure(3); >> image(x); >> colormap( autumn ) >> figure(4); >> image(x); >> colormap( spring )

Colormap A colormap is also a matrix. For color images, it is an N x 3 matrix where the three columns corresponds to the RGB (red, green, blue) indices.

Colormap >> c = colormap( spring ); >> c2 = colormap( autumn );

Colormap The reason we don t see much of a color range is, the color map has many possible colors (e.g. 64 colors) so we are using only a subset of the colors. But we can easily scale the values of the data matrix to use the full color map. >> help imagesc Scale data and display as image. >> figure(5) >> imagesc(x) >> colormap( spring )

Colormap Alternatively, we can create a new image matrix that uses a large range of values (between 0 and 64) in the first place. >> img = round(rand(100,100)*63)+1; >> figure(6) >> image(img) >> colormap( spring );

Colormap >> figure(3) >> colormap( hot ) >> colormap(3, winter ) will change the figure whose handle is 3

Change axis elements >> help axis >> figure(3); >> axis off; >> axis square;

User-defined colormaps We can also make our own colormaps. >> mycmap1 = [0 0 0 ; 0.25 0.25 0.25 ; 0.5 0.5 0.5 ; 0.75 0.75 0.75 ; 1 1 1]; >> mycmap1 = reshape(mycmap1, 3,5 )'; >> figure(7); >> axis off; >> axis square; >> image(img); >> colormap(mycmap1);

User-defined colormaps We can also make our own colormaps. >> mycmap1 = [0 0 0 ; 0.25 0.25 0.25 ; 0.5 0.5 0.5 ; 0.75 0.75 0.75 ; 1 1 1]; >> mycmap1 = reshape(mycmap1, 3,5 )'; >> figure(7); >> axis off; >> axis square; >> image(img); >> colormap(mycmap1); Why aren t there more colors?

User-defined colormaps We can also make our own colormaps. >> mycmap1 = [0 0 0 ; 0.25 0.25 0.25 ; 0.5 0.5 0.5 ; 0.75 0.75 0.75 ; 1 1 1]; >> mycmap1 = reshape(mycmap1, 3,5 )'; >> figure(7); >> axis off; >> axis square; >> image(img); >> colormap(mycmap1); Now the issue is my colormap has 5 colors but my image has 64. Since I have haven t used imagesc, any number greater than or equal to 5in this image will be displayed as the 5 th color, and in this example that is a medium-light blue.try changing the 5 th row of mycmap1 and draw figure again to check

User-defined colormaps We can also make our own colormaps. >> mycmap1 = [0 0 0 ; 0.25 0.25 0.25 ; 0.5 0.5 0.5 ; 0.75 0.75 0.75 ; 1 1 1]; >> mycmap1 = reshape(mycmap1, 3,5 )'; >> figure(7); >> axis off; >> axis square; >> image(img); >> colormap(mycmap1); Try imagesc instead of image

User-defined colormaps We can also make our own colormaps. >> mycmap1 = [0 0 0 ; 0.25 0.25 0.25 ; 0.5 0.5 0.5 ; 0.75 0.75 0.75 ; 1 1 1]; >> mycmap1 = reshape(mycmap1, 3,5 )'; >> figure(7); >> axis off; >> axis square; >> imagesc(img); >> colormap(mycmap1); Notice colors in the image are the same but now it s interpolating such that the range of numbers 1:64 are being assigned more uniformly to the range of colors available

Let s play with colormaps New.m file called mycolormaps.m clear all; close all; colormap(gray(256)); myimg = reshape(1:256,16,16); image(myimg); axis square; axis off; pause figure(1); for i = 1:200 cmaps = rand(256,3); colormap(cmaps); drawnow end What does the code do?