Getting used to working with arrays. Creating algorithms for working with a 2D array for image processing. Hopefully it will be interesting.
Tools
Here is the Imp program I showed in class (2 days) that you will need to
complete the assignment. Imp.java
The version linked here is slightly different than the
version I had in the lecture notes, you should use this one because it has the extra menu choices you will need.
This version has a reset picture item in the File menu.
Each menu choice under functions calls the corresponding method in the IMP class. You need to write your code in each method to solve the problems below.
What to do
Start a new project and put the IMP.java file in your project
Write code for the four methods called for below:
Function one is the code I gave you, it's an example of how to do what you need to do.
Open any picture and output the following gradient. Black is 0, white is 255 for each RGB.
Next algorithm will be opening a pic and turning it into a grayscale.
Original picture = Grayscale =
Next algorithm will take the original picture and isolate a color channel such as red. Turn everything else black.
Like this:
The last algorithm is a edge detection algorithm. Take the picture here:
And only repaint the edges leaving the rest white like this (it is possible to get it better than my results).