Image Analysis completing shapes in a binary image
I am analyzing the growth of ice crystals and I want to create an automated image analysis procedure. I work with Image Pro Plus 5.0 and I process the images as follows:
- converting to 8-bit grayscale
- setting the threshold to create a binary image
- filling holes in the binary image (the ice crystals are bounded by a dark edge and their inside is as bright as the background of the image)
- watershed-split (splitting clusters)
- Measuring and counting the crystals
My problem is that some crystals don’t show a homogeneous dark edge. In some spots the edge is too bright for the set threshold values. But I can’t change the threshold values because the background noise gets too high. So the results in the binary images for these inhomogeneous crystals are C-shaped crystals instead of the needed O-shaped crystals. It is necessary that the crystals are O-shaped, so that they can be filled and split.
Is there any way to complete these C-shaped crystals, like a reversed watershed-split? Dilating, a defined number of cycles, until the edges touch and then erode until the original size of the crystals are reached and creating a line in between the edges which didn’t touch. Or is there any other way to complete these crystals in order to get the expected shape?
Thanks in advance and I’d really appreciate your help.
Answers
Yuri
I think it's because of the shape of the crystals. In my first post I forgot to tell you that the ice crystals show every kind of shape. Some are round and some are hexagonal or even rectangular and in some cases needle shaped. The convex hull works quite well for the round and hexagonal shapes, with the other shapes the convex hull got its problems. But the biggest problems occure when the crystals form clusters. The convex hull feature creates way too big Areas for clusters. And I can't split the Clusters after the convexhull with the watershed-split because it creates wrong splits. So can you tell me another way to complete the crystals or is there no other way.
Thank you all very much.