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 Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by