This week's project is a single person project. The project is to implement other image processing operations and use parallel execution to speed them up.
In this week's lab, we used parallel execution to speed up the operation of inverting the colors of an image. This week's project is quite open-ended: you are to implement two operations from the following table. You may pick any two, provided they are from different columns:
|Column 1||Column 2||Column 3|
|black and white conversion||sepia conversion||lighten|
|flip horizontal||edge detection||darken|
|tint color||flip vertical||blur|
|zoom in (crop)||mirror (horizontal or vertical)||change background|
|shrink (resize smaller)||enlarge (resize bigger)||make collage from groupOfImages|
|replace color1 with color2||emboss||find/reduce redeye|
Alternatively, you may invent and implement your own original image conversion operation for one of your two operations (e.g., an Andy Warhol effect).
For each of your operations, you are to:
You are to research sequential algorithms for your operations, implement your algorithms in C++, use TSGL to display the resulting images, and parallelize your algorithms using OpenMP. There are many online sources for such algorithms. For example, this book by Mark Guzdial and Barbara Ericson contains Java implementations of many of these algorithms, which should be fairly easy to convert to C++. Likewise, there are many tutorials available (e.g., here and here).
You should make each operation a method of class ImageConverter, using the invertImage() operation from this week's lab exercise as a model. In particular, your operation should read pixels from one image (i.e., the image pointed to by myCanvas1) and write transformed pixels to a different Canvas object, rather than transforming the pixels of the original Canvas. Also, be sure to incorporate into your operation a Timer object and sleep() calls, to slow the processing sufficiently for you to see each thread drawing its pixels.
You may find the API documentation for TSGL to be useful, as well as this page of OpenMP resources.
CS > 112 > Projects > 10