Interactive City: Moving Clarity

Playing with OpenCV for Processing reference and examples, I have created a program that successfully identifies the motion detected area of interest within a webcam feed, and draws to it. This was done using the the setBackgroundSubtraction() and findContours() methods in its library to determine the contours of all moving areas in the image, and then draws the closed shapes identified to the screen, filled in with red.

The issue I am now working to solve is that although OpenCV for Processing provides the option to identify a “region of interest” (roi) to be modified separate of the rest of the image, the only constructor for the roi creates a rectangle. The polygons produced by the identified contours are, unfortunately, much more complicated polygons. I’m currently searching for an efficient solution to alter the image only in the select areas I desire. I have found proposed solutions online, but they all seem to apply to OpenCV for C++ thus far.

Nick Dalzell

Author: Nick Dalzell