August 19th, 2010
The convolution is an important tool in image processing. All linear filters are convolutions (like, for example, the Gaussian filter). One of the reasons linear filters are so prevalent is that they imitate physical systems. For example, an analog electric circuit (containing resistors, capacitors and inductors) can be described by a convolution. The projection of a cell on a slide, through the microscope’s optical systems, onto the CCD sensor, can be described by a convolution. Even the sampling and averaging that occur in the CCD can be described by a convolution.
Two properties of the convolution are quite interesting when looking for an efficient implementation:
- The convolution is a multiplication in the Fourier domain: f(x)⊗h(x) ⇒ F(ω)⋅H(ω) . This means that you can compute the convolution by applying the Fourier transform to both the image and the convolution kernel, multiplying the two results, then inverse transforming the result.
- The convolution is associative: (f⊗h1)⊗h2 = f⊗(h1⊗h2) . This post is about the repercussions of this property.
Read the rest of this entry »
Tags: convolution, numerical accuracy, separable.
Posted in algorithms | 2 Comments »
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.
Read the rest of this entry »
Tags: distance transform, mathematical morphology, maze, skeleton.
Posted in tutorials | 10 Comments »
March 19th, 2010
A new version of DIPimage and DIPlib has been released. You can get it at the the DIPlib website. This version fixes some bugs, adds compatibility for newer versions of MATLAB, and adds a few new functions. One interesting addition is that the function readim now will look for and use the Bio-Formats library if you install it. This means that a whole host of new image file formats are now readable. The Bio-Formats library is an open-source package created at the Laboratory for Optical and Computational Instrumentation (LOCI), University of Wisconsin-Madison. Unfortunately, their license doesn’t allow us to bundle the library with DIPimage. It is perfectly legal, however, for you to download and use the library.
Tags: DIPimage, DIPlib.
Posted in announcements | No Comments »
January 13th, 2010
Last month I posted a tutorial on snakes. I explained that with snakes, the segmentation solution is obtained by minimizing an energy functional. The gradient descent minimization then yields an update function for the snake that can be seen as a set of internal and external forces acting on the snake. I was curious to see where we would get if we were to define the snake simply as a set of balls, connected with each other through springs, moving over the image with momentum, friction, and all the rest. For this, we will completely abandon the notions of gradient descent, function minimization, and so forth, and write a simple Newtonian physics simulation.
Read the rest of this entry »
Tags: active contour, gradient, segmentation, snake.
Posted in algorithms | 2 Comments »
December 28th, 2009
In this post I want to show how to enable to DIPimage GUI to work with a new data type. In a previous post we developed a new class, dip_snake, for use with the function snakeminimize. The fully developed version of snakeminimize, which you can download here, integrates with the DIPimage GUI and uses DIPimage’s built-in automatic parameter parsing. We actually need to do something to DIPimage to get all that to work, because the dip_snake class is unknown to DIPimage. This post explains how to teach DIPimage about a new parameter type.
Note: This post is meant as a tutorial for people developing DIPimage applications, and contains nothing of interest to anybody else. If you’re not developing for DIPimage, you might want to look here instead.
Read the rest of this entry »
Tags: class, DIPimage, getparams, GUI, parameter parsing, snakes_with_style.
Posted in tutorials | No Comments »