|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
+ k3 L6 l6 w% y, F6 ^0 V) T
matlab 2011a版本
- K" |7 w7 t* l8 F8 b [! u2 E
: W# U& E6 j8 F) t) l6 E9 _- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);9 f8 o2 S) v7 F% _! b; ^
( U2 c, W; D1 d; X" \
! M% f" V" A- H( G( t
: q4 i w1 q0 O3 G( T, p
- 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 D1 ]) n( w( }6 B. Z
1 o4 |: C$ S/ Z& _/ ^5 W
& U4 F0 ^1 x0 U5 R; E) X0 |
' C; t" A% _7 |) k. Q; W/ }# I( D+ @# m7 i2 U/ }7 b8 N2 y" R, T
- tform=cp2tform(input_points,base_points,'affine'); >> Iout=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout); >> subplot(1,2,2),imshow(Ibase);
4 l% N7 Z+ P0 J# e8 ~2 c
+ e8 V" j4 k3 C' R
5 ]1 }, l) B; V
|; V# l/ S6 O; d
; ^5 H# t( R% C4 Z. K- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);
2 G1 f7 O9 |' E! P
* ]8 `' y! M6 I' ^0 b& J& W7 T, s9 g& Q4 x1 J
' |% k {* y \$ C- ]' N |
|