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

2 vues (au cours des 30 derniers jours)
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

Réponse acceptée

Sean de Wolski
Sean de Wolski le 2 Fév 2016
padarray(x,[1 1])

Plus de réponses (1)

Matt J
Matt J le 2 Fév 2016
Modifié(e) : Matt J le 2 Fév 2016
Without the Image Processing Toolbox,
y=zeros(258);
y(2:end-1,2:end-1)=x;

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by