The cameras do not detect the vehicle, they only photograph it.
If you look at every junction with a camera you will find a rectangular box outline in black tarmac about 60cm long and the width of the carriageway located just beyond the white line. Under the tarmac outline is a loop of cable which does the detecting. Immediately the lights turn to red, the loop is set to sense any new vehicle over the top of the loop. The implication is that, once the lights turn red, any vehicle sensed by the loop has crossed the white line after the red signal appears. And you're nicked.