程序代写代做代考 matlab algorithm University of Lincoln School of Computer Science CMP3108M – Image Processing

University of Lincoln School of Computer Science CMP3108M – Image Processing
Week 9: Image Segmentation
The test images required for this workshop can be downloaded from Blackboard
(testimages.zip).
Edge Detection
Task 1: Given an image of your choice (e.g. Lena), your task is to segment the image edge. You could firstly use Matlab function (edge()) to familiarize yourself with different edge detection methods (such as Prewitt, Sobel, Canny, etc). You are then encouraged to write your own code to implement one of the methods (e.g. Canny).
Task 2: You can also add some noise to the image using the imnoise() (e.g. salt and pepper) and then examine the effect of noise on the performance of edge detection.
Task 3: For the noisy images obtained from Task 2, you can then remove the noise and then repeat edge detection algorithms in Task 1.
Histogram based thresholding
As mentioned in the week four¡¯s workshop, in Matlab, image histogram can be constructed using the imhist, which has the following basic syntax:
>> h = imhist(I, b);
where I is the input image, h is its histogram, and b is the number of bins in the histogram (if it is not included in the function argument, b = 256 is used by default).
For a given test image, please try to segment the image based the threshold (e.g. thresh) obtained from the Histogram.
>> BW = imbinarize (I, thresh) or
>> BW = im2bw (I, thresh)
Getting Started

Otsu thresholding
Graythresh() is a Matlab function to automatically calculate Global image threshold using Otsu’s method
Please try to use this function to obtain the threshold and then segment the test images and compare the results with histogram based thresholding methods.
For the details of the Otsu method please see:
[1]Otsu, N., “A Threshold Selection Method from Gray-Level Histograms,” IEEE Transactions on Systems, Man, and Cybernetics, Vol. 9, No. 1, 1979, pp. 62-66.