loading
 
Filter array variables
Ibrahim from New Zealand  [2 posts]
5 months
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  [2 posts] 5 months
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

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index