EE499 Image Processing Project 1 Write Octave routines appropriate).
file in the appropriate netpbm
that take two arguments – an image as the first argument and a filename as the second argument. The routines write the image to the file format. The routines should test for the correct number of input arguments (nargin) and for the appropriate type (class or isa), dimension (ndims) and size (if There are test scripts and images for each of your routines (the images are used by the test scripts):
The test scripts read in the test image and display it. They then write the image to disk using your routine, read the image back in from the new file and display it for comparison to the original image. They also create a random-sized image, display it, write it to disk using your routine, read it back in and then display the new image for comparison to the original.
Recommendation: Don't use the test scripts to test your routine during development. Create a small (2 x 3 or so) image and use that. (You could create a small image by hand or read in one of the small netpbm text files we used in class.) Open your output file with a hex editor to see if it is correct.
Grading: +75% if your
routine passes the pgmwrite_test test script.
+15% if your
routine passes the ppmwrite_test test script.
+10% if your
routine passes the pbmwrite_test test script.
Try to avoid loops if possible (it is!!). You especially want to avoid looping over the pixels in an image.
routine will require allocating a new area of memory and twiddling bits to correspond to Octave's black and white image type.
Email your three routines as attachments to [email protected]
with the subject "EE499 – Project 1 –