|
Filter array variables Ibrahim from New Zealand [3 posts] |
7 year
|
Hi there,
I'm having difficulty with filtering an array of variables. I have multiple blob COGs being tracked. Filtering the COG_Y variable seems to just return the size of the array.
Ultimately, I want to find the tracker that has had the maximum change in the Y axis over the past 100 frames and what the value of that change was.
I can't think of a way to do that in a VB script without writing variables to a file and reading them every frame.
Thank you,
Ibrahim
|
|
|
Ibrahim from New Zealand [3 posts] |
7 year
|
I opted to create my own variable arrays and manipulate them in a script.
The general concept was:
for (number of trackers){
if currentYPosition > previousYMax
previousYMax = currentYPosition
if currentYPosition < previousYMin
previousYMin = currentYPosition
deltaYMax = previousYMax - previousYMin
}
if (10s have passed)
zero all arrays
I hope this gives some guidance to others in the future.
Thanks,
Ibrahim
|
|