<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rogerstuckey.com</title>
	<atom:link href="http://rogerstuckey.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rogerstuckey.com</link>
	<description>Python, Perl , VRML/X3D and other... stuff.</description>
	<lastBuildDate>Wed, 16 May 2012 06:51:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Selective Bathymetric SLAM</title>
		<link>http://rogerstuckey.com/2012/04/selective-bathymetric-slam/</link>
		<comments>http://rogerstuckey.com/2012/04/selective-bathymetric-slam/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 00:35:48 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=523</guid>
		<description><![CDATA[<br/>Time for another post. This one shows the Selective Bathymetric SLAM approach, detailed in this recent paper, Navigational Error Reduction of Autonomous Underwater Vehicles with Selective Bathymetric SLAM. Click on the image to see the simulations:]]></description>
			<content:encoded><![CDATA[<br/><p>Time for another post. This one shows the Selective Bathymetric SLAM approach, detailed in this recent paper, <a href="/files/pdf/NGCUV-2012-SBS.pdf">Navigational Error Reduction of Autonomous Underwater Vehicles with Selective Bathymetric SLAM</a>. Click on the image to see the simulations:</p>
<p><a href="/video/animation/selective-bathymetric-slam/"><img src="/wp-content/uploads/sbs_predefnavcells.png" alt="Selective Bathymetric SLAM" title="sbs-predefnavcells" width="600" height="338" class="aligncenter size-full wp-image-210" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2012/04/selective-bathymetric-slam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SLAM (HTML5/Processing)</title>
		<link>http://rogerstuckey.com/2011/02/slam-html5/</link>
		<comments>http://rogerstuckey.com/2011/02/slam-html5/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 00:17:28 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Processing.js]]></category>
		<category><![CDATA[Simulation]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=448</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/html5_32.png" width="32" height="32" alt="" title="HTML5" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/javascript_32.png" width="32" height="32" alt="" title="Javascript" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/processingjs_32.png" width="32" height="32" alt="" title="Processing.js" /><br/>I thought I should post something on an area I&#8217;ve been working in more recently, so here is my simulation of the Simultaneous Localisation and Mapping (SLAM) technique, as applied to an autonomous vehicle navigating through waypoints across a feature-rich terrain. Click through to see the simulation in action!]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/html5_32.png" width="32" height="32" alt="" title="HTML5" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/javascript_32.png" width="32" height="32" alt="" title="Javascript" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/processingjs_32.png" width="32" height="32" alt="" title="Processing.js" /><br/><p>I thought I should post something on an area I&#8217;ve been working in more recently, so here is my simulation of the Simultaneous Localisation and Mapping (<a href="http://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping">SLAM</a>) technique, as applied to an autonomous vehicle navigating through waypoints across a feature-rich terrain.</p>
<p>Click through to see the simulation in action!</p>
<p><a href="/simulation/javascript/slam-html5/"><img src="/wp-content/uploads/slam2_html5.png" alt="SLAM Simulation" title="slam_html5" width="600" height="338" class="aligncenter size-full wp-image-210" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2011/02/slam-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CH47B + MMS X3D (HTML5) Simulation</title>
		<link>http://rogerstuckey.com/2010/12/ch47b-mms-x3d-html5-simulation/</link>
		<comments>http://rogerstuckey.com/2010/12/ch47b-mms-x3d-html5-simulation/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 07:58:43 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[VRML/X3D]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=351</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/html5_32.png" width="32" height="32" alt="" title="HTML5" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/>Managed to export my VRML simulation to X3D, and embed it here with the HTML5 X3DOM Framework. Note that you will need to use a supported browser in order to view the model. Click on the image below to view the model in action:]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/html5_32.png" width="32" height="32" alt="" title="HTML5" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/><p>Managed to export my VRML simulation to X3D, and embed it here with the HTML5 <a href="http://www.x3dom.org">X3DOM</a> Framework. Note that you will need to use a <a href="http://www.x3dom.org/?page_id=9">supported browser</a> in order to view the model. Click on the image below to view the model in action:</p>
<p><a href="/simulation/vrmlx3d/ch47b-mms-html5/"><img src="/wp-content/uploads/ch47bmmssim.png" alt="CH47B + MMS" title="ch47bmmssim" width="600" height="338" class="aligncenter size-full wp-image-210" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/12/ch47b-mms-x3d-html5-simulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More HSL Simulations</title>
		<link>http://rogerstuckey.com/2010/10/more-hsl-simulations/</link>
		<comments>http://rogerstuckey.com/2010/10/more-hsl-simulations/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 01:43:12 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Simulation]]></category>
		<category><![CDATA[VRML/X3D]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=301</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/>I dug up some more old VRML simulation replays created some time ago. These ones demonstrate the dynamic response of CH-47B Chinook and UH-1H helicopters with externally slung loads undergoing a either simple disturbance or manoeuvre. The coupled-body dynamic simulation was performed in Matlab and then exported to VRML for visualisation. Note the browser/plugin requirements [...]]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/><p>I dug up some more old VRML simulation replays created some time ago. These ones demonstrate the dynamic response of CH-47B Chinook and UH-1H helicopters with externally slung loads undergoing a either simple disturbance or manoeuvre. The coupled-body dynamic simulation was performed in Matlab and then exported to VRML for visualisation.</p>
<p>Note the browser/plugin requirements in my <a href="/2010/06/ch47b-mms/">previous post</a>.</p>
<p><a href="/simulation/vrmlx3d/ch47b-multiple-loads/"><img src="/wp-content/uploads/ch47bsim0701.png" alt="CH47B + Multiple loads" title="ch47bsim0701" width="300" class="aligncenter size-full wp-image-210" /></a></p>
<p><a href="/simulation/vrmlx3d/uh1h-single-load/"><img src="/wp-content/uploads/uh1hsim601.png" alt="UH1H + Single load" title="uh1hsim601" width="300" class="aligncenter size-full wp-image-210" /></a></p>
<p><a href="/simulation/vrmlx3d/ch47b-rhib/"><img src="/wp-content/uploads/ch47bsim23R01.png" alt="CH47B + RHIB" title="ch47bsim23R01" width="300" class="aligncenter size-full wp-image-210" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/10/more-hsl-simulations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wxPython &amp; Pyro</title>
		<link>http://rogerstuckey.com/2010/08/wxpython-pyro/</link>
		<comments>http://rogerstuckey.com/2010/08/wxpython-pyro/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 07:09:01 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=272</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><br/>Building on my simple wxPython multiprocessing example, I&#8217;ve extended the design to implement a distributed computing architecture, using Pyro. The client, dispatcher and worker scripts are all listed here.]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><br/><p>Building on my simple <a href="/code/python/wxsimple_mp/">wxPython multiprocessing example</a>, I&#8217;ve extended the design to implement a distributed computing architecture, using <a href="http://www.xs4all.nl/~irmen/pyro3/">Pyro</a>.</p>
<p>The client, dispatcher and worker scripts are all listed <a href="/code/python/wxsimple_pyro/">here</a>.</p>
<pre class="brush: python; first-line: 48; title: ; notranslate">
...
class TaskServerPyro(TaskServerMP):
    &quot;&quot;&quot;
    The TaskServerMP class provides a target worker class method for queued processes.
    &quot;&quot;&quot;
    def __init__(self, tasks=[ ]):
        &quot;&quot;&quot;
        Initialise the TaskServerMP and create the dispatcher.
        &quot;&quot;&quot;
        TaskServerMP.__init__(self, numprocesses=0, tasks=tasks)

        # Create the dispatcher
        self.dispatcher = Pyro.core.getProxyForURI(&quot;PYRONAME://:wxSimple.dispatcher&quot;)

        self.numprocesses = self.dispatcher.getNumWorkers()
        self.PIDs = self.dispatcher.getWorkerPIDs()

        # The empty processes are instantiated here
        for n in range(self.numprocesses):
            process = EmptyProcess(self.PIDs[n])
            self.Processes.append(process)
...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/08/wxpython-pyro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wxPython &amp; Multiprocessing</title>
		<link>http://rogerstuckey.com/2010/07/wxpython-multiprocessing/</link>
		<comments>http://rogerstuckey.com/2010/07/wxpython-multiprocessing/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 07:00:40 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=240</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><br/>Now that the multiprocessing library comes standard in Python 2.6, I thought I&#8217;d migrate some of my apps to take full advantage. However, there aren&#8217;t many examples out there showing how to write a basic multiprocessing program with a graphical front-end. in order to prototype the program design, I wrote a simple wxPython script, listed [...]]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><br/><p>Now that the multiprocessing library comes standard in Python 2.6, I thought I&#8217;d migrate some of my apps to take full advantage. However, there aren&#8217;t many examples out there showing how to write a basic multiprocessing program with a graphical front-end.</p>
<p>in order to prototype the program design, I wrote a simple wxPython script, listed in full <a href="/code/python/wxsimple_mp/">here</a>.</p>
<pre class="brush: python; first-line: 135; title: ; notranslate">
...
    def processTasks(self, resfunc=None):
        &quot;&quot;&quot;
        Start the execution of tasks by the processes.
        &quot;&quot;&quot;
        self.keepgoing = True

        self.timeStart = time.time()
        # Set the initial process time for each
        for n in range(self.numprocesses):
            pid_str = '%d' % self.processes[n].pid
            self.processTime[pid_str] = 0.0

        # Submit first set of tasks
        if (self.numprocesses == 0):
            numprocstart = 1
        else:
            numprocstart = min(self.numprocesses, self.numtasks)
        for self.i in range(numprocstart):
            self.task_queue.put(self.Tasks[self.i])

        self.j = -1
        self.i = numprocstart - 1
        while (self.j &lt; self.i):
            # Get and print results
            output = self.getOutput()
            # Execute some function (Yield to a wx.Button event)
            if (isinstance(resfunc, (types.FunctionType, types.MethodType))):
                resfunc(output)
            if ((self.keepgoing) and (self.i + 1 &lt; self.numtasks)):
                # Submit another task
                self.i += 1
                self.task_queue.put(self.Tasks[self.i])
...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/07/wxpython-multiprocessing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SimData &#8594; VRML</title>
		<link>http://rogerstuckey.com/2010/06/simdata-vrml/</link>
		<comments>http://rogerstuckey.com/2010/06/simdata-vrml/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 05:52:35 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[VRML/X3D]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=229</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/>Just tidied up my VRMLtrace python program. This script converts any simulation/pose data (position+orientation) into a VRML model for visualisation. It uses a template file, a VRML model of the vehicle and a data file to generate the VRML. More details are on the page.]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/><p>Just tidied up my <a href="/code/python/vrmltrace/">VRMLtrace</a> python program. This script converts any simulation/pose data (position+orientation) into a VRML model for visualisation. It uses a template file, a VRML model of the vehicle and a data file to generate the VRML. More details are on the <a href="/code/python/vrmltrace/">page</a>.</p>
<pre class="brush: python; first-line: 266; title: ; notranslate">
...
      # Generate the key array
      key = [ k/(self.N - 1.0) for k in range(self.N) ]
      self.d['KEY'] = &quot; %8.4f&quot;*self.N % tuple(key)
      # Initial helicopter rotation &amp; translation
      self.d['HELI_ROT_0'] = &quot;%8.4f %8.4f %8.4f %8.4f&quot; % tuple(self.a2v(v))
      self.d['HELI_TRANS_0'] = &quot;%8.4f %8.4f %8.4f&quot; % tuple(self.a2v(r))

      af = 0.0
      ar = 0.0
      # Loop through each frame
      for i in range(self.N):
         x = self.X[i]
         q = self.e2q(x[3:6])
         v = self.q2v(q)
         r = x[0:3]
         # Intermediate helicopter rotation &amp; translation
         self.d['HELI_ROT'] += &quot;%8.4f %8.4f %8.4f %8.4f,\n&quot; % tuple(self.a2v(v))
         self.d['HELI_TRANS'] += &quot;%8.4f %8.4f %8.4f,\n&quot; % tuple(self.a2v(r))
         # Intermediate forward &amp; aft rotor rotations
         self.d['FWDROT_ROT'] += &quot;%8.4f %8.4f %8.4f %8.4f,\n&quot; % (0.0,1.0,0.0,af)
         self.d['AFTROT_ROT'] += &quot;%8.4f %8.4f %8.4f %8.4f,\n&quot; % (0.0,0.0,1.0,-ar)
...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/06/simdata-vrml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CH47B + MMS VRML Simulation</title>
		<link>http://rogerstuckey.com/2010/06/ch47b-mms/</link>
		<comments>http://rogerstuckey.com/2010/06/ch47b-mms/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 07:12:53 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Simulation]]></category>
		<category><![CDATA[VRML/X3D]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=211</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/>This is an old VRML simulation replay I created back when I worked in the Helicopter Flight Dynamics group at DSTO, Melbourne. It demonstrates the dynamic response of a CH-47B Chinook helicopter with an externally slung Medium Maintenance Shelter (MMS) load undergoing a simple manoeuvre. The coupled-body dynamic simulation was performed in Matlab and then [...]]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/vrml_32.png" width="32" height="32" alt="" title="VRML/X3D" /><br/><p>This is an old VRML simulation replay I created back when I worked in the Helicopter Flight Dynamics group at DSTO, Melbourne. It demonstrates the dynamic response of a CH-47B Chinook helicopter with an externally slung Medium Maintenance Shelter (MMS) load undergoing a simple manoeuvre. The coupled-body dynamic simulation was performed in Matlab and then exported to VRML for visualisation. More details are available in my <a href="/files/pdf/DSTO-TR-1257.pdf">report</a>.</p>
<p>You will need a <a href="http://cic.nist.gov/vrml/vbdetect.html">VRML Plugin</a> to view the model. On Windows, ParallelGraphics <a href="http://www.parallelgraphics.com/products/cortona3d/">Cortona 3D Viewer</a> works very well.</p>
<p><strong>If you are using OS X Safari with the FreeWRL plugin, be warned that clicking the following link, which contains the embedded VRML, may hang your system! I have not had any such problems under Windows :/ On a Mac, I suggest using <a href="http://www.instantreality.org/">instantplayer</a> and loading the direct <a href="/files/vrml/ch47bsim402.wrz">link</a> instead.</strong></p>
<p><a href="/simulation/vrmlx3d/ch47b-mms/"><img src="/wp-content/uploads/ch47bsim402.png" alt="CH47B + MMS" title="ch47bsim402" width="600" height="338" class="aligncenter size-full wp-image-210" /></a></p>
<p>Alternatively, you can see a video animation of model <a href="/video/animation/ch47b-mms/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/06/ch47b-mms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PyODE Example 4</title>
		<link>http://rogerstuckey.com/2010/06/pyode-example-4/</link>
		<comments>http://rogerstuckey.com/2010/06/pyode-example-4/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 03:25:23 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Renderman]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=176</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/renderman_32.png" width="32" height="32" alt="" title="Renderman" /><br/>This example, PyODE Example 4 demonstrates trimesh-trimesh collisions. Originally derived from the PyODE Tutorial 3. This example uses PyODE, and cgkit and was rendered with Pixie. The code is listed here.]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/python_32.png" width="32" height="32" alt="" title="Python" /><img src="http://rogerstuckey.com/wp-content/uploads/icons/renderman_32.png" width="32" height="32" alt="" title="Renderman" /><br/><p>This example, <a href="/video/animation/pyode-example-4/">PyODE Example 4</a> demonstrates trimesh-trimesh collisions. Originally derived from the <a href="http://pyode.sourceforge.net/tutorials/tutorial3.html">PyODE Tutorial 3</a>. This example uses <a href="http://pyode.sourceforge.net/">PyODE</a>, and <a href="http://cgkit.sourceforge.net/">cgkit</a> and was rendered with <a href="http://www.renderpixie.com/">Pixie</a>.</p>
<p><a href="/video/animation/pyode-example-4/"><img src="/wp-content/uploads/pyode_ex4.png" alt="PyODE Example 4" title="pyode_ex4" width="600" height="338" class="aligncenter size-full wp-image-179" /></a></p>
<p>The code is listed <a href="/code/python/pyode-example-4/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/06/pyode-example-4/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>convert_frames</title>
		<link>http://rogerstuckey.com/2010/06/convert_frames/</link>
		<comments>http://rogerstuckey.com/2010/06/convert_frames/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 11:28:47 +0000</pubDate>
		<dc:creator>rog</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://rogerstuckey.com/?p=108</guid>
		<description><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/perl_32.png" width="32" height="32" alt="" title="Perl" /><br/>This small perl script is really just an example of using Image::Magick to crop and convert a sequence of images to prepare them for insertion into a video file. I used it for my PyODE Example. You could easily write this as a one-line command if desired.]]></description>
			<content:encoded><![CDATA[<img src="http://rogerstuckey.com/wp-content/uploads/icons/perl_32.png" width="32" height="32" alt="" title="Perl" /><br/><p>This small perl script is really just an example of using <a href="http://www.imagemagick.org/">Image::Magick</a> to crop and convert a sequence of images to prepare them for insertion into a video file. I used it for my <a href="/video/animation/pyode-example-3/">PyODE Example</a>. You could easily write this as a one-line command if desired.</p>
<pre class="brush: perl; title: ; notranslate">
#!/usr/bin/perl
#
# convert_frames

use Image::Magick;

$imgdir = &quot;frames&quot;;
$prefix = &quot;pyode_ex3&quot;;

$| = 1;

while ($infile = &lt;$imgdir/$prefix.*.tif&gt;) {
    print &quot;$infile -&gt; &quot;;
    ($outfile = $infile) =~ s/\.tif$/.png/;

    $image = Image::Magick-&gt;new;
    $x = $image-&gt;Read($infile); warn &quot;$x&quot; if ($x);
    $x = $image-&gt;Crop(geometry=&gt;'640x360+0+30'); warn &quot;$x&quot; if ($x);
    $x = $image-&gt;Write($outfile); warn &quot;$x&quot; if ($x);

    unlink($infile);
    print &quot;$outfile \n&quot;;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rogerstuckey.com/2010/06/convert_frames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

