Average
Function
This modified FileIn command
takes several frames and squeezes them into a different frame range, which can
be either less than or greater than the original amount. Multiple frames will
be blended together to (kinda) give you a motion blurred effect. Any frames
beyond the destination range will take either the first or last frame of the
series. You can also weight the interpolation of the frames. If you want to
convert between 30 fps and 24 fps, use the dedicated PullDown
and PullUp functions, as they
allow you to mix the fields properly.
For more information on the file name syntax, see FileIn.
Parameters
|
Type
|
Defaults
|
Function
|
fileName |
string
|
The file path of the input image. | |
sStart, sEnd |
int
|
1, 5 | The Start and End frames of the Source Clip. |
dStart, dEnd |
int
|
1,3 | The Start and End frames of the Destination Clip |
bytes |
int
|
1 | bit depth, 1, 2, or 4 bytes/channel |
gain |
float
|
1.5 |
A gamma curve is applied to the contribution of the source frames blended to create the destination frame. Gain of 0 means each source frame needed to create the destination contributes equally, while a higher gain, like 2, will cause the center frame to give the greatest contribution and frames farther away proportionately less. |
scale |
float
|
0 | This controls how many frames beyond the normal averaging should be considered. For example, if you do a source clip of 20 frames, and you want to extend to 40 frames, each source frame would be considered in 2 output frames. With a scale of 2, it would be considered in 4 output frames, giving you more blending. |
Synopis
image Average ( const char * fileName, int sStart, int sEnd, int dStart, int dEnd, int nBytes, float gain, float scale );
Script
image = Average ( "fileName", sStart, sEnd, dStart, dEnd, nBytes, gain, scale );
Command Line
shake -average fileName sStart sEnd etc....
Example 1
shake -average alien.#.iff 1 46 1 10 1 1.5 0 -t 1-10
This takes in frames 1 to 46 as its Source images, and squeezes it down to 1 to 10 as its Destination range: