This is awesome (both the idea and the writeup) but I missed the bit about object recognition? It must have been necessary to detect and extract the rectangle representing the TV screen from the captured webcam image (even if the framing/positioning of the webcam were perfect, most webcams are 4:3 aspect ratio), but was a skew transformed performed to correct for any perspective issues? Assuming such a transform were written, wouldn’t it have been trivial to throw up a white sheet of paper next to the tv and have that represent your neutral as a white point reference?