|
| 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. |
Data:
ALSO: CHECK OUT THE DIGITAL CAMERA AND TAKE A PICTURE OF A PERSON'S FACE |
||||||||
| 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 "Enhancement by Point Processing" paper) on Image A. Try both quantized amplitude scaling and histogram equalization (see 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. |
| 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? |
| Problem 3:
Using connected components (8-connectedness) develop a function which can determine the number of independent elements in a binary image. It should take as input a binary image and output the number of elements contained in the image. Test the function on images C and D. Now, create a component labeling function, you can alter your connected components function, which should output a set of images, each one containing a region from the input image. Test your function on Images C and D. (Use subplot to display multiple images on one window in MATLAB, type help subplot to see how it works) Example output:
|
| Problem 4:
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):
Test your warping function on Image F and The image you took with the digital camera. |
| Problem 5:
Implement the polynomial warping function described on page 430 of the Geometrical Image Modification Handout. To do this, you will need to: 1. Choose control points in the original image and the warped version. This defines your warping function, by choosing around 10-12 points in the original image and then choosing where they will end up in the warped image. 2. Use the formulations on page 432 to determine the mapping functions. 3. Input all the points of the original image and generate the warped version. [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 F and the image you took with the digital camera. |