Reference

Table of Contents  ▸  List of Commands  ▸  Features Extraction  ▸  matchpatch◀  patches    |    plot2value  ▶

matchpatch

Built-in command

Arguments:

Description:

Estimate correspondence map between selected images and specified patch image, using

a patch-matching algorithm.
Each pixel of the returned correspondence map gives the location (p,q) of the closest patch in
the specified patch image. If output_score=1, the third channel also gives the corresponding
matching score for each patch as well.
If patch_penalization is >=0, SSD is penalized with patch occurrences.
If patch_penalization is <0, SSD is inf-penalized when distance between patches are less than -patch_penalization.

Default values:

patch_height=patch_width, patch_depth=1, nb_iterations=5, nb_randoms=5, patch_penalization=0, output_score=0 and guide=(undefined).

Example of use:

$ gmic image.jpg sample colorful +matchpatch[0] [1],3 +warp[-2] [-1],0

Command: image.jpg sample colorful +matchpatch[0] [1],3 +warp[-2] [-1],0
Command: image.jpg sample colorful +matchpatch[0] [1],3 +warp[-2] [-1],0
Command: image.jpg sample colorful +matchpatch[0] [1],3 +warp[-2] [-1],0
Command: image.jpg sample colorful +matchpatch[0] [1],3 +warp[-2] [-1],0