MATLAB: Stretch the middle of image

image

Suppose I have a .png
How can I use Matlab to stretch the middle third of the image in horizontal direction by a factor of 2?
img = imread('dough.png');%Open the image input
image(img)
[rows,columns,~] = size(img)
Thank you for your help!!!

Best Answer

img = imread('dough.png');%Open the image input
image(img)
[rows,columns,~] = size(img)
iwant = imresize(img,[2*rows columns]) ;
Related Question