1. Write a Matlab function (m-file) that performs downsampling of the original
image using a variable rate N. You will use two input image files (provided):
– ‘Xray.tif’
– ‘arteriogram.tif’
Your code and write-up will show results for N=2 and N=5 on both input images.
Downsampling is performed by uniform sampling at a spatial period of N (for both
rows and columns), as shown in the diagram on the left.
The inputs of your function will be the original image and
the down-sampling rate, while the output will be the
downsampled image. You also need to display the input and
output side by side.
This exercise is an opportunity to become familiar with
matrix indexing in Matlab, as opposed to using for loops,
which are computationally intensive and thus inefficient. For
instance, consider the matrix A
The expression 1:k creates a vector of integer values from 1
to k, so we can select a submatrix T2 of A by using indexing
with a single colon.
Using the colon operator twice allows you to access
elements of A spaced at a uniform distance. The
general syntax of this indexing is
start_location: space : end_location
2. Write a Matlab function ((m-file) that lowers the bit resolution of the original
input image by powers of 2 (B=3, 4, 5). The modification of the bit resolution is
shown in the diagram below. You will use the ‘Xray.tif’ image provided. Your code
will display the input and output image side by side, or in different figures.
As in Part 1, we need to avoid the use of for loops.
The division by 2^B will result in a non-integer
number, so a rounding operation needs to be
performed afterwards. This is implemented in
Matlab by round( ).
To display images with low dynamic range you
may use the imshow command with a specific
syntax, where the display range is specified.
To submit: one zip file, containing two m-files (one for each part) and a pdf file
containing a brief discussion of your results. Your discussion should focus on how
the quality of the image is affected by varying the spatial resolution (part 1), and the
intensity resolution (part 2).
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read moreClick one of our contacts below to chat on WhatsApp