Using Jitter in Max to create Webcam grid


    Nov 25 2017 | 8:14 pm
    I would like to create a small grid with my webcam. The goal is that when people pass over certain areas, it can trigger sounds. Basically I need certain areas of the camera to create a bang. I am having trouble getting started with jitter, so any information helps.
    Thanks

    • Nov 25 2017 | 11:29 pm
      The jit.world object reports the position of mouse clicks in its display window. Alternatively, the jit.window object reports the position of the mouse in its display window even without clicking if the @mouseidle attribute is set. Look for the x and y coordinate values, and test to see whether they fall within particular regions in order to know where the mouse is in the window.
    • Nov 26 2017 | 12:46 am
      Thanks! Thats getting me closer to my goal. But how does motion in the display window become registered. For example: If I move my hand in the top right corner of the display window, how can I register that movement as a bang? Ideally Id like to divide the display window up so that different parts of the display window can be triggered by movement. Perhaps I am wrong in thinking this is possible. Maybe I need an infrared camera to detect movement instead?
    • Nov 26 2017 | 3:48 am
      This is why clarity of expression is important. When you wrote "when people pass over certain areas", your meaning of "people" and "certain areas" were unclear. I thought you meant "when a viewer of the webcam image moves the mouse over a certain area of the display window". Apparently I was mistaken. It seems you meant "when the person in the webcam's image moves in a particular region of the image". For that, I recommend Jean-Marc Pelletier's cv.jit package of external objects for computer vision. http://jmpelletier.com/cvjit/
    • Nov 26 2017 | 1:23 pm
      Agree with Christopher: cv.jit is great. But for simple motion detection on-the-grid you don't need any additional packages:
      Here is a simple algorithm I'm typically using for this kind of tasks.
    • Nov 26 2017 | 2:53 pm
      Yes. That's a good, concise example for detecting change in regions of the image.
    • Nov 29 2017 | 7:43 am
      Thanks, a lot. This really helped me.
    • Nov 16 2019 | 5:37 pm
      great. I will be playing around. thanks a lot for sharing