Tools and Prerequisites for Image Processing Lecture 1, Jan 28 th, 2008 Part 2 by Lexing Xie EE4830 Digital Image Processing

Slides:



Advertisements
Similar presentations
Introduction to MATLAB The language of Technical Computing.
Advertisements

Matlab Tutorial. Session 1 Basics, Filters, Color Space, Derivatives, Pyramids, Optical Flow Gonzalo Vaca-Castano.
Working with Image Files Aaron Fuegi SCV Visualization Workshop – Fall 2008.
School of Computing Science Simon Fraser University
MATLAB for Image Processing April 10 th, Outline Introduction to MATLAB –Basics & Examples Image Processing with MATLAB –Basics & Examples.
Multimedia for the Web: Creating Digital Excitement Multimedia Element -- Graphics.
Graphics CS 121 Concepts of Computing II. What is a graphic? n A rectangular image. n Stored in a file of its own, or … … embedded in another data file.
Working with Image Files Aaron Fuegi IS&T Scientific Visualization Tutorial – Spring 2010.
2.01 Understand Digital Raster Graphics
Graphics in the web Digital Media: Communication and Design
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Introduction to Computer Graphics
IT 342 : Fundamentals of Multimedia Introduction & Multimedia Authoring.
Graphic File Formats. Objectives Understand the difference between two major categories of computer graphic images Investigate the differences between.
Image and Sound Editing Raed S. Rasheed Image Image. Digital image. – Raster images. – Vector Images. – Stereo Images. – Image File Formats Lossless.
Manipulating Images Image A visual representation of something that is seen in real life. It can be two-dimensional or three-dimensional A visual representation.
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
 Scanned or digitally captured image  Image created on computer using graphics software.
Dr Jimmy Lam CAD for Fashion and Textiles
Graphic Images 101. Painted on a grid Drawn mathematically.
Computational Tools for Image Processing Lecture 1, Jan 22nd, 2007 Part 2 (8:10-9:20pm) by Lexing Xie EE4830 Digital Image Processing
Prepared by George Holt Digital Photography BITMAP GRAPHIC ESSENTIALS.
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
Multimedia Specification Design and Production 2012 / Semester 1 / L4 Lecturer: Dr. Nikos Gazepidis
Lecture 4 - Introduction to Computer Graphics
INTRODUCTION FOR PERL MONGERS MATLAB. Outline 1. Matlab, what is it good for 2. Matlab’s IDE & functions 3. A few words about Maple 4. What needs to be.
Digital Image: Representation & Processing (2/2) Lecture-3
Introduction to MATLAB
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Gulsah Tumuklu Ozyer MATLAB IMAGE PROCESSING TOOLBOX.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 3 This presentation © 2004, MacAvon Media Productions Introduction to Computer Graphics.
GRAPHICS. Topic Outline What is graphic. Resolution. Types of graphics. Using graphic in multimedia applications.
CS- 375 Graphics and Human Computer Interaction Lecture 1: 12/4/1435 Fundamental Techniques in Graphics Lecturer: Kawther Abas.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
© Anthony J. Nowakowski, Ph.D. GRAPHICAL MEDIA EDC 601 Instructional Technologies © Anthony J. Nowakowski, Ph.D. “Graphics help to display and to clarify.
Adobe/Macromedia Fireworks JAOIT 8. Fireworks – what is it? Adobe Fireworks (formerly Macromedia Fireworks) is a bitmap and vector graphics editor. It.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well.
Unit 1: Task 1 By Abbie Llewellyn. Vector Graphic Software (Corel Draw) Computer graphics can be classified into two different categories: raster graphics.
Chapter 2 File Format Objectives (1 of 2) Identify the difference between vector based graphics and bitmap-based graphics Clarify 3 types of vector programs.
Multimedia Basics (1) Hongli Luo CEIT, IPFW. Topics r Image data type r Color Model : m RGB, CMY, CMYK, YUV, YIQ, YCbCr r Analog Video – NTSC, PAL r Digital.
 Scanned or digitally captured image  Image created on computer using graphics software.
