Preprocess CP2TFORM

版本 1.0.0.0 (2.0 KB) 作者: Dirk-Jan Kroon
Removes folded over triangles in piecewise linear image transformation, so cp2tform always works.
789.0 次下载
更新时间 2010/3/17

查看许可证

When CP2TFORM is used in piecewise linear image transformation mode, it uses triangulation to calculate the local image transformation. Sometimes a good triangulation of basepoints gives folded triangles when used with the input points. The function CP2TFORM try's to remove the controlpoints causing the folding, but often fails with the error:

Eliminated * control point pair(s).
Fold-over triangles remain. See CP2TFORM reference page.

This function PreProcessCp2tform removes all control points which cause fold-over triangles with cp2tform.

example code :
xy=[input_points2(:,2) input_points2(:,1)];
uv=[base_points2(:,2) base_points2(:,1)];
[xy uv]=PreProcessCp2tform(xy,uv);
trans_prj = cp2tform(xy,uv,'piecewise linear');
J = imtransform(I,trans_prj,'Xdata',[1 100],'YData',[1 100],'XYscale',1);

引用格式

Dirk-Jan Kroon (2024). Preprocess CP2TFORM (https://www.mathworks.com/matlabcentral/fileexchange/26985-preprocess-cp2tform), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Delaunay Triangulation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0