As the viewer's expression changes from a scowl to a smile, the computer generated painting changes from a dark, sombre image to a brightly-coloured one.
"The programme analyses the image of eight facial expressions, such as the position and shape of the mouth, the openness of the eyes, and the angle of the brows, to work out the emotional state of the viewer," said Dr John Collomosse of the University of Bath in southwest England.
"It does all of this in real time, meaning that as the viewer's emotions change the artwork responds accordingly," he said.
He recently presented the electronic artwork at a symposium on non-photorealistic animation and rendering, part of the International Animation Festival in Annecy, France.
"This kind of empathic painting only needs a desktop computer and a webcam to work, so once you have the programme and have calibrated it for the individual viewer, you are ready to start recreating personalised art based on your mood," said Dr John Collomosse of the University of Bath in southwest England.
Collomosse developed the empathic software with Maria Shugrina and Margrit Betke of the University of Boston in Massachusetts.