|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
3 G4 U- _ P5 j: V2 W4 v* ~1 c; x
matlab 2011a版本
$ g& {3 @4 ^5 K/ a4 z+ R4 U
8 K" s- q5 ?6 x- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);
5 `# D( ]/ M& b8 q A1 I. H- T1 [
- ]# H K% E7 a7 q
; V7 [# y" c9 y- 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
t% l+ L3 W# A0 i7 O) z. U 2 z! Z1 z! u1 U
3 Y& `3 ^& ]" W. ~, f/ e; s
8 w( \6 V& v2 m# _" ^
: W' N" y9 P( p. |. z' j, h& S- tform=cp2tform(input_points,base_points,'affine'); >> Iout=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout); >> subplot(1,2,2),imshow(Ibase);( E# R3 t" D6 ?& |; N) e
6 a; ~5 |+ [+ W9 G
: s9 F: L/ [ Q# ~3 K# U) }/ o5 o* u. D0 C* M& ~
/ ]* I# }& s" M( [& O- c5 y2 _- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);3 f e7 o; ], a! J
r$ t/ F7 i* E
7 Z# K" H) L/ X; G" X3 I% M) }9 Z0 T9 @
, h3 p8 k$ J) b' v' k
|
|