Hello oF community!
I'm currently working on a project that takes in a video input from ofVideoGrabber
and runs a computer vision script on it. I'm using Kyle McDonald's excellent ofxCV
. This is my first time using openCV
and ofxCV
.
Using ofxCV
's ObjectFinder
class, I'm attempting to recognize people's faces. The rectangle within which each face is recognized is then mapped to a simple ofPlanePrimitive
. Within my draw()
function, I draw the planes and run some shader distortion on them.
Upon each cycle, the new faces are all recognized and are mapped to the plane primitives. Since, the faces are recognized in update()
, but drawn in draw()
, I need to store them somewhere. In addition, since the number of plane primitives is entirely dependent on the number of faces recognized, at any one point in time, the number of plane primitives being instantiated is completely variable.
I'm currently struggling with how to store the image references and the planes they map to. Should I create a class to encapsulate them, and store those in an array or other data structure?