ofxSlitScan - time warp and video delay add on

Hey OF,

I put together an add on to do slit scan and time delays.
It works as an object that you can feed video frames into and get distorted or delayed video frames out based on a gray scale distortion map. it works a bit like this AE plug in, but in real time:
http://help.adobe.com/en-US/AfterEffect-…-7a52a.html

check out the site here:
http://jamesgeorge.org/ofxslitscan/

or go straight to download it here and here
http://jamesgeorge.org/ofxslitscan/sour-…-binary.zip
http://jamesgeorge.org/ofxslitscan/sour-…-source.zip

I only have os x versions compiled now, but the code should be cross platform if anyone wants to put together linux/windows versions

any feedback is welcome, hope someone finds it useful!

You are the shit– this is exactly what I’ve been looking for! I had a look at “Hesitation”, and it looks amazing. Seriously nice work, dude!

Say hi to Brooklyn for me, I miss it so.

Beautiful work my friend. Great addon with a sample program that goes above and beyond.

I second the fact that you really are the shit.

Well done.

Great work obviousjim. Thanks for sharing a very useful tool.

One question:
You make a change in ofMath.h for ofMap command, by adding one more argument?
Can you share your ofMath.h?

example:
precise = ofMap(delayMapPixels[width*y+x], 0.0, 1.0, mapMin, mapMax, false);

Thanks a lot.

Aris

I took a stab at modifying this for windows.

First, ofxMacFileDialog had to be replaced by ofxFileDialog (http://cya-alpha.googlecode.com/svn/tru-…-FileDialog). However I get a linker error “undefined reference to _GetOpenFileNameA@4”. My guess is that ofxFileDialog addon relies on windows libraries for the GetOpenFileName function, which are not available. An expert insight would be much appreciated.

@boba
Ahh, yeah the file dialog stuff is OS specific I forgot about that. I’ll take a look at doing a cross platform file dialog thing and putting that in. Unless there is one floating around?

@igoumeninja
the latest version of ofMath (.0061) the map function is:

ofMap(value, inputMin, inputMax, outputMin, outputMax, clamp = false)

so you can just delete that ‘false’ since its the default anyway

By looking at the ofxFileDialog I mentioned, it seems its intent was to make it multiplatform (and it is based on ofxMacFileDialog) notwithstanding the fact that it is not (working on my windows machine).

I’ve updated the source with a few things:

I changed the file handling to ofxFileDialog that should work for both windows + mac. (Thanks to Brett @ the Rockwell Group lab for putting that together). Should be windows ready now – still no machine to test on ~

I’ve also added a 4th parameter to ofxSlitScan::setup that allows you specify image type of (grayscale, rgb, or rgba) to make it more flexible.

download the new source:
http://jamesgeorge.org/ofxslitscan/sour-…-source.zip