Identify and separate worms that are overlaped among each other
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I am trying to create a code that recognizes worms in a plate and account them for further study, the problem I am encountering its that there are some worms that overlap each other and I'm strugling defining when 2 or more worms overlap each other,I tried using watersehd(),regionprops(), bwpropfilt() and the skel() to use the bwmorhp() to find the braches but it doesnt seems to work. I attached a picture of the plates with worms I am using.
1 Kommentar
William Rose
am 15 Jul. 2022
@Daisy Aguilar Aguilar, that looks like a hard probelm. If I were doing it I would probably want to convert the gray scale image to a binary image. Before doing that I would probably crop out the circular edge to eliminate the strange things that happen with light coming through the edges of th dish. I would also experiment with filtering before converting the image to binary, because there are patches in the image that have a birghtness level that may be comparable to the worms. The patches are large compared to the worms, therefore a highpass filter may be good at reducing the light patches enough that they do not appear after you convert the image to binary. If the above steps work, you have an image with a black background and white worms (or the reverse, if you choose to negate it). Then you have to indentify crossing worms, which will be difficult, but easier than before.
Antworten (1)
prabhat kumar sharma
am 20 Feb. 2024
Hi Daisy,
I understand that you are looking for the ideas to try to segment your overlapping worms in the given image.The task of segmenting and counting overlapping worms in a grayscale image is indeed a challenging problem in image processing .
Here's a step-by-step approach that could assist you in finding a solution.
- Crop Edges: Start by cropping the dish edges to eliminate potential artifacts that could interfere with image analysis.
- Highpass Filtering: Apply a highpass filter to the image to highlight the worms against the background, making them easier to distinguish.
- Binarization: Convert the grayscale image to binary to facilitate segmentation, using a method like imbinarize.
- Morphological Operations: Perform morphological operations to separate any connected worms, preparing them for accurate counting.
- Skeletonization and Branch Points: Skeletonize the image and detect branch points, which can help identify where worms overlap.
- Watershed Segmentation: For more complex cases of overlapping, consider using the watershed algorithm to segment the worms. https://www.mathworks.com/help/images/marker-controlled-watershed-segmentation.html
- Region Analysis: Use regionprops to analyze and filter the properties of each segmented region, helping to differentiate between individual worms.
- Counting: Finally, count the number of worms, making adjustments for overlaps by examining the morphology of the segmented regions.
For instances where worms are densely packed or overlapping significantly, an area-based method might be beneficial. By calculating the average area of a single worm, you can estimate the number of worms in a connected component by dividing its area by this average.
If your research involves studying worm growth, the area itself could serve as a valuable metric. Growth patterns might be inferred from changes in the total area occupied by the worms over time.
For additional insights and techniques, This blog on cell segmentation is an excellent resource: Cell Segmentation by Steve Eddins.
I hope these strategies help you effectively segment and count the worms in your study.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!