I am using MediaPipe to detect handgestures - thumb up and thumb down. It comes with a confidence rating for each gesture 0 to 1.
I want there to be a constant number that starts at lets say 2000, and whenever there is a thumb up detected this number will increase, and if there is a thumbs down this number will decrease.
So far I have tried using a math chop connected to my confidence rating and a constant to add them together. But when the confidence rating goes back to 0, so does the end result (as makes sense). But I want this to be “accumulative” so that the additions and subtractions from the gestures do not go away.
Hope I am explaining this clearly. Any help would be GREATLY appreciated!
this sounds like it could be used by a Count CHOP. It has 3 inputs for a trigger channel (your thumbs up / thumbs down) a reset (there is also a parameter to set the reset value - your 2000), and a increment value where you can control the amount it counts up - or down.
You would want to set the offtoon and whileon parameter to increase count. The trigger channel should be the Thumb Up and Thumbs Down combined with a Math CHOP via the Combine Channels parameter’s “Maximum” setting.
TO have them increase and decrease, first multiply the Thumbs Down channel with -1 and then add it to the Thumbs Up channel before feeding it into the third input of the Count CHOP.
Welcome nerk!
Also, remember that you can sneak inside operator snippets examples, sometimes you find a lot of answer or inspiration inside it (right mouse button on a operator)