<?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>Visual-Experiments.com</title>
	<atom:link href="http://www.visual-experiments.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visual-experiments.com</link>
	<description>ASTRE Henri experiments with Ogre3D and web stuff</description>
	<lastBuildDate>Tue, 01 May 2012 21:14:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>PhotoSynthToolkit 10</title>
		<link>http://www.visual-experiments.com/2012/05/01/photosynthtoolkit-10/</link>
		<comments>http://www.visual-experiments.com/2012/05/01/photosynthtoolkit-10/#comments</comments>
		<pubDate>Tue, 01 May 2012 21:14:03 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[photogrammetry]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[photosynthtoolkit]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2343</guid>
		<description><![CDATA[What do you think of this concept: a new PhotoSynthToolkit version almost everyday? . This version introduce a new feature that will allow you to process a PhotoSynth without needing to wait for the end of the upload. In fact you can even cancel your synth as soon as the computation is complete. But be [...]]]></description>
			<content:encoded><![CDATA[<p>What do you think of this concept: a new PhotoSynthToolkit version almost everyday? <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>This version introduce a new feature that will allow you to process a PhotoSynth without needing to wait for the end of the upload. In fact you can even cancel your synth as soon as the computation is complete. But be aware that all pictures uploaded in the meantime will stay on photosynth server (AFAIK).</p>
<p><strong>How to proceed:</strong><br />
- wait for synth to be processed (but not fully uploaded).<br />
- copy the 2 following files from <strong>%temp%\Photosynther</strong> to another folder (<em>d:\my_synth</em> for example)</p>
<ul style="margin-left: 20px;">
<li>collection.dzcz</li>
<li>collection.synth.bin</li>
</ul>
<p>- then you can launch the step 1 of the PhotoSynthToolkit by providing your folder (<em>d:\my_synth</em>).<br />
- you&#8217;ll need then to copy your original jpegs to the distort folder and you&#8217;re done!</p>
<p>You can download <a href="http://www.visual-experiments.com/blog/?sdmon=downloads/PhotoSynthToolkit10.zip">PhotoSynthToolkit10.zip</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F05%2F01%2Fphotosynthtoolkit-10%2F&amp;title=PhotoSynthToolkit%2010"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/05/01/photosynthtoolkit-10/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PhotoSynthToolkit 9</title>
		<link>http://www.visual-experiments.com/2012/04/29/photosynthtoolkit-9/</link>
		<comments>http://www.visual-experiments.com/2012/04/29/photosynthtoolkit-9/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 18:44:20 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[photogrammetry]]></category>
		<category><![CDATA[cmvs]]></category>
		<category><![CDATA[photosynthtoolkit]]></category>
		<category><![CDATA[pmvs]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2329</guid>
		<description><![CDATA[This is a quick post to announce the new version of the PhotoSyntToolkit with 2 new features: CMVS support finally integrated proper handling of folder with white space How to use CMVS with PhotoSynthToolkit: As usual run step 1 and move pictures from &#8220;hd&#8221; to &#8220;distort&#8221; folder. You need to run first &#8220;Prepare for PMVS2&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick post to announce the new version of the <a href="http://www.visual-experiments.com/demos/photosynthtoolkit/">PhotoSyntToolkit</a> with 2 new features:</p>
<ul>
<li><a href="http://grail.cs.washington.edu/software/cmvs/">CMVS</a> support finally integrated <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>proper handling of folder with white space</li>
</ul>
<p><strong>How to use CMVS with PhotoSynthToolkit:</strong></p>
<ol>
<li>As usual run step 1 and move pictures from &#8220;hd&#8221; to &#8220;distort&#8221; folder.</li>
<li>You need to run first &#8220;Prepare for PMVS2&#8243; then do <strong>NOT</strong> launch the generated bat file.</li>
<li>You can run &#8220;Prepare for CMVS&#8221; and run the generated bat file.</li>
</ol>
<p><strong>Warning:</strong> I&#8217;ve fixed all my programs to handle folder with white space (thanks to boost::filesystem). Sadly <a href="http://grail.cs.washington.edu/software/pmvs/">PMVS2</a>/<a href="http://grail.cs.washington.edu/software/cmvs/">CMVS</a> don&#8217;t handle them. The fix is trivial but instead of recompiling a new version I&#8217;ve found a bad workaround. I&#8217;m creating a temporary virtual drive z: pointing to your synth folder during the execution of <a href="http://grail.cs.washington.edu/software/pmvs/">PMVS2</a>/<a href="http://grail.cs.washington.edu/software/cmvs/">CMVS</a> using SUBST. The downside are that if you already have a z: drive it won&#8217;t work and if you kill <a href="http://grail.cs.washington.edu/software/pmvs/">PMVS2</a>/<a href="http://grail.cs.washington.edu/software/cmvs/">CMVS</a> you&#8217;ll have to manually remove the z: drive. <strong>To remove the z: drive type &#8220;subst z: /d&#8221; in your console</strong>.</p>
<p>If you need XSI/3DS max integration you&#8217;ll have to use the old version: <a href="http://www.visual-experiments.com/blog/?sdmon=downloads/PhotoSynthToolkit7.zip">PhotoSynthToolkit7.zip</a> otherwise <a href="http://www.visual-experiments.com/blog/?sdmon=downloads/PhotoSynthToolkit9.zip">PhotoSynthToolkit9.zip</a> is the latest version.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F04%2F29%2Fphotosynthtoolkit-9%2F&amp;title=PhotoSynthToolkit%209"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/04/29/photosynthtoolkit-9/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Ransac.js</title>
		<link>http://www.visual-experiments.com/2012/04/22/ransac-js/</link>
		<comments>http://www.visual-experiments.com/2012/04/22/ransac-js/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 17:46:28 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ransac]]></category>
		<category><![CDATA[ransac.js]]></category>
		<category><![CDATA[recon]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2282</guid>
		<description><![CDATA[Recently I&#8217;ve been reading a very interesting paper about a threshold-free Ransac solution called Recon (stand for REsidual CONsensus). The video presentation is very interesting and makes me realize that Ransac is a very visual algorithm! Thus I&#8217;ve decided to create a javascript implementation which draw each iterations on a Html5 canvas. I&#8217;ll try to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been reading a very interesting paper about a threshold-free <a href="http://en.wikipedia.org/wiki/RANSAC">Ransac</a> solution called <a href="http://www.cs.unc.edu/~rraguram/research.html#recon">Recon</a> (stand for REsidual CONsensus). The video presentation is very interesting and makes me realize that Ransac is a very visual algorithm! Thus I&#8217;ve decided to create a javascript implementation which draw each iterations on a Html5 canvas. I&#8217;ll try to implement Recon as well.</p>
<table>
<tr>
<td colspan="2">Illustrations from <a href="http://en.wikipedia.org/wiki/RANSAC">Wikipedia</a></td>
</tr>
<tr>
<td><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/04/points.png" alt="" title="points" width="255" height="255" class="alignleft size-full wp-image-2286" /></td>
<td><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/04/model.png" alt="" title="model" width="255" height="255" class="alignleft size-full wp-image-2285" /></td>
</tr>
<tr>
<td>Input points</td>
<td>Estimated fitting line</td>
</tr>
</table>
<h3 style="text-align: center">
<a href="http://www.visual-experiments.com/demo/ransac.js/">->Launch live demo<-</a><br />
</h3>
<p><br/></p>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/04/ransac_line_fitting1.gif" alt="" title="ransac line fitting" width="500" height="500" class="aligncenter size-full wp-image-2316" /></p>
<p style="text-align: center;">Animated GIF of the iterations</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F04%2F22%2Fransac-js%2F&amp;title=Ransac.js"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/04/22/ransac-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhotoSynthToolkit 8</title>
		<link>http://www.visual-experiments.com/2012/04/14/photosynthtoolkit-8/</link>
		<comments>http://www.visual-experiments.com/2012/04/14/photosynthtoolkit-8/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 18:05:05 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[photogrammetry]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[photosynthtoolkit]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2254</guid>
		<description><![CDATA[I&#8217;ve finally decided to release the new version of my PhotoSynthToolkit. This new version has bundle.out output support: this was indeed easy to add as I&#8217;ve already implemented it in my WebGL chrome extension. I&#8217;ve also rewritten the network part of the downloader by using libcurl. PhotoSynthDownloader is now replaced by my new tool PhotoSynthGrabber. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally decided to release the new version of my PhotoSynthToolkit. This new version has <a href="http://phototour.cs.washington.edu/bundler/bundler-v0.4-manual.html">bundle.out</a> output support: this was indeed easy to add as I&#8217;ve already implemented it in <a href="http://www.visual-experiments.com/2012/03/25/webgl-photosynth-extension-updated/">my WebGL chrome extension</a>. I&#8217;ve also rewritten the network part of the downloader by using <a href="http://curl.haxx.se/libcurl/">libcurl</a>. PhotoSynthDownloader is now replaced by my new tool PhotoSynthGrabber. BTW thumbnail/HD pictures downloading should be really much faster <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . </p>
<p>New feature coming:</p>
<ul>
<li>CMVS support (coming very soon)</li>
<li>White space handling in the toolkit scripting (PhotoSynthGrabber is already ready)</li>
<li>Expose HTTP Proxy parameters for the downloader</li>
</ul>
<p>You can download the new version: <a href="http://www.visual-experiments.com/blog/?sdmon=downloads/PhotoSynthToolkit8.zip">PhotoSynthToolkit8.zip</a> or keep the previous one in case you miss some advanced feature (vis.dat generation, SoftImage XSI / 3DS Max scripting for example): <a href="http://www.visual-experiments.com/blog/?sdmon=downloads/PhotoSynthToolkit7.zip">PhotoSynthToolkit7.zip</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F04%2F14%2Fphotosynthtoolkit-8%2F&amp;title=PhotoSynthToolkit%208"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/04/14/photosynthtoolkit-8/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WebGL Photosynth extension updated</title>
		<link>http://www.visual-experiments.com/2012/03/25/webgl-photosynth-extension-updated/</link>
		<comments>http://www.visual-experiments.com/2012/03/25/webgl-photosynth-extension-updated/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 21:08:12 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[three.js]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2231</guid>
		<description><![CDATA[I&#8217;ve updated my PhotoSynth extension for Google Chrome. I&#8217;ve included all optimization described in my previous post: point cloud loading is 4x faster and ply file generation could be 17x faster in some cases . As you can see in the screenshot below, I&#8217;ve also added a new checkbox to let you choose if you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my <a href="https://chrome.google.com/webstore/detail/jnnhdiolpfgjbgagkbmdfidfofancmee">PhotoSynth extension for Google Chrome</a>. I&#8217;ve included all optimization described in <a href="http://www.visual-experiments.com/2012/03/19/improving-photosynth-extension-performance/">my previous post</a>: <strong>point cloud loading is 4x faster</strong> and ply file generation could be 17x faster in some cases <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . As you can see in the screenshot below, I&#8217;ve also added a new checkbox to let you choose if you want to load thumbnails or not in the WebGL context (which could take a while for synth with more than 200 pictures).<br />
<img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/03/extension.jpg" alt="" title="webgl photosynth extension updated" width="600" height="362" class="alignleft size-full wp-image-2232" /></p>
<div style="margin-top: 20px;">&nbsp;</div>
<p>There is still room for improvements: I&#8217;ve discovered lot of interesting stuff that I&#8217;ve to try in <a href="http://www.youtube.com/watch?v=XAqIpGU8ZZk">Lilli Thompson speech at the GDC</a>. In particular I&#8217;d like to improve:</p>
<ul>
<li>memory usage: track V8 garbage collection</li>
<li>thumbnails loading: could be speed-up by using a web workers too</li>
<li>Three.js rendering: I still need to switch to r48 and use BufferGeometry</li>
<li>bundle.out generation: still very slow for big synth</li>
</ul>
<p>To accelerate bundle.out file generation I&#8217;ve found a solution working pretty well for very large ascii file (80mo+). I&#8217;m generating the ascii file by writing directly in binary in a Uint8Array (by chunk of 1mo). The resulting code is more complex but is as fast as regular string concatenation and in comparison as a memory footprint very limited. It&#8217;s not integrated in the extension yet as my test case is working well (ascii ply generation) but bundle.out is slow (I need to track V8 bailout/deopt to understand why it&#8217;s slow).</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F03%2F25%2Fwebgl-photosynth-extension-updated%2F&amp;title=WebGL%20Photosynth%20extension%20updated"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/03/25/webgl-photosynth-extension-updated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Improving PhotoSynth extension performance</title>
		<link>http://www.visual-experiments.com/2012/03/19/improving-photosynth-extension-performance/</link>
		<comments>http://www.visual-experiments.com/2012/03/19/improving-photosynth-extension-performance/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 22:38:31 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[webgl]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2150</guid>
		<description><![CDATA[I&#8217;ve recently discover the new transferable object feature in Google chrome. BTW transferable objects are really great! Furthermore you really should use them as I&#8217;ve found that structure cloning is leaking (you can try this leaking demo with chrome 17). Thus I&#8217;ve started to update my extension and done a benchmark of various solution with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently discover the new <a href="http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast">transferable object</a> feature in Google chrome. BTW transferable objects are really great! Furthermore you really should use them as I&#8217;ve found that structure cloning is leaking (<a href="http://visual-experiments.com/demo/transfert/">you can try this leaking demo</a> with chrome 17). Thus I&#8217;ve started to update my extension and done a benchmark of various solution with a big synth of 20mo (1200k vertices and 1000 pictures). </p>
<p>I&#8217;ve also improved a lot my binary parsing by using only native binary parsing (<a href="https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView">DataView</a>). One thing about DataView: <strong>did they realize that if you forgot the endianness parameter it will use BigEndian</strong>? <em>(littleEndian = x86, bigEndian = Motora 68k).</em></p>
<p>Thanks to both optimization <strong>the new version is 4x faster!</strong> (loading time: 24s > 6s)</p>
<h3>solution 1</h3>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/03/flow-11.jpg" alt="" title="flow-1" width="400" height="126" class="alignleft size-full wp-image-2186" /><br />
<br style="clear: both"/></p>
<ul>
<li>cross-orign was forbidden in contentscript (fixed now since chrome 13)</li>
<li>lack of TypedArray copy/transfert -> JS array replacement</li>
<li><strong>Loading time: 13600ms</strong> (24400ms with the previous version without optimized binary parsing)</li>
</ul>
<h3>solution 2</h3>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/03/flow-2.jpg" alt="" title="flow-2" width="300" height="82" class="alignleft size-full wp-image-2152" /><br />
<br style="clear: both"/></p>
<ul>
<li><strong>Issue:</strong> the UI is frozen during parsing (lack of threading)</li>
<li><strong>Loading time: 6500ms</strong></li>
</ul>
<h3>solution 3</h3>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/03/flow-3.jpg" alt="" title="flow-3" width="400" height="139" class="alignleft size-full wp-image-2153" /><br />
<br style="clear: both"/></p>
<ul>
<li>I&#8217;m using transferable objects to both send the xhr.response (ArrayBuffer) and receive the parsed Float32Array (vertex positions) and Uint8Array (vertex colors).</li>
<li><strong>Issue:</strong> I didn&#8217;t manage to spawn a worker from my extension directly (SECURITY_ERR: DOM Exception 18): I&#8217;ve been forced to <a href="http://blogs.microsoft.co.il/blogs/gilf/archive/2012/01/29/working-with-inline-web-workers.aspx">inline the worker</a> as a workaround.</li>
<li><strong>Loading time:  6000ms</strong></li>
</ul>
<h3>solution 4</h3>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/03/flow-4.jpg" alt="" title="flow-4" width="400" height="139" class="alignleft size-full wp-image-2154" /><br />
<br style="clear: both"/></p>
<ul>
<li><strong>Issue:</strong> because of <a href="http://code.google.com/p/chromium/issues/detail?id=45382">this bug</a> workers can not do cross-orign xhr.</li>
<li><strong>Loading time: N/A</strong></li>
</ul>
<p>I&#8217;ve also optimized the PLY file generation by generating binary file on the client side instead of ascii. </p>
<ul>
<li>Ascii: 74mo in 9000ms</li>
<li>Binary: 17mo in 530ms <strong>(~17x faster!)</strong></li>
</ul>
<p>Sadly I didn&#8217;t manage to find a way to accelerate <em>&#8220;bundle.out&#8221;</em> ascii file generation yet (involving lot of string concatenation and numbers formatting).</p>
<p><strong>I didn&#8217;t have updated the extension on the chrome web store yet</strong> as I&#8217;m working on using the new BufferGeometry of Three.js that should be more efficient. Building BufferGeometry directly from  Float32Array (vertex positions array) and Uint8Array (vertex colors array) seems a really better solution IMO.</p>
<h3>Mesh compression</h3>
<p>I&#8217;ve also discover the <a href="http://code.google.com/p/webgl-loader/">webgl-loader</a> mesh compression solution recently. I&#8217;ve compiled my own version of <a href="http://code.google.com/p/webgl-loader/source/browse/trunk/src/objcompress.cc">objcompress.cc</a> and fixed the JSON export. Then I&#8217;ve created my own format allowing to pack in one file all the utf8 files (thus reducing the number of http request needed). I will post about it soon: stay tuned!</p>
<h3>Firefox extension?</h3>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/02/screenshot2.jpg" alt="" title="Firefox extension" width="600" height="424" class="aligncenter size-full wp-image-2141" /><br />
On a side note I&#8217;ve also been playing with the new <a href="https://builder.addons.mozilla.org/">mozilla add-on builder SDK</a>&#8230; well IMO Firefox isn&#8217;t the best browser for extension anymore. I&#8217;ve been very disappointed by the restriction applied to code running in the contentscript (for example <a href="http://prototypejs.org/">prototype.js</a> is not working: I had to use a clone that I&#8217;ve built long time ago). And I&#8217;m also very concerned about their security strategy: they don&#8217;t have a cross-orign xhr permissions field in the manifest. Thus extensions can do cross-orign request to all domains by default! Nevertheless I&#8217;ve managed to port the binary parsing of the point cloud but Three.js is not working either <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F03%2F19%2Fimproving-photosynth-extension-performance%2F&amp;title=Improving%20PhotoSynth%20extension%20performance"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/03/19/improving-photosynth-extension-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PhotoSynth bundle.out export!</title>
		<link>http://www.visual-experiments.com/2012/02/01/photosynth-bundle-out-export/</link>
		<comments>http://www.visual-experiments.com/2012/02/01/photosynth-bundle-out-export/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 21:18:28 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[webgl]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2114</guid>
		<description><![CDATA[I&#8217;ve updated my Google Chrome extension to export a valid bundle.out from a PhotoSynth. The bundle.out generated need to be used with HD version of the images (not the thumbnails). Moreover I&#8217;ve removed tracks of length 2 from the bundle.out as I guess that PhotoSynth is keeping them only to get a &#8220;denser&#8221; point cloud [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my <a href="https://chrome.google.com/webstore/detail/jnnhdiolpfgjbgagkbmdfidfofancmee">Google Chrome extension</a> to export a valid bundle.out from a PhotoSynth. The <a href="http://phototour.cs.washington.edu/bundler/bundler-v0.4-manual.html">bundle.out</a> generated need to be used with HD version of the images (not the thumbnails). Moreover I&#8217;ve removed tracks of length 2 from the bundle.out as I guess that PhotoSynth is keeping them only to get a &#8220;denser&#8221; point cloud (aesthetic purpose only)? One more thing: you can not use the bundle.out file to run a bundle adjustment as the 2d measurements are unknown (I have computed them by projecting the tracks in corresponding cameras).</p>
<p>I&#8217;m sure that some of you have an idea of what to do with a bundle.out file from a PhotoSynth <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .<br />
BTW, this export wouldn&#8217;t have been possible without Peter Sibley help, <strong>thanks Peter</strong>! He has help me by giving me the missing information needed to do the bundle.out PhotoSynth export.</p>
<p><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2012/01/screenshot.jpg" alt="" title="PhotoSynth viewer with Bundle.out support" width="600" height="344" class="aligncenter size-full wp-image-2120" /></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F02%2F01%2Fphotosynth-bundle-out-export%2F&amp;title=PhotoSynth%20bundle.out%20export%21"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/02/01/photosynth-bundle-out-export/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>PhotoSynth viewer with HTML5 FileSaver</title>
		<link>http://www.visual-experiments.com/2012/01/15/photosynth-webgl-viewer-with-html5-fileaver/</link>
		<comments>http://www.visual-experiments.com/2012/01/15/photosynth-webgl-viewer-with-html5-fileaver/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 21:51:13 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[webgl]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2088</guid>
		<description><![CDATA[Happy New Year Everyone! This is my small gift for 2012: I&#8217;ve updated my PhotoSynth Google chrome extension! New features: Point cloud downloading is working now! Previous downloadify solution wasn&#8217;t working due to a Chrome bug and was removed New version is using Html5 BlobBuilder + FileSaver instead But you need a Chrome version >15 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Happy New Year Everyone! </strong><br />
This is my small gift for 2012: I&#8217;ve updated my <a href="https://chrome.google.com/webstore/detail/jnnhdiolpfgjbgagkbmdfidfofancmee">PhotoSynth Google chrome extension</a>!</p>
<p><strong>New features:</strong></p>
<ul style="margin-left: 20px;">
<li>Point cloud downloading is working now!
<ul>
<li>Previous <a href="https://github.com/dcneiner/Downloadify">downloadify</a> solution wasn&#8217;t working due to a <a href="http://code.google.com/p/chromium/issues/detail?id=58907">Chrome bug</a> and was removed</li>
<li>New version is using Html5 <a href="https://github.com/eligrey/BlobBuilder.js">BlobBuilder</a> + <a href="https://github.com/eligrey/FileSaver.js">FileSaver</a> instead</li>
<li>But you need a Chrome version >15</li>
</ul>
</li>
<li>Picture thumbnails are displayed thanks to my <a href="http://www.visual-experiments.com/2011/12/05/how-to-bypass-webgl-sop-restriction-v2/">sop bypass trick</a></li>
<li><a href="http://blogs.msdn.com/b/photosynth/archive/2011/10/18/photosynth-moving-to-windows-azure.aspx">Windows Azure support</a> (corresponding permission was added to the manifest)</li>
</ul>
<p><strong>Other features are coming:</strong></p>
<ul style="margin-left: 20px;">
<li><a href="http://www.visual-experiments.com/2011/11/01/photosynth-webgl-panorama-viewer/">basic panorama support</a> (using atlas.jpg only: no progressive download yet)</li>
<li>download <a href="http://jszip.stuartk.co.uk/">zip file</a> of whole synth?</li>
<li>bug fixes (the current version is still very buggy, especially the menu)</li>
<li>other cool stuff are coming! <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>If you don&#8217;t have Chrome you can take a look at my <a href="http://www.youtube.com/watch?v=o4I8WWm61gs&#038;feature=player_embedded">previous video</a> showing most of the new feature (except point cloud downloading). The previous version wasn&#8217;t available as it was using <a href="http://www.visual-experiments.com/2011/10/03/how-to-bypass-webgl-sop-restriction/">my previous trick to bypass sop restriction</a> (too slow to be widely used).</p>
<p>The new version is available on the <a href="https://chrome.google.com/webstore/detail/jnnhdiolpfgjbgagkbmdfidfofancmee">Google Web Store</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2012%2F01%2F15%2Fphotosynth-webgl-viewer-with-html5-fileaver%2F&amp;title=PhotoSynth%20viewer%20with%20HTML5%20FileSaver"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2012/01/15/photosynth-webgl-viewer-with-html5-fileaver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to bypass WebGL Sop restriction v2</title>
		<link>http://www.visual-experiments.com/2011/12/05/how-to-bypass-webgl-sop-restriction-v2/</link>
		<comments>http://www.visual-experiments.com/2011/12/05/how-to-bypass-webgl-sop-restriction-v2/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 22:17:29 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[restriction]]></category>
		<category><![CDATA[same-origin-policy]]></category>
		<category><![CDATA[sop]]></category>
		<category><![CDATA[webgl]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2060</guid>
		<description><![CDATA[I&#8217;ve previously posted a trick to bypass the WebGL same origin policy restriction in a particular context. But my solution had a major drawback: it was slow due to jpeg decoding in javascript. Hopefully I&#8217;ve implemented a new solution which is way much faster thanks to John Bauman suggestion and it works like a charm! [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve previously posted a trick to <a href="http://www.visual-experiments.com/2011/10/03/how-to-bypass-webgl-sop-restriction/">bypass the WebGL same origin policy</a> restriction in a particular context. But my solution had a major drawback: it was slow due to jpeg decoding in javascript. Hopefully I&#8217;ve implemented a new solution which is way much faster thanks to <a href="http://www.visual-experiments.com/2011/10/03/how-to-bypass-webgl-sop-restriction/comment-page-1/#comment-8711">John Bauman suggestion</a> and it works like a charm! </p>
<pre class="brush: jscript; highlight: [10]; title: ;">
var xhr = new XMLHttpRequest();
xhr.open(&quot;GET&quot;, JPEG_URL, true);
xhr.responseType = &quot;arraybuffer&quot;;
xhr.onload = function() {
	var img = new Image();
	img.onload = function() {
		var tex = new THREE.Texture(this);
		//do something with this texture...
	};
	img.src = arrayBufferDataUri(xhr.response);
};
xhr.send(null);
</pre>
<p>The function &#8220;<strong>arrayBufferDataUri</strong>&#8221; at the line 10 allow to speed-up the conversion from ArrayBuffer to base64 ascii string by avoiding an extra copy needed to use <strong>window.btoa</strong>. I&#8217;ve found this function here: <a href="http://jsperf.com/encoding-xhr-image-data/5">http://jsperf.com/encoding-xhr-image-data/5</a>.</p>
<pre class="brush: jscript; title: ;">
//From: http://jsperf.com/encoding-xhr-image-data/5
function arrayBufferDataUri(raw) {
	var base64 = '';
	var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
	var bytes = new Uint8Array(raw);
	var byteLength = bytes.byteLength;
	var byteRemainder = byteLength % 3;
	var mainLength = byteLength - byteRemainder;
	var a, b, c, d;
	var chunk;
	// Main loop deals with bytes in chunks of 3
	for (var i = 0; i &lt; mainLength; i = i + 3) {
		// Combine the three bytes into a single integer
		chunk = (bytes[i] &lt;&lt; 16) | (bytes[i + 1] &lt;&lt; 8 ) | bytes[i + 2];
		// Use bitmasks to extract 6-bit segments from the triplet
		a = (chunk &amp; 16515072) &gt;&gt; 18; // 16515072 = (2^6 - 1) &lt;&lt; 18
		b = (chunk &amp; 258048) &gt;&gt; 12;   // 258048   = (2^6 - 1) &lt;&lt; 12
		c = (chunk &amp; 4032) &gt;&gt; 6;      // 4032     = (2^6 - 1) &lt;&lt; 6
		d = chunk &amp; 63;               // 63       = 2^6 - 1
		// Convert the raw binary segments to the appropriate ASCII encoding
		base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]
	}
	// Deal with the remaining bytes and padding
	if (byteRemainder == 1) {
		chunk = bytes[mainLength];
		a = (chunk &amp; 252) &gt;&gt; 2; // 252 = (2^6 - 1) &lt;&lt; 2
		// Set the 4 least significant bits to zero
		b = (chunk &amp; 3) &lt;&lt; 4;   // 3   = 2^2 - 1
		base64 += encodings[a] + encodings[b] + '==';
	}
	else if (byteRemainder == 2) {
		chunk = (bytes[mainLength] &lt;&lt; 8 ) | bytes[mainLength + 1];
		a = (chunk &amp; 16128) &gt;&gt; 8; // 16128 = (2^6 - 1) &lt;&lt; 8
		b = (chunk &amp; 1008) &gt;&gt; 4;  // 1008  = (2^6 - 1) &lt;&lt; 4
		// Set the 2 least significant bits to zero
		c = (chunk &amp; 15) &lt;&lt; 2;    // 15    = 2^4 - 1
		base64 += encodings[a] + encodings[b] + encodings[c] + '=';
	}
	return &quot;data:image/jpeg;base64,&quot; + base64;
}
</pre>
<p>I&#8217;ve only used this code for my <a href="http://www.visual-experiments.com/2011/10/03/three-js-photosynth-viewer-with-pictures-and-new-ui/">Google Chrome PhotoSynth WebGL extension</a>. This is why I don&#8217;t have added extra check for other browser (line 10: <em>xhr.mozResponseArrayBuffer || xhr.response</em>).</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2011%2F12%2F05%2Fhow-to-bypass-webgl-sop-restriction-v2%2F&amp;title=How%20to%20bypass%20WebGL%20Sop%20restriction%20v2"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2011/12/05/how-to-bypass-webgl-sop-restriction-v2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhotoSynth WebGL panorama viewer</title>
		<link>http://www.visual-experiments.com/2011/11/01/photosynth-webgl-panorama-viewer/</link>
		<comments>http://www.visual-experiments.com/2011/11/01/photosynth-webgl-panorama-viewer/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 21:48:00 +0000</pubDate>
		<dc:creator>Henri</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[photosynth]]></category>
		<category><![CDATA[panorama]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[webgl]]></category>
		<guid isPermaLink="false">http://www.visual-experiments.com/?p=2018</guid>
		<description><![CDATA[I&#8217;ve updated my PhotoSynth Downloader/Parser to be able to process Synth and Panorama as well. The network part of my PhotoSynth downloader was really ugly: I&#8217;ve rewrote it from scratch using libcurl. This version is really much faster and doesn&#8217;t crash anymore. But I&#8217;m a bit concerned about releasing the binary/source code. Allowing the download [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my PhotoSynth Downloader/Parser to be able to process Synth and <strong>Panorama as well</strong>. The network part of my PhotoSynth downloader was really ugly: I&#8217;ve rewrote it from scratch using <a href="http://curl.haxx.se/libcurl/">libcurl</a>. This version is really much faster and doesn&#8217;t crash anymore. But I&#8217;m a bit concerned about releasing the binary/source code. Allowing the download of a panorama created with an iPhone doesn&#8217;t bother me but it&#8217;s really different with gigapixel panorama (and my downloader can download both).</p>
<p><a href="http://www.visual-experiments.com/demo/photosynth-pano-viewer-v1/"><img src="http://www.visual-experiments.com/blog/wp-content/uploads/2011/11/viewer.jpg" alt="" title="PhotoSynth WebGL panorama viewer" width="578" height="409" class="aligncenter size-full wp-image-2033" /></a></p>
<p style="text-align: center; font-size: 20px; font-weight: bold;"><a href="http://www.visual-experiments.com/demo/photosynth-pano-viewer-v1/">Live Demo (require WebGL enabled browser)</a></p>
<p>My implementation is very strait-forward: my PhotoSynthHDDownloader creates 6 jpg from a panorama url. The 6 faces of the cube are downloaded at full resolution. This solution is suitable for panorama created with an iPhone (low res) but not acceptable for gigapixel panorama (you need progressive download/display). I&#8217;m using <a href="https://github.com/mrdoob/three.js/">Three.js</a> as WebGL engine and I&#8217;d like to implement a <strong>megatexture</strong> solution to display very large panorama (I&#8217;ve found a very impressive <a href="http://www.noxa.org/blog/2009/11/29/megatextures-in-webgl-2/">working implementation</a> and played with it: it is working with Google Chrome / Firefox 10).</p>
<p>To be able to handle panorama as well, <a href="https://chrome.google.com/webstore/detail/jnnhdiolpfgjbgagkbmdfidfofancmee">my Google Chrome extension</a> needs to use megatexture and it would be really more efficient if Microsoft could add the missing cors header to allow WebGL cross-origin (even only for photosynth.net). And as they&#8217;ve <a href="http://blogs.msdn.com/b/photosynth/archive/2011/10/18/photosynth-moving-to-windows-azure.aspx">just moved their data to Windows Azure</a>, I guess that it may be easier to add this header <img src='http://www.visual-experiments.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Otherwise I&#8217;ll have to use my special trick <a href="http://www.visual-experiments.com/2011/10/03/how-to-bypass-webgl-sop-restriction/">to bypass webgl same-origin-policy restriction</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.visual-experiments.com%2F2011%2F11%2F01%2Fphotosynth-webgl-panorama-viewer%2F&amp;title=PhotoSynth%20WebGL%20panorama%20viewer"><img src="http://www.visual-experiments.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.visual-experiments.com/2011/11/01/photosynth-webgl-panorama-viewer/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.457 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-19 23:58:29 -->

