Read, process and write image dataset

조회 수: 6 (최근 30일)
Aravind Prabhu Gopala Krishnan
Aravind Prabhu Gopala Krishnan 2021년 7월 30일
Hello, I have image dataset containing 5000 images. I enhanced the one image from this dataset in the matlab my code is working good and i got good result. Now i need help in processing this all 5000 images using my filter code and have to store that processed images in my laptop local folder. How to read, process and write 5000 images in one go. can anybody know how to do that?
  댓글 수: 5
Aravind Prabhu Gopala Krishnan
Aravind Prabhu Gopala Krishnan 2021년 7월 30일
I need help in storing my processed 5000 images to my laptop thats it bro.
Rik
Rik 2021년 7월 30일
What is your question? Weren't you already writing the result to local storage? How does your current pipeline look? It should start with a way to load an image, and it should end with writing that image to some storage. How are you doing that last step?
Bro.

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

채택된 답변

KSSV
KSSV 2021년 7월 30일
infolder = '' % give the path of the folder where your images are present
outfolder = '' % give the path of the folder where you want to save images
imgFiles = dir([infolder,filesep,'\*.png']) ; % give extension of your images
N = length(imgFiles) ; % total images in the foder
for i = 1:N
thisFile = [infolder,filesep,imgFiles(i).name] ; % each image file
[filepath,name,ext] = fileparts(thisFile) ; % get name of the image file and extension
outFile = [outfolder,filesep,[name,ext]] ; % write image file on this name here
I = imread(thisFile) ; % read image into
% do what you want on I
imwrite(I,outFile) ; % write the image in the said folder on the name
end
  댓글 수: 7
KSSV
KSSV 2021년 7월 30일
Your code format is not fitting? Where did you try to fit? Show the complete code which you have tried and didnt let you fit.
Aravind Prabhu Gopala Krishnan
Aravind Prabhu Gopala Krishnan 2021년 8월 2일
KSSV thanks for your help bro it worked actually after that.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by