THE pretty people pictured in popular periodicals aren't real. They may have started out as photographic documentation of reality, but after the digital retouching process has had its way with them, the smoothness of skin, proportions of body, and degree of voluptuousness on show might as well come from an animator's pen. This digital plastic surgery has been criticised as having a deleterious effect on readers' mental health, leading to anorexia, bulimia, suicide and other ills. The American Medical Association in June condemned extreme photo alterations

Professor Hany Farid, a computer scientist at Dartmouth College in New Hampshire, and his PhD student Eric Kee, have been investigating photo retouching. They have developed a mathematical expression to quantify ballooning bosoms and winnowed waists. Their paper, published today in the Proceedings of the National Academy of Sciences, describes how they use mathematical models along with subjective human responses to produce a score of how radically a person's image has been modified from an original photograph.

Dr Farid says Mr Kee gathered roughly 450 examples of before and after photos that show retouching, finding them at sites that document fashion-photography blunders (which the magazines typically defend as legitimate) and retouchers advertising their services. He provides a sampling of such images on a website, including ones that show modified bodies that are anatomically impossible.

The researchers' algorithms look at two separate forms of change: geometric, in which retouchers enlarge breasts, trim legs, elongate necks and the like; and photometric alterations, which involve changing skin tone, removing blemishes and wrinkles and smoothing the skin. The output of these algorithms is a number from 1 to 5, with 1 being the least changed and 5 the most.

To tune the algorithm, the authors crowdsourced opinion through Amazon's Mechanical Turk, picking people ostensibly from all over the globe. Each Turk worker was given 70 sets of before and after images to look at, rating the difference in whole numbers from 1 to 5. (The responses were evaluated to discard automated and erratic answers.) Such tuning allows the algorithm to produce results that are in line with a swath of human perception, and there was surprisingly little variation between respondents. Dr Farid says this method can be expanded to include a larger cohort of images or participants. (For the mathematically minded, the responses were subjected to non-linear support vector regression to humanise the algorithms' output, Dr Farid explains.)

It is the photographs themselves, analysed by the software, that are most stunning. In one image, a supermodel's breast is given a lift and expansion, and the "heat map"—the use of colour to mark areas of change by significance—centres the eye neatly on the anatomical feature in question.

Dr Farid's position is in computer science, but his interest is social change. He proposes that magazines voluntarily adopt a code in which his algorithm's result would be shown alongside modified photographs, possibly with explanatory text that details the sorts of changes found. Dr Farid says an objective (though subjectively tuned) reference point removes the heat from the topic, and might give magazines a goal to reduce retouching if the extent of their efforts is numerically revealed.

The professor has his head less in the ivory tower than one might suspect. Britain's Advertising Standards Authority banned ads in July by a cosmetics maker for excessive retouching, Norway is considering regulation of or disclaimers alongside modified images, France has considered labeling photos and a group in America is agitating for restrictions.

"I would think even the models and actors and actresses would appreciate this. We're distorting what the public thinks of them," Dr Farid says. Perhaps. But more cynically-minded readers may come to the conclusion that this is, in fact, precisely the point.