|
| 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 function(s) (testfunc.m, threshold.m, etc.) you used.
Zip or tar your document with your source code (m-files) into a file called [Lastname_FirstInitial_Lab3.zip/tar] and email it to mcchang@lems.brown.edu with the subject "EN161 Lab3". |
| Overview:
This lab allows you to start playing with the some tools of image processing. Refer to the handouts given out in class for help. NOTE (once again): Any coordinates given in this handout are in the form of [x, y]. MATLAB, however, is reversed in its array handling, it uses IMAGE(height_coordinate, width_coordinate), be careful with this. |
| Problem 1:
Display the histogram of Image A (you can use the matlab function hist). Can you correspond any of the peaks of the histogram with elements of the image? Perform contrast enhancement techniques (check the handout Enhancement by Point Processing (p1, p2, p3, p4, p5, p6, p7,p 8) on Image A. Try both quantized amplitude scaling and histogram equalization (see the handout of Image Enhancement, Pratt 276-279). The second technique should give you a uniform histogram. Save the resulting images and display the histograms of the original and modified image. ![]() Image A |
| Problem 2:
Create a region filling algorithm (however you want to do it is fine as long as it works :) ). Your algorithm should take in an image as input and display the resulting image with the new filled regions. Test it on Images B and C. Can you foresee any image structures that would cause your algorithm to fail? ![]() Image B Image C |
| Problem 3:
Boundary following. Refer to the handout of SEGMENT LABELING (p1, p2). Implement the two bug following algorithms (Fig 18.6-2) and test them on the following airplane image. Report the crack codes of your boundary following results. Report your observation and compare your results on how each algorithm follows the contour. Is there any problem on the interior 'holes' of the object? ![]() Image D |
| Problem 4:
Image Filtering. For this problem you will filter an image with various customized filtering kernels. Convolve the given image with the following filters: 3x3 Box filter: [1 1 1 ; 1 1 1; 1 1 1] / 9 3x3 horizontal filter: [0 0 0 ; 1 1 1; 0 0 0] / 3 3x3 vertical filter: [0 1 0; 0 1 0; 0 1 0] / 3 3x3 'circular'-shape filter: [0 1 0; 1 1 1; 0 1 0] / 5 5x5 box filter: [1 1 1 1 1; 1 1 1 1 1; 1 1 1 1 1; 1 1 1 1 1; 1 1 1 1 1] / 25 5x5 circular-shape filter: [0 1 1 1 0; 1 1 1 1 1; 1 1 1 1 1; 1 1 1 1 1; 0 1 1 1 0] / 21 Be careful on the image boundary when performing filtering. Report the results you get and compare them. Which filter(s) do you think smooth the image better? ![]() Image E
|