tsp
Arguments:
Description:
Try to solve the
travelling salesman problem, using a combination of greedy search and 2-opt algorithms.
Selected images must have dimensions Nx1x1xC to represent N cities each with C-dimensional coordinates.
This command re-order the selected data along the x-axis so that the point sequence becomes a shortest path.
Default values:
precision=256.
Example of use:
256,1,1,2 rand 0,512 tsp , 512,512,1,3 repeat w#0 circle[-1] {0,I[$>]},2,1,255,255,255 line[-1] {0,boundary=2;[I[$>],I[$>+1]]},1,255,128,0 done keep[-1]
Command: 256,1,1,2 rand 0,512 tsp , 512,512,1,3 repeat w#0 circle[-1] {0,I[$>]},2,1,255,255,255 line[-1] {0,boundary=2;[I[$>],I[$>+1]]},1,255,128,0 done keep[-1]
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.