SlideShare a Scribd company logo
Computational Tools for
Image Processing
Lecture 1, Jan 22nd, 2007
Part 2 (8:10-9:20pm) by Lexing Xie
EE4830 Digital Image Processing
http://www.ee.columbia.edu/~xlx/ee4830/
-2-
Outline
 Image processing tools
 in C, Java, … and everything else
 Matlab
 Getting started
 Image I/O and display
 Matrix manipulation
 Image processing demos
 The daily practice of image manipulation
 Data types and file formats
 Resources, pointers and getting help
 Limitations of image processing …
-3-
Image Processing Toolboxes
 In C/C++
 IPL … http://www.cs.nott.ac.uk/~jzg/nottsvision/old/index.html
 OpenCV http://sourceforge.net/projects/opencvlibrary
http://tech.groups.yahoo.com/group/OpenCV/
 ImageMagick http://www.imagemagick.org/
 Insight Toolkit ITK (medical image) http://www.itk.org/
 List of tools at mathtools.net
http://www.mathtools.net/C_C__/Image_Processing/
 In Java
 Java Media APIs: JAI, JMF, Java image I/O …
http://java.sun.com/javase/technologies/desktop/media/
 http://www.mathtools.net/Java/Image_Processing/index.html
 Other
 Python Imaging Library (PIL) http://www.pythonware.com/products/pil/
numpy, scipy
-4-
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 (12th floor) has Matlab installed with CU site-
license
-5-
Why MATLAB?
 Shorter code, faster computation
 Focus on ideas, not implementation
 C:
#include <math.h>
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, can be slow
-6-
MATLAB: Working With Matrices
 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(), …
-7-
MATLAB (contd.)
 M-files:
 functions
 scripts
 Language constructs
 Comment: %
 if .. else… for… while… end
 Help:
 help function_name, helpwin, helpdesk
 lookfor, demo
-8-
Image Processing Toolbox
 File I/O and display
 imread(), imwrite()
 imshow(), image(), imagesc(), movie()
Demo: how different are these two images?
-9-
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()…
Demo: image histogram and enhancement.
-10-
Outline
 Image processing tools
 in C, Java, … and everything else
 Matlab
 Getting started
 Image I/O and display
 Matrix manipulation
 Image processing demos
 Other points of interest:
 Data types and file formats
 Resources, pointers and getting help
-11-
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
-12-
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
-13-
Format Comparison
Format RAW BMP GIF PNG JPG
Lossy? N N N N Y
Compressed? N N Y Y Y
192K 193K 52.2K 106K 16K
192K 193K 5K
(4bit)
23K 20K
Fine prints Raw
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 ?
-14-
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
…
-15-
Resources and pointers
 Google, Wikipedia, Mathworld …
 Getting Help in Matlab
 Matlab help, Image Processing Demos
 DIP matlab tutorial online
 Usenet groups
 Commercial and free “image” processing
software kits:
 GIMP, Adobe Photoshop, Macromedia Fireworks
 Adobe Illustrator, Corel Draw
 Picassa, ACDSee, Windows Paint, XV
-16-
Summary
 Image processing programming tools
 MATLAB basics
 Using image processing toolbox
 Data type and file formats
 Resources and pointers
-17-
< the end; & >

More Related Content

PPT
mathematics laboratory lecture 1_matlab.ppt
PPT
lec1_matlab.ppt basic all operations matlab operations
PDF
Image processing using matlab
PDF
Matlab dip
PPTX
Digital image processing
PDF
Image processing with matlab
PPTX
IEEE Papers on Image Processing
PDF
OpenPOWER Workshop in Silicon Valley
mathematics laboratory lecture 1_matlab.ppt
lec1_matlab.ppt basic all operations matlab operations
Image processing using matlab
Matlab dip
Digital image processing
Image processing with matlab
IEEE Papers on Image Processing
OpenPOWER Workshop in Silicon Valley

Similar to lec1b.ppt (20)

PPTX
Matlab demo
PDF
Matlab workshop
PPTX
Digital image processing - What is digital image processign
PPTX
Image processing in MATLAB
PPTX
Image Processing Using MATLAB
PPTX
Introduction to Machine Learning by MARK
PPTX
Matlab Introduction
PPTX
IT for beginners
PDF
Lecture1_computer vision-2023.pdf
PDF
Seeing Like Software
PPTX
MATLAB.pptx presentation presentation he
PPTX
statistical_packages./ reserach methodology/statisticspptx
DOCX
KEVIN MERCHANT DOCUMENT
DOCX
Kevin merchantss
PPTX
Python Training on python and SQL PPT.pptx
PDF
VitaFlow | Mageswaran Dhandapani [Pramati]
PPTX
PPT ON MACHINE LEARNING by Ragini Ratre
PPTX
Ember
PPTX
Matlab for Electrical Engineers
PPTX
Lecture 1.pptx
Matlab demo
Matlab workshop
Digital image processing - What is digital image processign
Image processing in MATLAB
Image Processing Using MATLAB
Introduction to Machine Learning by MARK
Matlab Introduction
IT for beginners
Lecture1_computer vision-2023.pdf
Seeing Like Software
MATLAB.pptx presentation presentation he
statistical_packages./ reserach methodology/statisticspptx
KEVIN MERCHANT DOCUMENT
Kevin merchantss
Python Training on python and SQL PPT.pptx
VitaFlow | Mageswaran Dhandapani [Pramati]
PPT ON MACHINE LEARNING by Ragini Ratre
Ember
Matlab for Electrical Engineers
Lecture 1.pptx
Ad

