#include <vips/vips.h> int im_contrast_surface( IMAGE *in, IMAGE *out, int half_win_size, int spacing );
int im_contrast_surface_raw( IMAGE *in, IMAGE *out, int half_win_size, int spacing );
The output is sub-sampled by a factor of spacing.
Input must be single-band uncoded uchar, WIO or PIO.
Output is single-band uncoded uint, WIO or PIO.
In im_contrast_surface(3), pixels beyond the edges of the input image are considered to be have the value of the nearest pixel which is in the image.
Alternatively, in im_contrast_surface_raw(3), pixels within half_win_size of the edge are not calculated, and output is smaller accordingly.