Avg or sum all in a COLL

Sep 9, 2013 at 6:27pm

Avg or sum all in a COLL

so I have a Coll set up to take in indexs up to 50 and then delete index 1, move all indexes down, and add to 50 essentially giving me a constantly changing 50 indexed list. This is for a computer vision project and I am looking to smooth out the blob x/y coord so this was a way I thought to implement it. Basically is there an efficient way to sum all values in a coll and bang that to the output? Is Coll the right tool to be using here?

Sep 9, 2013 at 7:39pm

I don’t know that taking the average of the last 50 values is the best formula for a smoothing filter :), but if you do want to do that, the table object might be your best bet.

– Pasted Max Patch, click to expand. –


Sep 12, 2013 at 12:16am

Alternatively, use zl.stream 50 to create a running list.

Vexpr does math on lists if you need anything fancy, though you can calculate the mean with the mean object, or the median with zl.median.

Sep 12, 2013 at 12:31am

yeah, [zl stream 50], [zl sum], [zl median].


You must be logged in to reply to this topic.