I have been playing around with the openCV example and I have created a grid of squares which react in a very basic sense to movement. I would like each of the squares to take on a set of colours which are most prominent in the video feed.
Please could someone provide me with help to find the average colour within my video feed, so I can change the squares to always update to the average colour. The project can be downloaded at the url below. It is currently setup with xcode.