December 21, 2010

Seurat’s painting and persistent homology

Filed under: image processing/image analysis software,mathematics — Peter Saveliev @ 4:15 pm

From a recent article in the Notices of the AMS “What is persistent homology?”: ” Consider the art of Seurat or a piece of old newsprint. The eye, or the brain, performs the marvelous task of taking the sense data of individual points and assembling them into a coherent image of a continuum — it infers the continuous from the discrete.”

The articles goes on to explain how topologists have learned to deal with noise and uncertainty of real life images and data. The tool is called persistent homology. The article explains some of the mathematics but not how exactly this approach applies to the painting.

I’ll try to analyze this image with Pixcavator.

First, I had to choose a color channel. The reason is that true color analysis is still impractical (also multiparameter persistence isn’t well understood).

Whatever the channel is, the result is a gray scale image. In this case,

 persistence = contrast.

I decided to concentrate on contrast only and see how far using only topological tools can take us. Not far.

In the first experiment, I chose “Blue”. Then I allowed myself to move only the “contrast” slider and tried to isolate the sail with least amount of noise left. The first image below is the result. A lot of small specs all around. Moving the slider further to the right would merge the sail with the background. Now, if you are allowed to filter out objects based on their sizes, the result is much better, second image. Much less noise and, in addition to the sail, the leaves and the shore line are captured too.

In the second experiment, I chose “Green”. Once again, I allowed myself to move only the “contrast” slider and tried to isolate the rower in the rowing boat, with least amount of noise left. Same story.

The results aren’t surprising at all. One sees similar results as salt-and-pepper noise, which is common in imaging, will have high contrast.

So, the bottom line is you can’t rely entirely on contrast/persistence and ignore geometry.

Of course, color image analysis might produce better results.

December 18, 2010

Colorant dispersion: an image analysis example

Filed under: image processing/image analysis software — Peter Saveliev @ 2:52 pm

Q: “I was unable to isolate the small black dots exclusive of the horizontal bands of color. Do you think it is possible to isolate only the black dots and recognize only them?”

I ran just the first image so far. The goal, as I understand it, is to capture the two small dots on the right. The way to get them is to search for small, dark, high contrast objects. Unfortunately, the letters in the label are exactly like that — black on white. So, I just cropped the image. Then, I tried to set a low limit on the size and high limits on contrast and average contrast. After a bit of trial and error I found limits that work: 20, 60, and 12. The screenshot shows that the dots are captured. There are also other contours shown — of large objects. To see the locations etc of the dots, I clicked (twice) on the top of the “Size” column in the output table to arrange the rows in the order of increasing size/area. As a result, the two dots are at the top of the list, #13 and 14.

Image:Colorant dispersion screenshot.jpg

More here

December 8, 2010

Discrete Calculus: Applied Analysis on Graphs for Computational Science by Grady and Polimeni

Filed under: education,mathematics,reviews — Peter Saveliev @ 3:35 pm

Discrete Calculus: Applied Analysis on Graphs for Computational Science by Leo J. Grady, Jonathan R. Polimeni [1]

Description: “The field of discrete calculus, also known as “discrete exterior calculus“, focuses on finding a proper set of definitions and differential operators that make it possible to operate the machinery of multivariate calculus on a finite, discrete space. In contrast to traditional goals of finding an accurate discretization of conventional multivariate calculus, discrete calculus establishes a separate, equivalent calculus that operates purely in the discrete space without any reference to an underlying continuous process.”

Best quote:

 Calculus is topology.

The reason is that the matrix of the exterior derivative is simply the transpose of the matrix of the boundary operator. The fact is well-known but I never saw the depth of this connection. The practical consequences are also significant. Indeed, if you know the boundary of each k-cell in a cell complex in terms of (k-1)-cells, you also know the exterior derivative of all discrete differential forms (co-chains). So, you know calculus.

This idea inspired me to come up with a formula of my own:

 calculus / algebra = topology.

Roughly, you can take all linear algebra out of calculus via a certain equivalence relation (cohomology). What you end up with is Betti numbers.

There will be a few more remarks here