Thin plate spline difference (Thin plate spline) Java implementation

Source: Internet
Author: User

In a recent project you need to use the image deformation, read some papers, said that almost all the biological related deformation can be used to approximate the thin plate spline difference. As a result, I searched the web for the code of the thin plate spline difference.

Http://elonen.iki.fi/code/tpsdemo/has the C + + code for TPS. This code can be run (you have to configure OpenGL and boost), but there is only one 3D version of the demo, 2D version only wrote an interface, and did not write the demo. And I wrote this project in Java. So, in accordance with the C + + 2D version of the code to write a copy of the Java version of the Code, in order to facilitate everyone to learn, and wrote a demo. Want to be able to help the needy friends.

Because of the matrix operations involved in the code, I borrowed a library of another Java matrix operation: JAMA. Link http://math.nist.gov/javanumerics/jama/

Below a few pictures, the initial lattice as shown in the plane to press the mouse, create a control point, and then to hold down the mouse drag, release points for this control point after the deformation of the corresponding point. (Note: Be sure to drag, click the mouse is no use!) )

Initial dot Matrix:


Three control points:

Four control points:


Five control points:


The code threw it on the csdn http://download.csdn.net/detail/xiayang1023/8278687.

Thin plate spline difference (Thin plate spline) Java implementation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.