Friday, February 28, 2014

2D to 3D Conversion - The Girl with the Pearl Earring

This an attempt at the 2D to 3D conversion of a famous painting by Vermeer called "The Girl with the Pearl Earring" using Depth Map Automatic Generator 4 (DMAG4) - semi-automatic 2D to 3D image converter.


Here she is, the girl with the pearl earring in all its flat two-dimensional glory.


Sparse depth map painted in Gimp.

Painting in the depth map can be quite challenging especially when you have depth changes occuring in two directions. A good example of this is the forehead which recedes horizontally as well as vertically. That can be challenging to scribble correctly. Here, I chose to use the gradient option in the pencil toolbox. The difficulty though is getting the length fade of the gradient correct. The alternative is to make a selection and run the gradient fill, which should work also.


Dense depth map obtained with DMAG4.

Here, I am gonna go the extra mile and smooth the depth map with Edge Preserving Smoothing 2 (EPS2).


Dense depth map smoothed with DMAG2.


3D scene rendered in Gimpel3D. As you can see, it's far from being perfect but that should do for our purposes.

Note that Gimpel3D seems to have trouble loading depth maps that are indexed (256 levels of gray), so it may be a good idea to convert the depth map to RGB prior to loading it into Gimpel3D.


Here's the wigglegram created in Gimp. In Gimpel3D, I positioned the viewing plane right in front of the nose and save the left and right images for an eye separation of 4.0 and 2.0. If you add the reference image, that gives a total of 5 frames for the 3D animation.

2 comments: