script to create controller based on animated greyscale values

I'm sure someone's already done this but I can't find one - was looking for a scrpit controller that takes a video or image sequence and reacts to the greyscale value of a specific pixel - i.e white is max, black in minimum value. I have tried writing it myself but haven't really got very far. before I really get stuck into it just wondered if anyone had already done this?