I just came across a problem when trying to track blobs with the Contour node. The node gives me x, y, and ID spreads of the found contours.
In order to make this work properly in my patch I need to sort the x and y spread by the ID values. How would i go about doing this?
without a patch it’s hard to know exactly what you are trying to do. the ‘sort’ node might help. Are you taking the the x and y centre values or the x & y contours? If the latter you can use the contours binsize pin to keep them sorted downstream in your patch.
use Sort (Spreads) and its Former Index to set the IndexGetSlice (Spreads). The input of the GetSlice would be your coordinates.
Thanks velcrome, right answer! :)