Posts Tagged ‘mathematical morphology’

Efficient algorithms vs efficient code

Saturday, October 21st, 2017

Since I have spent quite a bit of time porting 25-year old code, I have been confronted with the significant changes to CPU architecture over that time. Code in DIPlib used to be very efficient back then, but some optimizations did not age well at all. I want to show some examples here. It is nice to see that a little bit of effort into optimization can go a long way.

I also want to give a quick example of a highly optimized implementation of an inefficient algorithm, which highlights the difference between algorithms and code.


Mathematical Morphology and colour images

Sunday, June 23rd, 2013

We recently organized the 11th International Symposium on Mathematical Morphology here in Uppsala. I’m very happy with how the event turned out, and we got lots of positive comments from participants, so all our hard work paid off. We had a nice turnout, very interesting presentations, and lots of discussions. And I’m now the editor of a book containing all the papers presented.

There seem to be several trending topics in the ISMM community at the moment. One of those is the application of Mathematical Morphology to colour images. People have been working on this topic for a while now, and still there is no optimal solution. This year, three very different methods were presented to try and solve this problem. But what is this problem about?


ISMM 2013

Saturday, June 30th, 2012

We are going to be organizing the 11th conference in a series dedicated to Mathematical Morphology. This is the main conference in the field, and many of the ideas within Mathematical Morphology were first presented there. I can’t count the number of times the proceedings for this series is mentioned in the reference list of my papers! The first call for papers just went out, I’m copying it here for anyone interested. For more information, visit the ISMM 2013 website.


Solving mazes using image analysis

Saturday, April 17th, 2010

I found an interesting submission on the File Exchange. It uses a very simple set of mathematical morphology filters to find the solution to simple mazes. I have several other solutions, so I decided to write an entry about the subject.


The distance transform, erosion and separability

Thursday, November 6th, 2008

David Coeurjolly from the Université de Lyon just gave a presentation here at my department. He discussed, among other things, an algorithm that computes the Euclidean distance transform and is separable. The distance transform is an operation that takes a binary image as input, and writes in each object pixel the distance to the nearest background pixel. All sorts of approximations exist, using various distance measures that approximate the Euclidean distance. Using truly Euclidean distances is rather expensive. However, by making an algorithm that is separable, the computational cost is greatly reduced.

David’s algorithm computes the square distance first along each of the rows of the image, then modifies these distances by doing some operations along the columns. In higher-dimensional images you can just repeat this last step along the other dimensions. The operation to modify these distance values sounded very much like parabolic erosions to me, so I just gave this a try.