<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>GuruBlog : Articles about video</title>
    <description>local-guru.net</description>
    <link>http://www.local-guru.net/blog</link>
    <ttl>40</ttl>
    <item>
      <title>How To Make A CookieCutter</title>
      <link>http://www.local-guru.net//blog/2010/12/12/how-to-make-a-cookiecutter</link>
      <description>&lt;p&gt;This is a small how-to video that explains how to design and print a cookiecutter using my
&lt;a href="http://www.local-guru.net/blog/pages/cookiecutter-editor"&gt;Cookie-Cutter-Editor&lt;/a&gt; and a &lt;a href="http://www.makerbot.com"&gt;makerbot&lt;/a&gt;&lt;/p&gt;

&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=17729854&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=17729854&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;


&lt;p&gt;&lt;a href="http://vimeo.com/17729854"&gt;How To Make a CookieCutter&lt;/a&gt; from &lt;a href="http://vimeo.com/localguru"&gt;Nikolaus Gradwohl&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;the soundtrack is &lt;a href="http://ccmixter.org/files/stefsax/7785"&gt;Awel&lt;/a&gt; by &lt;a href="http://www.myspace.com/stefanthaens"&gt;stefsax&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>2010-12-12T16:52:44+01:00</pubDate>
    </item>
    <item>
      <title>Curling Recursion</title>
      <link>http://www.local-guru.net//blog/2010/6/3/curling-recursion</link>
      <description>&lt;p&gt;I made this animation with &lt;a href="http://www.contextfreeart.org/"&gt;Context Free Art&lt;/a&gt; and a small ruby script. The scroll down to see the sourcecode I
have used for this file&lt;/p&gt;

&lt;object width="500" height="500"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12259780&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=12259780&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="500"&gt;&lt;/embed&gt;&lt;/object&gt;


&lt;p&gt;&lt;a href="http://vimeo.com/12259780"&gt;Curling Recursion&lt;/a&gt; from &lt;a href="http://vimeo.com/localguru"&gt;Nikolaus Gradwohl&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;



</description>
      <pubDate>2010-06-03T10:30:00+02:00</pubDate>
    </item>
    <item>
      <title>dancing little lego-sheep</title>
      <link>http://www.local-guru.net//blog/2010/5/20/dancing-little-lego-sheep</link>
      <description>&lt;p&gt;I made another stop-motion video using &lt;a href="http://toonloop.com"&gt;toonloop&lt;/a&gt; and mencoder. This time its featuring a dancing little lego-sheep.&lt;/p&gt;

&lt;p&gt;if you want to know how to convert a set of images to a movie using mencoder see &lt;a href="http://www.local-guru.net/blog/2010/01/12/making-a-video-from-single-frames"&gt;this blog post&lt;/a&gt;&lt;/p&gt;

&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11896797&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=11896797&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;


&lt;p&gt;&lt;a href="http://vimeo.com/11896797"&gt;dancing sheep&lt;/a&gt; from &lt;a href="http://vimeo.com/localguru"&gt;Nikolaus Gradwohl&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;

</description>
      <pubDate>2010-05-20T10:40:00+02:00</pubDate>
    </item>
    <item>
      <title>making a video from single frames</title>
      <link>http://www.local-guru.net//blog/2010/1/12/making-a-video-from-single-frames</link>
      <description>&lt;p&gt;if you have exported a directory full of single frames from a processing sketch or a tool like &lt;a href="http://toonloop.com/"&gt;toonloop&lt;/a&gt;
or gimp you can combine them to a video using mencoder like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mencoder "mf://*.jpg" -mf fps=12 -o output.avi -ovc lavc -lavcopts vcodec=mpeg
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the mplayer manual has &lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html"&gt;more details&lt;/a&gt; in case you need them&lt;/p&gt;

&lt;p&gt;here is a sample video i made using toonloop and some colored buildingblocks&lt;/p&gt;

&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8691969&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=8691969&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;


&lt;p&gt;&lt;a href="http://vimeo.com/8691969"&gt;buildingblocks toonloop video&lt;/a&gt; from &lt;a href="http://vimeo.com/user2956553"&gt;Nikolaus Gradwohl&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;

</description>
      <pubDate>2010-01-12T11:33:00+01:00</pubDate>
    </item>
    <item>
      <title>Touchless Multitouch in Processing</title>
      <link>http://www.local-guru.net//blog/2008/10/10/touchless-multitouch-in-processing</link>
      <description>&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;update (23.11.2008):&lt;/em&gt; i made a &lt;a href="http://www.local-guru.net/blog/pages/colormatcher"&gt;processing library&lt;/a&gt; out of the codeexample above - &lt;em&gt;guru&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Today i read about &lt;a href="http://www.codeplex.com/touchless"&gt;touchless&lt;/a&gt;
an opensource sdk microsoft has released. it enables you to track objects using a
simple webcam to create apps similar to a multitouch display.&lt;/p&gt;

&lt;p&gt;then i spent about 20 minutes coding a &lt;a href="http://www.processing.org"&gt;processing&lt;/a&gt; sketch that does roughly the
same :-)&lt;/p&gt;

&lt;p&gt;as you can see in the screenshot i cant affort the same cool toys the microsoft
coder has in the demo video, so i  had to use some post-its instead&lt;/p&gt;

