I have some lists of images. They always only contain growing objects. For example:
image01:
image 01+n:
image 01+n+n:
image 01+n+n+n:
What do i like to get? (This is the third picture, but modified)
If two (or more) objects merge i like to get the center point of the merge (red point) and also two lines from this point to the background.
I already tried today to solve this problem. I thought it is not so hard, but unfortunately it does not seem to be that easy.
I tried this:
1) For every picture make all objects black
2) Get all objects on every picture. Get the center for each object.
3) Check on every image if on one object is more than one center of a polygon of the previous image. If this is the case two objects merged.
4) If a merge was detected take the centers of the two merged object of the previous frame. Connect them with the A* algorithm on the current frame. Search now the pixel which was white on the previous frame. This is the "merge point".
5) Try now to get the two nearest white points and use them to draw the "break lines" (blue lines on the last image).
Unfortunately this seems not to be that easy and programming this is also hard. Probably an already implemented algorithm (java) exists which could do this job much easier? I implemented everything which I described (quick and dirty), but it is slow and buggy. Something doesn't work and it is hard to debug it. But I think there should be an easier solution.




