how to add 0's to the first row first coloumn and last row last column in 256x256 image making it 258x258 ?

조회 수: 2 (최근 30일)
i want to increase the image size from 256x256 to 258x258 by inserting 0's to the fisrt row coloumn and last row and coloumn. how to do in matlab

채택된 답변

Sean de Wolski
Sean de Wolski 2016년 2월 2일
padarray(x,[1 1])

추가 답변 (1개)

Matt J
Matt J 2016년 2월 2일
편집: Matt J 2016년 2월 2일
Without the Image Processing Toolbox,
y=zeros(258);
y(2:end-1,2:end-1)=x;

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by