Computer Vision Worksheet

Basic Exercise

This week we will be using OpenCV

I have put up a basic implementation of Craig Reynolds’ Boids Algorithm. You can control the flock by passing in a centre point (a PVector) that all the boids will flock to. If the centre point is null then they will move towards the centre of the flock.

Create a computer vision interface to this code. Make the swarm flock towards the centre of the largest detected blob. If no blob are detected they should just flock normally. Remember that the array of Blob objects returned by opencv.blobs() is sorted in size order with the largest first.

You can use this movie to test your code, or another one if you want


Create a motion detection interface that detects movement in particular regions of the screen and produces a response

Use computer vision as a means to interact with different types of software, sound, graphics, or physics objects.

PDF Download    Send article as PDF to