5

So I removed all the 'red noise' from the image but I don't recognize the person. My question is : Do I have to enhance the colors any more or do I need to just guess the identity of the person because I can see the face and I don't know who it is. Whodunit

1
  • 1
    I got the same question! Thank you for asking Uzair Ahmed! – LvdD Feb 6 '16 at 13:07
7

I got the same picture! After tweaking, I found that the reason why it's so light and hard to see is because all the coloured pixels are very close to white. What I mean is each pixel has an rgb that resembles (200,255,255). The more red, the whiter the pixel.

With that in mind, I used if statements to separate each shade of "light blue" and turned it black or grey.

Here are my if statements:

if (triple.rgbtRed == 255) {
    triple.rgbtRed = 255;
    triple.rgbtBlue = 255;
    triple.rgbtGreen = 255;
} 

if (triple.rgbtRed < 240 && triple.rgbtRed > 225) {
    triple.rgbtRed = 240;
    triple.rgbtBlue = 240;
    triple.rgbtGreen = 240;
} else if (triple.rgbtRed < 225 && triple.rgbtRed > 200) {
    triple.rgbtRed = 225;
    triple.rgbtBlue = 225;
    triple.rgbtGreen = 225;
} else if (triple.rgbtRed < 200 && triple.rgbtRed > 175) {
    triple.rgbtRed = 125;
    triple.rgbtBlue = 125;
    triple.rgbtGreen = 125;
} else if (triple.rgbtRed <= 175 && triple.rgbtRed > 150) {
    triple.rgbtRed = 60;
    triple.rgbtBlue = 60;
    triple.rgbtGreen = 60;
} else if (triple.rgbtRed <= 150 && triple.rgbtRed > 100) {
    triple.rgbtRed = 50;
    triple.rgbtBlue = 50;
    triple.rgbtGreen = 50;
} else if (triple.rgbtRed <= 150 && triple.rgbtRed > 100) {
    triple.rgbtRed = 25;
    triple.rgbtBlue = 25;
    triple.rgbtGreen = 25;
} else if (triple.rgbtRed <= 100 && triple.rgbtRed > 50) {
    triple.rgbtRed = 15;
    triple.rgbtBlue = 15;
    triple.rgbtGreen = 15;
} else if (triple.rgbtRed <= 50 && triple.rgbtRed > 0) {
    triple.rgbtRed = 0;
    triple.rgbtBlue = 0;
    triple.rgbtGreen = 0;
}

Here is the image I get afterwards:enter image description here

As you can see, there are still blotches of light blue everywhere and my background isn't completely white. It's not perfect but it's the closest I've been able to get to an enhanced image. I still have no idea who that is though.

2
  • Never gonna give you up... – Lele Carabina Nov 3 '16 at 16:00
  • Great idea! Thankyou! – Uzair Ahmed Dec 10 '16 at 18:36
2

If by enchancing you mean making the colors stronger, you can. What differentiates each of these tones of blue, if you think of the RGBTRIPLE structure? On the "stronger" pixels, the value of blue is higher. So, in order to make the image clearer, you can just increase the B component in every pixel, remebering that:

  • 255 is the limit value. Make sure it doesn't get past that.

  • The difference of tones is what makes the picture. When picking a value to add to Blue, try not to make originally different pixels look equal.

If you still can't figure out who it is, google has an image search feature.

Hope these hints are enough to get you going. Good luck with this and the rest of the Pset, you'll need it :P

2

Actually this image can be slightly better enhanced by setting different values for the three color components, I've searched the RGB value of human face (I think this guy is a white guy so I searched the white people's RGB value) and its about 0xffe0bd (http://www.color-hex.com/color-palette/737), well my idea was to create a color image like a real human face, but I failed, but the result is still satisfying. At least the eyebrows of the both sides are clearer, although the color is kinda weird:D

This is part of the code:

        if (triple.rgbtRed == 0xff)
        {
            triple.rgbtRed = 0xff;
            triple.rgbtGreen = 0xff;
            triple.rgbtBlue = 0xff;
        }

        if (triple.rgbtRed < 0xff && triple.rgbtRed > 0xee)
        {
            triple.rgbtRed = 0xff;
            triple.rgbtBlue = 0xff;
            triple.rgbtGreen = 0xff;
        } 
        else if (triple.rgbtRed <= 0xee && triple.rgbtRed > 0xdd)
        {
            triple.rgbtRed = 0xff;
            triple.rgbtBlue = 0xff;
            triple.rgbtGreen = 0xff;
        }
        else if (triple.rgbtRed <= 0xdd && triple.rgbtRed > 0xcc)
        {
            triple.rgbtRed = 0xee;
            triple.rgbtBlue = 0xe0;
            triple.rgbtGreen = 0xbd;
        }
        else if (triple.rgbtRed <= 0xcc && triple.rgbtRed > 0xbb) 
        {
            triple.rgbtRed = 0xe0;
            triple.rgbtBlue = 0xd0;
            triple.rgbtGreen = 0xb0;
        }
        else if (triple.rgbtRed <= 0xbb && triple.rgbtRed > 0xaa) 
        {
            triple.rgbtRed = 0x50;
            triple.rgbtBlue = 0x50;
            triple.rgbtGreen = 0x50;
        }
        else if (triple.rgbtRed <= 0xaa && triple.rgbtRed > 0x99) 
        {
            triple.rgbtRed = 0x45;
            triple.rgbtBlue = 0x45;
            triple.rgbtGreen = 0x45;
        }
        else if (triple.rgbtRed <= 0x99 && triple.rgbtRed > 0x66) 
        {
            triple.rgbtRed = 0x40;
            triple.rgbtBlue = 0x40;
            triple.rgbtGreen = 0x40;
        }
        else if (triple.rgbtRed < 0x66 && triple.rgbtRed > 0x55) 
        {
            triple.rgbtRed = 0x35;
            triple.rgbtBlue = 0x35;
            triple.rgbtGreen = 0x35;
        }
        else if (triple.rgbtRed < 0x55 && triple.rgbtRed > 0x44) 
        {
            triple.rgbtRed = 0x30;
            triple.rgbtBlue = 0x30;
            triple.rgbtGreen = 0x30;
        }
        else if (triple.rgbtRed <= 0x44 && triple.rgbtRed > 0x33) 
        {
            triple.rgbtRed = 0x20;
            triple.rgbtBlue = 0x20;
            triple.rgbtGreen = 0x20;
        }
        else if (triple.rgbtRed <= 0x33 && triple.rgbtRed >0x22)
        {
            triple.rgbtRed = 0x15;
            triple.rgbtBlue = 0x15;
            triple.rgbtGreen = 0x15;
        }
        else if (triple.rgbtRed <= 0x22 && triple.rgbtRed >0x11)
        {
            triple.rgbtRed = 0x10;
            triple.rgbtBlue = 0x10;
            triple.rgbtGreen = 0x10;
        }
        else if (triple.rgbtRed <= 0x11 && triple.rgbtRed > 0x00) 
        {
            triple.rgbtRed = 0x00;
            triple.rgbtBlue = 0x00;
            triple.rgbtGreen = 0x00;

        }

This is the result:enter image description here

Another noteworthy point is that certain places, like eyebrows, eyes, have certain range of RGB values, so if you want to enhance a certain range of the picture, you can first figure out the range, decrease it to make it darker, while making the surrounding places whiter by increasing the RGB values

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .