EdgeDetect

 

Function
The EdgeDetect function is great for pulling out and massaging edges. You can control what is detected, the strength of the edge, and the ability to expand or soften the edge.

Parameters
Type
Defaults
Function
strength
float
1 A gain on the filter. The more strength, the more details will appear. Numbers are practically from 1 to 10, but you can go much higher.
threshold
float
0 Pixels below the threshold will not be revealed in the filter and will turn black. The range is 0 to 1.
binaryOutput
int
0

When this is on, there is no greyscale, only black and white pixels.

directionFilter int 0 This will turn on an effect similar to Emboss.
directionFilterAngle float 0 The lighting angle. This only is in effect when directionFilter is on.
despeckle int 0 Similar to a Median filter, this will clean up isolated pixels to the despeckle radius.
x,yBlur float 0 Blurs the result.
x,yDilateErode float 0 Applies the DilateErode effect to the first filter pass.
rgbEdges int 0 Inherits color from the input image instead of just black-and-white.
addEdgesToImage int 0 Mixes the filter result back into the input image.
method string "Sobel" Your choices are "Sobel" , "Babu" or “Fast.”
Note: Babu is an algorithm that is extremely slow and cannot be used on large (2k+) plates. It is maintained for compatibility purposes.
babuSteps int 8 The steps done for the Babu filter. The more steps you add, the slower it goes. For example, if you put 12 steps, it will go much much slower.
bytes int 1 Output bit depth.


Synopsis

image EdgeDetect( 
  image In, 
  float strength,
  float threshold,
  int binaryOutput,
  int directionFilter,
  float directionFilterAngle,
  int despeckle,
  float xBlur,
  float yBlur,
  float xDilateErode,
  float yDilateErode,
  int rgbEdges,
  int addEdgesToImage,
  const char * method,
  int babuSteps,
  int bytes  
);


Script

image EdgeDetect( 
  In, 
  strength,
  fthreshold,
  binaryOutput,
  directionFilter,
  directionFilterAngle,
  despeckle,
  xBlur,
  yBlur,
  xDilateErode,
  yDilateErode,
  rgbEdges,
  addEdgesToImage,
  "method",
  babuSteps,
  bytes  
);


Command Line

shake -edgedetect strength