Question

I'm doing image processing and mathematical morphology using and really enjoy it. Our work involves simulating charges moving through various films, and we're trying to use image analysis tools to estimate why different morphologies work better than others.

I quickly was able to use ndimage.label and distance_transform_edt to find the connected components and get sizing on them. I also implemented a breadth-first search to find minimal paths between the components and the edges, which represent electrodes.

Now, I'd like to determine "bottleneck" or "narrow channel" regions. I'm not even sure if I'm searching for the right keywords, since my expertise isn't really in image processing. I've given two examples below.. I want to find features like the red circles and count them and determine their size distributions. (Consider that charges will move more easily through wider bottlenecks.)

The problem is that I can't label these, since they're not independent components. The distance transforms give me small numbers at the edges.. I want something like the smallest distance through these bottlenecks.

Any advice where to look or general strategies?

enter image description here enter image description here

Was it helpful?

Solution

One could use the medial axis transform to calculate the radius of a ball fit at each point in the bacl set to obtain the nooks in the image. In the following example we use the watershed of the distance function weighted by the distance function itself to obtain contours which separate minimas(the white components in the image). This thus gives a path weighted by the maximum value of the distance function separating 2 white components. I have done this in matlab but i think its easy to replicate the same in Scikit image tool box.

Image1:

enter image description here

Filling the holes since they aren't paths:

enter image description here

Distance function: (heat map)

enter image description here

Watershed of distance function (paths):

enter image description here

Watershed weighted by Distance function (final paths):

enter image description here

Image 2:

enter image description here

Distance function:

enter image description here

Watershed of distance function (paths):

enter image description here

Watershed weighted by Distance function (final paths):

enter image description here

Thus as demonstrated we have calculated technical a skeleton by zone of influence(SKIZ) using the watershed of the distance function(cityblock used here). One has to also note that the holes on the borders are not filled since the imfill ignores holes on borders. If its to be filled one can add a frame around so that one can use imfill to fill these later.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top