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 :)
- 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.
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!
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!