More from RithikRaj25 (17)

PPT
html1.ppt
PPT
PPTX
PPT
Introduction To Database.ppt
PPT
Data.ppt
PPT
DataTypes.ppt
PPTX
NoSQL.pptx
PPTX
PPT
text classification_NB.ppt
PPT
html1.ppt
PPTX
slide-keras-tf.pptx
PPT
Intro_OpenCV.ppt
PPT
PR7.ppt
PPT
objectdetect_tutorial.ppt
PPTX
14_ReinforcementLearning.pptx
PPTX
datamining-lect11.pptx
PPT
week6a.ppt
html1.ppt
Introduction To Database.ppt
Data.ppt
DataTypes.ppt
NoSQL.pptx
text classification_NB.ppt
html1.ppt
slide-keras-tf.pptx
Intro_OpenCV.ppt
PR7.ppt
objectdetect_tutorial.ppt
14_ReinforcementLearning.pptx
datamining-lect11.pptx
week6a.ppt
Ad

Recently uploaded (20)

PPT
ISS -ESG Data flows What is ESG and HowHow
PPT
Quality review (1)_presentation of this 21
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
Computer network topology notes for revision
PDF
Mega Projects Data Mega Projects Data
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
Supervised vs unsupervised machine learning algorithms
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
Introduction to machine learning and Linear Models
PPTX
Business Acumen Training GuidePresentation.pptx
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PDF
Lecture1 pattern recognition............
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PDF
Fluorescence-microscope_Botany_detailed content
PDF
annual-report-2024-2025 original latest.
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
ISS -ESG Data flows What is ESG and HowHow
Quality review (1)_presentation of this 21
IB Computer Science - Internal Assessment.pptx
Computer network topology notes for revision
Mega Projects Data Mega Projects Data
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Supervised vs unsupervised machine learning algorithms
Clinical guidelines as a resource for EBP(1).pdf
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Introduction to machine learning and Linear Models
Business Acumen Training GuidePresentation.pptx
STUDY DESIGN details- Lt Col Maksud (21).pptx
oil_refinery_comprehensive_20250804084928 (1).pptx
Lecture1 pattern recognition............
Data_Analytics_and_PowerBI_Presentation.pptx
Fluorescence-microscope_Botany_detailed content
annual-report-2024-2025 original latest.
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb

lec1b.ppt

  • 1. Computational Tools for Image Processing Lecture 1, Jan 22nd, 2007 Part 2 (8:10-9:20pm) by Lexing Xie EE4830 Digital Image Processing http://www.ee.columbia.edu/~xlx/ee4830/
  • 2. -2- Outline  Image processing tools  in C, Java, … and everything else  Matlab  Getting started  Image I/O and display  Matrix manipulation  Image processing demos  The daily practice of image manipulation  Data types and file formats  Resources, pointers and getting help  Limitations of image processing …
  • 3. -3- Image Processing Toolboxes  In C/C++  IPL … http://www.cs.nott.ac.uk/~jzg/nottsvision/old/index.html  OpenCV http://sourceforge.net/projects/opencvlibrary http://tech.groups.yahoo.com/group/OpenCV/  ImageMagick http://www.imagemagick.org/  Insight Toolkit ITK (medical image) http://www.itk.org/  List of tools at mathtools.net http://www.mathtools.net/C_C__/Image_Processing/  In Java  Java Media APIs: JAI, JMF, Java image I/O … http://java.sun.com/javase/technologies/desktop/media/  http://www.mathtools.net/Java/Image_Processing/index.html  Other  Python Imaging Library (PIL) http://www.pythonware.com/products/pil/ numpy, scipy
  • 4. -4- 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 (12th floor) has Matlab installed with CU site- license
  • 5. -5- Why MATLAB?  Shorter code, faster computation  Focus on ideas, not implementation  C: #include <math.h> 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, can be slow
  • 6. -6- MATLAB: Working With Matrices  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(), …
  • 7. -7- MATLAB (contd.)  M-files:  functions  scripts  Language constructs  Comment: %  if .. else… for… while… end  Help:  help function_name, helpwin, helpdesk  lookfor, demo
  • 8. -8- Image Processing Toolbox  File I/O and display  imread(), imwrite()  imshow(), image(), imagesc(), movie() Demo: how different are these two images?
  • 9. -9- 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()… Demo: image histogram and enhancement.
  • 10. -10- Outline  Image processing tools  in C, Java, … and everything else  Matlab  Getting started  Image I/O and display  Matrix manipulation  Image processing demos  Other points of interest:  Data types and file formats  Resources, pointers and getting help
  • 11. -11- 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
  • 12. -12- 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
  • 13. -13- Format Comparison Format RAW BMP GIF PNG JPG Lossy? N N N N Y Compressed? N N Y Y Y 192K 193K 52.2K 106K 16K 192K 193K 5K (4bit) 23K 20K Fine prints Raw 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 ?
  • 14. -14- 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 …
  • 15. -15- Resources and pointers  Google, Wikipedia, Mathworld …  Getting Help in Matlab  Matlab help, Image Processing Demos  DIP matlab tutorial online  Usenet groups  Commercial and free “image” processing software kits:  GIMP, Adobe Photoshop, Macromedia Fireworks  Adobe Illustrator, Corel Draw  Picassa, ACDSee, Windows Paint, XV
  • 16. -16- Summary  Image processing programming tools  MATLAB basics  Using image processing toolbox  Data type and file formats  Resources and pointers