Simple question - how to get the last value of a variable which changes continually
in
Programming Questions
•
1 year ago
I have been coding all day and seriously, I can't think anymore.. My brain has exploded many many times. I am relatively new to processing so forgive me for my newbie-ness. And I'm french too so I'm also sorry for my english.
Ok here's my poject. I'm using OpenCV for blob detection and well, everythings working really fine. I'm using OSC to pass the Y position of the blob to another computer which passes it to an ellipse. The goal is to detect the jump motion of a human and use his Y position to create a game. The problem is, I need to do a lot of configurations to set up the ellipse movement so it's fluid and working.
I want to evaluate the last position of the ellipse so I can determine if the ellipse is ascending or descending. Should I use an array to store the Y positions and use a for ? Is it possible to check the value of the Y position at the last frame so if posY=posYLastFrame || posY<posYLastFrame, i know the object is descending? (which would be much easier and less head-bashing)
Thank you very much for your help and if you don't understand my problem I'll be glad to re-explain it! thank you!
1