SlideShare a Scribd company logo
1 of 15
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

Digital Modulation Techniques ppt
Digital Modulation Techniques pptDigital Modulation Techniques ppt
Digital Modulation Techniques pptPankaj Singh
 
cellular concepts in wireless communication
cellular concepts in wireless communicationcellular concepts in wireless communication
cellular concepts in wireless communicationasadkhan1327
 
Nyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelNyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelPriyangaKR1
 
Radar Systems -Unit- I : Radar Equation
Radar Systems -Unit- I : Radar Equation Radar Systems -Unit- I : Radar Equation
Radar Systems -Unit- I : Radar Equation VenkataRatnam14
 
3F3 – Digital Signal Processing (DSP) - Part1
3F3 – Digital Signal Processing (DSP) - Part13F3 – Digital Signal Processing (DSP) - Part1
3F3 – Digital Signal Processing (DSP) - Part1op205
 
9. parameters of mobile multipath channels
9. parameters of mobile multipath channels9. parameters of mobile multipath channels
9. parameters of mobile multipath channelsJAIGANESH SEKAR
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation pptPriyanka Mathur
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effectsPeriyanayagiS
 
Spread spectrum techniques
Spread spectrum techniquesSpread spectrum techniques
Spread spectrum techniquesFaisal Ch
 
L 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmL 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmDEEPIKA KAMBOJ
 
Broadband antennas
Broadband antennasBroadband antennas
Broadband antennasAJAL A J
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation pptsanjeev2419
 
Large scale path loss 1
Large scale path loss 1Large scale path loss 1
Large scale path loss 1Vrince Vimal
 
Digital Communication 1
Digital Communication 1Digital Communication 1
Digital Communication 1admercano101
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNALkaran sati
 
Mimo in Wireless Communication
Mimo in Wireless CommunicationMimo in Wireless Communication
Mimo in Wireless Communicationkailash karki
 
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 analysisCKSunith1
 

What's hot (20)

Digital Modulation Techniques ppt
Digital Modulation Techniques pptDigital Modulation Techniques ppt
Digital Modulation Techniques ppt
 
cellular concepts in wireless communication
cellular concepts in wireless communicationcellular concepts in wireless communication
cellular concepts in wireless communication
 
Nyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelNyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channel
 
Matched filter
Matched filterMatched filter
Matched filter
 
Radar Systems -Unit- I : Radar Equation
Radar Systems -Unit- I : Radar Equation Radar Systems -Unit- I : Radar Equation
Radar Systems -Unit- I : Radar Equation
 
3F3 – Digital Signal Processing (DSP) - Part1
3F3 – Digital Signal Processing (DSP) - Part13F3 – Digital Signal Processing (DSP) - Part1
3F3 – Digital Signal Processing (DSP) - Part1
 
9. parameters of mobile multipath channels
9. parameters of mobile multipath channels9. parameters of mobile multipath channels
9. parameters of mobile multipath channels
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation ppt
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 
Spread spectrum techniques
Spread spectrum techniquesSpread spectrum techniques
Spread spectrum techniques
 
L 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmL 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcm
 
communication system ch1
communication system ch1communication system ch1
communication system ch1
 
Broadband antennas
Broadband antennasBroadband antennas
Broadband antennas
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation ppt
 
Large scale path loss 1
Large scale path loss 1Large scale path loss 1
Large scale path loss 1
 
Sampling Theorem
Sampling TheoremSampling Theorem
Sampling Theorem
 
Digital Communication 1
Digital Communication 1Digital Communication 1
Digital Communication 1
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
 
Mimo in Wireless Communication
Mimo in Wireless CommunicationMimo in Wireless Communication
Mimo in Wireless Communication
 
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
 

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-modelajaydev1111
 
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 methodAbhishekvb
 
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 Alamgir Hossain
 
imageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptximageenhancementtechniques-140316011049-phpapp01 (1).pptx
imageenhancementtechniques-140316011049-phpapp01 (1).pptxsalutiontechnology
 
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 MATLABEmbedded Plus Trichy
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques Arshad khan
 
Bicubic interpolation codes
Bicubic interpolation codesBicubic interpolation codes
Bicubic interpolation codesmmjalbiaty
 

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

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

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.