{"id":20350813,"url":"https://github.com/nclack/thinplatesplines","last_synced_at":"2025-03-04T16:31:02.489Z","repository":{"id":8345673,"uuid":"9905010","full_name":"nclack/ThinPlateSplines","owner":"nclack","description":"n-dimensional thin plate splines in c and matlab","archived":false,"fork":false,"pushed_at":"2013-05-07T15:22:28.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T23:57:50.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nclack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-07T05:49:47.000Z","updated_at":"2013-12-07T17:44:28.000Z","dependencies_parsed_at":"2022-08-07T03:00:38.286Z","dependency_job_id":null,"html_url":"https://github.com/nclack/ThinPlateSplines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nclack%2FThinPlateSplines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nclack%2FThinPlateSplines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nclack%2FThinPlateSplines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nclack%2FThinPlateSplines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nclack","download_url":"https://codeload.github.com/nclack/ThinPlateSplines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241880288,"owners_count":20035933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T22:33:57.409Z","updated_at":"2025-03-04T16:31:02.457Z","avatar_url":"https://github.com/nclack.png","language":"C","readme":"ThinPlateSpline\n===============\n\nn-dimensional thin plate splines in c and matlab.\n\nAt present, this computes the full interpolation kernel; it's not\nsparse and updating the kernel can be expensive. However, for many applications, \nthe kernel only needs to be computed once and can then be resused many times.\nThat's the approach used here.\n\n## Example\n\n### In Matlab\n```matlab\n  t=ThinPlateSpline;  \n  [yy,xx]=meshgrid(linspace(1,512,5),linspace(1,512,5));\n  t.SourceSpaceKnots=[xx(:) yy(:)]; % leads to kernel computation\n  [yy,xx]=meshgrid(1:512,1:512);\n  t.SourceSpaceQuery=[xx(:) yy(:)]; % leads to kernel computation\n\n  % might repeat this many times\n  t.DestSpaceKnots=perturb(s); % a fast update\n  r=map(t);\n```\n\n### In C\n```c\n  #include \"tps.h\"\n  ...\n  tps_t ctx=make_tps(stiffness,src_knots,nknots,ndims);\n  tps_fit(ctx,dst_knots,src_knots,stiffness);\n  tps_eval(ctx,npoints,dst_query,src_query); // dst_query is the output\n\n  { // might repeat this many times \n    tps_update(ctx,perturb(dst_knots),tps_stiffness(ctx)); \n    tps_eval(ctx,npoints,dst_query,0);  // will re-use last src_query\n  }\n  free_tps(ctx); // cleanup at the end\n```\n\n## Building\n\nRequires [CMake](http://www.cmake.org/).\n\nYou also need a C++ compiler and, optionally, Matlab.\n\nBuilding may require an internet connection.  The build process may\nattempt to download [Eigen](http://eigen.tuxfamily.org/), which is\nthe linear algebra library used under the hood.\n\nAfter installing CMake, and making sure it's on your path.  The first steps look the same for most operating systems.  Open a terminal, change directory to where you cloned this repository, and then type:\n\n### Configure\n\n#### Everywhere\n```bash\n  mkdir build\n  cd build\n  cmake ..\n```\nNote that configuring as a Release build results in much faster (~10X) code than a Debug build.\nTo make sure you have a release build use:\n```\n  cmake -DCMAKE_BUILD_TYPE=Release ..\n```\n\n### Build\n\n#### On OS X and *nix:\n```bash\n  make package\n```\nThis will build a .tgz file you can unpack somewhere.  All the matlab stuff will be assembled in a matlab subdirectory in that package.\n\n#### On Windows\nwith [Microsoft Visual Studio](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products):\n\n1. Open the `tps.sln` file that has been created in the build directory.\n\n2. Build the PACKAGE target in the solution that opens up.\nThis should[1] build an executable installer in the build directory.  It will install to \nsomething like: \"C:\\Program Files\\tps\".  You can also configure the build to produce a .zip file archive if\nyou don't want the installer.\n\n\n[1]: My CMakeLists.txt might be missing some stuff required for the NSIS installer.  This is untested at the moment.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnclack%2Fthinplatesplines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnclack%2Fthinplatesplines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnclack%2Fthinplatesplines/lists"}