Vips.Image.hist_find_indexed (original) (raw)
Method
VipsImagehist_find_indexed
Declaration [src]
int
vips_hist_find_indexed (
VipsImage* in,
VipsImage* index,
VipsImage** out,
...
)
Description [src]
Make a histogram of in, but use image index to pick the bins. In other words, element zero in out contains the combination of all the pixels in inwhose corresponding pixel in index is zero.
char and uchar index images are cast to uchar before histogramming, all other image types are cast to ushort. index must have just one band.
in must be non-complex.
out always has the same size and format as in.
Normally, bins are summed, but you can use combine to set other combine modes.
This operation is useful in conjunction with vips_labelregions(). You can use it to find the centre of gravity of blobs in an image, for example.
Optional arguments
combine: VipsCombine, combine bins like this
This method is not directly available to language bindings.
Parameters
index
Type: VipsImage
Input index VipsImage.
The data is owned by the caller of the method.
out
Type: VipsImage
Output image.
| The argument will be set by the function. |
|---|
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
...
Type: ``
NULL-terminated list of optional named arguments.
Return value
Type: int
0 on success, -1 on error.