slitscanning

I’ve been playing around with an idea I saw at an amazing toshio iwai presentation. It happens to be called slitscanning and it’s basically a progressive delay applied to different portions of a realtime video (you need a webcam for this to work).

a badly recorded video
http://www.youtube.com/watch?v=9uuWfgzSD-U

source code is here. tested under dev-c++ and codewarrior on windows:
http://jesusgollonet.com/openFrameworks-…-01-src.zip

keys:

  • / - .slice the video in more or less portions
    a / z .increase decrease delay between frames
    s / x .zooming

of version : prerelease v0.01

comments, corrections and suggestions much appreciated.

edit: forgot to mention that the delay code is based in a video delay example by zach.

nice one!

i downloaded it and gave it a run on my Apple (PPC) laptop (1.5Ghz, 2Gb RAM) with a firewire iSight.

Since this is the first source code I’ve downloded and given a test run, i’ll just trace the steps - everyone: please chip in if i’ve gone about it the wrong way.

  1. download source code
  2. dubplicated the ‘MoveiGrapperExample’ folder within the ‘apps’ folder of OF_001.
  3. renamed it to ‘slitscan’
  4. replaced the ‘src’ folder with the one from your .zip file
  5. double clicked the ‘openFrameworks.xcodeproj’ file
  6. in XCode, with ‘OpenFrameWorks’ selected in the ‘Groups & FIles bar’ I clicked ‘Build & Go’

…ok, so far so good.

Fullscreen, small live video feed in bottom left corner and larger similar feed right next to it.

no text on the screen (guessing the ‘verdana.ttf’ didn’t load properly on my Mac)

there is no slitscan effect … only live feed, which is SUPER slow.

the ‘s’ and ‘x’ buttons work (for zooming) so the keyListeners are implemented and it’s not caught in some ugly loop causing it to ignore the keyboard… the ‘+’ and ‘-’ buttons doesn’t seem to alter anything. :frowning:

.
.
.

Am I doing something wrong here? Did someone else manage to get this working on a Mac? Is this the right way to download-and-run a source file (didn’t know how to start an empty OF project).

thanks for sharing!!! :slight_smile:

  • mikkel

whoops, too bad I don’t have a mac for testing…

anyway, it’s my first time sharing openframeworks code too (and I uploaded it at 5:00 am), so I could have done something wrong…

I’ll upload codewarrior and dev-c++ projects this evening to make things easier. hope your problem gets solved.

hi -

there was a bug in quicktime grabber for mac that is getting fixed in the next release…

try adding this line after qtVg.initGrabber(…)

qtVg.initGrabber(imgW, imgHJ);
qtVg.videoSettings();

that will fix the camera input speed on the mac…

the short story about the bug is that there is a call in qtVideoGrabber that sets the frame rate to 30fps, but on some cameras in mac, that causes the video to be ultra slow. Loading the video settings fixes it. that fix is in the next release.

for the verdana, font loading thing - take a look at this-part of the xcode setup tutorial – it explains how you have to put external files (fonts, movies, etc) for mac OF applications to work.

let me know if that helps -

take care,
zach

got it working now. cheers!

  • m

great work :wink: thank you for letting us see inside the source.

dan

Would the code also work on pre0.02?
What changes should I do?
I tried it yesterday but it was missing some qtVideoPlayer/Grabber files.
After inserting these there were collisions between structs in qtUtils.h and qtVideoPlayer/Grabber.h

Any help?

Thanks
Dimi

there were some name changes between 0.01 and 0.02. I’d try downloading 0.02 and trying it. It definitely wont work to mix 0.01 and 0.02 code, because of the changes (you should keep each version separate)

hope that helps -

take care!
zach

hi dimi_christop

sorry it took so long. I’ve just tried the code with of 0.02 and the only line I’ve changed (in testApp.h) is:

  
ofQtVideoGrabber 	qtVg;  

for this

  
ofVideoGrabber 	qtVg;  

and everything works (but now the app is aligned to the top :slight_smile:

now that someone asked in other thread ( http://forum.openframeworks.cc/t/slit-scanning-frame-buffer/1733/6

cheers