warewullf opened this issue on Apr 08, 2009 · 11 posts
CaptainJack1 posted Wed, 08 April 2009 at 8:18 AM
A lot of software that does this kind of thing uses two images, taken at slightly different angles.
Since they're only using one picture, I'd guess that they're making a shadow map, too. The technique there would be to find the edges, identify pixels on either side of edge lines that are similar in hue but where they're much darker on one side. This would distinguish shadows from, say, highlights in the hair. approximating the slope of the edge curves at different points and measuring the length of each shadow along a perpendicular to the slope would give some idea of where the light was coming from. I'd be willing to bet that pictures taken in bright sunlight work much better than pictures taken with flat, indoor lighting.
Once you know where the shadows are, you could assume that areas in darker shadow and areas where the shadow is wider recede further back. That would give you a fair approximation of the depth intended in the image.
They might pre-process the image, too. For example, they might have an artist remove the background in Photoshop and adjust the contrast by eye to improve the chances of making a good map, before they run it through their software to convert it.