This is yet another add-on to “Video Manipulation – ICM”.
Coding Assignment: Incorporate the pixels of an image (or video) into a Processing sketch.
Solution: Processing Code
Due the usage of a webcam, this code will not run via the applet. Download the code and run it locally.
This solution is motion detection. If the camera perceives motion at the top left or right corners (50 x 50 pixels), it will draw a white square to signal motion in that general area.
Issues: Currently the ‘computer vision’ is very sensitive, so it will pick up the slightest movement. In theory this is great, but in practice it does cause a few issues. The most predominant one is that if there is no change in motion between frames, it will not draw the square. Consider the fact that the webcam is set to capture at 30 frames per second. Future revisions of this code will include making the computer vision less sensitive and keeping the drawn white squares on the screen a little longer.