chesse fries
chesse fries

Reputation: 11

Hand gesture recognition in processing

I'm trying to change an int variable using a hand gesture. I'm trying to turn on the webcam in processing and if you swing your hand to the left the value changes and when you swing your hand to the right the value changes again. Any ideas on how to go about this?

Upvotes: 0

Views: 707

Answers (1)

Kevin Workman
Kevin Workman

Reputation: 42174

This question is pretty vague for StackOverflow. It's hard to answer general "how do I do this" type questions. It's much easier to answer specific "I tried X, expected Y, but got Z instead" type questions. That being said, I'll try to answer in a general sense.

Break your problem down into smaller steps.

Step 1: Can you write a simple sketch that simply displays the stream from a camera? The video library might be able to help you with that.

Step 2: Once you have that working, can you write code that tracks your hand? Try just drawing a dot on top of your hand. You might use OpenCV for this step.

Step 3: If you have code that can track your hand, then you can keep track of its position. You'll know when the position moves to the left or right, and you can take whatever action you want.

You might have to break these steps down into even smaller sub-steps. If you get stuck, then you can post an MCVE and a specific technical question, and we can go from there. Good luck.

Upvotes: 1

Related Questions