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 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:

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:

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:

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.

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

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

Now we just need the inverse perspective transformation:

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

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…

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

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

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

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.

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

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?

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.

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

## 10 Comments

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.

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?

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

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

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.

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.

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?

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.

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

Hi Bruno, You’re right, ImagePerspectiveTransformation transforms 2D images. For 3D graphics, the viewpoint orientation can be controlled with the mouse, or programmatically using options such as http://reference.wolfram.com/mathematica/guide/3DGraphicsOptions.html. Camera selection can be done using ImageCapture[] – http://reference.wolfram.com/mathematica/ref/ImageCapture.html. Regarding your iSight camera, it’s possible another program running on your computer has control of the camera(s).

Hope this helps!