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

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 3.5.3 (2025/03/07)

Reference

Table of Contents  ▸  List of Commands  ▸  Features Extraction  ▸  distance◀  displacement    |    edgels  ▶

distance

Built-in command

Arguments:

Description:

Compute the unsigned distance function to specified isovalue, opt. according to a custom metric.

metric can be { 0:Chebyshev | 1:Manhattan | 2:Euclidean | 3:Squared-euclidean }.
method can be { 0:Fast-marching | 1:Low-connectivity dijkstra | 2:High-connectivity dijkstra | 3:1+Return path | 4:2+Return path }.

Default values:

metric=2 and method=0.

This command has a tutorial page.

Examples of use:

• Example #1

image.jpg threshold 20% distance 0 pow 0.3

Command: image.jpg threshold 20% distance 0 pow 0.3

• Example #2

400,400 set 1,50%,50% +distance[0] 1,2 +distance[0] 1,1 distance[0] 1,0 mod 32 threshold 16 append c

Command: 400,400 set 1,50%,50% +distance[0] 1,2 +distance[0] 1,1 distance[0] 1,0 mod 32 threshold 16 append c
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.