Lukasz Karluk aka julapy has been doing some interesting experiments with openCV. To start, he wanted to play with some basic shapes and since he was doing all this in work downtime he felt a little obliged to use the agency‘s logo. The end result in an interesting collage of both motion tracking, delaunay triangulations and particle effects generated by motion in front of camera (see videos below).
The two interactive demos included below use openCV for the camera interaction. He writes:
1) first step is to work out the frame differencing, basically taking away the last two frames in the camera stream and working out the difference in the image. its a way of allowing the camera to see movement.
2) next step is to work out the common area of intersect between the movement image and the holler logo. by applying the & operator, both images are checked for common areas containing white pixels.
3) contour analysis is then applied on the common area of intersect. it searches out all the white blobs in that image and returns the result as a series of points which when connected show an outline of the blobs and mathematically describe what each blob/shape looks like.
4) now that each white blob is described as a bunch of points, that data can be passed to a delaunay triangulation algorithm which calculates the triangles necessary to fill that shape.
5) finally optical flow is used to add velocity to the box2d elements.
Read the full post on his blog with detail descriptions of each step.
Posted on: 23/05/2010
Posted in: openFrameworks