SlideShare a Scribd company logo
1 of 14
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
Digital Image
Processing
Sampling and Quantization
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
key stages in digital image processing
Sampling : related to coordinates values
(Nyquist frequency)
Quantization : related to intensity values
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
© 2002 R. C. Gonzalez & R. E. Woods
y (intensity values)
Generating a digital image.
(a) Continuous image. (b)
A scaling line from A to B
in the continuous image,
used to illustrate the
concepts of sampling and
quantization. (c) sampling
and quantization. (d)
Digital scan line.
a b
c d
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
© 2002 R. C. Gonzalez & R. E. Woods
(a) Continuous image
projected onto a sensor
array. (b) Result of image
sampling and
quantization.
a b
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
0 0 0 75 75 75 128 128 128 128
0 75 75 75 128 128 128 255 255 255
75 75 75 200 200 200 255 255 255 200
128 128 128 200 200 255 255 200 200 200
128 128 128 255 255 200 200 200 75 75
175 175 175 225 225 225 75 75 75 100
175 175 100 100 100 225 225 75 75 100
75 75 75 35 35 35 0 0 0 35
35 35 35 0 0 0 35 35 35 75
75 75 75 100 100 100 200 200 200 200
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
Sampling
1024
512
256
128
64
32
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
Sampling
1024 512 256
128 64 32
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
imread() – reading an image with different
postfixes
imresize() – resizing an image to any given size
figure – opening a new graphical window
subplot(#of row, # of col, location) – showing
different plots/images in one graphical window
imshow() – displaying an image
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
generating figures of slide 6
im=imread('obelix.jpg');
im=rgb2gray(imread('obelix.jpg'));
im1=imresize(im, [1024 1024]);
im2=imresize(im1, [1024 1024]/2);
im3=imresize(im1, [1024 1024]/4);
im4=imresize(im1, [1024 1024]/8);
im5=imresize(im1, [1024 1024]/16);
im6=imresize(im1, [1024 1024]/32);
figure;imshow(im1)
figure;imshow(im2)
figure;imshow(im3)
figure;imshow(im4)
figure;imshow(im5)
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
generating figure of slide 7
figure;
subplot(2,3,1);imshow(im1);subplot(2,3,2);imshow(im2)
subplot(2,3,3);imshow(im3);subplot(2,3,4);imshow(im4)
subplot(2,3,5);imshow(im5);subplot(2,3,6);imshow(im6)
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
Quantization
8-bit 7-bit 6-bit 5-bit
4-bit 3-bit 2-bit 1-bit
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
generating figure of slide 11
im=imread('obelix.jpg');
im=rgb2gray(imread('obelix.jpg'));
im1=imresize(im, [1024 1024]);
im2= gray2ind(im1,2^7);
im3= gray2ind(im1,2^6);
im4= gray2ind(im1,2^5);
im5= gray2ind(im1,2^4);
im6= gray2ind(im1,2^3);
im7= gray2ind(im1,2^2);
im8= gray2ind(im1,2^1);
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
figure;
subplot(2,4,1);imshow(im1,[]);subplot(2,4,2);imshow(im2,[])
subplot(2,4,3);imshow(im3,[]);subplot(2,4,4);imshow(im4,[])
subplot(2,4,5);imshow(im5,[]);subplot(2,4,6);imshow(im6,[])
subplot(2,4,7);imshow(im7,[]);subplot(2,4,8);imshow(im8,[])
Gholamreza Anbarjafari, PhD
Video Lecturers on Digital Image Processing
Summary
 We have looked at:
 What is sampling?
 What is spatial resolution?
 What is quantization?
 What is grey-level resolution?
 Next time we will start to see zooming
and interpolation

More Related Content

Similar to DIP.ppt

EMC 3130/2130 Lecture One - Image Digital
EMC 3130/2130 Lecture One - Image DigitalEMC 3130/2130 Lecture One - Image Digital
EMC 3130/2130 Lecture One - Image Digital
Edward Bowen
 
YU JIANGANG
YU JIANGANGYU JIANGANG
YU JIANGANG
butest
 
DIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdg
DIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdgDIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdg
DIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdg
MrVMNair
 

Similar to DIP.ppt (20)

IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
IEEE 2014 MATLAB IMAGE PROCESSING PROJECTS Robust face recognition from multi...
 
Google | Infinite Nature Zero Whitepaper
Google | Infinite Nature Zero WhitepaperGoogle | Infinite Nature Zero Whitepaper
Google | Infinite Nature Zero Whitepaper
 
CATalkOnline.ppt
CATalkOnline.pptCATalkOnline.ppt
CATalkOnline.ppt
 
3D Stereoscopic Filmmaking Discussion
3D Stereoscopic Filmmaking Discussion3D Stereoscopic Filmmaking Discussion
3D Stereoscopic Filmmaking Discussion
 
Introduction to Computer Vision using OpenCV
Introduction to Computer Vision using OpenCVIntroduction to Computer Vision using OpenCV
Introduction to Computer Vision using OpenCV
 
A Hybrid DWT-SVD Method for Digital Video Watermarking Using Random Frame Sel...
A Hybrid DWT-SVD Method for Digital Video Watermarking Using Random Frame Sel...A Hybrid DWT-SVD Method for Digital Video Watermarking Using Random Frame Sel...
A Hybrid DWT-SVD Method for Digital Video Watermarking Using Random Frame Sel...
 
Video to Video Translation CGAN
Video to Video Translation CGANVideo to Video Translation CGAN
Video to Video Translation CGAN
 
IRJET - Applications of Image and Video Deduplication: A Survey
IRJET -  	  Applications of Image and Video Deduplication: A SurveyIRJET -  	  Applications of Image and Video Deduplication: A Survey
IRJET - Applications of Image and Video Deduplication: A Survey
 
A Video Watermarking Scheme to Hinder Camcorder Piracy
A Video Watermarking Scheme to Hinder Camcorder PiracyA Video Watermarking Scheme to Hinder Camcorder Piracy
A Video Watermarking Scheme to Hinder Camcorder Piracy
 
EMC 3130/2130 Lecture One - Image Digital
EMC 3130/2130 Lecture One - Image DigitalEMC 3130/2130 Lecture One - Image Digital
EMC 3130/2130 Lecture One - Image Digital
 
G010245056
G010245056G010245056
G010245056
 
Image Processing(Beta1)
Image Processing(Beta1)Image Processing(Beta1)
Image Processing(Beta1)
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
YU JIANGANG
YU JIANGANGYU JIANGANG
YU JIANGANG
 
aip basic open cv example
aip basic open cv exampleaip basic open cv example
aip basic open cv example
 
1st section
1st section1st section
1st section
 
Image encryption and decryption
Image encryption and decryptionImage encryption and decryption
Image encryption and decryption
 
DIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdg
DIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdgDIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdg
DIPsadasdasfsdfsdfdfasdfsdfsdgsdgdsfgdfgfdg
 
A0540106
A0540106A0540106
A0540106
 
Motion analysis in video surveillance using edge detection techniques
Motion analysis in video surveillance using edge detection techniquesMotion analysis in video surveillance using edge detection techniques
Motion analysis in video surveillance using edge detection techniques
 

Recently uploaded

electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
benjamincojr
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
BalamuruganV28
 

Recently uploaded (20)

5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 

DIP.ppt

  • 1. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Digital Image Processing Sampling and Quantization
  • 2. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing key stages in digital image processing Sampling : related to coordinates values (Nyquist frequency) Quantization : related to intensity values
  • 3. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing © 2002 R. C. Gonzalez & R. E. Woods y (intensity values) Generating a digital image. (a) Continuous image. (b) A scaling line from A to B in the continuous image, used to illustrate the concepts of sampling and quantization. (c) sampling and quantization. (d) Digital scan line. a b c d
  • 4. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing © 2002 R. C. Gonzalez & R. E. Woods (a) Continuous image projected onto a sensor array. (b) Result of image sampling and quantization. a b
  • 5. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing 0 0 0 75 75 75 128 128 128 128 0 75 75 75 128 128 128 255 255 255 75 75 75 200 200 200 255 255 255 200 128 128 128 200 200 255 255 200 200 200 128 128 128 255 255 200 200 200 75 75 175 175 175 225 225 225 75 75 75 100 175 175 100 100 100 225 225 75 75 100 75 75 75 35 35 35 0 0 0 35 35 35 35 0 0 0 35 35 35 75 75 75 75 100 100 100 200 200 200 200
  • 6. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Sampling 1024 512 256 128 64 32
  • 7. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Sampling 1024 512 256 128 64 32
  • 8. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing imread() – reading an image with different postfixes imresize() – resizing an image to any given size figure – opening a new graphical window subplot(#of row, # of col, location) – showing different plots/images in one graphical window imshow() – displaying an image
  • 9. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing generating figures of slide 6 im=imread('obelix.jpg'); im=rgb2gray(imread('obelix.jpg')); im1=imresize(im, [1024 1024]); im2=imresize(im1, [1024 1024]/2); im3=imresize(im1, [1024 1024]/4); im4=imresize(im1, [1024 1024]/8); im5=imresize(im1, [1024 1024]/16); im6=imresize(im1, [1024 1024]/32); figure;imshow(im1) figure;imshow(im2) figure;imshow(im3) figure;imshow(im4) figure;imshow(im5)
  • 10. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing generating figure of slide 7 figure; subplot(2,3,1);imshow(im1);subplot(2,3,2);imshow(im2) subplot(2,3,3);imshow(im3);subplot(2,3,4);imshow(im4) subplot(2,3,5);imshow(im5);subplot(2,3,6);imshow(im6)
  • 11. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Quantization 8-bit 7-bit 6-bit 5-bit 4-bit 3-bit 2-bit 1-bit
  • 12. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing generating figure of slide 11 im=imread('obelix.jpg'); im=rgb2gray(imread('obelix.jpg')); im1=imresize(im, [1024 1024]); im2= gray2ind(im1,2^7); im3= gray2ind(im1,2^6); im4= gray2ind(im1,2^5); im5= gray2ind(im1,2^4); im6= gray2ind(im1,2^3); im7= gray2ind(im1,2^2); im8= gray2ind(im1,2^1);
  • 13. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing figure; subplot(2,4,1);imshow(im1,[]);subplot(2,4,2);imshow(im2,[]) subplot(2,4,3);imshow(im3,[]);subplot(2,4,4);imshow(im4,[]) subplot(2,4,5);imshow(im5,[]);subplot(2,4,6);imshow(im6,[]) subplot(2,4,7);imshow(im7,[]);subplot(2,4,8);imshow(im8,[])
  • 14. Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Summary  We have looked at:  What is sampling?  What is spatial resolution?  What is quantization?  What is grey-level resolution?  Next time we will start to see zooming and interpolation