Re: cut&paste w/arbitrary warp
Posted by Wilhelm Burger on Jan 30, 2017; 1:07pm
URL: http://imagej.273.s1.nabble.com/cut-paste-w-arbitrary-warp-tp5017962p5017970.html
Hi Kenneth,
when you say "perturbed polyline" -- do you mean that the n vertices are cyclically shifted or could they be fully permuted?
Regarding the geometric part of the mapping, you need a transformation preserving straight lines if you want to transform one polygon shape to another (i.e., spline models are out of question). Selecting 2 corresponding point pairs will give you a unique rigid transformation (i.e., rotation and uniform scaling only), 3 point pairs define an affine transformation and 4 point pairs give a projective transformation (linear in homogeneous coordinates). There is no straight line-preserving 2D transformation that could map more than n=4 point pairs. The common approach for n>4 is to tesselate the image into triangles or quads, and transforming these individually with the resulting affine or projective transformations, respectively. In this way it should be straightforward to map between arbitrary polygons by triangulation.
Hope I understood the question right ...
--Wilhelm