Method

VipsImagecountlines

Declaration [src]

int
vips_countlines (
  VipsImage* in,
  double* nolines,
  VipsDirection direction,
  ...
)

Description [src]

Function which calculates the number of transitions between black and white for the horizontal or the vertical direction of an image. black<128 , white>=128 The function calculates the number of transitions for all Xsize or Ysize and returns the mean of the result Input should be one band, 8-bit.

::: seealso vips_morph(), vips_conv().

Parameters

nolines double*
 

Output average number of lines.

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

Count lines horizontally or vertically.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.