Another nice application of a slitscan process, this time using fonts can be seen at :http://www.c71123.com/typography/slitscan-type-project/
This approach uses Adobe Illustrator CS or CS2, and a script provided by the project’s author. Tré cool.
Another nice application of a slitscan process, this time using fonts can be seen at :http://www.c71123.com/typography/slitscan-type-project/
This approach uses Adobe Illustrator CS or CS2, and a script provided by the project’s author. Tré cool.
OK, I gotta say it: “iMovie is crap”. Basically all the problems I had with video transport disappeared when I converted the DV footage to a suitable Quicktime supported codec using MPEG Streamclip.
So the workflow on Mac OS X is like this:
The problems I was having with iMovie were basically to do with the sync points or ‘interesting time’ markers that it was inserting into converted files. It was putting extra points in which made no sense in the context of where the individual frames began/ended. Also the H.264 format didn’t work correctly with some quicktime.Media object methods, yet I have since tested a H.264 format movie exported by MPEG Streamclip that did not seem to suffer from the same problems so I can only assume that iMovie mings this up too.
I tested a number of different codecs at higher quality settings with a DV file that was around 160 MB. Platform was my ancient 450MHz Blue and White G3 Mac running OS X 10.3.9 and Quicktime 7.1.6. The original file specs:
The exported files had no sound exported with them as it was not required. I would expect the frame rate improved (in some cases) because of this. Performance in Quicktime Player was as follows:
I’m using one of the Panasonic DV cameras (model ag-dvc30e) to record some video. Seeing as I would like to come up with a rough guide to camera panning (and perhaps movement through space), I needed to figure some stuff out.
The Panasonic’s digital multiplier is ~9.6. This figure was not quoted directly in any info I could find but was calculated from the 35mm equivalent figures.
The reciprocal of 9.6 is:
1/9.6 = 0.1041667
Which gives a CCD element size of:
0.1041667 * 36mm = 3.75mm
0.1041667 * 24mm = 2.5mm
The 36mm and 24mm above are 35mm film dimensions.
FOV (rectilinear) = 2 * arctan(frame size/(focal length * 2))
(source http://photo.net/learn/fov/)
So by substitution we have for the minimum zoom setting:
HFOV = 2 * arctan(3.75/(4.1 * 2)) ~= 49.15 degrees
VFOV = 2 * arctan(2.5/(4.1 * 2)) ~= 33.91 degrees
And for the maximum zoom setting:
HFOV = 2 * arctan(3.75/(65.6 * 2)) ~= 3.27 degrees
VFOV = 2 * arctan(2.5/(65.6 * 2)) ~= 1.09 degrees
The focal length figures for 4.1 and 65.6mm are taken from the tech spec sheet for the camera found online somewhere.
These figures actually seem accurate despite the guesswork and approximations. The horizontal FOV matched up pretty well when I checked by eyeballing the FOV on the camera’s viewscreen against lines of sight taken from a protractor.
784 pixels horizontally per frame.
~16pixels per degree.
~5760 pixels for 360 degrees.
So 5760 pixels divided by 25 fps gives ~230 seconds for a 360 degree horizontal pan moving at a rate of one pixel per frame.
The original pan I took was around 36 seconds in duration, and 230 / 36 ~= 6.39 pixels per frame horizontal movement. I’m pretty sure this matches up closely to the average number of slices taken when tracking the horizontal movement of that clip (found when I was doing some variable width slice experiments), so the figure of 230 seconds must be a pretty good guide for how long a 360 degree pan should take.
That’s kind of a long time, and a small movement rate to pan at manually, but it’s not too bad with a tripod, practice and planning. Motion control would be nice too though.
OK, the Java Virtual Machine doesn’t like it when you try to use more memory than processing has allocated.
A compressed movie may be a few MB or less, but when it is made in to a video cube the size can grow massively. For example a 2.4MB MotionJPEG movie takes up nearly 160MB as a serialized object. Once the size of the videocube object exceeds the memory allocation things break and out of memory errors ensue.
The lab G5’s have 256MB of memory and processing can be allocated all of that, but it’s not really going to cut it with even a 5MB movie. Presumably giving processing all the memory will result in page swapping because the OS needs something too, so performance will not be so great either.
I guess this is just a limitation of the videocube idea. Not sure how to deal with it.
Well time is drawing near ot wrap this stuff up. This post is just a quick draft of what I’ll try to get together for assessment.
Hopefully this will be enough material. Not much of it is at present ready for submission, and I need to inform Mitchell of my submission date. Probably late in the second week of exams if that’s not pushing it.
If I do try to create some larger images from the video slicing and video cube experiments, they will need to be interpolated in order to scale them up for printing or simply larger on-screen display.
I have Photoshop, which supports bicubic as it’s best interp algorithm, but there are a number of other solutions out there. The ‘industry standard’ appears to be the Genuine Fractals plugin which can be used in Photoshop (and compatible image manipulation programs). There are other plugin solutions too. A number of stand-alone software applications also have interp capabilities. There are a reasonable number of interp algorithms available, but comparing them is kind of hard because different methods may be suitable for images with differing content.
I have found a few pages which have attempted to do this:
http://www.general-cathexis.com/interpolation.html
http://www.americaswonderlands.com/digital_photo_interpolation.htm
Unfortunately most of the stand-alone applications are Windows only which is not so great for Mac users who have not yet moved to Intel based Macs running bootcamp, parallels, VMWare, Wine or CrossOver.
OK have fixed up the variable width video slicer again (see previous post comment).
The code supports averaging of ‘passes’. Basically to use the thing you must view the movie and record values for how far the features in the scene move by clicking on their position in different frames of the movie. It is possible to do this a number of times and then average the result for each frame, which should theoretically produce a more accurate set of values. The following image used 2 passes:
Maybe it looks a little better than just 1 pass. Maybe it’s the placebo effect.
I’m thinking of giving up on this approach because there are 2 specific problems with it:
I think I can code to fix the first problem, by either using the tracking info for the y values (it’s supported by the VideoTracking class already), or by processing the resultant image later on to shift the slices around until they match (I have an approach worked out for this too). But that still leaves the exposure problem.
I was quite pleased with the original single pixel image, so it may be better to just use a tripod and a slow panning rate to generate these kinds of images. I will have to shoot some more video to try that out.
I have ironed out most of the issues and bugs with the video slicing code in processing, so now I can actually start using it to see what can be produced. This is the first image:
You can see the very obvious slices taken. They seem to mostly be around 20 pixels wide, so the camera is probably moving far too quickly. Also because it is hand-held footage the slices aren’t lining up too well either. Perhaps it’s worth taking a much slower pan using a tripod. I guess this is why Daniel Crookes uses a motion control rig.
For the moment I’ll try taking a few shorter passes where I’ll track the motion of features in a scene on a frame-by-frame basis to see if this gives any better results.
Just a quick post about this processing based project’s progress.
I have managed to get the video transport behaving itself quite well now. It supports normal playing, frame-by-frame in both directions, variable speed in both directions, and has the ability to pause or reset to the start point.
The direction issue has been partly solved. If a movie is set to play backwards, then the controls are reversed, and it sets the start point to the last frame of the movie. The main issue still to fix is the looping behaviour – it loops OK when going from the last frame through to the first, but not back the other way. This isn’t a major problem for use generally so it’s not a high priority to fix at the moment.
Accumulating variable width slices seems to work most of the time (errors pop up from time to time, so there’s still a few things to iron out). I have decided to accumulate the slices into a single PImage file which is then saved out at the end to a png format image. The image size is worked out by summing all the variable slice widths together before putting any slices into it. The image size can exceed the sketch size – I don’t know if there is some sort of implementation dependent limit to this, but I guess it may be worth looking into just in case I try to do something really huge.
The final major problem I have is the quicktime movie format. I tried h264 and it was found lacking. Some other formats just seem to produce huge files. I have had a shot at using mpeg4, but it seems to crash the applet sometimes, and is kinda slow anyway. So the search continues for a better codec to use that has good performance, reasonable file sizes, and cooperates with the quicktime java api. If I can’t find something suitable, then I’ll have to support entering the Delta X values with a low res version of the source movie, and then scale them up to grab the slices from the full resolution version. Not too hard, just more code and a different workflow.