Project pitch: Fun with Frames
I wanted to call this pitch "Use Frames, It's easy!", but somebody beat me to it, so having fun with frames it is.
Every now and then, a new processor comes on the market and we need an even harder problem to solve (in an even more stupid manner). This time I've chosen to try to create a mosaic for a motion picture. Think mosaics for every frame of a movie (not a movie of a mosaic in a mosaic). Add to that one rule: no cheating. Most mosaic programs cheat by changing the brightness or color of the sub images. To compensate for not doing any of the cheating, we will need a large collection of images to pick from and multiple computers to do the picking. The problem is simple: for a given frame select the best sub-frames to resemble it.
I've written a client and server which will do HSB full image matching using an absolute distance nearest neighbor algorithm. If you don't know what that means, it's the first algorithm you would come up with yourself. This means that if we get enough laptops together, we should at least be able to get the best frame out of a large collection and do it quickly enough to be done before Christmas.So, I would like to invite everybody to join in an effort to create a video together. I've got the following sessions lined up:- Get the code running, which includes:
- Install gstreamer and gstreamer-plugins
- Compile and run the test
- Get to grips with the implementation
- Size up the problem
- Decide on what to do:
- Make successive subframes in the generated mosaic actually successive frames of the original. (my own favorite)
- Optimize current implementation and go nuts for a while.
- Get the cloud to do the work.
- Bring in a new technology (like Hadoop clustering or 0MQ).
- Refactor and clean up the code to handle correct aspect ratios and other resolutions
- Start a VM and view the results at new years eve.
- Go with the decision made in the first session.
- Do the final run of the software an create our "best result".
At these sessions I will make sure we have a switch to connect all the laptops, some videos to use as sub-frame and a working version on my laptop.
Try it at home (on Linux, but Mac should also work):Install gstreamer and gstreamer plugins good (use brew for the Mac)
Install ffmpeg as a command, to collapse multiple frames back to a movie
$ git clone git://github.com/bneijt/videosaic.git
$ cd videosaic
$ ./test.shThis should create /tmp/image_?????.png files which contain a mosaic and (if you have ffmpeg installed) create a file called /tmp/image.ogg which contains a videosaic of vid/onesecond.ogg in itself. If you can get the movie to work, you are more then ready for the first session and you will also have seen that there is a long way to go!


