We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I would like to develop a virtual drum set by using a webcam to detect the position of my hands on the screen and play a sound when they are over a certain location on the screen. I am new to computer vision and Processing. What are the few main tasks to do in order to achieve this? What are the areas to read up and how can I do this using Processing? Thanks guys!!! =)
Answers
Drums require very low latency, and I think that's hard to achieve when analyzing video. But it can be fun even with some latency.
There are examples included in the Examples menu for using the webcam. What I would try is to maybe overlay 5 rectangles on top of the live web cam image. I would copy() those 5 image areas, and use blend(DIFFERENCE) with previous copies of the same areas to calculate the difference between them. Then one could add the pixels values of each diff'ed area to see if the pixel change is large enough to trigger a sound. I think a time-threshold might be required to avoid samples being played too often.
I'm sure there are many other ways of doing it :)
aBe