The primary goal of this assignment is to gain experience with geometric image processing and image sampling methods. Your first task is to extend the im_short class to include new methods to shear an image by Sx in the X direction and Sy in the Y direction. In your initial implementation, use "nearest neighbor" sampling.
Next, extend the im_color class to include two new shear methods that call your im_short shear methods. This should take about 10 lines of code :)
To test your new methods, you will need to add a shear command to the menu.cpp program. Generate several sheared images using lenna.jpg or another image as input, and save your output images for your project report.
Once everything is working properly, modify your program to use "bilinear interpolation" instead of "nearest neighbor" sampling. Generate the same sheared images as above and save the results. Can you see any differences?
The formulas for image shear in the X and Y directions is given in the text book (page 88 in the 3rd edition). Use the im_short methods Scale and/or Rotate as examples when designing your shear methods. Similarly, look at how the scale/rotate methods are implemented in im_color to add your new methods. Finally, look at how the scale/rotate commands are implemented in menu.cpp when adding your shear command.
My standard advice is to develop your code incrementally so you always have something that compiles and runs, even if it is not complete.
Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Save your testing output in text files for submission on the program due date.
When you have completed your program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.
In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "submit" your documentation, program, and testing files.
The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit (50% off if less than 24 hours late, no credit if more than 24 hours late), so hand in your best effort on the due date.
You should also PRINT a copy of these files and hand them into your instructor in the department office. Include a title page which has your name and uaid, and attach your hand written design notes from above.