{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Interactive Computer Graphics: A Top-Down Approach Using OpenGL (4th Edition)

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS/ECE 433 Introduction to Computer Graphics, Fall 2007 Homework 1 Due Sunday, September 23, 2007 at 11:59pm In this homework, you will get your hands dirty with 2D raster graphics, like we have been talking about in class. 1. Bilinear Resampling (30 pts) You have been hired at Adobe to work on the new version of Photoshop. They want a complete re-write of their codebase, and you have been assigned the task of writing the new bilinear resampling for scaling images. This is the algorithm that will run on an image when the user selects “Image->ImageSize” and changes the size of an image using bilinear resampling. You are to write a C or C++ program called LinearResample.exe that takes in an image in various possible formats and outputs it at a different size by using bilinear resampling. The executable should take in the following arguments: LinearResample.exe <input> <new width> <new height> <output> Where <input> and <output> are the input and output images, respectively. The output image should have the resolution given by <new width> x <new height> and the images could be in the jpg, tif, or bmp formats as specified by their extension. So for example, I would run the following to scale my test1.tif image into a 50 x 25 image which is saved as out.tif: LinearResample.exe test1.tif 50 25 out.tif Remember, the output image can be bigger or smaller than the original. The user can also change the aspect ratio. For example, one dimension can be increased while the other is decreased (see the examples below). Your program should produce an output that is visually comparable to that of using the bilinear resampling filter in Photoshop. To help you get started, I provide you with a Visual Studio solution file called ImageProc which reads in and image and saves it back out as a different filename. This code uses the Windows CImage class to read and write image, but feel free to write your own if you want (although writing a function to read/write jpegs is probably not a valuable use of your time). You can also use any standard image I/O library if there is another you prefer
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
or if you want to do your coding on something other than Windows. Just make sure that your final submission compiles and runs on the Windows machines in the lab, so please test it there before you submit and include any of the libraries or dll’s you need. Also please note in the comments any code you borrow. You are not to use someone else’s code to do the actual filtering. In terms of the filtering, remember that you can use different convolution kernels for upsampling and downsampling of the image.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 5

Homework 1 - CS/ECE 433 Introduction to Computer Graphics...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online