|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
) k3 y' X2 j0 C+ z1 }6 Rmatlab 2011a版本& W9 V5 _ Z/ y8 B0 ]
/ k7 [, m% I" t2 R. W7 J
- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);
( o0 H+ |7 e2 O- N, I
& U8 F* w: u: p
0 M, L _/ K& c" t& e: s+ T$ |
) {# a; w; x4 r! \8 F; ]
- 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, e7 C m. a T) a# p
' h" [/ V/ i' d" a6 Z8 j( _# k
% Z V+ @3 d5 R! |, Y- T3 |# Z$ @1 E3 m
( w5 `6 Q, s7 E1 @- tform=cp2tform(input_points,base_points,'affine'); >> Iout=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout); >> subplot(1,2,2),imshow(Ibase);
; O2 l% Q0 ?( {" Y
# W3 D* y$ L8 e/ E3 E3 r9 K/ l( Q
/ _0 Q1 P# G4 ?2 A
; _+ q5 z+ c# D. z" r
- F: K4 N1 `! X
- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);; k: I, `0 I" U; f9 x- l! H
& u, `' }! n4 r/ z) k$ Q7 I; M6 u6 |& J
9 c }/ {% I ^0 } |
|