Question
(Matlab) Take an image, downsample and convert to black and white with the follwoing code: image_BW=rgb2gray(image); image_DS=downsample(image_BW,3); The simplest interpolation would be reconstruction with a
(Matlab) Take an image, downsample and convert to black and white with the follwoing code:
image_BW=rgb2gray(image);
image_DS=downsample(image_BW,3);
The simplest interpolation would be reconstruction with a square pulse which produces a zero-order hold. Here is a method that works for a one-dimensional signal (i.e., one row or one column of the image), assuming that we start with a row vector xr1, and the result is the row vector xr1hold.
xr1 = (-2).(0:6);
L = length(xr1);
nn = ceil((0.999:1:4*L)/4); %<-- Round up to the integer part
xr1hold = xr1(nn);
Use this method to up sample the down sampled gray scale image by a factor of 3 and try to restore the orignal image. Interpolate both on rows and columns. Display the new image.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started