Flikcer's Algorithm is based on the
"Automatic Detection of Flashing Video Content"
by Lúcia Carreira, Nelson Rodrigues, Bruno Roque and Maria Paula Queluz
of Instituto de Telecomunicações Instituto Superior Técnico, Universidade de Lisboa Lisbon, Portugal


What could cause an epileptic seizure?

Photosensitive Epilepsy (PSE) is a form of epilepsy where seizures are triggered by visual stimuli, such as flashing lights and high contrasting geometric patterns. Both natural and artificial light may trigger seizures.

What is the definition of a potential trigger?

  • A potentially harmful flicker occurs when there is a pair of opposing changes in luminance (i.e. an increase in luminance followed by a decrease, or a decrease followed by an increase) of 20 cd/m2 or more. This applies only when the screen luminance of the darker image is below 160 cd/m . Irrespective of luminance, a transition to or from a saturated red is also potentially harmful.

  • A sequence of flashes is not permitted when both the following occur
    1) the combined area of flashes occurring concurrently occupies more than 25% of the displayed screen area
    2) the flash frequency is higher than 3 Hz.

  • A sequence of flickering images lasting more than 5 seconds may constitute a risk even when it complies with the guidelines above.

How does Flikcer detect these triggers?

  • Flikcer looks at every frame of the video, and compares the brightness values of each pixel to their corresponding brightness values in the next frame.

  • Depending on whether the change is positive or negative, Flikcer makes two groups of pixels.

  • Flikcer then accumulates the values for both groups, until the number of pixels exceeds the minimum limit of 25% screen area.

  • Flikcer then calculates the average change in brightness level for every consecutive frame.

  • Flikcer now scans these “average changes” for a change of more than 20cd/m2 with frames of opposite signs. Every one of these changes is a flicker.

  • Flikcer checks for a harmful flash by calculating the frequency of these flickers. If it is more than 3Hz, it terms it as a potential trigger.