Error while performing the operation but not while reading the images in folders.
1 次查看(过去 30 天)
显示 更早的评论
While just reading the images its working fine but while doing encode operation its throwing error. But the encode operation is working fine for single images. Please help me where i am doing wrong.
function ret()
myfolder = ('D:\imagesa\**');
filePattern = fullfile(myfolder, '*.tif');
theFiles = dir(filePattern);
for k =1 : length(theFiles)
%baseFileName = theFiles(k).name;
fullFileName = fullfile(theFiles(k).folder,theFiles(k).name);
fprintf(1, 'Now reading %s\n', fullFileName);
i = imread(fullFileName);
encode_HTJ2K(fullFileName,i,1);
end![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/800369/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/800369/image.png)
0 个评论
回答(1 个)
yanqi liu
2021-11-26
sir,may be upload encode_HTJ2K.m to do some analysis
or check the image dim if ask for gray image,please use rgb2gray to make it to gray
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!