|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
& h& H$ ]- L3 _. [matlab 2011a版本6 Y' J# V: m5 J; I
! k0 w/ l3 f7 u1 b8 E, @6 J7 o3 q5 O
- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);5 e% _% B) T% Q3 S7 {% W
& q, w: z3 ?8 l8 C+ h
7 d* m8 Z+ H0 _/ b6 t# a- j* U" x, C1 E; h$ 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; x& N& f4 X. d$ a8 J& y
# c1 x& |3 {; M( t) h
0 V) T9 n: C R; w( q& D q, Y' |) q' \: P9 E) ~% I( O
( q5 {; @6 N/ 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);
/ q! [9 }# I6 v# u) b$ z- o+ V7 F
7 P1 b3 ~( B9 o5 I7 Z/ ]8 s
* h; l Z! s8 L7 @, a& }9 ~
9 q; v6 }0 j# ?" E0 c' m6 A+ Y% m0 g/ T2 {
- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);) T; N4 T6 R6 N4 b
% L6 I' \; Z0 \! c6 D7 E t/ |/ A$ P
& g" h! x9 Y P% c' ~+ I
4 e0 G' p' c6 r7 b4 s |
|