Top Banner
EFFECT OF VARYING NUMBER OF SAMPLES ON IMAGE QUALITY LAKSHMI.M M.E, COMMUNICATION SYSTEMS
15

Effects of varying number of samples in an image

Jun 11, 2015

Download

Education

lakshmymk

What is the effect of varying number of samples in an image. . includes matlab code ..
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Effects of varying number of samples in an image

EFFECT OF VARYING NUMBER OF SAMPLES ON

IMAGE QUALITY

LAKSHMI.MM.E, COMMUNICATION SYSTEMS

Page 2: Effects of varying number of samples in an image

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.

Page 3: Effects of varying number of samples in an image

SAMPLING

UPSAMPLING- INCREASING THE NUMBER OF SAMPLES

DOWNSAMPLING- DECREASING THE NUMBER OF SAMPLES

Page 4: Effects of varying number of samples in an image

Upsampling and Downsampling of a discrete signal

Page 5: Effects of varying number of samples in an image
Page 6: Effects of varying number of samples in an image

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);

Page 7: Effects of varying number of samples in an image

Fig1.1024*1024

Fig2. 512*512

Fig3. 256*256

Fig4. 128*128

Fig5. 64*64

Fig6. 32*32

DOWNSAMPLED IMAGES

Page 8: Effects of varying number of samples in an image

EFFECT OF VARYING NUMBER OF SAMPLES

256*256 256*256

Downsampled by a factor of 3

Upsampled by a factor of 3

Page 9: Effects of varying number of samples in an image

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); %downsamplingdown=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);

Page 10: Effects of varying number of samples in an image

Pixel values of original image

Page 11: Effects of varying number of samples in an image

EFFECT OF VARYING NUMBER OF SAMPLES

256*256 256*256

Upsampled by a factor of 3

Downsampled by a factor of 3

Page 12: Effects of varying number of samples in an image

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);%upsamplingup=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 imagedown=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);

Page 13: Effects of varying number of samples in an image
Page 14: Effects of varying number of samples in an image

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.

Page 15: Effects of varying number of samples in an image

THANK YOU