Wolfram Blog
Andrew Moylan

The Ambassadors

October 27, 2010 — Andrew Moylan, Technical Communication & Strategy

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…

Posted in: Image Processing
Leave a Comment

10 Comments


Lucile Lichtblau

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.

Posted by Lucile Lichtblau    October 27, 2010 at 2:22 pm
Seth Chandler

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?

Posted by Seth Chandler    October 27, 2010 at 2:28 pm
Daniel Lichtblau

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”.

Posted by Daniel Lichtblau    October 27, 2010 at 2:53 pm
Manfred Plagmann

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

Posted by Manfred Plagmann    October 27, 2010 at 3:46 pm
Michael

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.

Posted by Michael    October 28, 2010 at 3:52 pm
    Wolfram Blog Team

    Hi Michael, what you are seeing in this blog post is a preview of new technology under development, which will appear in a future version of Mathematica.

    Posted by Wolfram Blog Team    October 28, 2010 at 4:51 pm
Dave HImes

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?

Posted by Dave HImes    October 28, 2010 at 4:14 pm
thm

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.

Posted by thm    October 28, 2010 at 10:23 pm
Bruno Autin

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

Posted by Bruno Autin    November 15, 2010 at 1:12 pm


Leave a comment

Loading...

Or continue as a guest (your comment will be held for moderation):