<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>a different tune</title>
	
	<link>http://stewartgreenhill.com/blog</link>
	<description>Stewart Greenhill's random thoughts and musing</description>
	<pubDate>Tue, 11 May 2010 05:52:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/StewartGreenhill" /><feedburner:info uri="stewartgreenhill" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>LCD Multitouch Table Mark 1</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/UHdtOLO_DVs/</link>
		<comments>http://stewartgreenhill.com/blog/2009/06/24/lcd-multitouch-table-mark-1/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 14:32:09 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[The Lab]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/?p=63</guid>
		<description><![CDATA[Multitouch is cool, but its also becoming cheaper and more accessible thanks to the work of folks like Jeff Han, and communities like the NUI Group. Of course, devices like the iPhone have made many of these ideas mainstream, but not everyone wants to do multitouch on a tiny display. Multitouch surfaces have great potential [...]]]></description>
			<content:encoded><![CDATA[<p>Multitouch is cool, but its also becoming cheaper and more accessible thanks to the work of folks like <a href="http://www.ted.com/talks/jeff_han_demos_his_breakthrough_touchscreen.html">Jeff Han</a>, and communities like the <a href="http://nuigroup.com/">NUI Group</a>. Of course, devices like the <a href="http://www.apple.com/iphone/">iPhone</a> have made many of these ideas mainstream, but not everyone wants to do multitouch on a tiny display. Multitouch surfaces have great potential as intuitive, multi-user, social computing environments.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/table1.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/table1-300x225.jpg" alt="" /></a></p>
<p>I wanted to build a small, portable touch table that can be used by one or two people. The display surface is the horizontal table top, and people &#8220;play&#8221; at opposite sides. Its a bit like those old-style sit-down arcade games, though for the life of me I can&#8217;t remember any games that were simultaneous two-player. Both users can touch the surface, but also maintain face-to-face interactions across the table. The device is designed particularly with kids in mind, for play between two children, or between a child and parent.</p>
<p>One of the main motivations for building this was to come up with an aid for educating kids as young as 2 years old. Some children struggle to learn stuff that most of us pick up effortlessly, like how to talk and interact socially. Very early intervention can make a huge difference for kids with conditions like <a href="http://en.wikipedia.org/wiki/Autism">autism</a> and other language disabilities. While therapies like <a href="http://en.wikipedia.org/wiki/Applied_behavior_analysis">ABA</a> can be very effective, they can also be gruelling and intense for both the child and the therapist (usually, the parent). If we can simplify this process using engaging interactive games, and by sharing and building resources collaboratively on-line, this has to be a good thing. More on this later&#8230;</p>
<h2>Design</h2>
<p>There are many ways to do multitouch sensing, but the basic idea used here is to measure pressure optically with a camera. A great place to get some background is <a href="http://nuigroup.com/forums/viewthread/1982/">this thread at NUI group</a>. Since I wanted to do fiducial tracking, I chose an approach based on diffuse illumination. This means that the display does not rely on a very tight coupling with the surface to illuminate objects.</p>
<p>I wanted my table to be small, cheap and robust, so I chose to use an LCD rather than a projector. LCDs don&#8217;t transmit diffuse IR very well, so the illumination is provided by the surface itself (Diffuse Surface Illumination, or &#8220;DSI&#8221;). A special type of acrylic (called &#8220;Endlighten&#8221; or &#8220;DLux&#8221;, depending on the manufacturer) is used as the top surface of the display. This has embedded particles which reflect light out the surface when lit from the side. This material is often used in display signs.</p>
<h2>Parts List</h2>
<ul>
<li>LG W2252TQ-PFT 22&#8243; LCD Monitor</li>
<li>Unibrain Fire-i B/W Camera</li>
<li>2.5mm focal length lens</li>
<li>Mac Mini</li>
<li>Firewire 9-pin to 6-pin cable</li>
<li>IR pass filter 850nm</li>
<li>Acrylic panel, 10mm &#8220;Endlighten&#8221;</li>
<li>IR LED strip illuminator</li>
<li>Power supply, 12V for illuminator</li>
<li>Misc hardware: MDF, wood screws, nut/bolts, square dowell, 1&#8243; aluminium angle, steel strip, T-nuts, hinge, construction adhesive, silicone sealant, magnetic catches, gaffa tape</li>
</ul>
<p>I found a lot of useful information on-line, but much of it was fragmented. So here is an illustrated guide to how I built my system. Click on the images for higher resolution versions.<br />
<span id="more-63"></span></p>
<h2>Step 1: Disassemble Monitor</h2>
<p>I selected a 22&#8243; LCD display from (LG W2252TQ-PFT), as these seem to give a good balance between size and cost. I wanted something cheap so that it didn&#8217;t matter too much if I trashed it.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/monitorfront.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/monitorfront-300x225.jpg" alt="" /></a></p>
<p>First problem is to get the thing apart without breaking it. The monitor is held together with pesky snap fittings, so you have to carefully prise it apart with a screwdriver. Hint: if you remove the grey front bezel, try levering from the bottom left and right corners.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/monitorinterior.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/monitorinterior-300x225.jpg" alt="" /></a></p>
<p>Once you&#8217;ve removed the plastic there are basically just two parts left, the panel and the power supply unit, which also has the video connector. Be careful not to scratch the display surface. The black back-light cables are only just long enough in the original configuration. Eventually, you&#8217;ll need to <a href="#lengthen">carefully lengthen these</a>.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/buttonassembly.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/buttonassembly-300x225.jpg" alt="" /></a></p>
<p>The control buttons are supported by the original casing. I just cut the whole thing out with a dremel tool.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/driverboard.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/driverboard-300x225.jpg" alt="" /></a></p>
<p>We need to separate the LCD driver board from the panel, so that we can remove the backing. Its held on by three black screws - I couldn&#8217;t shift these with a screw driver and had to drill them out.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/driverboarddetail.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/driverboarddetail-300x225.jpg" alt="" /></a></p>
<p>This close-up of the driver board shows the connector for the ribbon cable. Be very careful not to stress the yellow flexi cables that connect the driver to the panel. These are held on by glue, and if you tug on them they will pull off the panel and you will lose entire rows or columns of pixels. If you do damage the cables, they <a href="http://www.instructables.com/id/Repair-a-Malfunctioning-LCD/"><strong>may</strong> be repairable</a>, but I haven&#8217;t ever tried this, so play it safe.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/sideclip.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/sideclip-300x225.jpg" alt="" /></a></p>
<p>The metal backing is held on with clips around the edges. Carefully prise these open and you&#8217;ll be able to lift the backing off. The display is made of several layers: the panel (front) with a polarising film on the front and back, a diffuser, a fresnel lens, the backlight (a perspex panel), and a glossy white plastic reflector. Most of this stuff is just to get smooth lighting of the display. I discarded the fresnel lens and the reflector, though you&#8217;ll probably want to keep them until you&#8217;re finished.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/paneltest1.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/paneltest1-225x300.jpg" alt="" /></a></p>
<p>At this point you&#8217;ll probably want to test the panel to make sure it still works. I set mine up on a perspex sheet. The display will still run without the backlight.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/paneltest2.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/paneltest2-300x225.jpg" alt="" /></a></p>
<p>For experiments, I set up the camera under the panel in a little frame made of Duplo. You can light it from the back with a desk lamp.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/paneltest3.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/paneltest3-300x225.jpg" alt="" /></a></p>
<p>Here you can see the panel running with the original backlight.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/paneltestreflector.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/paneltestreflector-300x225.jpg" alt="" /></a></p>
<p>Here you can see how much brightness is lost by removing the back reflector. It makes a big difference, though the screen is usable without it. You can probably get some brightness back by lining the interior of the box with a similar glossy white coating.</p>
<h2>Step 2: Modify the backlight</h2>
<p>We can use the existing backlight with two modifications: cut the center out of the back, and lengthen the backlight cables.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightrun.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightrun-300x225.jpg" alt="" /></a></p>
<p>The backlight has two long fluorescent tubes, mounted in the sides of the panel. I decided to keep as much of the frame as possible, removing the center portion.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightdetail.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightdetail-300x225.jpg" alt="" /></a></p>
<p>The backlight cables connect at one end of the tubes, which are supported by plastic insulators.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightmod.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightmod-300x225.jpg" alt="" /></a></p>
<p>I cut the center out of the panel using a combination of hack-saw and tin snips. If you have some sort of cutting wheel that might work better. Do it carefully so you don&#8217;t damage the fluoro tubes.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightmoddetail.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightmoddetail-300x225.jpg" alt="" /></a></p>
<p>Try to leave some space around the corners. As you can see here, its quite thin in places. When its done, the whole LCD assembley should fit back into the frame.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightpattern1.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightpattern1-300x225.jpg" alt="" /></a></p>
<p>The perspex panel has an interesting pattern etched in the bottom surface. I guess this is to help reflect the light forward. Otherwise, the perspex looks quite clear, so I don&#8217;t think its a diffusing edge-lit type.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightpattern2.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightpattern2-300x225.jpg" alt="" /></a></p>
<p>The density of the cross-hatch pattern is higher in the middle, presumably to normlise the intensity of reflected light across the surface.</p>
<p><a name="lengthen"><br />
</a><a href="http://stewartgreenhill.com/blog/files/2009/06/backlightconnector.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/backlightconnector-300x225.jpg" alt="" /></a></p>
<p>Now it time to lengthen the backlight cables. Each fluoro has two plugs (four wires). The blue and pink wires are high voltage (3kV), so you need to use a thick wire with good insulation. The power supply includes some sort of sensing that will shut down the supply if there is too much voltage drop. This means that you <strong>can&#8217;t add more than about 20cm to the cable length</strong>. I cut the cables near the connector and joined the extra lengths in, insulating the joins with heat-shrink tubing.</p>
<h2>Step 3 : Assemble the touch surface</h2>
<p>I wanted a design that would enable sensing of objects on the surface, so I chose to use an IR diffusing surface. The top panel is 10mm edge-lit acrylic. This has a couple of brand names, including &#8220;Endlighten&#8221; and &#8220;DLux&#8221;, depending on the manufacturer.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/irstrip.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/irstrip-300x225.jpg" alt="" /></a></p>
<p>The acrylic panel is lit from the side with 850nm IR LEDs. To save time, I used 850nm IR LED Flex ribbon, from <http://www.environmentallights.com/categories/1303_2399/infrared-led-ribbon-flex">Environmental Lights</a>. This can easily be cut to length. Its not cheap, but a 5m reel gave me enough to make two surfaces.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/irstripdetail.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/irstripdetail-300x225.jpg" alt="" /></a></p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/box1.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/box1-300x225.jpg" alt="" /></a></p>
<p>Because its flexible, the flex ribbon is very easy to attach to the panel. I just taped it on with masking tape. Here&#8217;s the completed panel sitting on the beginnings of my box.</p>
<h2>Step 4 : Putting it all together</h2>
<table border="0">
<tbody>
<tr>
<td><a href="http://stewartgreenhill.com/blog/files/2009/06/lens_19mm.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/lens_19mm-300x225.jpg" alt="" width="150" /></a><br />
1.9mm lens</td>
<td><a href="http://stewartgreenhill.com/blog/files/2009/06/lens_25mm.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/lens_25mm-300x225.jpg" alt="" width="150" /></a><br />
2.5mm lens</td>
</tr>
<tr>
<td><a href="http://stewartgreenhill.com/blog/files/2009/06/lens_36mm.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/lens_36mm-300x225.jpg" alt="" width="150" /></a><br />
3.6mm lens</td>
<td><a href="http://stewartgreenhill.com/blog/files/2009/06/lens_43mm.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/lens_43mm-300x225.jpg" alt="" width="150" /></a><br />
4.3mm lens</td>
</tr>
</tbody>
</table>
<p>Depending on the size of the panel, and desired height of the table you need to choose a lens of the appropriate focal length. Short focal lengths allow you to minimise the distance between the surface and the camera, but they also introduce spherical distortion. With too much distortion, the finger-touch blobs will be smaller at the edge of the surface, requiring more pressure to get the same response. I initially tried a 1.9mm lens, which allowed me to get the camera about 20cm from the surface but the response was not uniform enough to make drag gestures work well. I bought a few different size lenses, and tested them for distortion and distance. I settled on a 2.5mm lens, which could see the entire panel from about 30cm distance.</p>
<p>Once I had the distance between the camera and panel, I made the box to fit. It takes a bit of juggling to get everything in the right place. Other critical distances are the distance between the power supply and the corners of the backlight, and the distance between the power supply and the driver board (for the flat ribbon cable). For safety, I chose to keep the power supply in its original shield, but the shield actually contains two small boards with a short cable between them. These could be separated if things get tight with the spacing.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/tableinteriorside.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/tableinteriorside-300x225.jpg" alt="" /></a></p>
<p>Here you can see an early side view with the camera and power supply in place.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/tableinteriortop.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/tableinteriortop-300x225.jpg" alt="" /></a></p>
<p>This shows a top view of the completed system, including all electronics and cabling.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/table1.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/table1-300x225.jpg" alt="" /></a></p>
<p>Here is the finished system up and running.</p>
<h2>Lessons Learned</h2>
<h3>Tracking</h3>
<p>I found the DSI surface to be surprisingly good. The contrast is low because in addition to the IR reflected from finger touches, it also receives IR diffused through the bottom surface of the acrylic, IR from the backlight, as well as ambient IR from the room. Despite the low contrast, it does seem very consistent and with appropriate settings the blob detection is reliable. If anything, it is a little too sensitive at times, responding to very light touches, brushes from sleeves, etc. It works well in normal room lighting. It does not have to be dark, though if there is bright sunlight on the surface or nearby it has some problems. Direct sunlight on the surface produces spurious blobs, and a very high ambient brightness can result in shadows and reduced sensitivity.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/track.png"><img src="http://stewartgreenhill.com/blog/files/2009/06/track.png" alt="" width="100%" /></a></p>
<p>I used <a href="http://nuicode.com/projects/tbeta">Community Core Vision</a> to do the tracking. I tried the <a href="http://reactivision.sourceforge.net/">Reactivision</a> tracker, but could get nothing but noise out of it (perhaps it doesn&#8217;t work with low contrast?).</p>
<h3>Fiducials Fail</h3>
<p>I tried using Reactivision fiducial markers, but found the images very blurry. This blurring comes partly from the LCD panel, and partly from the diffuser.</p>
<p>&lt;<a href="http://stewartgreenhill.com/blog/files/2009/06/fiducial-diffuser.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/fiducial-diffuser.jpg" alt="" width="300" /></a></p>
<p>In this image, the diffuser covers only the right hand side of the display, so you can see the difference between the panel by itself (left) and with the diffuser (right). In both cases, the tracker fails to segment the fiducial from the background, though the images could possibly be recovered with some specialised signal processing, at least without the diffuser.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/fiducial-no-diffuser.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/fiducial-no-diffuser.jpg" alt="" width="300" /></a></p>
<p>For comparison, here is the marker in front of the panel (right) and behind the panel (left).</p>
<p>The purpose of the diffuser is to produce a constant background illumination for the LCD panel. It does this by blurring, so this effect should not really be surprising. Without the diffuser, you can see objects behind the panel which can be confusing.</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/diffusertest1.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/diffusertest1-300x225.jpg" alt="" /></a></p>
<p>This image shows the effect on image clarity of removing the diffuser. Without the diffuser (right) we can see the cross-hatch pattern on the lower surface of the backlight. This could be improved using a different design of backlight, but then we may end up seeing through to objects behind the panel (eg. the camera and wiring). Ideally, we need a material that diffuses visible light, but transmits IR.</p>
<p>Anyway, although its not a showstopper, its still is an issue that I would like to solve. If anyone has any ideas or suggesions, please let me know.</p>
<h2>Future Work</h2>
<p>Some things still to do:</p>
<ul>
<li>Add cooling. With the box completely closed, it can overheat. I plan to add some inlet vents at the top, which will also let out the sound from the speakers. A fan will exhaust air out the bottom of the unit - there&#8217;s a small gap between the bottom of the cabinet and the ground.</li>
<li>Switch the illuminators. Currently these are always on while the unit is plugged in, but there&#8217;s an activity LED from the monitor which I could easily use to switch the power to the illuminators.</li>
<li>Switch the CPU. Currently need to open the table to press the power button on the Mac Mini. I don&#8217;t know if the Mac can be remotely switched. I&#8217;m reluctant to hack it just yet.</li>
<li>Get fiducials working.</li>
<li>Write some more code!</li>
</ul>
<p>And one observation. If you leave your touch table open, it may become home to unwanted guests. I walked in today to find things wildly moving about the screen. On closer investigation I found this:</p>
<p><a href="http://stewartgreenhill.com/blog/files/2009/06/cat.jpg"><img src="http://stewartgreenhill.com/blog/files/2009/06/cat-300x225.jpg" alt="" /></a></p>
<p>I don&#8217;t blame her - its midwinter here, and for a short-haired cat, a heated box is pretty cozy place to be.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/UHdtOLO_DVs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2009/06/24/lcd-multitouch-table-mark-1/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2009/06/24/lcd-multitouch-table-mark-1/</feedburner:origLink></item>
		<item>
		<title>A batch controller for Autostitch</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/fbW17yV4y08/</link>
		<comments>http://stewartgreenhill.com/blog/2008/07/22/a-batch-controller-for-autostitch/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 14:50:39 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[The Lab]]></category>

		<category><![CDATA[Autostitch]]></category>

		<category><![CDATA[batch]]></category>

		<category><![CDATA[command-line]]></category>

		<category><![CDATA[panorama]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2008/07/22/a-batch-controller-for-autostitch/</guid>
		<description><![CDATA[Autostitch is an automatic 2D image stitcher. Give it a collection of partly overlapping images, and it will position and blend them into a seamless panorama. A demo version of Autostitch is available for free download. It has a simple GUI which can be used to select input images, and adjust parameters such as output [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.autostitch.net">Autostitch</a> is an automatic 2D image stitcher. Give it a collection of partly overlapping images, and it will position and blend them into a seamless panorama. A demo version of Autostitch is available for free download. It has a simple GUI which can be used to select input images, and adjust parameters such as output resolution, cropping, and image rotation. However, the GUI interface is a little inconvenient when you have a large number of repetitive stitching tasks to perform, for example : panoramic video.</p>
<p><object classid="D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370"><param name="movie" value="http://www.viddler.com/player/4881e049/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/4881e049/" width="437" height="370" type="application/x-shockwave-flash" allowFullScreen="true"></embed></object></p>
<p>A panoramic video can be made by stitching each frame of an input video against a background panorama, <a href="http://stewartgreenhill.com/blog/2006/05/22/fun-with-autostitch-panoramic-video/">as described in this earlier post.</a> To do this we need to run thousands of separate stitching operations, each with different sets of images. Its too much to do by hand via the GUI, which is why I wrote this little batch controller for Autostitch.</p>
<p>The batch controller is a simple program that pretends to be a user, sending sequences of events to the GUI to simulate the normal operation of the program:</p>
<ol>
<li>In the Autostitch window, select menu File -&gt; Open.</li>
<li>When the open dialog appears, enter a set of image names into the edit control, and then press the &#8220;Open&#8221; button</li>
<li>Wait for Autostitch to finish processing</li>
<li>When Autostitch opens the preview window, close it. This makes Autostitch ready to perform the next stitching operation</li>
</ol>
<p>Fortunately, this is not too hard to do using the Win32 API. <code>FindWindow(NULL, name)</code> gets us a top-level window with a given name (eg. &#8220;autostitch&#8221; or &#8220;Open&#8221;). The controls for a window can be recursively enumerated using <code>EnumChildWindows(window, callback, data)</code>. We can use our own callback function to search based on the name or class of a control. Windows uses messages to communicate events to controls. We can generate the same messages using <code>SendMessage</code>. For example, to click a button:</p>
<pre><code>  SendMessage(button, BM_CLICK, 0, 0);</code></pre>
<p>or to enter text into an Edit control:</p>
<pre><code>  SendMessage(edit, WM_SETTEXT, 0, (LPARAM) text);</code></pre>
<p>If you want more details, check out the source from the <a href="#download">download</a> links below.</p>
<h3>Usage</h3>
<p>To use the batch controller, you need to first start Autostitch in the usual way. Autostitch must be &#8220;pointing&#8221; at the directory containing your source images. You can set this using the &#8220;File-&gt;Open&#8221; menu. Just select one or more images and press &#8220;Open&#8221; - it doesn&#8217;t matter whether the result is successful or not. From the command-line, you can then stitch any set of images from that directory like this:</p>
<pre><code>  stitch file1.jpg file2.jpg file3.jpg</code></pre>
<p>This will stitch the images as usual, opening the result &#8220;pano.jpg&#8221; in the default image previewer. To run multiple stitches in sequence, the preview window must be closed before the next stitch can start. Request this by specifying <code>-wait -close</code>. For example:</p>
<pre><code>  stitch -wait -close file1.jpg file2.jpg file3.jpg</code></pre>
<p>To stitch a sequence of images, use the <code>-template</code> option, like this:</p>
<pre><code>  stitch -template frame%03d.jpg 20 50 file1.jpg file2.jpg file3.jpg</code></pre>
<p>This specifies a file name template (using sprintf syntax), and a range of file numbers. The example generates a sequence of names &#8220;frame020.jpg&#8221;, &#8220;frame021.jpg&#8221;, &#8230;, &#8220;frame050.jpg&#8221;. Each stitch operation combines one of the sequence names with the remaining arguments, and renames the output panorama (by default, to &#8220;out0020.jpg&#8221; &#8230; &#8220;out0050.jpg&#8221;). Template mode automatically implies <code>-wait -close</code>.</p>
<p>Here are some simple examples using the Autostitch demo images:</p>
<pre><code>  stitch -wait -close 100-0023_img.jpg 100-0024_img.jpg 100-0025_img.jpg</code></pre>
<p>This stitches the bottom 3 images of the &#8220;mountain&#8221; panorama.</p>
<pre><code>  stitch -path s:/stewart/programs/autostitch/images/test/ \
             -template 100-%04d_img.jpg 38 40 \
             100-0023_img.jpg 100-0024_img.jpg 100-0025_img.jpg</code></pre>
<p>This stitches each of the top three images (38..40) against the bottom three images, producing three outputs, &#8220;out0038.jpg&#8221; .. &#8220;out0040.jpg&#8221;. (change the path to reflect your Autostitch installation).</p>
<p>There are a bunch of settings that you might need to change. For example, the system looks for the preview window using one of the standard applications (&#8221;pano.jpg - Windows Picture and Fax Viewer&#8221; or &#8220;Microsoft Photo Editor - [pano.jpg]&#8220;). If you have a different preview app, you&#8217;ll need to change the title of the preview window using the <code>-output</code> option.</p>
<p>In &#8220;template&#8221; mode, the system renames each &#8220;pano.jpg&#8221; to a different file name using the sequence number, but to find the resulting file you need to specify the result directory using <code>-path</code>. Alternatively, run the <code>stitch</code> command from the directory containing the source images.</p>
<pre>
Options:
-help      Show help message and exit
-version   Show version and exit
-wait      Wait for Autostitch to complete (single stitch only)
-close     Close preview opened by Autostitch (single stitch only)
-template  <strong>temp</strong> <strong>start</strong> <strong>end</strong> Specify template for batch operation
           A range of images is processed for start &lt;= id &lt;= end. Use sprintf
           formatting (eg. id=23, temp='file%04d.jpg' -&gt; 'file0023.jpg')
-dryrun    Just output batch image lists without calling Autostitch
-path      Path to image directory (for batch stitch). INCLUDE TRAILING '/'

Stuff you probably don't need to change:
-window    Name of Autostitch window (default: autostitch)
-status    Name of Autostitch status window (default: Status)
-output    Name of preview window (default: 'pano.jpg - Windows Picture and Fax Viewer')
-fileOpen  Menu name for File-&gt;Open dialog (default: 'File:Open')
-openTime  Delay (in ms) for open dialog to populate controls (default: 500)
-closeTime Delay (in ms) to wait before closing preview window (default: 2000)
-outjpg    Template (dir,id) for output files (default: '%sout%04d.jpg')
-outtxt    Template (dir,id) for output files (default: '%sout%04d.txt')
</pre>
<h3>Download</h3>
<p><a name="download"></a></p>
<ul>
<li><a href="http://stewartgreenhill.com/blog/files/stitcher/stitch-20090216.tar.gz">Source code and Windows binary</a> (gzipped tar file, 10K)</li>
<li><a href="http://stewartgreenhill.com/blog/files/stitcher/stitch.c">C source on-line</a></li>
</ul>
<p>This app is fairly minimalist, but it should not be hard to modify if required. I used mingw + gcc which are available for free from <a href="http://mingw.org">mingw.org</a>.</p>
<p>Have fun! And if you manage to create something interesting, please post a comment.</p>
<p><a href="http://stewartgreenhill.com/blog/2006/05/23/fun-with-autostitch/">Check here</a> for more fun with Autostitch.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/fbW17yV4y08" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2008/07/22/a-batch-controller-for-autostitch/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2008/07/22/a-batch-controller-for-autostitch/</feedburner:origLink></item>
		<item>
		<title>Google’s new Dr Seuss look</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/0FdSZd-LdYI/</link>
		<comments>http://stewartgreenhill.com/blog/2008/06/18/googles-new-dr-seuss-look/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 03:32:22 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2008/06/18/googles-new-dr-seuss-look/</guid>
		<description><![CDATA[Google recently replaced their &#8220;big G&#8221; favicon with a &#8220;little g&#8221;. At the same time, they made it transparent, which I think was probably a mistake because it doesn&#8217;t look consistent and is hard to read against some backgrounds.

The &#8220;little g&#8221; is has a kind of archaic, quirky feel. While its used a lot in [...]]]></description>
			<content:encoded><![CDATA[<p>Google recently replaced their &#8220;big G&#8221; favicon with a &#8220;little g&#8221;. At the same time, they made it transparent, which I think was probably a mistake because it doesn&#8217;t look consistent and is hard to read against some backgrounds.</p>
<p><img src="http://stewartgreenhill.com/blog/files/2008/google-favicon-white.png"><img src="http://stewartgreenhill.com/blog/files/2008/google-favicon-grey.png"><img src="http://stewartgreenhill.com/blog/files/2008/google-favicon-black.png"></p>
<p>The &#8220;little g&#8221; is has a kind of archaic, quirky feel. While its used a lot in print, the &#8220;looptail&#8221; version its not so common in screen fonts which I guess makes it distinctive. Unfortunately, I&#8217;m immediately reminded of the typography of Dr Seuss.</p>
<p><img height="200" src="http://stewartgreenhill.com/blog/files/2008/greeneggs.jpg"><img height="200" src="http://stewartgreenhill.com/blog/files/2008/horton.png"><img src="http://stewartgreenhill.com/blog/files/2008/google-favicon-white.png"></p>
<p>Now this is not necessarily a bad thing, but I wonder if that&#8217;s what they intended.</p>
<p>Update: The <a href="http://googleblog.blogspot.com/2008/06/one-fish-two-fish-red-fish-blue-fish.html">Official Google Blog</a> shows some of the 300 designs they tried. It also confirms the Dr Seuss connection - maybe there&#8217;s a fan in the design team. Personally, I think the old one was fine - its immediately recognisable which is all a favicon should be. For the disgruntled, there&#8217;s a campaign to <a href="http://www.bringbacktheoldgooglefavicon.com/">bring back the old Google favicon</a>. Or if you have a better idea, <a href="http://www.google.com/faviconideas/">Google are inviting submissions</a>.</p>
<p>Update: Google changed their favicon again, after reviewing suggestions from their users. <a href="http://googleblog.blogspot.com/2009/01/googles-new-favicon.html">The final design</a> is based on one submitted by André Resende, a computer science undergraduate student at the University of Campinas in Brazil.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/0FdSZd-LdYI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2008/06/18/googles-new-dr-seuss-look/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2008/06/18/googles-new-dr-seuss-look/</feedburner:origLink></item>
		<item>
		<title>Spooky Men of the West launch new album</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/qnKFT7xwb44/</link>
		<comments>http://stewartgreenhill.com/blog/2008/05/24/spooky-men-of-the-west-launch-new-album/#comments</comments>
		<pubDate>Sat, 24 May 2008 02:49:43 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Music]]></category>

		<category><![CDATA[cd]]></category>

		<category><![CDATA[spooky men of the west]]></category>

		<category><![CDATA[spooky men's chorale]]></category>

		<category><![CDATA[we never meant to come here]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2008/05/24/spooky-men-of-the-west-launch-new-album/</guid>
		<description><![CDATA[&#8220;Created some time ago in 2005, The Spooky Men of the West is Stephen Taberner&#8217;s twisted vision for the western chapter of the The Spooky Men&#8217;s Chorale.
This now rogue chapter has expanded its repertoire with their own musical masterpieces, drawing on personal feelings and other things.
The Spooky men of the West seems to have been [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Created some time ago in 2005, <a href="http://www.spookymenofthewest.com.au">The Spooky Men of the West</a> is <a href="http://www.stephentaberner.com/">Stephen Taberner&#8217;s</a> twisted vision for the western chapter of the <a href="http://www.spookymen.com/">The Spooky Men&#8217;s Chorale.</a></p>
<p>This now rogue chapter has expanded its repertoire with their own musical masterpieces, drawing on personal feelings and other things.</p>
<p>The Spooky men of the West seems to have been formed with no end in mind - luckily, cos there&#8217;s no sign of stopping them now&#8230;&#8221;</p>
<p>&#8220;We never meant to come here&#8221; is the brand new EP from <a href="http://www.spookymenofthewest.com.au">The Spooky Men of the West</a>. A sixteen voice male acapella choir, the Spooky Men of the West explore (or should that be &#8220;subjugate&#8221;?) a range of musical styles from traditional Georgian table singing to contemporary and original works. Their sound has been said to be &#8220;gentle and sad, even sweet, but also sexy, powerful and unmistakably male&#8221;. One newspaper report aptly describes them as &#8220;a group of wierdos who sing&#8221;.</p>
<p>&#8220;We Never Meant to Come Here&#8221; includes six new songs that depart from Stephen Taberner&#8217;s Spooky repertoire. &#8220;Navigation&#8221; is an original song by the Spooks, with music by Spookmeister Ryan Morrison. &#8220;Delilah&#8221; (Mason &amp; Reed) and &#8220;When You Sleep&#8221; (CAKE) are surprisingly recognisable after being given a Spooky makeover. &#8220;Varjele&#8221; was written by Digby Hill, loosely based on a Finnish folk song, and &#8220;Mirangula&#8221; is a traditional Georgian lament. The &#8220;Norwegian Sailors Chorus&#8221; is Wagner as you have never heard him before, and possibly never want to hear him again.</p>
<p>Rather than trying to explain what this is about, check this out:</p>
<p><object classid="D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="282"><param name="movie" value="http://www.viddler.com/player/7ec7e891/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/7ec7e891/" width="437" height="282" type="application/x-shockwave-flash" allowFullScreen="true"></embed></object></p>
<p>&#8220;When You Sleep&#8221; is <a href="http://www.simonnield.com/">Simon Nield&#8217;s</a> beautiful interpretation of the song by <a href="http://www.cakemusic.com/">CAKE</a>. To call it a cover is almost unfair because this version actually has a melody, something that is missing from the catchy but rather tuneless original. I guess this song appeals to my sense of strange, which makes it a personal favourite. Another stand-out track for me is Digby Hill&#8217;s rousing arrangment of &#8220;Varjele&#8221;, which perfectly sets the mood for marauding. And who else but the Spooks could turn a Wagnerian drinking chorus into a treatise on the demise of bathtime. I hope they&#8217;re not suggesting we drink the bathwater&#8230;</p>
<p>I have just two tiny criticisms of this album. Firstly, the opening track &#8220;Navigation&#8221; is <em>too short</em>. Just as the song gathers momentum its finished - perhaps that&#8217;s the point the song is making, but I felt I wanted more of the wonderful &#8220;home is where I hang my hat&#8221; motif. Secondly, while the CD sounds great it lacks some of the energy of the live performances, but I guess this is always the trade-off with studio recordings.</p>
<p>My advice is to get this CD but go see them live if you can, because part of the Spooky experience is that dissonance between the warm, wonderful evocative sound and their strange understated deadpan humour. If you&#8217;re in Western Australia you can catch them at the upcoming <a href="http://dfov.org.au">Denmark Festival of Voice</a>, and at the odd gig around Perth. For details and CDs, check <a href="http://www.spookymenofthewest.com.au">their web site</a>.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/qnKFT7xwb44" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2008/05/24/spooky-men-of-the-west-launch-new-album/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2008/05/24/spooky-men-of-the-west-launch-new-album/</feedburner:origLink></item>
		<item>
		<title>Repurposing a broken office chair</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/CM2U2qXBUkQ/</link>
		<comments>http://stewartgreenhill.com/blog/2008/05/23/repurposing-a-broken-office-chair/#comments</comments>
		<pubDate>Fri, 23 May 2008 13:44:51 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2008/05/23/repurposing-a-broken-office-chair/</guid>
		<description><![CDATA[Cheap office chairs really aren&#8217;t built to last.
Here&#8217;s what usually goes wrong:


 The arm rests are screwed into the plywood base of the seat. Any sort of load on the arm rests tends to split the whole side off the seat. Not good when you have kids about - they love to swing on these [...]]]></description>
			<content:encoded><![CDATA[<p>Cheap office chairs really aren&#8217;t built to last.</p>
<p>Here&#8217;s what usually goes wrong:<br />
<img src="http://stewartgreenhill.com/blog/files/hacks/chair1.jpg" width="200" align="right"></p>
<ul>
<li> The arm rests are screwed into the plywood base of the seat. Any sort of load on the arm rests tends to split the whole side off the seat. Not good when you have kids about - they love to swing on these things which really hastens their demise.</li>
<li> The gas-lift stops working. These are not really repairable, although they can sometimes be replaced if you can find the right part.</li>
<li> The back adjustment works using a clutch-like mechanism. The clutch is made of thin steel plates which are welded to the base of the chair. These plates can snap off, and once they&#8217;ve all gone the back of the chair is completely floppy. In our chair, all of the plates have snapped of just before the weld with the base. Unfortunately, the mechanism is not replacable.</li>
</ul>
<p><img src="http://stewartgreenhill.com/blog/files/hacks/chair2.jpg" width="250"></p>
<p>Rather than chucking it out, I tried to think of something I could do with the parts, most of which were still OK. The result looks something like this, and we&#8217;ll come to what exactly it does later:</p>
<p><img src="http://stewartgreenhill.com/blog/files/hacks/chair3.jpg" width="250"></p>
<p>The conversion is pretty simple, though obviously it depends a bit on the chair and how its made. The first step is to remove the seat post and mechanism. On my chair, the seat post is a light steel tube which is press-fitted into the plastic caster base. Once you remove a locking bolt the post can be removed with a few belts of a mallet. </p>
<p>The seat and back are just bolted on to the main mechanism. Once these are removed you can check them for usability. To mount onto the caster base you want whichever one has the flattest back. On my chair this was the back rather than the seat, though this may vary between chairs.</p>
<p>To fix the seat/back onto the base, juggle the spacing until its right and then drill some holes through the caster base. I just used some large-gague self-tappers to hold the seat in position. If its curved you might need to add some spacers between the base and the seat (eg. using washers or cutting short lengths of tubing).</p>
<p><img src="http://stewartgreenhill.com/blog/files/hacks/chair4.jpg" width="250"></p>
<p>I thought this would be <strong>fun for the kids to play with</strong>, and indeed it was for a short while. Since then, I&#8217;ve found several other uses. </p>
<ul>
<li> <strong>Moving potplants, or other heavy objects.</strong> Once you&#8217;ve lifted it on its pretty stable, though you may have to hold your load in place top stop it falling off.</li>
<li> <strong>Moving furniture.</strong> For items that are large but not too heavy (eg. sofas), you can lift one end onto the device, and then carry the other end yourself.</li>
<li> <strong>A foot-rest.</strong> My wife claims that this is the best foot-rest she has ever had, which given her initial skepticism is saying something. An added benefit is that she keeps it under her desk, so I don&#8217;t have to find somewhere else to store it.</li>
<li> <strong>A cat throne.</strong> (suggested by Kathryn) Providing your cat somewhere to sit may stop it trying to sit in inconvenient places. If you&#8217;re lucky, it may even scratch here rather than destroying the sofa.
</ul>
<p>Its pretty easy to get raw materials for these things. If you can&#8217;t scavenge some broken chairs from a workplace, you can usually find them in kerb-side junk collections.</p>
<p><img src="http://stewartgreenhill.com/blog/files/hacks/chair5.jpg" width="250"></p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/CM2U2qXBUkQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2008/05/23/repurposing-a-broken-office-chair/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2008/05/23/repurposing-a-broken-office-chair/</feedburner:origLink></item>
		<item>
		<title>How to make a WiiFit Exercise Bike</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/bbSHWNNNrgU/</link>
		<comments>http://stewartgreenhill.com/blog/2008/05/23/how-to-make-a-wiifit-exercise-bike/#comments</comments>
		<pubDate>Fri, 23 May 2008 01:10:01 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[The Lab]]></category>

		<category><![CDATA[bike]]></category>

		<category><![CDATA[cycling]]></category>

		<category><![CDATA[jogging]]></category>

		<category><![CDATA[Wii]]></category>

		<category><![CDATA[WiiFit]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2008/05/23/how-to-make-a-wiifit-exercise-bike/</guid>
		<description><![CDATA[Perhaps you too have an unused exercise bike languishing in a dark corner. Lets face it, its pretty boring exercising on one of these things. How to get motivated? Make it fun using WiiFit!
Here&#8217;s what to do:

 Stick your bike in front of the TV. 
 Fire up WiiFit, and select Jogging (under Training -&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps you too have an unused exercise bike languishing in a dark corner. Lets face it, its pretty boring exercising on one of these things. How to get motivated? Make it fun using WiiFit!</p>
<p>Here&#8217;s what to do:</p>
<ol>
<li> Stick your bike in front of the TV. </li>
<li> Fire up WiiFit, and select Jogging (under Training -&gt; Aerobic Exercises -&gt; Jogging).</li>
<li> Attach the Wiimote to the lower part of your leg. Its normally meant to go in your hand or pocket so its pretty insensitive to orientation but does need a good amount of movement. If you&#8217;re wearing socks, you can just slide the Wiimote in - remember to face the buttons away from your leg so you can press &#8220;A&#8221; through your sock. It also works to put it the cuff of track pants, though it tends to flop about too much for my liking.</li>
<li> Press &#8220;A&#8221; and start riding. It can take a couple of seconds for the Wii to learn the motion pattern.</li>
</ol>
<p>Wiifit gives you some nice visual feedback that helps you keep a constant cadence. As you ride, your avatar runs along a path, following your training guide. The landscape is quite pleasant, and you can see other runners and dogs exercising too. If you slow down, your avatar starts to lag behind your guide and it will prompt you to keep a steady pace. You can select your desired activity level as you start the game. If your bike has a variable load, you can adjust this if you find the jogging pace too easy.</p>
<p>Have fun!</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/bbSHWNNNrgU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2008/05/23/how-to-make-a-wiifit-exercise-bike/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2008/05/23/how-to-make-a-wiifit-exercise-bike/</feedburner:origLink></item>
		<item>
		<title>Migrating to Wordpress MU</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/BDHoPXZaso0/</link>
		<comments>http://stewartgreenhill.com/blog/2008/05/20/migrating-to-wordpress-mu/#comments</comments>
		<pubDate>Tue, 20 May 2008 15:15:14 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[migration]]></category>

		<category><![CDATA[Wordpress MU]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2008/05/20/migrating-to-wordpress-mu/</guid>
		<description><![CDATA[Notice some activity in my RSS feed? No, don&#8217;t get too excited - I&#8217;m not actually blogging. However, I did move my blog from Wordpress to Wordpress MU. Here are some thoughts on why and how to do this.
Wordpress MU is the multi-user version of Wordpress which is used for sites like wordpress.com and edublogs.org. [...]]]></description>
			<content:encoded><![CDATA[<p>Notice some activity in my RSS feed? No, don&#8217;t get too excited - I&#8217;m not actually blogging. However, I did move my blog from Wordpress to Wordpress MU. Here are some thoughts on why and how to do this.</p>
<p><a href="http://mu.wordpress.org/">Wordpress MU</a> is the multi-user version of Wordpress which is used for sites like <a href="http://wordpress.com">wordpress.com</a> and <a href="http://edublogs.org/">edublogs.org</a>. A single Wordpress MU site can host many blogs at once. If you have more than one blog this simplifies the process of maintaining, updating, and backup because you can handle all your blogs in one hit. According to the official docs, a single box running both web server and MySQL will get you about 10-20 thousand blogs. Wordpress.com currently has over 3 million blogs.</p>
<p><span id="more-50"></span></p>
<p>Wordpress MU is similar to Wordpress in structure, and shares &#8220;95-99%&#8221; of the core Wordpress code. Some points of comparison:</p>
<ul>
<li> MU stores all blogs in a single database. The core Wordpress tables (posts, postmeta, comments, links, terms, options, etc) are duplicated once for each blog. There is a single users table; users can contribute to multiple blogs.
<li> MU stores all content under &#8220;wp-content&#8221;. Each blog has its own &#8220;files&#8221; directory under &#8220;wp-content/blogs.dir/N&#8221;, where N is the blog id. Each blog has an upload quota, which defaults to 10Mb, but can be changed in the site preferences.
<li> Most (but not all) standard Wordpress plugins also work for MU. These are stored under &#8220;wp-content/plugins&#8221; and are activated in the normal way. There is a separate directory for MU-specific plugins: &#8220;wp-content/mu-plugins&#8221;. These plugins act <em>over all blogs at once</em> and cannot be selectively enabled or disabled. Only the administrator can install plugins; the site preferences control whether plugins are available to user blogs.
<li> Many (but not all) standard Wordspress themes also work for MU. These are stored under &#8220;wp-content/themes&#8221;. They can be selectively enabled / disabled via the site preferences. Only the administrator can install themes; there is no theme editor like in standard Wordpress. This means that users are limited to the customisation options enabled by individual themes.
<li> MU can be installed in two configurations: subdomain and subdirectory. For subdomain mode, each blog has its own domain; if your root site is &#8220;domain.tld&#8221;, blogs will have names like &#8220;blog.domain.tld&#8221;. For subdirectory mode blogs will be named &#8220;domain.tld/blog&#8221;. Subdirectory mode might seem better because it only requires one domain, but some things don&#8217;t work properly in this mode. One example is the Spam Karma 2 plugin, which has a broken admin interface under subdirectory mode. This appears to be because it does not use the right kind of relative naming for its resources.
<li> If you plan to use subdomain mode, you need a host that supports wild-card subdomains. Some hosting services (eg. Bluehost) don&#8217;t allow this, which means that you need to manually assign sub-domains to your mu-site for each new blog. For a small number of blogs this might be OK, but it won&#8217;t work if you want to allow users to create their own blogs.
</ul>
<p>In principle, the basic strategy for migration should be:</p>
<ol>
<li>Export blog from Wordpress to XML.</li>
<li>Install Wordpress MU.</li>
<li>Import blog from XML into Wordpress MU.</li>
</ol>
<p>But of course, things are never quite that simple&#8230;</p>
<p>As I&#8217;ve already mentioned, there are different ways of installing MU depending on whether you plan to use subdirectory of subdomain mode. I experimented with both before finding a setup that worked: subdomain mode with David Dean&#8217;s <a href="http://wpmudev.org/project/Multi-Site-Manager">Multi-Site Manager</a> plugin. This plugin makes it easier to host multiple domains from the one installation. Unfortunately, the documentation is not good, but I found I could get by using some helpful tutorials by <a href="http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping">Richard Bui</a> and <a href="http://www.brilliances.com/multisite-manager-with-wordpress-mu/">Jerry Huang</a>. <strong>Wordpress MU has multi-site capability as shipped, but it doesn&#8217;t allow you to just park multiple domains on your site. You <em>can</em> do this, but it won&#8217;t behave as expected.</strong> To get things working smoothly it needs some setup <strong>per site</strong>, which is where the Multi-Site Manager helps.</p>
<p>Once I did an import into MU I started to notice some differences. Standard Wordpress trusts the user and allows almost any vaild HTML to be used in the document text. Wordpress MU is more restrictive, and actively limits the tags and attributes that you can use. For example, I found that <strong>I lost all my embedded videos</strong> under the default configuration. At first I thought this was an error, but later realised that this was actually what was intended to happen. Wordpress MU includes the HTML filter &#8220;kses&#8221; which removes tags that can potentially be exploited, including <code>OBJECT</code>, <code>PARAM</code>, and <code>EMBED</code>, but also lots of useful attributes like <code>class</code>, <code>id</code>, and <code>target</code>. Fortunately, mu-plugins exist to enable specific features, like <a href="http://wpmudev.org/project/Allow-Embedded-Videos">Allow Embedded Videos</a>. However, several times I&#8217;ve found myself editing &#8220;wp-include/kses.php&#8221; to enable the odd attribute that is missing.</p>
<p>I also found that Wordpress MU <strong>failed to import my tags correctly</strong>. <a href="http://trac.wordpress.org/ticket/5330">This bug</a> has been documented, but for some reason the fix is not in the release version, so it has to be patched by hand.</p>
<p>If your blog posts reference uploaded images or files, you&#8217;ll need to move the uploaded files from &#8220;wp-content/uploads&#8221; to &#8220;wp-content/blogs.dir/N&#8221; (where N is the blog ID). If you&#8217;re lucky the HTTP paths to the files will be the same. Otherwise, if you need to change the file paths the easiest way to do this is probably to so a search+replace on the paths in the XML version of your blog <strong>before</strong> doing the import. It may take several attempts to get it right.</p>
<p>On migrating my blog I took the opportunity to <strong>change my permalink structure</strong>. Originally, I used the default &#8220;?p=nn&#8221; style permalinks because at the time this was the only scheme that sanely supported relative links to files. Now it seems to work with other schemes too,  so I switched to the prettier (and now default) date-and-name based links. Interestingly, the old style &#8220;?p=nn&#8221; can still be used, so with some judicious fiddling of the post IDs I actually <strong>managed to keep two different permalink styles working at once.</strong></p>
<p>Aside from some of these &#8220;gotchas&#8221;, I&#8217;m pretty happy with the result though I guess time will tell whether or not it was a good move. I wouldn&#8217;t recommend it for everyone, but if you have a couple of blogs and want to consolidate your Wordpress installations, MU is well worth a look.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/BDHoPXZaso0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2008/05/20/migrating-to-wordpress-mu/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2008/05/20/migrating-to-wordpress-mu/</feedburner:origLink></item>
		<item>
		<title>Vote The Bastards Out</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/GJrsVsdm6lo/</link>
		<comments>http://stewartgreenhill.com/blog/2007/11/22/vote-the-bastards-out/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 15:04:03 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[election]]></category>

		<category><![CDATA[spooky men's chorale]]></category>

		<category><![CDATA[stephen taberner]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2007/11/22/vote-the-bastards-out/</guid>
		<description><![CDATA[With the Australian Federal Election looming, Stephen Taberner, has hit the campaign trail with some advice for voters. Considering how hard it can be to sing outdoors, I think these &#8220;flash mob&#8221; choral performances are pretty good. Check out the original Spooky Men&#8217;s Chorale version below, or on their album Tooled Up.
Well, if I wasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>With the Australian Federal Election looming, <a href="http://www.stephentaberner.com/">Stephen Taberner</a>, has hit the campaign trail with some advice for voters. Considering how hard it can be to sing outdoors, I think these &#8220;flash mob&#8221; choral performances are pretty good. Check out the original <a href="http://www.spookymen.com.au/">Spooky Men&#8217;s Chorale</a> version below, or on their album <a href="http://www.spookymen.com.au/spookycd.htm">Tooled Up</a>.</p>
<p>Well, if I wasn&#8217;t convinced before I certainly am now&#8230;</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/vziDROl_MJo&amp;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/vziDROl_MJo&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/o1LLsw1lcuA&amp;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/o1LLsw1lcuA&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>Update: actually, we did vote the bastards out. The first acts of the new Rudd government were to ratify the <a href="http://en.wikipedia.org/wiki/Kyoto_Protocol">Kyoto protocol</a>, apologise to the <a href="http://en.wikipedia.org/wiki/Kyoto_Protocol">Stolen Generations</a>, and <a href="http://www.australia2020.gov.au/">consult the people</a> on the nation&#8217;s future. Seems like a good start to me.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/GJrsVsdm6lo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2007/11/22/vote-the-bastards-out/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2007/11/22/vote-the-bastards-out/</feedburner:origLink></item>
		<item>
		<title>Free Album made with Tenori-On</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/odGMOoDxSNY/</link>
		<comments>http://stewartgreenhill.com/blog/2007/11/22/free-album-made-with-tenori-on/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 13:54:56 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Music]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[norman fairbanks]]></category>

		<category><![CDATA[tenori-on]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2007/11/22/free-album-made-with-tenori-on/</guid>
		<description><![CDATA[Norman Fairbanks has released his latest album &#8220;7 Days Microsleep&#8221;. Eight tracks are available for free download from his web site. Its pure electronica - calming, mellow, yet full of motion and melody. For some reason I&#8217;m reminded of gamelan.
What&#8217;s unusual about these compositions is that they are produced entirely on Yamaha&#8217;s new gesture-based synth, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://normanfairbanks.com/">Norman Fairbanks</a> has released his latest album &#8220;7 Days Microsleep&#8221;. Eight tracks are available for free download from his web site. Its pure electronica - calming, mellow, yet full of motion and melody. For some reason I&#8217;m reminded of gamelan.</p>
<p>What&#8217;s unusual about these compositions is that they are produced entirely on Yamaha&#8217;s new gesture-based synth, the <a href="http://www.global.yamaha.com/design/tenori-on/">Tenori-On</a>. Designed by Toshio Iwai, the Tenori-On is a hand-held device boasting a 256 pixel (16&#215;16) LED display. By touching the display in different ways, the performer can build sequences of sounds that can be layered into complex soundscapes. The novelty of the interface is that it allows relatively complex sequences to be controlled through intuitive gestures. Unlike a traditional multitrack sequencer, the Tenori-On is a live performance instrument. This stuff is all real-time.</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/_SGwDhKTrwU&amp;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/_SGwDhKTrwU&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>This video shows some of the different gestures that can be used to generate tone sequences : Score Mode, Push Mode, Changing Loop Points, Bounce Mode, and Solo Mode. Yamaha have some neat videos explaining these and other interactions <a href="http://www.global.yamaha.com/tenori-on/features/index.html">here</a>. Some technical details are available in <a href="http://recherche.ircam.fr/equipes/temps-reel/nime06/proc/nime2006_172.pdf">this NIME06 paper.</a></p>
<p>I was quite intrigued by this gadget when it was released earlier this year, but I admit to being underwhelmed by some of the demo music I heard. Having listened to Norman&#8217;s album a couple of times now its definitely growing on me. The standout tracks for me are &#8220;The Glam Machines Arrive&#8221; and &#8220;The Freedom Loop&#8221;, but all the tracks have something to offer, sharing a unique tranquil hypnotic style. If you like this sort of thing, or are simply intrigued by the possibilities of this instrument, <a href="http://normanfairbanks.com/">give &#8220;7 Days Microsleep&#8221; a try.</a> A brief interview with Norman Fairbanks is <a href="http://createdigitalmusic.com/2007/11/20/free-all-tenori-on-album-a-chat-with-norman-fairbanks/">available at Create Digital Music</a>.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/odGMOoDxSNY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2007/11/22/free-album-made-with-tenori-on/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2007/11/22/free-album-made-with-tenori-on/</feedburner:origLink></item>
		<item>
		<title>Viddler drops streaming playback</title>
		<link>http://feedproxy.google.com/~r/StewartGreenhill/~3/QyBsd79FzNs/</link>
		<comments>http://stewartgreenhill.com/blog/2007/11/20/viddler-drops-seekable-playback/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 00:41:29 +0000</pubDate>
		<dc:creator>Stewart</dc:creator>
		
		<category><![CDATA[Rants]]></category>

		<category><![CDATA[Viddler]]></category>

		<guid isPermaLink="false">http://stewartgreenhill.com/blog/2007/11/20/viddler-drops-seekable-playback/</guid>
		<description><![CDATA[I&#8217;ve been using Viddler a fair bit to host videos of talks from local events such as Perth Barcamp and Podcamp. You can check out these and other offerings at my Viddler page.
For long videos Viddler offered several advantages over sites like Youtube.

Viddler supports videos longer that 10 minutes, and up to 500mb in size.
Viddler [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.viddler.com">Viddler</a> a fair bit to host videos of talks from local events such as <a href="http://barcamp.port80.asn.au/Main/BarCampArchive">Perth Barcamp</a> and <a href="http://stewartgreenhill.com/blog/?p=18">Podcamp</a>. You can check out these and other offerings <a href="http://www.viddler.com/sgreenhill/videos/">at my Viddler page</a>.</p>
<p>For long videos Viddler offered several advantages over sites like <a href="http://www.youtube.com">Youtube</a>.</p>
<ul>
<li>Viddler supports videos longer that 10 minutes, and up to 500mb in size.</li>
<li>Viddler has timed comments, which allow you to annotate important moments in the video</li>
<li>Viddler <i>had</i> streaming playback, which allowed you to jump to arbitrary times by clicking in the seek bar. Also, you could click on a comment and jump to that point in the  playback. This is very useful for picking out highlights.
</ul>
<p>Since <a href="http://stewartgreenhill.com/blog/?p=15">I originally compared Viddler and Youtube in September 2007</a>, several things have happened. Firstly, Youtube added support for seekable playback. Download is still &#8220;progressive&#8221; but can be restarted at any point by clicking in the seek bar. Recently <strong><a href="http://www.viddler.com/forums/support/528/">Viddler turned off streaming  support</a> in their player</strong>, saying that it was &#8220;expensive and unreliable&#8221;. They plan to move to a progressive seek player similar to those now offered by Youtube and Google.</p>
<p><strike>So while Viddler still supports timed comments, its no longer possible to jump to the comment time. This was a very useful feature and IMO a key differentiator between their offerings and the many other video sharing sites out there. Lets hope they get this fixed soon.</strike></p>
<p><strong>Update:</strong> Viddler have added progressive seek to their player, so you can now jump to any time in a video. It does seem to be more stable than the old streaming player.</p>
<img src="http://feeds.feedburner.com/~r/StewartGreenhill/~4/QyBsd79FzNs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://stewartgreenhill.com/blog/2007/11/20/viddler-drops-seekable-playback/feed/</wfw:commentRss>
		<feedburner:origLink>http://stewartgreenhill.com/blog/2007/11/20/viddler-drops-seekable-playback/</feedburner:origLink></item>
	</channel>
</rss>
