dr. praveen sankaran · 2012-12-27 · dr. praveen sankaran department of ece nit calicut december...
TRANSCRIPT
A Sample ProgramBasic Intensity Transformations
Summary
Dr. Praveen Sankaran
Department of ECE
NIT Calicut
December 26, 2012
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
Outline
1 A Sample ProgramReviewImage Format, Read, Write
2 Basic Intensity TransformationsBackgroundIntensity Transformation Functions
3 Summary
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Outline
1 A Sample ProgramReviewImage Format, Read, Write
2 Basic Intensity TransformationsBackgroundIntensity Transformation Functions
3 Summary
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Review Summary
The possible values of g [m,n] are the gray levels l = 0,1 · · ·L;A digital image is an M×N array of gray levels.
Bits and samples allocation can a�ect an image
Mathematical models developed for continuous systems canonly be approximated in digital imagery.
There can be variation in �nal output based on how youapproximate your equations.
Simple pixel relationships.
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Questions to solve
2.2, 2.5, 2.6, 2.9, 2.10, 2.11, 2.16, 2.17
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Outline
1 A Sample ProgramReviewImage Format, Read, Write
2 Basic Intensity TransformationsBackgroundIntensity Transformation Functions
3 Summary
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Some Image Formats
1 PPM: Portable Pixel Map
2 PGM: Portable Grayscale Map
3 JPEG: Joint Photographic Experts Group
4 GIF: Graphic Interchange Format
5 TIFF: Tagged Image File Format
6 PNM: Portable Network Map�combination of PGM and PPM
7 PNG: Portable Network Graphics
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
The .pgm Format
ASCII data header, followed by the data in either raw or ASCIIformat. P5→raw, P2→ASCII
The body of the header is followed by NumberOfColumns ×NumberOfRows elements of data.
Example
P5 (or P2)# �-NumberOfColumns NumberOfRowsNumberOfGrayLevels
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
The .pgm Format
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
The .ppm Format
ASCII data header, followed by interleaved color data in eitherraw or ASCII format. P6→raw, P3→ASCII
There are three color bands red ,green,blue(RGB).
The body of the header is followed by NumberOfColumns×NumberOfRows ×NumberOfBands elements of data.
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Get going on g++
You may select any compiler/OS to your liking.
g++ on Ubuntu.
http://www.claremontmckenna.edu/pages/faculty/alee/g++/g++.html
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Get Going - 1
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Get Going - 2
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Get Going - 3
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
ReviewImage Format, Read, Write
Get Going - 4
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
BackgroundIntensity Transformation Functions
Outline
1 A Sample ProgramReviewImage Format, Read, Write
2 Basic Intensity TransformationsBackgroundIntensity Transformation Functions
3 Summary
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
BackgroundIntensity Transformation Functions
Spatial Domain
Refers to the image plane itself.↓
Direct manipulation of image pixels.
Figure: Spatial Filtering with a 3×3 mask (kernel, template or window)
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
BackgroundIntensity Transformation Functions
Outline
1 A Sample ProgramReviewImage Format, Read, Write
2 Basic Intensity TransformationsBackgroundIntensity Transformation Functions
3 Summary
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
BackgroundIntensity Transformation Functions
Example: Log Transformations
Let r be the original pixel values and,s be the pixel value after processing.s = T (r)→s = clog (1+ r), c →constant, r ≥ 0.
Figure: Linear: Negative and Identity, Logarithmic: Log and Inverse log,Power-law:nthpower and n
throot
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
BackgroundIntensity Transformation Functions
Power-law Transformation
s = cr γ
Figure: Gamma correction curves
Dr. Praveen Sankaran DIP Winter 2013
A Sample ProgramBasic Intensity Transformations
Summary
Summary
Introduction to g++ on ubuntu.
Image formats examples.
.pgm and .ppm formats.
Looked at a code to read an image and compute mean.Integer and �oat values di�er, why?
Spatial domain operations.
Intensity transformation functions that work on single pixelvalues.
Dr. Praveen Sankaran DIP Winter 2013