Hi I'm new to coding and dont really know that much, but I have a homework assignment where I'm suppose too create a "sophisticated grey scale" instead of add up all the red, green, and blue pixel and then dividing it by 3.
It says "obtain the new RGB values, instead of adding up the color values and diving by three, you should multiply each one by a weight factor and add the results."
This is what I have so far and not sure where to go from here.
import images.*; public class SophisiticatedGreyScale { public static void main (String args[]) { APImage image = new APImage("smokey.jpg"); image.draw(); APImage aCopy = image.clone(); for (Pixel p:aCopy) { }//end for loop aCopy.draw(); aCopy.save(); }//end method main }//end SophisiticatedGreyScale
Any help would be appreciated ^___^!