<?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>blog.flo.cx &#187; camera</title>
	<atom:link href="http://blog.flo.cx/tag/camera/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flo.cx</link>
	<description>Tech, Food, Life</description>
	<lastBuildDate>Fri, 30 Dec 2011 14:37:37 +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>DIY time-lapse timer&#8230;</title>
		<link>http://blog.flo.cx/2011/01/diy-time-lapse-timer/</link>
		<comments>http://blog.flo.cx/2011/01/diy-time-lapse-timer/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 16:31:48 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[arduino diecimila]]></category>
		<category><![CDATA[arduino pro mini]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[time lapse]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2181</guid>
		<description><![CDATA[i did a time-lapse video a few month ago. back then i used the video function from my eos 7D. extracted 2 frames per second, did some image manipulations and put it all back together at 24 frames per second.

video takes a lot of space. since time-lapse videos are much more interesting if you ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/10/rfid-door-opener/' rel='bookmark' title='RFID Door Opener&#8230;'>RFID Door Opener&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>i did a <a href="http://blog.flo.cx/s/9z">time-lapse video</a> a few month ago. back then i used the video function from my eos 7D. extracted 2 frames per second, did some image manipulations and put it all back together at 24 frames per second.</p>
<p>video takes a lot of space. since time-lapse videos are much more interesting if you cover a big time interval you either have to have a huge memory card or you manage to turn down the amount of data that comes in. i decided to do the latter. since canon cams don&#8217;t come with a time-lapse function built in, one has to find an external time that does the job. there are several <a href="http://www.amazon.com/s?ie=UTF8&#038;tag=wwwcanoniccom-20&#038;index=blended&#038;link_code=qs&#038;field-keywords=eos%20remote%20timer">cheap external cable timers</a> available. they just have one problem. they just do time intervals from 1 to about 9999 seconds. i needed less. 300 ms (0,3 sec) should be my smallest interval. so i built my own.<br />
<span id="more-2181"></span><br />
<div id="attachment_2197" class="wp-caption alignright" style="width: 310px"><a href="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_2400_02.jpg"><img src="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_350_02-300x199.jpg" alt="" title="diy_time-lapse_timer_350_02" width="300" height="199" class="size-medium wp-image-2197" /></a><p class="wp-caption-text">the second try - opened box</p></div>since i didn&#8217;t want to put any solder on my camera i bought a cheap cable remote switch, which i took apart to get the cable.<br />
the first iteration was set up in an old stopwatch. it used an <a href="http://arduino.cc/en/Main/ArduinoBoardProMini">arduino pro mini</a>. one can push the buttons to increase or decrease the interval. since i was not able to use the internal display for timer feedback that was not the optimal solution. i do want to know what interval i&#8217;m using exactly.</p>
<p>the second iteration is built on an <a href="http://www.arduino.cc/en/Main/ArduinoBoardDiecimila">arduino diecimila</a>. on top i use a prototyping board which holds a 16&#215;2 display. as input there is a potentiometer that chooses the timing interval. the display shows exactly what interval is chosen.<br />
<div id="attachment_2195" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_2400_03.jpg"><img src="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_350_03-300x199.jpg" alt="" title="diy_time-lapse_timer_350_03" width="300" height="199" class="size-medium wp-image-2195" /></a><p class="wp-caption-text">final 2nd iteration</p></div></p>
<p>to reduce the risk of toasting my camera i separated the arduino circuit with an opto-isolator to the cable.</p>
<p>the next step is to reduce the size of the box by finding a smaller form factor and using the arduino pro mini.</p>
<p>here is the arduino code:</p>
<pre class="brush: cpp; collapse: true; light: false; title: ; toolbar: true; notranslate">
/*
  Time-lapse timer

Copyright 2011 Florian Klien. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice, this list of
      conditions and the following disclaimer.

   2. Redistributions in binary form must reproduce the above copyright notice, this list
      of conditions and the following disclaimer in the documentation and/or other materials
      provided with the distribution.

THIS SOFTWARE IS PROVIDED BY Florian Klien ``AS IS AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Florian Klien OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include &lt;LiquidCrystal.h&gt;

#define LCDRS 11
#define LCDENABLE 10
#define LCDD4 7
#define LCDD5 6
#define LCDD6 5
#define LCDD7 4
#define POTPIN 2 // potentiometer pin
#define LEDPIN 12 // pin for an optional led
#define SWITCHPIN 8
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(LCDRS, LCDENABLE, LCDD4, LCDD5, LCDD6, LCDD7);

double val = 0;
int ts = 0;
unsigned long int steps[] = {333,500,750,
               1000,1500,2000,
               2500,3000,4000,
               5000,6000,7000,
               8000,9000,10000,
               12000,15000,20000,
               25000,30000,35000,
               40000,45000,50000,
               55000,60000,90000,
               120000,240000,300000,
               360000,420000,480000,
               540000,600000,900000,
               1200000
             }; // in ms

unsigned long lasttime = 0;

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(&quot;timer set to:&quot;);
  Serial.begin(9600);
  //lasttime = millis();
  pinMode(LEDPIN, OUTPUT);
  pinMode(SWITCHPIN, OUTPUT);
  digitalWrite(LEDPIN,HIGH);
  delay(500);
  digitalWrite(LEDPIN,LOW);
}

void loop() {
  val = analogRead(POTPIN);
  ts = map(val, 0, 1023, 0, 37);
  lcd.setCursor(0, 1);
  double time = (float)steps[ts]/1000;
  lcd.print(time);
  lcd.print(&quot; sec &quot;);
  lcd.print((float)(millis()-lasttime)/1000);
  lcd.print(&quot;    &quot;);
  if((millis()-lasttime) &gt; steps[ts]){
    digitalWrite(LEDPIN, HIGH);
    digitalWrite(SWITCHPIN,HIGH);
    delay(100);
    digitalWrite(LEDPIN, LOW);
    digitalWrite(SWITCHPIN,LOW);
    lasttime = millis();
  }
}</pre>
<p><strong>update:</strong><br />
here is a little testvideo:<br />
<object style="height: 320px; width: 520px"><param name="movie" value="http://www.youtube.com/v/ZPb77NvY-tk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/ZPb77NvY-tk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="520" height="320"></object></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/10/rfid-door-opener/' rel='bookmark' title='RFID Door Opener&#8230;'>RFID Door Opener&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2181&amp;md5=62ec2759ebe50f1c9969549d3bcfe093" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/01/diy-time-lapse-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make time-lapse videos on a motorcycle&#8230;</title>
		<link>http://blog.flo.cx/2010/01/how-to-make-time-lapse-videos-on-a-motorcycle/</link>
		<comments>http://blog.flo.cx/2010/01/how-to-make-time-lapse-videos-on-a-motorcycle/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:27:39 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[Motoriges]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[cameramount]]></category>
		<category><![CDATA[canon]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[motorbike]]></category>
		<category><![CDATA[motorcylce]]></category>
		<category><![CDATA[timelapse]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=1599</guid>
		<description><![CDATA[a few weeks ago i got my hands on a motorcylce camera stand (thx Patrick). one that was actually made for a motorbike and not a modified tankbag with rubber wraps. please don't ever use those and please do never put a camera into your helmet as some youtube idiots present.

the camera i used ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/02/video-14h-time-lapse/' rel='bookmark' title='[video] 14h Time Lapse&#8230;'>[video] 14h Time Lapse&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>a few weeks ago i got my hands on a motorcylce camera stand (thx Patrick). one that was actually made for a motorbike and not a modified tankbag with rubber wraps. please don&#8217;t ever use those and please do never put a camera into your helmet as some youtube idiots present.</p>
<p>the camera i used is my canon ixus 750. since the lense on this camera is rather low i had to improve the camera stand. i added some aluminum ducts to make it higher and to make the camera see the street. about 7 centimeters were enough.</p>
<p><img class="aligncenter size-thumbnail wp-image-1618" title="IMG_1040_1200" src="http://blog.flo.cx/mycontent/2010/01/IMG_1040_1200-250x187.jpg" alt="" width="250" height="187" /></p>
<p>since i was not able to get the <a href="http://chdk.wikia.com/wiki/CHDK">CHDK</a> timelapse to work i shot video. to generate a timelapse i used ffmpeg to extract images out of the video and to unite them to a timelapse video.<br />
using this <a href="http://pr0gr4mm3r.com/linux/how-to-create-a-time-lapse-video-using-ffmpeg/">tutorial</a> and the man pages i was able to come up with this:<br />
<code><br />
#!/bin/bash<br />
# sample usage: ./timelapsify.sh input.avi output.mp4<br />
mkdir ffmpeg_temp<br />
ffmpeg -i $1 -r 1.4 -f image2 ffmpeg_temp/%05d.png<br />
ffmpeg -i ffmpeg_temp/%05d.png -sameq $2<br />
rm -rf ./ffmpeg_temp<br />
</code><br />
note that it is important for ffmpeg to have the images you use to generate the timelapse video in order and sequenced. if you decide to delete some images you have to rename them and must not leave gaps.<br />
also you may have to vary the rate (i used: 1.4) acording to the speed of your input video and the speed of the output video you want to have.</p>
<p>one step i did between extracting and generating the timelapse was sending it through imagemagick to blend the speedometer. using info from this <a href="http://studio.imagemagick.org/pipermail/magick-users/2008-September/021801.html">mailing list</a>:<br />
<code><br />
#!/bin/bash<br />
#usage: pixelate_circle.sh IN.file OUT.file center_x_coord center_y_coord border_x_coord border_y_coord<br />
convert $1 \( -clone 0 -scale 10% -scale 1000% \) \<br />
\( -clone 0 -gamma 0 -fill white \<br />
-draw "circle ${3},${4},${5},${6}"\<br />
\) -composite $2<br />
</code><br />
of course this has to be done for every image <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>and here is the resulting video:</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="320" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/7Kr1v-kWc6s&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="320" src="http://www.youtube.com/v/7Kr1v-kWc6s&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/02/video-14h-time-lapse/' rel='bookmark' title='[video] 14h Time Lapse&#8230;'>[video] 14h Time Lapse&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=1599&amp;md5=3b9eb97b2a136d57760c040cd743f6a4" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2010/01/how-to-make-time-lapse-videos-on-a-motorcycle/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

