vcmohan
30th September 2008, 10:46
FXpanse (http://avisynth.org/vcmohan/FXpanse/FXpanse.html): This plugin creates an expanded frame out of panned video frames. The panning can be towards, left, right, up or down or any combination of these.
A full scene by joining these frames at appropriate places is created. Rotation and Zooming are not handled.
A maximum of 1/4 frame dimension shift between adjacent frames can be handled(Unfurl plugin can handle shifts to one side only).
A fuller description is here (http://avisynth.org/vcmohan/FXpanse/FXpanse.html).
The plugin estimates the frame to frame shifts by cross correlation (in freq domain) and requires fftw dll. To minimise the memory requirement in constructing the full scene, parameters may be specified as tight as possible.
The examples given are out of NTSC format videos I recorded. Some joints seen are due to rotation and some due to persons moving infront close to camera.
To correctly specify parameters a prior run with another plugin Corr2D (http://avisynth.org/vcmohan/Corr2D/Corr2D.html) will be helpful.
All processing is done by the constructor. As such it will be bothersome if this process line is included in the script without using the outpput of this plugin. Comment out.
Even though YUY2 and YV12 video can also be input, incase of odd pixels of shift between frames some inaccuracy will be introduced. On the other hand RGB format will be accurate to a pixel but requires more memory.
The joints seen on the reconstructed scene
http://img81.imageshack.us/img81/3734/flowergardens0av9.th.jpg (http://img81.imageshack.us/my.php?image=flowergardens0av9.jpg)
produced from a video are not seen from scene produced from a synthetic video generated from a large image by cropping and joining.
wd = 800
ht = 240
nw = 12000
nh= 50
nf = 100
imagereader("D:\images\parisbynight.jpg", end = 3)
crop(0,0,14900,500)
trim(1,1)
r = crop(nw,nh,wd,ht)
#return (r)
cr = canvasZigZag(last,r,nf,wd,ht,nw,nh)
fx = FXpanse(cr,wmax = 22, wmin = -22, hmax = 18, hmin = -18)
return (fx)
function canvasZigZag(clip c,clip r,int nframes, int wd,int ht, int nw, int nh)
{
dx = 20 - rand(40)
dy = 2
r = r + crop(c,nw+dx,nh+dy,wd,ht)
nframes <= 1 ? r: canvaszigzag(c,r,nframes - 1,wd,ht, nw+dx, nh+dy)
}
for example
http://img206.imageshack.us/img206/1368/paris0uz7.th.jpg (http://img206.imageshack.us/my.php?image=paris0uz7.jpg)http://img206.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
A full scene by joining these frames at appropriate places is created. Rotation and Zooming are not handled.
A maximum of 1/4 frame dimension shift between adjacent frames can be handled(Unfurl plugin can handle shifts to one side only).
A fuller description is here (http://avisynth.org/vcmohan/FXpanse/FXpanse.html).
The plugin estimates the frame to frame shifts by cross correlation (in freq domain) and requires fftw dll. To minimise the memory requirement in constructing the full scene, parameters may be specified as tight as possible.
The examples given are out of NTSC format videos I recorded. Some joints seen are due to rotation and some due to persons moving infront close to camera.
To correctly specify parameters a prior run with another plugin Corr2D (http://avisynth.org/vcmohan/Corr2D/Corr2D.html) will be helpful.
All processing is done by the constructor. As such it will be bothersome if this process line is included in the script without using the outpput of this plugin. Comment out.
Even though YUY2 and YV12 video can also be input, incase of odd pixels of shift between frames some inaccuracy will be introduced. On the other hand RGB format will be accurate to a pixel but requires more memory.
The joints seen on the reconstructed scene
http://img81.imageshack.us/img81/3734/flowergardens0av9.th.jpg (http://img81.imageshack.us/my.php?image=flowergardens0av9.jpg)
produced from a video are not seen from scene produced from a synthetic video generated from a large image by cropping and joining.
wd = 800
ht = 240
nw = 12000
nh= 50
nf = 100
imagereader("D:\images\parisbynight.jpg", end = 3)
crop(0,0,14900,500)
trim(1,1)
r = crop(nw,nh,wd,ht)
#return (r)
cr = canvasZigZag(last,r,nf,wd,ht,nw,nh)
fx = FXpanse(cr,wmax = 22, wmin = -22, hmax = 18, hmin = -18)
return (fx)
function canvasZigZag(clip c,clip r,int nframes, int wd,int ht, int nw, int nh)
{
dx = 20 - rand(40)
dy = 2
r = r + crop(c,nw+dx,nh+dy,wd,ht)
nframes <= 1 ? r: canvaszigzag(c,r,nframes - 1,wd,ht, nw+dx, nh+dy)
}
for example
http://img206.imageshack.us/img206/1368/paris0uz7.th.jpg (http://img206.imageshack.us/my.php?image=paris0uz7.jpg)http://img206.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)