IDefocus

Function
This is the Defocus function with a second image input to control the size of the defocused flaring. For more information, jump to Defocus.

Parameters
Type
Defaults
Function
x,yPixels
float
11,11 Kernal size for the defocus in pixels. Anything less than 3 does nothing. This is the general size of the flare.
channels
string
"rgba"

Which channels are calculated for the blur.

percent
float
100 The mix between the blurred and non-blurred image.
shape
string
"gaussian" Either "fast gaussian", "fast box", "circle", "square", "hexagon", or "octagon". This describes the shape of the flaring. The fast modes give you low quality but fast results.
boostPoint
float
.95 The image value where the superwhite boosting starts. If boostPoint is .75, rgb values above .75 will be boosted to increase flaring effects. A high value generally decreases flare areas, since fewer candidate pixels are flared out.
superWhite
float
1 Max value to boost image to. A value of 1 in the original will be boosted to this value. By boosting this, you increase the brightness of the flare area. Values around 50 give you a very strong boost.
steps int 5 This is the amount of regions. The intensity of the control image is divided up X amount of zones, with X being equal to regions.
stepBlend
float
1 This controls the blending between the amount of regions (see below). If you put this at 0, each step will have a constant blur value. If this is 1, there is a continuous blend between the different regions.
controlChannel
string
"a" The channel of the second image to use to control the amount of sharpen.
invert
int
0 Inverts the controlChannel.


Synopsis

image IDefocus( 
image img, image controlImg, float xPixels, float yPixels, const char * channels, float percent, const char * shape, float boostPoint, float superWhite, int steps, float stepBlend, const char * controlChannel, const char * channels, int invert );


Script

image = IDefocus( 
img, controlImg, xPixels, yPixels, "channels", percent, "shape", boostPoint, superWhite steps, stepBlend, "controlChannel", "channels", invert );


Command Line

shake -idefocus controlImg xPixels yPixels channels etc...


See Also
PercentBlur, Blur, Defocus,