std :: dsp::imaging
Function std::conv2d
int conv2d(
[]const double img,
unsigned long h,
unsigned long w,
[]const double kernel,
unsigned long kh,
unsigned long kw,
[]double out,
)'img' is hw row-major; 'kernel' is khkw row-major (kh, kw should be odd so the kernel has a well-defined center tap); 'out' must have room for h*w doubles (same size as 'img' — out-of-bounds kernel taps read as zero, i.e. zero-padded boundary handling).