On Mon, 21 Feb 2011, Jaime Oliver wrote:
That's why [#labelling] also outputs a version of the incoming grid in which the "1" regions have all been flood-filled with distinct integers (numbered from 2 upwards ; it can go well beyond 255 if needed).
I mean this : http://gridflow.ca/gallery/%23labelling_false_colors.png Note that, as the flood-fills are just indices in the list of regions, I had to colour them with "random" colours, pretending that this is an indexed-colour image.
I still don't think the problem is well explained. for example, what are "1" regions?
They are whatever regions have been selected. The "0" regions are the regions that aren't selected. You do this selection process using effects that turn your image into "0" and "1" colours, such as thresholding. That would usually be [# >=] or other comparator, possibly after other filters.
In the new version of http://gridflow.ca/help/%23labelling-help.html I am thresholding the result of red minus green minus blue, for example. Different situations have different criteria.
i think this goes beyond the constant id aspect of it or are you arguing that nearest neighbor is not the only/wrong approach to the problem?
I mean that the nearest neighbour of centroïds is not the only approach to getting constant ids. There are many possible ways of getting constant ids. I just haven't tried any yet.
What I am getting is that you are obtaining regions of pixels based on some criterion, for each frame
Yes, this is what I already do when I'm doing a multiblob detect without constant ids.
and then comparing how they overlap with the previous frame?
That's what I propose but haven't tried.
To do this each of these groups need to be labelled?
The first outlet outputs an indexed-colour picture in which each pixel is labelled with its region-number.
are you assigning constant id to the objects with maximum overlap?
I haven't done it, but this sounds like what I would do. There might be more creative things to do with those labelled pixels, but I think that the maximum-overlap thing would be something to be tried.
Actually, one can already build an overlap matrix quickly, using [#join] and [#draw_polygon + 1, draw point] (the polygon thing is a misnomer in point-mode.)
Finding the maxima in there is another business though.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC