Monthly Archives: May 2010

Timeslice Code Available

Set up a google code svn repo for the time slicing code for anyone interested:
https://code.google.com/p/videotimeslice/

Advertisements

More Timeslicing + Some Old Stuff

Got a new Cannon Powershot sx200is (was promptly CHDK’d) which can do some surprisingly good 720p video. So I thought I’d have a bash at running some footage through the timeslicing code I’ve written. Unfortunately the re-encoding with ffmpeg wasn’t so good so the quality is a bit out of whack, but here is is anyway with the wonderful BlackCloud1711 modelling for the footage:

Also here’s a couple of pictures of an old GCSE (I think) project. It’s a parallel port controlled pen drum plotter. Most of the mechanical hardware was built by my dad with a couple of design suggestions thrown in from me, all the electronics and software was done by me (before the days of fancy-pancy arduinos). It’s controlled through the parallel port with all the code written in QBasic on a IBM100 (100Mhz raaaawwww power, also the first computer that was mine, it was only about 10 years out of date).

One of these days I’ll get round to adding an arduino with a G-Code interpreter to it so I can get some delicious plotting action on the go.

Time Slicing Update

Been spending the past few evenings playing around with and rewriting the time slicing code I wrote a while back. It now pushes and pops the camera frames into a fixed size buffer and allows you to set the rotation of the “slice” through the buffer. The effect this achieves is quite difficult to describe so here is a video to demonstrate it.

Here’s a brief description of each of the sections.

  • Normal video recorded @ 640×480 with a cheap webcam in my front yard. Splitting the frames out using ffmpeg for processing greatly reduced the quality of the subsequent sections (probably need to play around with some switches).
  • Time slice set at 45 degrees, effectively making columns of pixels to the right of the image be further back in time the columns on the left. The video appears to “grow” from the centre at the start of the section as the frame buffer fills up.
  • The time slice slowly rotates about the centre axis, changing the view from one instance in time at 0 degrees to the “history” of  the centre column of pixels at 180 degrees.
  • Same as previous section but with the slice rotating faster. Note how objects at the edge appear to be sped up while objects towards the centre slow down, this is due to the rotation of the slice effectively speeding up the play back of columns of pixels at the edge of the frames.

Why am I wandering aimlessly through an overgrown yard? Well the idea was the movement of the plants would look cool, but the web-cam I used to capture the video was too shitty to pick up much detail. One of these day’s I’ll save up for a decent video camera.

Currently the slice is only rotatable in one axis, will hopefully change this in later versions to allow full 3D positioning, and will probably get round to releasing the code at some point aswell.

CNC Machine – Mini-Update

Not managed to get much more done on the CNC machine due to things beginning to go a little pear-shaped , but I’ve found my new favourite building material, Chopping boards.

Off to PlayEverything in Manchester this weekend, so I doubt much will get done till next week.

Mini Guitar Amp

Decided to do some work on a project I haven’t touched in about a year. It’s a mini portable guitar amp, everything from the handle to the circuit is handmade.

The circuit is closely based around the example circuit in the LM386 datasheet. The volume control on the right also acts as an overdrive control when pushed past about half way (still need to find a decent knob/dial ). LM386’s have a pretty good sound when pushed into overdrive and are used in a bunch of commercial pocket amplifiers (probably most notably the smokey amp).

I’m probably going to rebuild the amp board at some point as it’s taken a bit of a beating being dragged between houses and there’s a couple of loose connections. Also may add a tone control if I can find some room on the faceplate. Will post a circuit diagram some point in the future.

Will probably have to get round to building a case for my deathtrap 50watt gainclone amp at some point soon.

CNC Machine – Part 2

Been doing a little more work on my CNC machine, got a fair bit of the X axis finished. The MDF parts were designed using QCad then roughly cut out with a fret saw, will give them a better finish at some point, but for now all the important dimensions and angles are accurate.

The connection between the stepper motor and the threaded rod will be made using heat shrink tubing once I’ve bought some.

There is a slight disparity between the end of the threaded rod and the stepper motors spindle. I think this is due to the way the stepper motor is mounted, as the guide rails and threaded rod seem good and parallel. Hopefully this shouldn’t be too problematic.

Also I’ve started work on the Y axis, which I should get mostly finished tomorrow.

Light-Field Roundup

Here’s a rather badly written introduction/overview on light-field photography I’ve written.

Light Field Photography

Introduction

The purpose of light field photography is to capture the intensity of the rays of light travelling in every direction through every point in space of a scene. At first this may sound intimidating, but the concept is incredibly simple.

Conceptually the idea is similar to Ambisonics or wave field synthesis, in that it captures a representation of a scene that can be decoded into a multitude of formats, or if accurately captured and reproduced , when played back, is indistinguishable from viewing the scene with your own eyes (i.e. your eyes could focus on various depths within the scene, and both your eyes would receive slightly different images, just like in real life). Unfortunately only a few expensive display technologies currently exists that can reproduce a full light field.

The concept can be quite difficult to visualise because human eyes have built in lenses that focus the rays of light in a scene onto a two dimensional plane with intensity values, effectively reducing the amount of information in a scene that a human can “see” at any single point in time.

Practicality

Light field photography can be split into 2 main areas, capturing and reproduction. For both of these areas no perfect solution is available, but compromises can be made that produce interesting and potentially useful results.

1.) Capturing

The ideal way to capture a light field would be to have a very dense 2 dimensional array of cameras. With each of the cameras capturing images with an infinite depth of field (everything in focus). All cameras would capture a frame at exactly the same time. The result of this would be a large number of images all captured from slightly different positions with every part in focus.

There are a number of ways to make this practical. Firstly is creating a lens that is similar in structure to the multi-lensed eye of a fly. If created correctly this lens could capture multiple images from slightly different positions on a single cameras CCD at the same time. Although this method relies on the capturing camera having a very high resolution CCD sensor, it is probably the most elegant solution for capturing light-field video.

Another solution is to use a single camera on a platform that moves in either 1 or 2 dimensions. To capture a light field image the camera could be moved to the required positions mechanically, effectively emulating a dense multi-camera set-up. This of course has the downside of taking a great deal of time to capture a single light-field image, but the advantage of being able to emulate an almost perfect light-field camera.

It is also possible to emulate pretty closely an ideal multi-camera system using a specially constructed rig to hold multiple cameras, and some method of syncing the frame capture of each. The main downside of this is cameras aren’t physically small enough to make a dense grid and the quality of the resulting light-field representation will suffer.

2.) Reproduction

As stated previously only a few expensive/impractical technologies currently exists that can reproduce a full light-field, but because light-field (ideally) captures all the available light information in a scene it can be “decoded” in number of interesting ways, some of which I will describe here.

Because the light-field images are captured by taking a number of “standard” images form slightly different positions it is trivial to reproduce a stereoscopic image that can have and adjustable appearance of 3D depth. This can be done by variably selecting 2 of the “standard” images that are horizontally displaced (Useful for calibrating 3D displays and standard 3D capturing rigs). This also leads to the possibility of creating depth maps and 3D models from light-field images using standard stereoscopic processing techniques (which could potentially have high accuracy due to the number of images from different positions captured).

Also light-field images can be used to produce “standard” images that can be dynamically refocused to bring certain areas of the image in or out of focus in post processing. This could potentially be augmented using eye tracking to bring an area of an image that a user is looking at into focus, based on what part of the image the user is looking at. With further processing it is also possible to create images with adjustable depth of fields (i.e. being able to select the depth rang of an image that is in focus).

Final Thoughts

This is by no means a full list of the potential ways to capture and reproduce light-field images, there are no doubt numerous other techniques either currently in existence or yet to be developed. It hopefully provides an overview of some of the methods, techniques and potential in a field that is yet to be fully explored.

Interesting Links

http://graphics.stanford.edu/projects/lightfield/ -Overview of some light-field technologies from Stanford.

http://www.youtube.com/watch?v=9H7yx31yslM -Demo video of dynamic refocusing by Stanford.

http://www.futurepicture.org/?p=47 -A multi-camera light-field set-up created by futurepicture.org

http://www.notcot.com/archives/2008/02/adobe-lightfiel.php -Adobe multi-lens light-field lens on single camera body.

http://www.youtube.com/watch?v=FF1vFTQOWN4 -Volumetric light-field display.

http://www.umiacs.umd.edu/~aagrawal/sig08/BuildingLightFieldCamera.html -Pinhole light-field lens on single camera body.

http://en.wikipedia.org/wiki/Light_field -Wikipedia article.