Due: Tuesday, March 23, 2004 (4:00 AM on Mar 24 for night owls).
Credit (U-grad): Approximately 6 points (Relative, and very rough absolute weighting)
Credit (Grad): Approximately 5 points (Relative, and very rough absolute weighting)
This assignment is meant to help you get familiar with some useful tools and ideas. It is not meant to be mathematically or technically difficult. If you are having trouble, please see Scott rather than beat your head against a wall. (Expend your creative energy on the project instead).
You can do this assignment in either Matlab or C/C++ using whatever libraries you like.
For those wanting to use the KJB libray, I have tweaked it a bit for this assigment. Recall that there is an example program and a compile line available in this directory . There are hopefully enough comments in example.c to get you started. The file compile_line deals with the complexities of including and linking. (Those that are using the library more seriously in the long run should, at some point, talk to me regarding a more sophisticated way to use the library which is necessary if you want to modify it). The files matrix.txt and image.tiff can be used as data for the example program.
If you are using the KJB library, the following routines might prove useful (man
pages should be available, although the quality may not be high!):
kjb_read_image kjb_write_image kjb_display_image ow_make_black_and_white_image bw_image_to_matrix matrix_to_bw_image get_1D_gaussian_mask get_2D_gaussian_mask x_convolve_matrix y_convolve_matrix convolve_matrixMatlab users: Some functions which may prove helpful are:
conv2To keep things simple, we will focuss on black and white (gray level) images. This means that an image is basically a matrix. Thus both in Matlab and in C it likely easiest to get the image into a matrix, work on the matrix, and then convert the matrix back to an image for IO.
An example BW image is here.
In case the word "roughly the same" confuses you in what follows: In several cases there are some subleties in implementing the various strategies for calculating the same quantity multiple ways, so just because they are mathemetically the same, checking that things are working may not require that you get exactly the same answer. What to hand in: : Your source code, and executable (if C), a README answering the few questions asked as well as any other comments about your work which are relevent, and the result images requested for one input image. If your input image is not the one pointed to above, also provide your input image. It is quite instructive to run your code on a number of different kinds of images, but this is not required.
Do you expect any speed difference? Why? Do you see any speed difference? (You may want to put the convolution in a loop, or use a bigger sigma and image to test for time differences).
Matlab users: This is just a matter of calling conv2 with different parameters.
KJB library users: See x_convolve_matrix and y_convolve_matrix.