If the light goes red BEFORE you cross the big, thick, white line, then a sensor will be triggered and a photo taken. As eternity says, the camera will take multiple exposures to determine if you continued through the junction.

If the light goes red and you nudge a bit too far forward and there is a flash, just stop.