SlideShare a Scribd company logo
EFFECT OF VARYING
NUMBER OF SAMPLES ON
IMAGE QUALITY
LAKSHMI.M
M.E, COMMUNICATION SYSTEMS
SAMPLING
Sampling is the first operation done in digitalization of
an analog signal followed by quantization
Sampling - principal factor determining the spatial
resolution of an image.
Spatial resolution is the smallest discernible detail in an
image.
SAMPLING
UPSAMPLING
- INCREASING THE NUMBER OF SAMPLES
DOWNSAMPLING
- DECREASING THE NUMBER OF SAMPLES
Upsampling and Downsampling of a
discrete signal
CODE FOR DOWNSAMPLING:
clc;
clear all;
close all;
f=imread('cameraman.tif');
y=imresize(f,[1024 1024]);
figure; imshow(y);
down=y(1:2:end,1:2:end);
figure; imshow(down);
down1=y(1:4:end,1:4:end);
figure; imshow(down1);
down2=y(1:8:end,1:8:end);
figure; imshow(down2);
down3=y(1:16:end,1:16:end);
figure; imshow(down3);
down4=y(1:16:end,1:16:end);
figure; imshow(down4);
Fig1.
1024*1024
Fig2.
512*512
Fig3.
256*256
Fig4.
128*128
Fig5.
64*64
Fig6.
32*32
DOWNSAMPLED IMAGES
EFFECT OF VARYING NUMBER OF SAMPLES
256*256 256*256
Downsampled by
a factor of 3
Upsampled by a
factor of 3
clc;
clear all;
close all;
f=imread('cameraman.tif');
y=imresize(f,[8 8]);
figure; imshow(y);
disp(y);
display('size of original image:');
l1=size(y);
disp(l1);
%downsampling
down=y(1:2:end,1:2:end);
disp(down);
display('size of downsampled image:');
l2=size(down);
disp(l2);
figure; imshow(down);
Upsampling the downsampled image
% upsampling the downsampled image
up=down(1:0.4:end,1:0.4:end);
disp(up);
display('size of upsampled image:');
l3=size(up);
disp(l3);
figure; imshow(up);
Pixel values of original image
EFFECT OF VARYING NUMBER OF SAMPLES
256*256 256*256
Upsampled by a
factor of 3
Downsampled by
a factor of 3
f=imread('cameraman.tif');
y=imresize(f,[4 4]);
display('pixel values of original image');
figure; imshow(y);
title('original image');
disp(y);
display('size of original image:');
l1=size(y);
disp(l1);
%upsampling
up=y(1:0.4:end,1:0.4:end);
display('pixel values of downsampled
image');
disp(up);
display('size of upsampled image:');
l2=size(up);
disp(l2);
figure; imshow(up);
title('upsampled image');
Downsampling the upsampled image
%downsampling the upsampled image
down=up(1:2:end,1:2:end);
display('pixel values of reconstructed
image');
disp(down);
display('size of reconstructed image:');
l2=size(down);
disp(l2);
figure; imshow(down);
Inference:
Downsampling provides reduced pixel value
image which when zoomed, results in poor
image quality
In upsampling, no pixel value is removed
and hence when downsampled to its original
image size, almost the original image quality
is obtained.
THANK YOU

More Related Content

What's hot

What's hot (20)

Link power and rise time budget analysis
Link power and rise time budget analysisLink power and rise time budget analysis
Link power and rise time budget analysis
 
Adaptive equalization
Adaptive equalizationAdaptive equalization
Adaptive equalization
 
Monolithic ic
Monolithic icMonolithic ic
Monolithic ic
 
Mimo
MimoMimo
Mimo
 
Visible light communication
Visible light communicationVisible light communication
Visible light communication
 
Photo detector noise
Photo detector noisePhoto detector noise
Photo detector noise
 
Diversity Techniques in Wireless Communication
Diversity Techniques in Wireless CommunicationDiversity Techniques in Wireless Communication
Diversity Techniques in Wireless Communication
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
Aperture antennas
Aperture antennasAperture antennas
Aperture antennas
 
Vsat access control protocols
Vsat access control protocolsVsat access control protocols
Vsat access control protocols
 
Smart Antenna
Smart AntennaSmart Antenna
Smart Antenna
 
Introduction to equalization
Introduction to equalizationIntroduction to equalization
Introduction to equalization
 
Concept of Diversity & Fading (wireless communication)
Concept of Diversity & Fading (wireless communication)Concept of Diversity & Fading (wireless communication)
Concept of Diversity & Fading (wireless communication)
 
Optical Detector PIN photodiode
Optical Detector PIN photodiodeOptical Detector PIN photodiode
Optical Detector PIN photodiode
 
Antenna basics from-r&s
Antenna basics from-r&sAntenna basics from-r&s
Antenna basics from-r&s
 
Design and Simulation Microstrip patch Antenna using CST Microwave Studio
Design and Simulation Microstrip patch Antenna  using CST Microwave StudioDesign and Simulation Microstrip patch Antenna  using CST Microwave Studio
Design and Simulation Microstrip patch Antenna using CST Microwave Studio
 
Pulse width modulation
Pulse width modulationPulse width modulation
Pulse width modulation
 
Antenna (2)
Antenna (2)Antenna (2)
Antenna (2)
 
Optical receivers
Optical receiversOptical receivers
Optical receivers
 
Phased array antenna
Phased array antennaPhased array antenna
Phased array antenna
 

Similar to Effects of varying number of samples in an image

Matlab fair-record-model
Matlab fair-record-modelMatlab fair-record-model
Matlab fair-record-model
ajaydev1111
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
Saideep
 

Similar to Effects of varying number of samples in an image (15)

Dsp manual
Dsp manualDsp manual
Dsp manual
 
Matlab fair-record-model
Matlab fair-record-modelMatlab fair-record-model
Matlab fair-record-model
 
Introduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodIntroduction to image contrast and enhancement method
Introduction to image contrast and enhancement method
 
Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report Digital signal Processing all matlab code with Lab report
Digital signal Processing all matlab code with Lab report
 
Matlab programs
Matlab programsMatlab programs
Matlab programs
 
image enhancement.pptx
image enhancement.pptximage enhancement.pptx
image enhancement.pptx
 
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
 
Signal and image processing on satellite communication using MATLAB
Signal and image processing on satellite communication using MATLABSignal and image processing on satellite communication using MATLAB
Signal and image processing on satellite communication using MATLAB
 
DSP_EXP.pptx
DSP_EXP.pptxDSP_EXP.pptx
DSP_EXP.pptx
 
Test
TestTest
Test
 
matlab.docx
matlab.docxmatlab.docx
matlab.docx
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques
 
ResearchPaper_Final
ResearchPaper_FinalResearchPaper_Final
ResearchPaper_Final
 
Bicubic interpolation codes
Bicubic interpolation codesBicubic interpolation codes
Bicubic interpolation codes
 

Recently uploaded

plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
parmarsneha2
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Extraction Of Natural Dye From Beetroot (Beta Vulgaris) And Preparation Of He...
Extraction Of Natural Dye From Beetroot (Beta Vulgaris) And Preparation Of He...Extraction Of Natural Dye From Beetroot (Beta Vulgaris) And Preparation Of He...
Extraction Of Natural Dye From Beetroot (Beta Vulgaris) And Preparation Of He...
 

Effects of varying number of samples in an image

  • 1. EFFECT OF VARYING NUMBER OF SAMPLES ON IMAGE QUALITY LAKSHMI.M M.E, COMMUNICATION SYSTEMS
  • 2. SAMPLING Sampling is the first operation done in digitalization of an analog signal followed by quantization Sampling - principal factor determining the spatial resolution of an image. Spatial resolution is the smallest discernible detail in an image.
  • 3. SAMPLING UPSAMPLING - INCREASING THE NUMBER OF SAMPLES DOWNSAMPLING - DECREASING THE NUMBER OF SAMPLES
  • 4. Upsampling and Downsampling of a discrete signal
  • 5.
  • 6. CODE FOR DOWNSAMPLING: clc; clear all; close all; f=imread('cameraman.tif'); y=imresize(f,[1024 1024]); figure; imshow(y); down=y(1:2:end,1:2:end); figure; imshow(down); down1=y(1:4:end,1:4:end); figure; imshow(down1); down2=y(1:8:end,1:8:end); figure; imshow(down2); down3=y(1:16:end,1:16:end); figure; imshow(down3); down4=y(1:16:end,1:16:end); figure; imshow(down4);
  • 8. EFFECT OF VARYING NUMBER OF SAMPLES 256*256 256*256 Downsampled by a factor of 3 Upsampled by a factor of 3
  • 9. clc; clear all; close all; f=imread('cameraman.tif'); y=imresize(f,[8 8]); figure; imshow(y); disp(y); display('size of original image:'); l1=size(y); disp(l1); %downsampling down=y(1:2:end,1:2:end); disp(down); display('size of downsampled image:'); l2=size(down); disp(l2); figure; imshow(down); Upsampling the downsampled image % upsampling the downsampled image up=down(1:0.4:end,1:0.4:end); disp(up); display('size of upsampled image:'); l3=size(up); disp(l3); figure; imshow(up);
  • 10. Pixel values of original image
  • 11. EFFECT OF VARYING NUMBER OF SAMPLES 256*256 256*256 Upsampled by a factor of 3 Downsampled by a factor of 3
  • 12. f=imread('cameraman.tif'); y=imresize(f,[4 4]); display('pixel values of original image'); figure; imshow(y); title('original image'); disp(y); display('size of original image:'); l1=size(y); disp(l1); %upsampling up=y(1:0.4:end,1:0.4:end); display('pixel values of downsampled image'); disp(up); display('size of upsampled image:'); l2=size(up); disp(l2); figure; imshow(up); title('upsampled image'); Downsampling the upsampled image %downsampling the upsampled image down=up(1:2:end,1:2:end); display('pixel values of reconstructed image'); disp(down); display('size of reconstructed image:'); l2=size(down); disp(l2); figure; imshow(down);
  • 13.
  • 14. Inference: Downsampling provides reduced pixel value image which when zoomed, results in poor image quality In upsampling, no pixel value is removed and hence when downsampled to its original image size, almost the original image quality is obtained.