G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.3 (2026/07/20)

Reference
Table of Contents  ▸  List of Commands  ▸  Filtering  ▸  convolve◀  closing_circ    |    convolve_fft  ▶

convolve

Built-in command

Arguments:

  • [mask],_boundary_conditions,_is_normalized={ 0:No | 1:Yes },_channel_mode,_xcenter,_ycenter,_zcenter,_xstride>0,_ystride>0,_zstride>0,_xdilation,_ydilation,_zdilation,_xoffset,_yoffset,_zoffset,_xsize>=0,_ysize>=0,_zsize>=0

Description:

Convolve selected images by specified mask.

boundary_conditions can be { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror }.
channel_mode can be { 0:All | 1:One-for-one | 2:Partial sum | 3:Full sum }.

Note: For each of the parameter groups center (xcenter,ycenter,zcenter), stride (xstride,ystride,zstride), dilation (xdilation,ydilation,zdilation), offset (xoffset,yoffset,zoffset) and size (xsize,ysize,zsize), either all three components must be specified, or none of them. It is not allowed to set only one or two components of a given group (e.g. specifying xoffset without also specifying yoffset and zoffset is invalid).

Default values:

boundary_conditions=1, is_normalized=0, channel_mode=1, xcenter=ycenter=zcenter=(undefined), xstride=ystride=zstride=1, xdilation=ydilation=zdilation=1,xoffset=yoffset=zoffset=0 and xsize=ysize=zsize=(input_size/stride).

This command has a tutorial page.

Examples of use:

• Example #1

image.jpg (0,1,0;1,-4,1;0,1,0) convolve[-2] [-1] keep[-2]

Command: image.jpg (0,1,0;1,-4,1;0,1,0) convolve[-2] [-1] keep[-2]

• Example #2

image.jpg (0,1,0) resize[-1] 130,1,1,1,3 +convolve[0] [1]

Command: image.jpg (0,1,0) resize[-1] 130,1,1,1,3 +convolve[0] [1]
Command: image.jpg (0,1,0) resize[-1] 130,1,1,1,3 +convolve[0] [1]
Command: image.jpg (0,1,0) resize[-1] 130,1,1,1,3 +convolve[0] [1]
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.