How to make all the .tif files with the same size?
2 次查看(过去 30 天)
显示 更早的评论
Hello,
My .tif files are not all the same size [m x n], i.e., some are 87x207 pixels, some are 88x207 pixels, some are 88x208 pixels, and some are 87x208 pixels. I cc'd subsample of the tif files, and the code to check the size for them.
I want to cut the number of rows above the minimum m, and delete the number of columns above the minimum n, i.e., I want all of them be in 87x207 pixels size without damaging the geographical information in them. Is that possible?
unzip Test.zip
% Warning: Cannot open file "" for reading.
files = dir('*.tif');
filenames = fullfile({files.folder},{files.name});
N = numel(files);
sz = zeros(N,2);
for ii = 1:N
files(ii).data = imread(filenames{ii});
sz(ii,:) = size(files(ii).data);
end
disp(sz)
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!