11
0
Look at these photographs of natural scenes, with one of the RGB channels taken out of them:
Source (with red): https://en.wikipedia.org/wiki/File:Altja_j%C3%B5gi_Lahemaal.jpg
Source (with green): https://commons.wikimedia.org/wiki/File:2007_mather-lake_hg.jpg
Source (with blue): https://commons.wikimedia.org/wiki/File:Fox_01.jpg
Even without one of the channels, you can probably make out what colours certain things are supposed to be, or at least have a good idea if a reconstruction of the missing channel is accurate.
For example, here is the first picture with a red channel added back onto it which is just random noise:
This image clearly isn't an accurate reconstruction of the red channel. This is because nature photos generally don't use the entire RGB spectrum, but only a subset of "natural-looking colours". Also, the shades of red will follow certain gradients that correlate with the others.
Your task is to build a program that will take a photograph that's had one channel removed and attempt to approximate the original image as closely as possible by reconstructing what it believes is the missing channel.
Your program will be scored on how closely the missing channel matches with the channel of the original image, by counting the percentage of pixels whose values of that channel are within ±15 (inclusive) of the actual value in the original image (where the values range from 0 to 255 as in a standard 8-bit colour channel).
The test cases that your program will be scored on can be found here (9.04 MB zip file, 6 images). Currently it only contains the three example images above and their originals, but I'll add a few more later to make the full suite once I've done them.
Each image is scaled down and cropped to 1024 x 768, so they will have the same weight in your score. The program that can predict the most pixels within the given tolerance wins.
1Could you write a scoring program, e.g. in Python? – orlp – 2016-05-03T07:29:22.690
I'll get to that tomorrow. Right now I need to go to bed. – Joe Z. – 2016-05-03T07:30:39.533
Is there a limit to runtime of the program? – Lause – 2016-05-04T13:43:18.097
@Lause The limit is your patience for the program to actually produce output. – Joe Z. – 2016-05-04T14:21:20.280