Suppose There is a Directory Names "Database"
It contains 1000 plus image file
I want to read all the images of the folder Database
and Resize it to a new size of M x N
and sequentially keep showing rezied images in imshow
Suggest a minimal line for this task

댓글 수: 1

Mehmed Saad
Mehmed Saad 2020년 5월 29일
what have you done so far. Show us your code

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

답변 (1개)

Mohammad Sami
Mohammad Sami 2020년 5월 29일

0 개 추천

If you have deep learning toolbox, this can be easily acheieved with the augmented Image Data Store.
a = imageDatastore(foldername,'IncludeSubfolders',true);
size = [m n 3]
a = augmentedImageDatastore(size,a);

댓글 수: 2

If you do not have deep learning toolbox you can use the transform function on image datastore to achieve the same results.
a = imageDatastore(foldername,'IncludeSubfolders',true);
m = 224;
n = 224;
targetSize = [m,n];
imdsReSz = transform(a,@(x) imresize(x,targetSize));
Mohammad Sami
Mohammad Sami 2020년 5월 29일
An example is available in the Matlab documentation.

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

카테고리

도움말 센터File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 5월 29일

댓글:

2020년 5월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by