|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
9 M6 x( E( |) qmatlab 2011a版本
% l8 N( q" X8 R
5 F5 _! W9 @( C. v+ r- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);1 V3 t, p% Z- Q3 j/ w H
, [7 L$ w/ e9 Q+ v
) o0 y$ g5 p9 m4 c' w% x2 h6 h3 a8 |( ?* b: J3 s8 U" w$ H
- cpselect(Iin,Ibase); >> input_points input_points = 130.5000 145.0000 269.5000 66.0000 159.5000 216.0000 292.5000 118.0000 >> base_points base_points = 30.5000 16.0000 295.5000 14.0000 20.5000 77.0000 298.5000 78.0000
- P2 K9 h+ y: b, r& G. z% m9 ]
- d! a9 @ y5 j* l% t
) ]! m# \7 E% ~+ T5 q
7 D; Q1 { D0 x; j& ]
3 w1 { R) q/ W2 y% L: d- tform=cp2tform(input_points,base_points,'affine'); >> Iout=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout); >> subplot(1,2,2),imshow(Ibase);7 N3 | M! T% P" Q9 |5 _$ e
/ Q: n# Y6 V' |
[6 F; [+ z$ ]& K, n% E+ k+ m5 ~% z' M3 J$ c7 R5 C
8 \5 C |9 O0 d4 s. v9 J- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);* S8 |# Y) G1 `: Y4 `) I; z
+ Y" X o2 j, n+ m2 l
9 q4 l9 W0 ]7 j% u2 N0 q
5 L s7 U [' x0 ?; B& n7 N; V" S
|
|