Im looking to write a browser plugin for either Firefox or chrome. I would like it to be able to detect how much 'white' color there is, on an embedded video player in a web page. For example, what percentage of the frame is between a white-ish RGB range, at any given time.
What im trying to do, is detect when there quite a lot of white in the frame, and when there is much less white in the frame.
How would I go about doing this in javascript, in a browser plugin?