Many videos and web sites contain a lot of flashing images. This can be a problem for people with epilepsy. There is currently a free Photosensitive Epilepsy Analysis Tool (PEAT) tool that can gauge whether a web site or video is capable of inducing photosensitive epileptic seizures. The tool is for web developers to ensure that they are aware if their sites can induce a seizure. This program works well for web developers aware of the issues.
PEAT is designed as a free, downloadable resource for web developers to identify seizure risks in their web content and software. It is NOT designed to analyze commercial videos or games, to remove epilepsy risks, or for day-to-day web site screening by a person with photosensitive epilepsy. It also cannot make unsafe videos safe (but others can use it to figure out how to make small changes in their content to make it safe). – PEAT User Guide
I wish to start with a Google Chrome extension that detects if a Youtube video is capable of inducing a photosensitive seizure. It is often difficult to determine the contents of a Youtube before it starts. Before it plays, there should be a warning if there is a possibility of inducing seizures. If the user is on Youtube, it will take the video before playing, analyze the frames and determine if there are high contrast flashes that occur in the video. If there are, a warning box will appear in the window before playing the video to see if the user wants to continue or not.
To extend this to websites in general, the PEAT tool takes a video of the site contents while it’s loading and running. This video is then analyzed and can then be used to see the implications of certain Flash applications or animations. I would try something similar to this and provide a warning before the website renders and/or offer a warning in the browser URL bar.
The image intensity can be calculated for each frame and compared to the previous and next frames to determine whether there is a large change in intensity. The basic calculations are easy, but optimizing for speed is something I need to look into.