For vehicles equipped with the optional Matrix LED headlights, a multifunction camera is used to detect light sources from oncoming vehicles. The Matrix function of the LED Matrix beam headlights then masks out the light distribution around other vehicles or traffic signs in real time with individually switchable LED chips in each headlight. This results in a perfectly illuminated road ahead and greater safety.