How to access images?

조회 수: 5 (최근 30일)
mohammed mahmoud
mohammed mahmoud 2019년 1월 15일
댓글: Jan 2019년 1월 16일
I have one folder contain 50K images, I want to cut a group (5000 image) of this images according to indexing numbers. For example [ 6, 9, 2000,40215,...]. How to code such this?
path='E:\CIFAR-10\train';
jpeg_files = dir(fullfile(path,'*.png'));
for cnt = 1 : 50000
I{cnt} = imread(fullfile(path,jpeg_files(cnt).name));
% figure,imshow(I{cnt});
for j=1:5000
if cnt==class1num(1,j)
imwrite(I{cnt},sprintf('%s%d.jpg','0',cnt));
end
end
end
  댓글 수: 6
mohammed mahmoud
mohammed mahmoud 2019년 1월 16일
Jan
Jan 2019년 1월 16일
This link does not contain more useful information. I asked some questions for clarifications there also. Please read: How to ask a good question

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by