Concatenating Images multiple times in a Loop

조회 수: 2 (최근 30일)
Fareed Jamali
Fareed Jamali 2019년 12월 8일
댓글: Fareed Jamali 2019년 12월 8일
Hey everyone,
I have a text file in which I have 1000 lines. Every line has a four characters, I also have a folder (named Alphabets) which has all the characters in it (0-9, A-Z, and a-z). What I want is to read text file first four characters (single line) and then go to Alphabet folder, pick those four characters concatenate them and save them in a particular directory. I also want to resize image back to 140x60 pixels. This is what I want to do for complete text file so that by the end I have 1000 images stored in a specific directory. What I coded is a lot of if else conditions and I realize that my code is not efficient so I thought of asking help from experts. Thank you very much!
Regards,
Fareed Jamali
  댓글 수: 2
Image Analyst
Image Analyst 2019년 12월 8일
Give an example, and attach the text file. In the meantime, you might want to look at fgetl(), and dir() or imageDatastore().
Fareed Jamali
Fareed Jamali 2019년 12월 8일
5Abm.png
I have attached text file and here is the sample image that has been generated by concatenating four characters, then manually resized to 140x60 pixels.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by