A pair of Dartmouth researchers have developed an algorithm that shows just how much fashion and beauty images have been doctored.

Newsflash: Kim Kardashian has cellulite. But you probably won't see it in the beaucoup ads that use her image.

It's widely accepted that most of the ads you see in magazines are photoshopped. Inches could be lobbed off thighs, wrinkles can be removed from faces, teeth can be straightened, eyes can be brightened, and so on. But these fantastical changes might be imperceptible to the average magazine reader. However, a pair of Dartmouth researchers have developed software designed to shine a light on the photoshopped images that appear in our magazines.

"Fix one thing, then another and pretty soon you end up with Barbie," Harry Farid, one of the researchers, told the New York Times. Farid is a professor of computer science and a digital forensics expert at Dartmouth.

Legislators in France, the U.K., and Norway are pushing for altered images to be labeled. In fact, in July, the U.K.'s Advertising Standards Authority (ASA) because it said the model, actress Julia Roberts, was far too photoshopped. It also pulled a Maybelline ad featuring model Christy Turlington and deemed both ads "misleading."

In the U.S., the American Medical Society in June adopted a new policy about body image in advertising, encouraging advertisers to create guidelines for retouching photos, "in a manner that could promote unrealistic expectations of appropriate body image."

Farid told the Times that the push for regulation in Europe piqued his interest.

Farid and Eric Kee, a Ph.D student in computer science at Dartmouth, have come up with an algorithm that assigns a 1-5 rating that shows how pictures in fashion and beauty magazines have been photoshopped, from minimal retouching to absurd changes that make the subject look nearly unrecognizable.

Since the software is supposed to mirror human perceptions, the team starting by having hundreds of people compare before and after images and rate them 1-5. The human ratings helped teach the software. Their findings will be published this week in scholarly journal, The Proceedings of the National Academy of Sciences.

To see some of the examples of crazy before and after photoshop jobs, see the team's research on the Dartmouth Web site.