|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
4 H* U" u& X( d
matlab 2011a版本0 z9 M7 J; C: _* @8 \9 G
7 ~ R: i1 @) U- B' p- clear all >> Iin=imread('leftside.bmp'); >> Ibase=imread('calibrated.bmp'); >> figure >> subplot(1,2,1),imshow(Iin); >> subplot(1,2,2),imshow(Ibase);) H2 |, @% z, a5 t( P- H
* k9 t3 A* f- M6 Z8 c
3 K2 f2 X0 ]0 C8 i
- G+ R6 [, e, \) J9 r- 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
& p. N/ o0 i0 i' W/ }! Q/ V8 L
( `' B8 W) U' _& Y* R
. d; K- @( I& A: t$ v; j3 U* ~
8 D; w0 p$ I2 F+ |/ r( W8 Z0 @) V5 L
7 \: ^+ {8 i- S2 ?
- tform=cp2tform(input_points,base_points,'affine'); >> Iout=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout); >> subplot(1,2,2),imshow(Ibase);2 z i1 ?/ r8 S, @2 U+ d
0 w9 X4 M& Y; z# H: I
5 n( U5 N' F9 ]3 b0 P2 ? t& Z- ?
" ^0 x, W6 S" T, C) o! ^" ?, q( U
* V% u: L' ^; W% v( A# I6 R- tform1=cp2tform(input_points,base_points,'projective'); >> Iout1=imtransform(Iin,tform); >> figure >> subplot(1,2,1),imshow(Iout1); >> subplot(1,2,2),imshow(Ibase);- R9 j) J& y0 s- ~
: f/ m& \) C! U' ]
" |8 Z1 I+ z2 \
/ t$ p$ s$ \1 a9 A/ F, |. q |
|