|
| NOTE: Problems should be done in MATLAB. Type up your
solutions for each one including: (1) The answer to any questions posed,
(2) any resulting images (include in document), and (3) the name of any
functions you used.
Zip or tar your document with your source code (m-files) into a file called [Lastname_FirstInitial_Lab5.zip/tar] and email it to mcchang@lems.brown.edu with the subject "EN161 Lab5". |
| Overview:
This lab will introduce you to various methods of edge detection and image warping. |
| Problem 1:
Edge detection by kernel convolution. Refer to the handout of edge detection kernels (p1). Use the Matlab convolution function (conv2) to convolve the kernels over the input image to detect edges on it. Use kernels of:
Specifically look for the success of each algorithm with respect to corners, curved edges, noise inclusion/exclusion, etc. Which of the edge types above are most easily detected; which are more difficult. Provide specific examples and images to illustrate your findings. ![]() Image A Image B |
| Problem 2:
Gradient edge detection. In this problem you will explore a very simple edge detector. a. Load Image A and smooth it with a Gaussian filter to eliminate noise.
[dy,dx]=gradient(A); c. Look at the magnitude of the gradient image using imshow,
M=sqrt(dx^2+dy^2)
1. Visit every edge pixel in the binary image.
For each one, look at the gradient direction at that point (dy,dx) and
round it to the nearest of the 8 pixel directions.
Submit the thinned and unthinned images. Also try it on image B. |
| Problem 3:
Image Warping. Refer to the handout of Beyond Photography. pp. 34-72. Create an image warping function. The function should take in as input a greyscale image array and output a warped version of the image. You can implement any of the algorithms on the warping handout, for example (Function 1). You are welcome to implement all of them. It's fun!
Input (eien.jpg)
Output
Test your warping function on eien.jpg and the image you took with the digital camera. |
| Problem 4:
Image Warping. [Hint: In order to get a result like the one in figure 14.2-3, the image must be centered about the origin. However, matricies in MATLAB cannot be zero or negative. Think about how you might get around this.] Test on Image C and the image you took with the digital camera. Image C
![]()
|