-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image segmentation to identify migration area #5
Comments
Hi from the global sprint in Manchester! This is just a short introduction to let you know that I have been working on this. Still work in progress and I want to clean up code before proceeding, so just a summary of what I got so far. I'm using python to process the images of individual plates. I'm using skimage to generate clusters on the central part of each image, make them uniform and select according to a threshold the clusters that seem to have activity. This is an example of what I'm obtaining. Subplots from left to right:
With using average pixel values within each cluster I get good results. These are the plots for a few images randomly selected. Finally, to compute the area covered I just count pixels within the selected clusters. This is related to #6. This is an example for the images above, just plotting number of pixels vs iteration (the image sequence is not linear!): Sorry I don't have more time today to upload clean code. Tomorrow more. Any suggestions welcomed, both from the technical part or from what you actually need, as I'm not familiar with the details of the project. |
Oh wow @jmoldon! This looks awesome! Did you already play around with the threshold already? Because in image 225 there is a hole forming inside the area and after image 255 basically everything is filled on the top left. If this could be avoided the readout would be accurate enough. I already tried a completely different approach some time ago calculation just the differences between the images in a certain area. But this produces so much noise.. Apart from that I think it should be very different with future image produced by the dark field lighting setup because it will generate a better contrast (bacteria/agar)! So I guess this could work very well! I think @2alin is trying a different approach using openCV for #4 and we have to see how good this will work! Let's talk tomorrow when you have more time! If you like you can you our MozSprint Gitter Channel because we are discussing everything right there! |
OK great. There are different thresholds to play with: the threshold to generate the clusters, which we can also modify with some gaussian filtering, and the threshold to select which clusters to classify as relevant. Currently I fixed the values checking one or two images and applied blindly to the rest. So we can surely find more suitable and robust parameters depending on the illumination/contrast. Good that you are already improving the illumination, first I tried other methods but the contrast was not enough. With better bacteria/agar separation we will avoid those glitches much better. I'm using skimage because the segmentation tools look pretty nice, but probably there is something similar in open-cv. It will be good to use only one to keep dependencies low. Thanks for sharing the gitter channel, I will follow you there. |
On the other hand there are bacterial species which are very translucent and it would be nice to be able to use the script with a challenging contrast. Anyways, we will see what proves better and then decide for either openCV or skimage if this is fine with you! |
The next step after localizing the agar plate is the identification of bacteria on the agar plate. They will appear as a white area which starts to spread over time.
To calculate the migration speed the edges of the area have to be determined on each image to segment it and calculate the migration area over time.
We can use the test pictures when we are writing a script
The text was updated successfully, but these errors were encountered: