Question: The standard grayscale algorithm sets the gray value to the sum of 30% of the red value, 59% of the green value, and 11% of
The standard grayscale algorithm sets the gray value to the sum of 30% of the red value, 59% of the green value, and 11% of the blue value Each pixel is composed of three components: red, green, and blue. These are fields in the Pixel class. Acceptable values for these components range from 0 to 255
Here is what I have so far still needed a few more lines of code. I'm really stuck. Please help me with my current code

public void filter (PixelImage theImage) (l // get the data from the image Pixel data - theImage. getDataO: for (int row = 0; row the Image. getHeight(); row++) { for (int col = 0; col the Image . getWidth ( ) / 2; col++) { Pixel temp = data [ row] [col]; int red = ; int green = int blue = r; //int average = //rgb. (a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