&lt;p&gt;below is the complete sourcecode of the app. I didn't export it as an
applet this time, because the applet couldn't use the quicktime api. It also
only works on mac and windows this time, because processing uses the quicktime
api. on linux the gstreamer based replacement from &lt;a href="http://codeanticode.wordpress.com/2007/12/12/cross-platform-video-library-for-processing/"&gt;codeanticode&lt;/a&gt;
can be used.&lt;/p&gt;

&lt;p&gt;when the programm starts hold up 2 different colored items (use colors that do not appear in the background)
then click on the first color with the left mousebutton and on the second color using the right
mousebutton. and then enjoy the "minority report"-experience zooming and rotating the image :-)&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/colormatcher.png" alt="colormatcher.png" /&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;import processing.video.*;
import java.util.*;

Capture video;
PImage img; 

void setup() {
  size( 640, 480 );
  video = new Capture( this, width, height, 30 );
  img = loadImage( "mangoofdeath.jpg" );
  noStroke();
  smooth();
}

int searchColor1 = color( 128, 255, 0 );
int searchColor2 = color( 255, 0, 0 );

Point e1 = new Point( 0, 0 );
Point e2 = new Point( 640, 480);

boolean s1, s2;


void draw() {
  if ( video.available()) {
     video.read();
     pushMatrix();
     scale(-1,1);
     image( video, -width, 0, width, height );
     popMatrix();

     int idx = 0;

     ArrayList p1 = new ArrayList();
     ArrayList p2 = new ArrayList();
     for ( int y = 0; y &amp;lt; video.height ; y++ ) {
        for ( int x = video.width; x &amp;gt;0; x-- ) {
          if ( match( searchColor1, video.pixels[idx] )) {
            p1.add( new Point( x, y ));
            //fill( 255, 255, 0, 128 );
            //ellipse( x, y, 10, 10 );
          } else if (match( searchColor2, video.pixels[idx] )){
            p2.add( new Point( x, y ));
            //fill( 255, 0, 0, 128 );
            //ellipse( x, y, 10, 10 );
          }
          idx ++;
        }
     }

    noStroke();
    if (p1.size() &amp;gt; 0) e1 = avg( p1 );
    if (p2.size() &amp;gt; 0) e2 = avg( p2 );

    if (s1) {
      fill( 255, 255, 0, 128 );
      ellipse( e1.x, e1.y, 30, 30 );
    }
    if ( s2 ) {  
      fill( 255, 0, 0, 128 );
      ellipse( e2.x, e2.y, 30, 30 );
    }

    if (s1 &amp;amp;&amp;amp; s2 ) {
      pushMatrix();
      translate( e1.x, e1.y );
      int dx = e2.x - e1.x;
      int dy = e2.y - e1.y;
      rotate( - atan2( e2.x -  + e1.x, e2.y - e1.y) + atan2( img.width, img.height));
      float zoom = sqrt ( dx * dx + dy * dy ) / 
           sqrt(img.width * img.width + img.height * img.height);
      scale(zoom, zoom ); 


      tint( 255, 200 );

      image( img, 0, 0 );
      strokeWeight( 3 );
      stroke( 255 );
      noFill();
      rect( 0,0,img.width, img.height );
      noTint();
      popMatrix();
    }
  }
}

boolean match( int c1, int c2 ) {
  int limit = 20;
   int sr = c1 &amp;gt;&amp;gt; 16 &amp;amp; 0xFF;
   int sg = c1 &amp;gt;&amp;gt; 8 &amp;amp; 0xFF;
   int sb = c1 &amp;amp; 0xFF;

   int cr = c2 &amp;gt;&amp;gt; 16 &amp;amp; 0xFF;
   int cg = c2 &amp;gt;&amp;gt; 8 &amp;amp; 0xFF;
   int cb = c2 &amp;amp; 0xFF;

   return cr &amp;gt; sr - limit &amp;amp;&amp;amp; cr &amp;lt; sr + limit &amp;amp;&amp;amp;
     cg &amp;gt; sg - limit &amp;amp;&amp;amp; cg &amp;lt; sg + limit &amp;amp;&amp;amp; 
     cb &amp;gt; sb - limit &amp;amp;&amp;amp; cb &amp;lt; sb + limit;
}

void mousePressed() {
  if (mouseButton == LEFT) {
      searchColor1 = get( mouseX, mouseY );
      s1 = true;
  }
  if (mouseButton == RIGHT) {
     searchColor2 = get( mouseX, mouseY );
     s2 = true;
  }
}

void keyPressed() {
  s1 = false;
  s2 = false;
}

Point avg( ArrayList l ) {
  if (l.size() == 0) {
    return new Point( 0, 0 );
  }
  int x = 0;
  int y = 0;
  for( Iterator i = l.iterator(); i.hasNext(); ) {
      Point p = (Point)i.next();
      x += p.x;
      y += p.y;
  }
  return new Point( x  / l.size(), y / l.size());
}

public class Point {
  int x;
  int y;

  Point( int x, int y ) {
    this.x = x;
    this.y = y;
  }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
      <pubDate>2008-10-10T19:52:00+02:00</pubDate>
    </item>
  </channel>
</rss>

