imcrop not working for tiff
Hi, i want to crop several .tiff pics so i wrote below code but it dosnt work for .tiff files. it works for .png .jepg . i used imshow it shows nothing for .tiff files.
clc;
clear all;
address=’D:alluni things1-mastermaster project6-Data1-pics1-main2L2-E5′;
filenames=dir(fullfile(address,’*.tiff’));
for n=1:numel(filenames)
fullname=fullfile(address,filenames(n).name);
t1=imread(fullname);
info = imfinfo(fullname);
t2=imcrop(t1,[10, 10, 1000, 950]);
t3=size(t2);
imwrite(t2,fullname);
endHi, i want to crop several .tiff pics so i wrote below code but it dosnt work for .tiff files. it works for .png .jepg . i used imshow it shows nothing for .tiff files.
clc;
clear all;
address=’D:alluni things1-mastermaster project6-Data1-pics1-main2L2-E5′;
filenames=dir(fullfile(address,’*.tiff’));
for n=1:numel(filenames)
fullname=fullfile(address,filenames(n).name);
t1=imread(fullname);
info = imfinfo(fullname);
t2=imcrop(t1,[10, 10, 1000, 950]);
t3=size(t2);
imwrite(t2,fullname);
end Hi, i want to crop several .tiff pics so i wrote below code but it dosnt work for .tiff files. it works for .png .jepg . i used imshow it shows nothing for .tiff files.
clc;
clear all;
address=’D:alluni things1-mastermaster project6-Data1-pics1-main2L2-E5′;
filenames=dir(fullfile(address,’*.tiff’));
for n=1:numel(filenames)
fullname=fullfile(address,filenames(n).name);
t1=imread(fullname);
info = imfinfo(fullname);
t2=imcrop(t1,[10, 10, 1000, 950]);
t3=size(t2);
imwrite(t2,fullname);
end .tiff, image processing, imcrop MATLAB Answers — New Questions