Irregular image detection on uneven background

Hello together,

I want to analyse some images, e. g. this one:

I want to know the area of the objects for further data treatment. I therefore started to implement a routine in KNIME, which is atatched below. I used a Gaussian filter and divided the original image by the filtered image. Then I applied a mean global threshhold, used the morphological operation erode and then inverted the image. The resulting image looked quite nice. My problem is to "fill" the holes. As you can see, some reflections are present at the surface so that the detected object is not completed. I tried to use the morphologcal operation open, which worked up to some partin some of the images. In one of the images, which is included in my workflow file, this hasn't worked at all...

Has anyone a suggestion, how to solve this? Furthermore I would be interested if a segmentation of overlapping objects (as given on the right-hand side in the example image) is possible. Otherwise, is there a way to "ignore" these overlapping segments in the analysis?

I would be happy, if someone could help me :)

 

Kind regards,

Bjoern

Hi Bjoern,

  • You can try using the Fill Holes node to fill holes, it requires closed shapes though, so you should improve the detection in your workflow a bit so that the bubbles are closed
  • The division you are performing in the Image Calculator combined with mean thresholding could be problematic. The target type UnsignedByteType can not store the values of the calculation correctly, resulting in an approximation of the result.
  • You should take a look at using an edge detection filter on your image (e.g. Soebel) to find the circumference of the bubbles, this should make the detection much easier.
  • With overlapping segments do you mean two bubbles touching? Then you can try the cell-clump slitter, else you can filter out bubbles touching the border of the image using the Segment Filter node.

Best,

Gabriel

1 Like

Hi Gabriel,

 

thanks for the fast reply and sorry for the late feedback. We tried your suggestions, but some of them didn't work for us.

The Soebel filter node didn't work for us at all, as it was not detecting our bubbles. Thus, we continued working with our image calculation (division). The Fill Holes node worked. However, the filling of bubbles is always incomplete, which results in smaller detected areas and other geometric features...the Segment Filter node works for exluding bubbles touching the border. We tried to solve our problem of excluding overlapping bubbles using the cell-clump splitter, as was suggested, but again, we had no success in doing so.

I have attached our revised workflow. Maybe you (or someone else) could check this and find an optimization for our problem. We are thankful for every advice!

 

Best regards,

Bjoern

Hi Bjoern,

do you have any influence on the image acquisition? One of the biggest problems with these images is that they are illuminated very unevenly, this is creating the uneven background and the reflection highlights on the bubbles. I was able to remove those with a little trickery (see attached workflow).

You need to pay attention to the datatype of the Image when using the Image Calculator you where still using UnsignedByteType which creates numerical errors!

best,

Gabriel

Hey Gabriel,

thanks for your help so far, I tried a lot to remove the highlights but had no success. Same with the preprocessing, I tried some other node combinations, including the comparison with an empty background image but nothing really worked.
I always have a problem with the next step. How can I turn the result into a binary image, to use the connected component analysis node? Is there any other possibility than using the Global Thresholder node?

And I still don’t understand the probem with the UnsignedByteType Images and the Image Calculator. The results are fine, where are the numerical errors?

Thanks in advance, greetings
Christina

And I still don’t understand the probem with the UnsignedByteType Images and the Image Calculator. The results are fine, where are the numerical errors?

See my answer here where I added an example workflow: How to merge images in different rows? - #3 by gab1one

Regarding the thresholding, you can experiment with all the different methods in the Global Thresholder and the Local Thresholder nodes. Some of these methods are much better at handling complicated images, than a simple mean threshold.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.