Relative Content

Tag Archive for pythonopencvmachine-learningimage-processingcomputer-vision

Is there a better and more efficient way to identify clusters from an image?

So I have a video of moving bacterias which I have converted to images. Now I have to find the clusters of bacterias in each image. We define two neighboring bacteria as members of the
same cluster if their centers of mass are separated by less than a distance R and if their motion directions differ by less than an angle alpha. A dynamic cluster is defined to include all bacteria that are connected to at least one other bacterium that satisfies the local distance and motion direction criteria.

Is there a better way to get rid of white flickers/dots/small clusters(noise) from my enhanced image

So I am working on a project which needs me to segment each individual cell(left image of the figure). By getting some help and using adaptive thresholding and retinax theory, I was able to identify different components as shown by the right image of the figure. But my further analysis is getting bothered because of the noise. I need to get rid of the small white pixels in between. Because I am new to image analysis, I am not sure which is the best method to do so. Can someone please help me with it? I thought I could write a small code such that it goes over each connected component and sees how many pixels is the component actually made up of. If its less than 3 then remove that. But that doesn’t seem to work. Is there some other method which I am unaware of? Thankyou so much.

How do I filter out the contours I do not want?

So I am working on a project where I need to find the angle of atleast 90% of the cells. This is how a sample image looks like:

Theoretically, the cells are supposed to be elliptical shaped so I want only the contours that can be fit into an elliptical shape without much error. I tried to work on it and wrote a pretty simple code but my problem is that the contours I am getting are not elliptical shaped. How can I fix that?