$25.00
1. Consider the two images subsets, S1 and S2, shown in the following figure. For V = {1},
determine whether these two subsets are (a) 4-adjacent, (b) 8-adjacent, or (c) m-adjacent.
S1 S2
0 0 0 0 0 0 0 1 1 0
1 0 0 1 0 0 1 0 0 1
1 0 0 1 0 1 1 0 0 0
0 0 1 1 1 0 0 0 0 0
0 0 1 1 1 0 0 1 1 1
2. Consider the image segment shown.
(a) Let V = {0, 1} and compute the lengths of the shortest 4-, 8-, and m-path between p and q.
If a particular path does not exist between these two points, explain why.
(b) Repeat for V = {1, 2}
3 1 2 1 (q)
2 2 0 2
1 2 1 1
(p) 1 0 1 2
3. Spatial Transforms and Filtering
1. Implement the histogram equalization to the input images Q2_1_1.tif and Q2_1_2.tif ; submit your
code and the output images. The implementation is developed in a form of
Function [OutputImage, OutputHist, InputHist]=HistEqu_学号(InputImage);
2. Specify a histogram for image Q2_2.tif, such that by matching the histogram of Q2_2.tif to the
specified one, the image is enhanced. Implement the specified histogram matching to the input
image Q2_2.tif. You may refer to the histogram given in the Lecture Notes 2 page 49, but not
necessary to use the same one. Submit your specified histogram as a histogram plot, and a
Matlab .mat file. Submit your code and the output image. The implementation is developed in a
form of
Function [OutputImage, OutputHist, InputHist]=HistMatch_学号(InputImage, SpecHist);
3. Implement the local histogram equalization to the input images Q2_3.tif; submit your code and the
output image. The implementation is developed in a form of
Function [OutputImage, OutputHist, InputHist] = LocalHistEqu_学号(ImageImage, mSize);
4. Implement an algorithm to reduce the salt-and-pepper noise of an image; submit your code and the
output image. The input image is Q2_4.tif. The implementation is developed in a form of
Function [OutputImage] = ReduceSAP_学号(InputImage, nsize);
In the above, InputImage is the file name of the input image, OutputImage is the file name of the
output image, InputHist and OutputHist are vectors containing the histogram of the input image and
output image, and SpecHist is a vector containing a specified histogram of the input image; nsize is a
scale of the neighborhood size, and msize is a scale of the filter size.
Submission:
Send your answers and codes to
11749181@mail.sustc.edu.cn 助教马定妃 with the following formats.
Email subject: DIP assignment & lab 2
Naming rules for files to be submitted:
Answers_学号.doc or .pdf: The answer of Questions 1 and 2, and any necessary explanations of
your algorithms.
FunctionName.m: The Matlab codes of the above 4 algorithms.
InputImageName_学号.tif: The file names of the output images.
WhatsApp us