11/29/ Image Processing. 11/29/ Systems and Software Image file formats Image processing applications.
Chapter 8B Graphics and Multimedia. 8B-2 Graphic File Formats Bitmapped images –Most common image type –Also called raster images –Image is drawn using.
The Digital Revolution Changing information. What is Digital?  Discrete values used for  Input  Processing  Transmission  Storage  Display  Derived.
Outline Introduction to MATLAB Image Processing with MATLAB
CIS 601 Fall 2003 Introduction to MATLAB Longin Jan Latecki Based on the lectures of Rolf Lakaemper and David Young.
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Image File Formats Harrow Computer Club – Wed, 1 Dec 2010 Bob Watson MA CMath MIMA MBCS.
Chapter 1 Definitions & Basics of Digital Image 1.Image 2.Digital Image 3.Raster 4. Vector 5.Image Editing 1.
Introduction to MATLAB Ehsan Adeli M. Iran University of Science and Technology, E-Learing Center, Fall 2008 (1387)
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Jaime Villarreal EDTC Dr. Janice W. Butler.
8th Lecture – Intro to Bitmap or Raster Images
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
Computer Application in Engineering Design
Graphics and image data representation
Chapter 3 Graphics and Image Data Representations
Introduction to Matlab ( Google Search )
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
CMPE 101 Introduction to Information Technologies Chapter 5: Application Software: Tools for Productivity Copyright © 2012 Pearson Education, Inc. Publishing.
Image File Size and File Compression
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
Digital Images.
Introduction to Computer Graphics
Introduction to MATLAB
Digital Image Processing using MATLAB
MED 2001 Advanced Media Production
Digital Media Objective
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Presentation transcript:

Tools and Prerequisites for Image Processing Lecture 1, Jan 28 th, 2008 Part 2 by Lexing Xie EE4830 Digital Image Processing

-2- Outline Review and intro in MATLAB A light-weight review of linear algebra and probability An introduction to image processing toolbox A few demo applications Image formats in a nutshell Pointers to image processing software and programming packages

-3- Matlab is … : a numerical computing environment and programming language. Created by The MathWorks, MATLAB allows easy matrix manipulation, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs in other languages. Main Features: basic data structure is matrix optimized in speed and syntax for matrix computation Accessing Matlab on campus Student Version Matlab + Simulink $99 Image Processing Toolbox $59 Other relevant toolboxes $29~59 (signal processing, statistics, optimization, …) CUNIX and EE lab (12 th floor) has Matlab installed with CU site- license

-4- Why MATLAB? Shorter code, faster computation Focus on ideas, not implementation C: #include double x, f[500]; for( x=1.; x < 1000; x=x+2) f[(x-1)/2]=2*sin(pow(x,3.))/3+4.56; MATLAB: f=2*sin((1:2:1000).^3)/3+4.56; But: scripting language, interpreted, … …

-5- matrices … are rectangular “tables” of entries where the entries are numbers or abstract quantities … Some build-in matrix constructors a = rand(2), b = ones(2), c=eye(2), Addition and scalar product d = c*2; Dot product, dot-multiply and matrix multiplication c(:)’*a(:), d.*a, d*a Matrix inverse, dot divide, etc. inv(a), a./d

-6- matrixes as images, and vice versa x = 1 : 256; y = ones(256,1); a = x*y; b = y*x; size(a) = ? size(b) = ? ? imagesc(b); colormap(gray(256)) 256x256 chess board b = ones(1,8); b(2:2:end)=0 b = [b; b(end:-1:1)] b = repmat(b, [4 1]) chessb = kron(b,ones(32)); imagesc(checkerboard(32)>.5); or, from scratch:

-7- eigen vectors and eigen values “eigenvectors” are exceptional vectors in the same direction as Ax Ax = x are called eigenvalues Examples: A = [.8.3;.2.7] [v, d] = eig(A); A*v(:, 1) A*v(:, 2) properties of :  i=1 n a ii =  i=1 n i = trace(A) 1 ¢  2 ¢ … n = det(A)  eigshow eigshow eigen-vectors and values are useful for: Getting exponents of a matrix A Image compression Object recognition The search algorithm behind Google …

-8- matlab quiz Chessboard + noise x = chessb + randn(256); How to get the minimum and maximum value of x (in one line, with one function call) ? [min(x(:)) max(x(:))] prctile(x(:), [0 100]) the handy, esp. if x is more than three dimensions the obscure, but exactly one function call.

-9- probability probability refers to the chance that a particular event (or set of events) will occur x Pr(head)=1/2, Pr(tail)=1/2 p = pdf('normal', -4:.1:4, 0, 1); plot(-4:.1:4, p) p = pdf('uniform', -1:256, 0, 255); plot(-1:256, p) probability density function p(x) is a non-negative intergrable function R  R such that for any interval [a, b]: Pr(x 2 [a,b]) = s a b p(x)dx

-10- probability Suppose you’re blind-folded and points to a point in a cardboard with the following prints, after a friend rotates and shifts it randomly (i.e. randomly draw a pixel from the following images) x p( )=1/2 p( )=p( )=… = p( ) = 1/256

-11- mean and std Mean m x = E[x]= s x p(x) dx Standard-deviation  x 2 = E[(x-m x ) 2 ] = s (x-m x ) 2 p(x) dx (a) (b) (a) and (b) are afore- mentioned gray-scale images with values between [0,1]. Which one of the following holds, if any? m a < m b  a <  b m a = m b  a >  b X X

