MATLAB: Image zero Padding row, column

image processing

I have an image[1102 x 1290]. But I need to resize this image so that it will be [1108 x 1300] in shape. How can I do that with zero padding?

Best Answer

I = rand(1102,1290) ;
iwant = zeros(1108,1300) ;
iwant(1:1102,1:1290) = I ;
Related Question