Lec 1 B
Lec 1 B
Image Processing
EE4830 Digital Image Processing
http://www.ee.columbia.edu/~xlx/
ee4830/
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
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
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;
MATLAB (contd.)
M-files:
functions
scripts
Language constructs
Comment: %
if .. else… for… while… end
Help:
help function_name, helpwin, helpdesk
lookfor, demo
-8-
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-
In MATLAB:
uint8doubleuint8
-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
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-
Summary
Image processing programming tools
MATLAB basics
Using image processing toolbox