When applying grey scale photographic convolution, should I set the input as the gamma compressed grey Scale or the inversed the gamma compressed grey Scale?
I usually see people convoluting the Red Green and Blue separately. I think somehow I am filtering out all the RED. I am not sure if it's because I am convoluting the wrong thing.
private static Color createRGB(int rgbint) {
System.out.println(rgbint);
int red;
int blue;
int green;
System.out.println(rgbint);
if (rgbint <= 255) {
red = green = blue = rgbint;
} else {
red = (rgbint & 0x00FF0000) >> 16;
blue = rgbint & 0x000000FF;
green = (rgbint & 0x0000FF00) >> 8;
}
red=correctColor(red);
green=correctColor(green);
blue=correctColor(blue);
Color c = new Color(red, blue, green);
return c;
}
/**
*To filter out too large or negative numbers
*/
private static int correctColor( int color){
int c;
if(color>255){
c=255;
}else if(color<0){
c=0;
}else{
c=color;
}
return c;
}