Method

VipsImagecanny

Declaration [src]

int
vips_canny (
  VipsImage* in,
  VipsImage** out,
  ...
)

Description [src]

Find edges by Canny’s method: The maximum of the derivative of the gradient in the direction of the gradient. Output is float, except for uchar input, where output is uchar, and double input, where output is double. Non-complex images only.

Use sigma to control the scale over which gradient is measured. 1.4 is usually a good value.

Use precision to set the precision of edge detection. For uchar images, setting this to VipsPrecision will make edge detection much faster, but sacrifice some sensitivity.

You will probably need to process the output further to eliminate weak edges.

::: tip “Optional arguments” * sigma: gdouble, sigma for gaussian blur * precision: VipsPrecision, calculation accuracy

::: seealso vips_sobel().

Parameters

out VipsImage
 

Output image.

 The argument will be set by the function.
 The instance takes ownership of the data, and is responsible for freeing it.
... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.