Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Arguments of ShapeTransformer estimateTransformation method

Greetings,

I'm a computer programmer who is working on a personal image processing project using opencv. The goal is to implement an image warp function which allows you to pick a point on an image and drag it along with the image distorting to fit around it. From what I've been reading I got the idea that a thin plate spline transformation can be used to achieve this effect.

I have found the ThinPlateSpline ShapeTransformer class in the Opencv documentation but even after reading the algorithm description in various papers (I do not have a Maths background) I have difficulty in understanding the parameters required in the estimateTransformation method. I presume that the first one is a set of initial points and the second is a set of target points where the only change between the two will be the point which I will "drag" to a new position. Is this correct?

I cannot comprehend the third argument though, which contains a set of "matches". As I only have a single image (or point set) to work on, how can I compare it with a " second " inage to find common points so that I can then pass them on as an argument? All I know is the new coordinate of the point which I will move.I have looked at the algorithm again and while I get the gist of the vector maths and tracked the relevant lines of the source code that implement them I could not find a link between that and this requirement for a set of matches

Any help or pointers to sources that can clarify the way this works would be welcome.

Thanks!