WOLFRAM

The Ambassadors

Practically everything I know about British art history would fit in one BBC documentary—the very BBC documentary I watched a little while ago.

I was intrigued to learn about the The Ambassadors, a sixteenth-century painting by Holbein. Among other things, this painting is famous for containing a human skull hidden in plain sight. Can you see it?

The Ambassadors

The skull can only be seen properly from an extreme perspective. This is pretty nifty, and it caught my attention because we have a number of new Mathematica technologies under development that are related to perspective transforms.

One of them was shown recently by Jon McLoone in this blog post; you will be able to efficiently apply texture images to 3D graphics. We can use The Ambassadors as the texture image for a rectangle:

The Ambassadors as the texture image for a rectangle

With Mathematica‘s ability to rotate, pan, and zoom 3D graphics in real time, you can immediately examine the painting from any angle.

There is also a full set of options for programmatically controlling the camera position and orientation in 3D graphics, so you can set up a fly-by style animation. Here’s one that reveals the anamorphic skull:

Another feature in our development pipeline is support for arbitrary geometric transforms applied to images. We can use this to obtain a high-quality image of the skull:

Transformation function
Transformed skull

For a bit of fun, I tried to insert my own head in place of the skull, beginning with yet another upcoming feature: immediate access to image capture devices (such as webcams). I gave my best impression of the skull:

Image code
Imported webcam image

We can quickly get rid of the unwanted background parts of the image by using a new piece of image processing technology: image segmentation based on the image foresting transform.

Colorize the image
Colorize the image

Using this segmentation, we can blank out the background components and take only the part we want:

Cut out the face
Cut out the face

Next we drop the face, appropriately scaled, onto the skull image:

Placing the face over the skull
Placing the face over the skull

Now we just need the inverse perspective transformation:

Inverse function

We can apply the inverse transform and drop the result right back onto the original:

Placing the skewed image into the painting
Placing the skewed image into the painting

It’s amazing how much you can do in a few lines of code when all the functionality is seamlessly integrated into one system.

I just hope Holbein wouldn’t have minded me “defacing” his painting…

Comments

Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.

10 comments

  1. I once tried to insert my own head in place of the Mona Lisa but they arrested me before I got very far. The French are picky that way.

    Reply
  2. Just terrific in every way. How did Holbein do it, however. Could he perform transforms and inverses in his head? Is there a mechanical device he could have used?

    Reply
  3. He could paint the skull on canvas, then have it placed obliquely and repaint that image. A process I’ll refer to, for lack of a better term, as “moylanation”.

    Reply
  4. Very nice example of the versatility of Mathematica and the compactness of the code needed to perform tasks such as these.
    Interesting that MM will include connectivity to a camera in the upcomming version. Just a pitty that I just wrote such a function to get video images into my mathematica notebook.

    Thanks for the ‘artistic’ blog

    Reply
  5. Sadly, my copy of Mathematica 7 doesn’t appear to have an “ImageForestingComponents” function, nor does a web search reveal the existence of such a function.

    Reply
  6. Interesting! It still looks like it’s somewhat distorted, even after the change in viewpoint. I suspect the skull was reflected off of a curved surface. Is there enough information to determine the shape of this surface?

    Reply
  7. It seems, then, that the next version of Mathematica might be useful for investigations along the lines of the Hockney-Falco Thesis (a good summary of which is available on Wikipedia). I’ve seen Falco give a talk on this, and there is one example (of a different painting, I think) which also shows a stretched, distorted skull, which, the Thesis argues, could have been produced using a convex mirror to project an image onto the canvas.

    Reply
  8. I tried reproducing all the functions with the beta version of Mathematica 8. 1. Something is surprising, the perspective transformation acts on a 2D image.
    2. I cannot capture my image although the iSight webcam of my Mac is active. More generally, I would like to capture images from any video camera. How can one specify the connexion of the video camera to Mathematica?
    Thanks for helping me, Bruno

    Reply