23 February 2012
Melting Images like Ice in the Sunshine
I recently had a problem explaining various image filters and decided to try a different way of visualizing the result. So instead of simply applying the filter and generating a series of images, I rendered a set of 3D images of the resulting image using the brightness as the height of a mesh.
This first image shows a comparison of an original image in relation to the result of a Gaussian blur and the corresponding unmask sharpening with the same Gaussian filter.
The implementation as an ANKHOR Operator Graph was straight forward and quite linear. The first step is to convert the brightness of the image into a table of numeric values from 0 to 255, which is done by the “Get Image Luminance” operator. This is then scale and handed over to the “Build Vector Mesh” operator.
This operator generates a 2D or 3D mesh based on the given input. In this case I give it a simple two dimensional table of numbers. It will interpret the cell values as the depth and the column and row index as the horizontal and vertical coordinates. The same image is then also used as the texture for the mesh by generating a format value with the image as the fill-color and applying it to the mesh.
Finally some 3D rotation and scaling to generate a more interesting perspective and we are done.
The next series of images shows a Gaussian blur with varying values of variance for the normal distribution that forms the base function of the convolution. It looks a bit like melting snow which is a nice fit for the winter scene. One can easily observe the growing lack of details as the variance increases.
The final series iterates through contrast and brightness changes. The contrast, which varies from left to right, changes the slope and the range whereas the brightness from top to bottom the overall elevation.
It can be easily observed how the image is clipped at the top and bottom of the 0 to 255 range for pixels at the extreme brightness and contrast levels.
This is an interesting way of viewing image transformations, and I am looking forward to receive some suggestions for other filters that might show some insight when presented in this 3D visualization.
|Download the FlowSheet and sample image here (ZIP archive)|