0

What do we have to do in Pset 5 : Whodunit?

I know we need to analyze a file, but all I see is a lot of red pixels.

1 Answer 1

7

The image has a "secret" message on it, but the message is hidden by random pixels. We need to clean all the noise (the red pixels) and find the hidden message of whodunit.

Pixels of an image are stored as 8-bit integer triples (the so-called RGB code). Each byte of the triple represents the level (i.e. the "quantity") of the colour: R for red, G for Green and B for blue.

Setting the three bytes of the triple to 0 means "this pixel has no color in it", hence the pixel will appear black. Setting the three bytes of the triple to their maximum (255, as each value only has 8 bits, and 28 - 1 = 255), will produce a white pixel.

The colour of each pixel can then be modified by changing the value of each colour "channel", i.e. the value of each byte in the triple.

If we want to create an image having all pixels red, we should set to 255 the Red channel, and to 0 the other two channels of each pixel. In the same fashion, we can have an image with no red pixels setting to 0 the Red channel of each pixel's triple.

Now, back to our Pset: we have a picture with an hidden message in it, and the message is covered by "Red" noise: how can we get rid of the red noise of the image? The answer should be "reading each pixel (each triple of bytes), turning off the "red" channel and rewriting each pixel with the "denoised" value.

3
  • how do you go about doing it? I don't understand.
    – hunter
    Commented Aug 25, 2014 at 15:11
  • what do you mean of "turn off red channel", is it mean that set all red channel of pixel to zero like this, triple.rgbtRed = 0x00; Commented Mar 5, 2015 at 13:58
  • I got it. But the image is not clear. how can i get a clear image. Commented Nov 21, 2015 at 10:15

You must log in to answer this question.

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