|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
: s7 v7 k- f R. d" T5 O4 C
matlab 2011a版本/ O; k# z; D8 e
; o) _ r% B# u; `
- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);
+ a$ U4 O8 {8 a# [* M$ |( d. K . k) _5 A/ T/ q- Q6 ~7 Y
$ S& K1 Y4 b' w. ]
* e1 W6 }, T3 k+ w/ f5 N- 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! C8 G% c. r, D
3 i7 c- j7 o+ {- P( G. p
3 \5 t% u8 [) F1 H
$ q9 x# a; ~. J. t( P2 p# O: _/ T7 r- V5 |
- tform=cp2tform(input_points,base_points,'affine'); >> Iout=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout); >> subplot(1,2,2),imshow(Ibase);0 ?$ U4 r( H7 N# I% V
% e; V* v5 k( @
- o6 W6 d* z/ I' B/ }9 F1 J% r& L& Z
# l& L- e: b* W: P7 X8 z0 {- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);; J- D, D5 X& Q+ K% R4 [
2 s/ Q( Y, H2 v8 X- \/ a
4 ]) ]7 O& _9 }# d7 J& d: T
7 f5 |) r- @. \" n) E8 T, A# ]6 x |
|