<?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>What&#039;s new about OTB? &#187; Howto</title>
	<atom:link href="http://blog.orfeo-toolbox.org/category/howto/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.orfeo-toolbox.org</link>
	<description>For the latest news on the Orfeo Toolbox</description>
	<lastBuildDate>Tue, 31 Jan 2012 17:01:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OTB Mad Lab</title>
		<link>http://blog.orfeo-toolbox.org/uncategorized/otb-mad-lab</link>
		<comments>http://blog.orfeo-toolbox.org/uncategorized/otb-mad-lab#comments</comments>
		<pubDate>Fri, 07 May 2010 14:32:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.orfeo-toolbox.org/?p=359</guid>
		<description><![CDATA[It seems that C++ programming can be cumbersome for some users. Well, OTB allows you to work also in other programming languages as for instance Python. The Pylab Project which gathers numeric and scientific Python packages such as NumPy, SciPy and Matplotlib is considered as having the same features as some commercial scientific environments. Some [...]]]></description>
			<content:encoded><![CDATA[<p><tt><tt><span style="color: #000080;"> </span></tt></tt></p>
<p>It seems that C++ programming can be cumbersome for some users. Well, OTB allows you to work also in other programming languages as for instance Python. The <a href="http://www.scipy.org/PyLab">Pylab Project</a> which gathers numeric and scientific Python packages such as NumPy, SciPy and Matplotlib is considered as having the same features as some commercial scientific environments. Some people consider that Pylab is even more powerful than these commercial tools, since you get for free the power of a full featured and general purpose programming language as Python.</p>
<p>Recently I needed to quickly plot the temporal profiles of several pixels coming from temporal image series in order to easily assess the impact of a correction algorithm. I have to admit that my first idea was to generate simple ASCII files with the pixel values and then feed these files to Gnuplot. However, I found a more elegant (at least from my point of view) way to do this.</p>
<p>I use the OTB Python bindings in order to read my images (2 GeoTiff files with 49 bands each). Using the &#8220;GetPixel&#8221; method, I access the pixels I want to plot. Finally I use pylab to plot 2 temporal profiles (before and after correction). Here goes the code.</p>
<pre><tt><tt><strong><span style="color: #000080;">
import</span></strong> sys

<strong><span style="color: #0000ff;">if</span></strong><span style="color: #990000;">(</span> <strong><span style="color: #000000;">len</span></strong><span style="color: #990000;">(</span>sys<span style="color: #990000;">.</span>argv<span style="color: #990000;">)</span> <span style="color: #990000;">!=</span> <span style="color: #993399;">5</span><span style="color: #990000;">):</span>
    <strong><span style="color: #0000ff;">print</span></strong><span style="color: #990000;">(</span><span style="color: #ff0000;">"Usage: "</span><span style="color: #990000;">+</span>sys<span style="color: #990000;">.</span>argv<span style="color: #990000;">[</span><span style="color: #993399;">0</span><span style="color: #990000;">]+</span><span style="color: #ff0000;">" series1 series2 x0 y0"</span><span style="color: #990000;">)</span>
    <strong><span style="color: #000000;">exit</span></strong><span style="color: #990000;">()</span>

<strong><span style="color: #000080;">import</span></strong> itk
<strong><span style="color: #000080;">import</span></strong> otbImages
<strong><span style="color: #000080;">import</span></strong> otbIO
<strong><span style="color: #000080;">import</span></strong> pylab

<em><span style="color: #9a1900;"># Types</span></em>

ImageType <span style="color: #990000;">=</span> otbImages<span style="color: #990000;">.</span>VectorImage<span style="color: #990000;">[</span>itk<span style="color: #990000;">.</span>D<span style="color: #990000;">,</span> <span style="color: #993399;">2</span><span style="color: #990000;">]</span>
ReaderType <span style="color: #990000;">=</span> otbIO<span style="color: #990000;">.</span>ImageFileReader<span style="color: #990000;">[</span>ImageType<span style="color: #990000;">]</span>

<em><span style="color: #9a1900;"># Pixel coordinates</span></em>

index <span style="color: #990000;">=</span> itk<span style="color: #990000;">.</span>Index<span style="color: #990000;">[</span><span style="color: #993399;">2</span><span style="color: #990000;">]()</span>
index<span style="color: #990000;">[</span><span style="color: #993399;">0</span><span style="color: #990000;">]</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">int</span></strong><span style="color: #990000;">(</span>sys<span style="color: #990000;">.</span>argv<span style="color: #990000;">[</span><span style="color: #993399;">3</span><span style="color: #990000;">])</span>
index<span style="color: #990000;">[</span><span style="color: #993399;">1</span><span style="color: #990000;">]</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">int</span></strong><span style="color: #990000;">(</span>sys<span style="color: #990000;">.</span>argv<span style="color: #990000;">[</span><span style="color: #993399;">4</span><span style="color: #990000;">])</span>

<em><span style="color: #9a1900;"># Import first series</span></em>
readerBefore <span style="color: #990000;">=</span> ReaderType<span style="color: #990000;">.</span><strong><span style="color: #000000;">New</span></strong><span style="color: #990000;">()</span>
readerBefore<span style="color: #990000;">.</span><strong><span style="color: #000000;">SetFileName</span></strong><span style="color: #990000;">(</span>sys<span style="color: #990000;">.</span>argv<span style="color: #990000;">[</span><span style="color: #993399;">1</span><span style="color: #990000;">])</span>
readerBefore<span style="color: #990000;">.</span><strong><span style="color: #000000;">Update</span></strong><span style="color: #990000;">()</span>

pixBefore <span style="color: #990000;">=</span> readerBefore<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetOutput</span></strong><span style="color: #990000;">().</span><strong><span style="color: #000000;">GetPixel</span></strong><span style="color: #990000;">(</span> index <span style="color: #990000;">)</span>

<em><span style="color: #9a1900;"># Import second series</span></em>
readerAfter <span style="color: #990000;">=</span> ReaderType<span style="color: #990000;">.</span><strong><span style="color: #000000;">New</span></strong><span style="color: #990000;">()</span>
readerAfter<span style="color: #990000;">.</span><strong><span style="color: #000000;">SetFileName</span></strong><span style="color: #990000;">(</span>sys<span style="color: #990000;">.</span>argv<span style="color: #990000;">[</span><span style="color: #993399;">2</span><span style="color: #990000;">])</span>
readerAfter<span style="color: #990000;">.</span><strong><span style="color: #000000;">Update</span></strong><span style="color: #990000;">()</span>

pixAfter <span style="color: #990000;">=</span> readerAfter<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetOutput</span></strong><span style="color: #990000;">().</span><strong><span style="color: #000000;">GetPixel</span></strong><span style="color: #990000;">(</span> index <span style="color: #990000;">)</span>

<em><span style="color: #9a1900;"># Chek that both series have the same length</span></em>

<strong><span style="color: #0000ff;">if</span></strong><span style="color: #990000;">(</span> pixBefore<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetSize</span></strong><span style="color: #990000;">()</span> <span style="color: #990000;">!=</span> pixAfter<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetSize</span></strong><span style="color: #990000;">()</span> <span style="color: #990000;">):</span>
    <strong><span style="color: #0000ff;">print</span></strong><span style="color: #990000;">(</span><span style="color: #ff0000;">"Series have different lengths"</span><span style="color: #990000;">)</span>
    <strong><span style="color: #000000;">exit</span></strong><span style="color: #990000;">()</span>

<em><span style="color: #9a1900;"># Plot</span></em>

vectorBefore <span style="color: #990000;">=</span> <span style="color: #990000;">\
 [</span>pixBefore<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetElement</span></strong><span style="color: #990000;">(</span>i<span style="color: #990000;">)</span> <strong><span style="color: #0000ff;">for</span></strong> i <strong><span style="color: #0000ff;">in</span></strong> <strong><span style="color: #000000;">range</span></strong><span style="color: #990000;">(</span>pixBefore<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetSize</span></strong><span style="color: #990000;">())]</span>
vectorAfter <span style="color: #990000;">=</span> \
 <span style="color: #990000;">[</span>pixAfter<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetElement</span></strong><span style="color: #990000;">(</span>i<span style="color: #990000;">)</span> <strong><span style="color: #0000ff;">for</span></strong> i <strong><span style="color: #0000ff;">in</span></strong> <strong><span style="color: #000000;">range</span></strong><span style="color: #990000;">(</span>pixAfter<span style="color: #990000;">.</span><strong><span style="color: #000000;">GetSize</span></strong><span style="color: #990000;">())]</span>

pylab<span style="color: #990000;">.</span><strong><span style="color: #000000;">xlabel</span></strong><span style="color: #990000;">(</span><span style="color: #ff0000;">"Date"</span><span style="color: #990000;">)</span>
pylab<span style="color: #990000;">.</span><strong><span style="color: #000000;">ylabel</span></strong><span style="color: #990000;">(</span><span style="color: #ff0000;">"Reflectance"</span><span style="color: #990000;">)</span>
pylab<span style="color: #990000;">.</span><strong><span style="color: #000000;">plot</span></strong><span style="color: #990000;">(</span>vectorBefore<span style="color: #990000;">,</span> label<span style="color: #990000;">=</span><span style="color: #ff0000;">"Raw"</span><span style="color: #990000;">)</span>
pylab<span style="color: #990000;">.</span><strong><span style="color: #000000;">plot</span></strong><span style="color: #990000;">(</span>vectorAfter<span style="color: #990000;">,</span> label<span style="color: #990000;">=</span><span style="color: #ff0000;">"Clean"</span><span style="color: #990000;">)</span>
pylab<span style="color: #990000;">.</span><strong><span style="color: #000000;">legend</span></strong><span style="color: #990000;">(</span>loc<span style="color: #990000;">=</span><span style="color: #ff0000;">'upper left'</span><span style="color: #990000;">,</span> shadow<span style="color: #990000;">=</span>True<span style="color: #990000;">)</span>
pylab<span style="color: #990000;">.</span><strong><span style="color: #000000;">show</span></strong><span style="color: #990000;">()</span>
</tt></tt></pre>
<p>﻿And here you can see a result example.</p>
<div id="attachment_369" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.orfeo-toolbox.org/wp-content/uploads/2010/05/plot.png"><img class="size-medium wp-image-369  " title="plot" src="http://blog.orfeo-toolbox.org/wp-content/uploads/2010/05/plot-300x226.png" alt="" width="300" height="226" /></a><p class="wp-caption-text">Temporal profiles</p></div>
<p>Of course, you can imagine to make this script a little bit more interactive in order to choose other pixel coordinates, etc., but I hope you grasp the power of this approach. By using the OTB Python bindings and other freely available open source Python goodies (NumPy, SciPy, Matplotlib, <a href="http://rpy.sourceforge.net/">rpy</a>) you get the user friendly approach of Octave, Scilab and their commercial counterparts plus the power of OTB (which in turn makes available ITK, OSSIM, etc.).</p>
<p>Isn&#8217;t it great?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orfeo-toolbox.org/uncategorized/otb-mad-lab/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Contribute easily to OTB</title>
		<link>http://blog.orfeo-toolbox.org/news/contribute-easily-to-otb</link>
		<comments>http://blog.orfeo-toolbox.org/news/contribute-easily-to-otb#comments</comments>
		<pubDate>Sat, 06 Mar 2010 13:03:55 +0000</pubDate>
		<dc:creator>Emmanuel Christophe</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[contribute]]></category>
		<category><![CDATA[sandbox]]></category>

		<guid isPermaLink="false">http://blog.orfeo-toolbox.org/?p=312</guid>
		<description><![CDATA[For most open source projects, integration of patches provided by willing users if not an easy task and it often falls behind. The burden of patches is both on the user himself and on the project member doing the integration. Generating a patch is not straightforward for the user (he needs to compare with the [...]]]></description>
			<content:encoded><![CDATA[<p>For most open source projects, <strong>integration of patches</strong> provided by willing users if not an easy task and it often <strong>falls behind</strong>. The burden of patches is both on the user himself and on the project member doing the integration.</p>
<p>Generating a patch is not straightforward for the user (he needs to compare with the original version if he still has it) and worst, he doesn&#8217;t get the benefits of version control systems.</p>
<p>On the other side, the project member integrating the patch has to find the correct version against which the patch applies, he has to fight with the line breaks if the patch was submitted by email.</p>
<p>The more obvious solution is to <strong>give access to the version control system</strong> to the potential contributors: this way, they can fully contribute and the integration is easy. But that raises another question: do you really want anybody to be able to put his/her contribution without any check? Sometimes, the contribution could break another capabilities, sometimes a different solution to fix the problem might be more appropriate, sometimes, this is not the time to integrate risky modifications&#8230; That the case why in most open source projects, the core team of people with commit access is limited.</p>
<p>With the availability of distributed VCS (mercurial, git, bazar), part of this problem disappear: the user can work locally and benefit from the VCS, it also makes the patch generation easier. But there is still the problem of sharing. The main argument of the DVCS is that a contributor can go out and say &#8220;hey guys, here is my cool version, come and pull from it&#8221;, but that involve him <strong>setting up a public repository</strong>. Unlikely if he is just interested in using the program and on his way fixed a bug.</p>
<p>To make this process easier, we&#8217;ve just created a <strong>&#8220;sandbox&#8221; repository</strong> for OTB which works as a testing environment that isolates untested code changes and outright experimentation from the production environment or repository. Here is how it works:</p>
<ol>
<li>Clone the main OTB repository:
<pre>hg clone http://hg.orfeo-toolbox.org/OTB</pre>
<p>as normal</li>
<li>Set up your mercurial identity, in Linux, edit the ~/.hgrc and put the following lines:
<pre>[ui]
username = Your Name &lt;email-where-we-can@contact.you&gt;</pre>
</li>
<li>work as usual, commit locally as you would do for your own project</li>
<li>when you are happy, push to the sandbox
<pre>hg push http://hg.orfeo-toolbox.org/OTB-SandBox</pre>
<p>If necessary, use the -f option (we will sort out the mess). When ask for the login use &#8220;anonymous&#8221; with the password &#8220;otb&#8221;.</li>
<li>We will be informed that something new is in the sandbox, but you can also drop a mail at otb-users@googlegroups.com to provide more explanations.</li>
<li> We will then review the corrections, test them and then merge them into the main repository.</li>
</ol>
<p>This way, the fix, the new capability, etc will be <strong>maintain in the upcoming version of OTB</strong>. And also, the user will have the chance to appear in our <a href="http://blog.orfeo-toolbox.org/news/otb-development-history">latest codeswarm</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orfeo-toolbox.org/news/contribute-easily-to-otb/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>OTB Live CD recipe</title>
		<link>http://blog.orfeo-toolbox.org/howto/otb-live-cd-recipe</link>
		<comments>http://blog.orfeo-toolbox.org/howto/otb-live-cd-recipe#comments</comments>
		<pubDate>Tue, 04 Nov 2008 23:45:26 +0000</pubDate>
		<dc:creator>Emmanuel Christophe</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.orfeo-toolbox.org/?p=63</guid>
		<description><![CDATA[The new OTB live CD is out! On the program is the brand new OTB 2.6 (which came out last week) with the new Xubuntu 8.10 (which came out also last week coincidentally). It&#8217;s just as usual: download it from http://www.orfeo-toolbox.org/otblive/, burn it on a CD, put it on a computer and restart. This is [...]]]></description>
			<content:encoded><![CDATA[<p>The new OTB live CD is out! On the program is the brand new OTB 2.6 (which came out last week) with the new Xubuntu 8.10 (which came out also last week coincidentally).</p>
<p>It&#8217;s just as usual: download it from <a title="OTB Live CD" href="http://www.orfeo-toolbox.org/otblive/" target="_blank">http://www.orfeo-toolbox.org/otblive/</a>, burn it on a CD, put it on a computer and restart.</p>
<p>This is the screen you should get:</p>
<div id="attachment_70" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.orfeo-toolbox.org/wp-content/uploads/2008/11/otblive26-snapshot.png"><img src="http://blog.orfeo-toolbox.org/wp-content/uploads/2008/11/otblive26-snapshot-300x225.png" alt="OTB Live CD desktop" title="OTB Live CD" width="300" height="225" class="size-medium wp-image-70" /></a><p class="wp-caption-text">OTB Live CD desktop</p></div>
<p>To help you get started with OTB, follow the guide on the help page:</p>
<div id="attachment_71" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.orfeo-toolbox.org/wp-content/uploads/2008/11/otblive26-snapshot2.png"><img src="http://blog.orfeo-toolbox.org/wp-content/uploads/2008/11/otblive26-snapshot2-300x225.png" alt="OTB live CD, help page" title="OTB live CD - Help" width="300" height="225" class="size-medium wp-image-71" /></a><p class="wp-caption-text">OTB live CD, help page</p></div>
<p>You can also try the numerous applications directly out of the box:</p>
<div id="attachment_72" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.orfeo-toolbox.org/wp-content/uploads/2008/11/otblive26-snapshot3.png"><img src="http://blog.orfeo-toolbox.org/wp-content/uploads/2008/11/otblive26-snapshot3-300x225.png" alt="OTB live CD, example of applications" title="OTB live CD - Application" width="300" height="225" class="size-medium wp-image-72" /></a><p class="wp-caption-text">OTB live CD, example of applications</p></div>
<p>Now, a few more word on what&#8217;s going on behind the scene to build this CD. All this process is coming from various sources (Gnu Linux Magazine France, several websites, tons of trial and errors).</p>
<p>First, you need to get the iso image from the latest xubuntu (www.xubuntu.org). We are going to unpack all this to be able to work on it. Go into your working directory (start from a clean one, you&#8217;ll be putting a lot of mess there), and make sure you have at least 5GB free.</p>
<pre>
<code>
mkdir mnt
sudo mount -o loop xubuntu-8.10-desktop-i386.iso mnt

mkdir extract-cd
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

sudo modprobe squashfs
mkdir squashfs
sudo mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs

mkdir edit
sudo cp -a squashfs/* edit/

sudo umount squashfs
sudo umount mnt
</code>
</pre>
<p>Now, you have unpacked all the system, you can &#8216;chroot&#8217; yourself on it:</p>
<pre>
<code>
sudo cp /etc/resolv.conf edit/etc/
sudo cp /etc/hosts edit/etc/

sudo chroot edit
mount -t proc none /proc
mount -t sysfs none /sys
export LC_ALL=C
</code>
</pre>
<p>Here, you are root on the live cd system, all the command you pass in this environment won&#8217;t affect your own computer. The few lines above are required every time you have to go in the chroot environment. Some of the modification below will require you to go in and out. In this case, it&#8217;s better to keep two terminals open.</p>
<p>Now that we are here, we need to make some space for OTB. Don&#8217;t forget that everything has to fit on 700MB. Actually as the filesystem is compressed (squashfs), you can count on around 2GB.</p>
<pre>
<code>
aptitude update
dpkg-query -W --showformat='${Installed-Size} ${Package}\n'| sort -nr | less
aptitude remove --purge thunderbird
aptitude remove --purge gnome-games-extra-data gnome-games gnome-games-data gnome-games-servers
aptitude remove --purge gimp gimp-data gimp-help-common gimp-help-en libgimp2.0
aptitude remove --purge gnumeric-common gnumeric-doc gnumeric-gtk gnumeric-plugins-extra gnumeric
</code>
</pre>
<p>You can choose what you want according to your own taste. One part which is quite space consuming is the localization packages. They can be removed by:</p>
<pre>
<code>
aptitude remove --purge `dpkg-query -W --showformat='${Package}\n' | grep language-pack | egrep -v '\-(en|fr)'`
</code>
</pre>
<p>Usually, I keep only the two official languages for OTB: English and French.</p>
<p>Now we need to remove some libraries which became unused:</p>
<pre>
<code>
vim /etc/apt/sources.list
</code>
</pre>
<p>Uncomment the two lines:</p>
<pre>
<code>
#deb http://archive.ubuntu.com/ubuntu intrepid universe
#deb-src http://archive.ubuntu.com/ubuntu intrepid universe
</code>
</pre>
<p>and run deborphan:</p>
<pre>
<code>
aptitude update
aptitude install gedit
aptitude install deborphan

aptitude remove --purge `deborphan`
aptitude remove --purge `deborphan`
aptitude remove --purge `deborphan`
</code>
</pre>
<p>It&#8217;s time to fill up some of the space we&#8217;ve just freed and install the libraries necessary for OTB:</p>
<pre>
<code>
aptitude install libglu1-mesa-dev
aptitude install cmake g++ libgdal1-1.5.0 libgdal1-dev libfltk1.1 libfltk1.1-dev fluid libcurl4-gnutls-dev libfftw3-dev
ln -s /usr/lib/libgdal1.5.0.so  /usr/lib/libgdal.so
mkdir /otb
</code>
</pre>
<p>From outside of the chroot (normal environment), you can copy OTB sources and documentation:</p>
<pre>
<code>
sudo cp -r OrfeoToolbox-2.6.0 edit/otb
sudo cp -r OrfeoApplications-2.6.0 edit/otb
sudo cp OTBSoftwareGuide-2.6.pdf edit/otb
sudo cp -r Doxygen/ edit/otb/
</code>
</pre>
<p>Now, in the chroot, you can compile OTB libs and applications:</p>
<pre>
<code>
cd otb
mkdir OTB-Binary
mkdir OTB-Binary-Applications
cd OTB-Binary
ccmake ../OrfeoToolbox-2.6.0/

c
CMAKE_BUILD_TYPE -> Release
OTB_USE_CURL -> ON
USE_FFTWD -> ON
c
g

make -j 2

cd ../OTB-Binary-Applications
ccmake ../OrfeoApplications-2.6.0/
c
e
OTB_DIR -> /otb/OTB-Binary/
CMAKE_BUILD_TYPE -> Release
c
c
g

make -j 2
</code>
</pre>
<p>Now, you have all the basic ready. In another post later on, we may cover some personalization issues (start logo, splash screens, etc). </p>
<p>We are now going to build the CD. Before that, clean the mess you&#8217;ve create on the chroot (you don&#8217;t want your typos to be burnt on hundreds of CDs around the world):</p>
<pre>
<code>
aptitude clean
rm -rf /tmp/*
rm /etc/resolv.conf
echo "127.0.0.1 localhost" > /etc/hosts
umount /proc
umount /sys
rm -rf ~/.bash_history
exit
</code>
</pre>
<p>We are now going to update the list of packages on the live CD:</p>
<pre>
<code>
chmod +w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sudo sed -ie '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
</code>
</pre>
<p>Then we need to rebuild the compressed filesystem:</p>
<pre>
<code>
sudo rm -rf extract-cd/casper/filesystem.squashfs
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs
</code>
</pre>
<p>Add the checksum:</p>
<pre>
<code>
sudo -s
rm extract-cd/md5sum.txt
(cd extract-cd &#038;&#038; find . -type f -print0 | xargs -0 md5sum > md5sum.txt)
exit
</code>
</pre>
<p>And build the iso image:</p>
<pre>
<code>
cd extract-cd
sudo genisoimage -r -V "OTB Live 2.6.0" -publisher "Somebody" -p "You" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../otblive-2.6.0.iso .
cd ..
</code>
</pre>
<p>Now you have the image, you can give it a try before burning it by using qemu/kvm:</p>
<pre>
<code>
kvm -cdrom otblive-2.6.0.iso -boot d -m 512
</code>
</pre>
<p>All this process should be working quite well, it has be tested with Xubuntu 8.10 Intrepid, 8.04 Hardy, 7.10 Gutsy and with OTB 2.0, 2.2, 2.5 (unofficial) and 2.6. The hardest part is usually to be able to fit everything on the 700MB of the CD. Using a live USB key is a relief, but more on that later&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orfeo-toolbox.org/howto/otb-live-cd-recipe/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