-12- MATLAB (contd.) M-files: functions scripts Language constructs Comment: % if.. else… for… while… end Help: help function_name, helpwin, helpdesk lookfor, demo

-13- Image Processing Toolbox File I/O and display imread(), imwrite() imshow(), image(), imagesc(), movie() ? how different are these two images? cu_home_low.bmp (382 KB) cu_home_low_j40.jpg (29KB) im1 = imread('cu_home_low_treebranch.bmp'); im2 = imread('cu_home_low_treebranch_j40.jpg'); sqrt( sum( (im1(:)-im2(:)).^2 ) / prod(size(im1)) ) imshow(im1- im2)

-14- Image Processing Toolbox (contd) Linear operations fft2(), dct2(), conv2(), filter2() Non-linear operations median(), dilate(), erode(), histeq() Statistics and analysis imhist(),,mean2(), corr2(), std2() Colormap and type conversions colormap(), brighten(), rgbplot() rgb2ycbcr(), hsv2rgb(), im2uint8()…

-15- Outline Review and intro in MATLAB A light-weight review of linear algebra and probability An introduction to image processing toolbox introduction and pointers to other image processing software and programming packages

-16- Demo of image processing software Enhancement “equalize” (lecture 4) Compression (lecture 12) Color manipulation (lecture 3) with GIMP “unshake” (lecture 7) before after before after

-17- Image Processing Software Bitmap editing: Adobe Photoshop, Macromedia Fireworks Vector graphics editing: Adobe Illustrator, Corel Draw Consumer photo tools: Picassa, ACDSee, Windows Paint, XV, Photoshop Elements … GIMP Send me your suggestions of image editing/processing tools!

-18- Video processing software Player Windows media player, Real, Quicktime, iTunes, intervideo WinDVD, … Format conversion ffmpeg Editing Adobe premier, muvee, Resource sites..

-19- Image Processing Toolboxes In C/C++ IPL … OpenCV ImageMagick Insight Toolkit ITK (medical image) List of tools at mathtools.net In Java Java Media APIs: JAI, JMF, Java image I/O … Other Python Imaging Library (PIL) numpy, scipyhttp://

-20- Image Data Types Basic unit in disk: byte (8 bits) Images are stored as unsigned integers (0- 255) Depends on the color space and the precision / bit depth 1bit, 4bit, 8bit, 24bit, 32bit (+alpha channel), indexed colors (gif, 2-8 bits) In MATLAB: uint8  double  uint8

-21- File Formats Why different file formats? Convenient to use Compact representation How many formats do we have? e.g. 30+ in a consumer image software (ACDSee) There are much more out there: raster, vector, metafile, … and growing Basic structure: Header + Data

-22- Format Comparison FormatRAWBMPGIFPNGJPG Lossy?NNNNY Compressed?NNYYY 192K193K52.2K106K16K 192K193K5K (4bit) 23K20K Fine printsRaw data Header ~1K Look-up table + data Quality factor 80 Two 256x256 color images Why do the two images have different sizes as GIF/PNG/JPG files ?

-23- Image Format Classification Types that MATLAB supports: BMP, JPEG, PNG, GIF, TIFF, XWD, HDF, PCX, … Other open-source libraries from “google” Image (bitmap) lossless compression no compression no loss raw, bmp, pgm, ppm, gif, tiff … png, jpeg, gif, tiff, jpeg2000… lossy compression jpeg, tiff, jpeg2000 …

-24- Resources and pointers Google, Wikipedia, Mathworld … Getting Help in Matlab Matlab help, Image Processing Demos DIP matlab tutorial online Usenet groups

-25- Summary Review of matrixes and probability MATLAB for image processing Data type and file formats Resources and pointers

-26-

-27-

-28- Working With Matrices in MATLAB Everything is treated as a matrix Elementary matrix manipulation zeros(), ones(), size(), eig(), inv() Operators and special characters a(:,1:2:256)=b’.*c String imstr=[‘this is lena’]; imglena=imread([imstr(9:end),’.png’]); ischar(), num2str(), …

-29- Review of linear algebra Point operation and matrix operations Eigen vectors,.. eigen values Images as matrices, and matrices as images … Question: max/min, subsampling, Review of probability Coin-tossing, pdf, cdf, gaussian pdf Expectations, std, variance Question: pdf shape, expectation/expected value, Matlab Getting started Image I/O and display Matrix manipulation Image processing demos The daily practice of image manipulation Image processing tools in C, Java, … and everything else Data types and file formats Resources, pointers and getting help