0% found this document useful (0 votes)
9 views17 pages

Lec 1 B

The document provides an overview of computational tools for image processing, focusing on MATLAB and its capabilities for matrix manipulation, image I/O, and various image processing operations. It outlines different programming languages and libraries available for image processing, including C, Java, and Python, as well as the types of image data and file formats supported by MATLAB. Additionally, it highlights resources for learning and assistance in image processing.

Uploaded by

solomon raju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views17 pages

Lec 1 B

The document provides an overview of computational tools for image processing, focusing on MATLAB and its capabilities for matrix manipulation, image I/O, and various image processing operations. It outlines different programming languages and libraries available for image processing, including C, Java, and Python, as well as the types of image data and file formats supported by MATLAB. Additionally, it highlights resources for learning and assistance in image processing.

Uploaded by

solomon raju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Computational Tools for

Image Processing
EE4830 Digital Image Processing
http://www.ee.columbia.edu/~xlx/
ee4830/

Lecture 1, Jan 22nd, 2007


Part 2 (8:10-9:20pm) by Lexing Xie
-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
Two 256x256 color
images
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 23K 20K


(4bit)
Fine prints Raw Header Look-up Quality
data ~1K table + factor
data 80

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
no (bitmap lossy
compression ) compressio
no loss lossless n
compressio
n
raw, bmp,
pgm, ppm,
png, jpeg, jpeg, tiff,
gif, tiff …
gif, tiff, jpeg2000
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; & >

You might also like