stretch1 = 1.08;
>>
>> size_left1 = [size(I_left1,1) round(stretch1*imid1)];
>> size_right2=[size(I_right2,1) round(stretch1*imid2)];
>> I_left1_stretched = imresize(I_left1,size_left);
>> I_right2_stretched = imresize(I_right2,size_right);
>>
>> stretch2 = 1.02;
size_right1 = [size(I_right1,1) round(stretch2*imid1)];
>> size_left2=[size(I_left2,1) round(stretch2*imid2)];
>> I_left2_stretched = imresize(I_left2,size_left);
>> I_right1_stretched = imresize(I_right1,size_right);
>> I_piecewiselinear = [I_left1_stretched I_right1_stretched];
J_piecewiselinear = [I_left2_stretched I_right2_stretched];
K_piecewiselinear = [I_piecewiselinear J_piecewiselinear];
tform1=maketform('projective',[1 0 0;0 1.8 0;0 0 1]);
>> y="imtransform"(K_piecewiselinear,tform1,'bicubic');
figure(1);
subplot(331);imshow(I);
subplot(332);imshow(I_left);
subplot(333);imshow(I_right);
subplot(334);imshow(I_left1);
subplot(335);imshow(I_right1);
subplot(336);imshow(I_left2);
subplot(337);imshow(I_right2);
subplot(338);imshow(y);
figure(2);
subplot(221);imshow(I_left1_stretched);
subplot(222);imshow(I_right1_stretched);
subplot(223);imshow(I_left2_stretched);
subplot(224);imshow(I_right2_stretched);
文章评论(0条评论)
登录后参与讨论