Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How does the following code works?
조회 수: 2 (최근 30일)
이전 댓글 표시
r_idx = random('unid', size(listing, 1));
im_input = imread(strcat('D:\project\CVPR17_training_code\data_generation\image\input\', listing(r_idx).name));
I found this code .But ,I couldn't understand how the random() and size() function works.Please explain this...
댓글 수: 3
Walter Roberson
2018년 2월 19일
As an outside person, I have no reason to expect that you have given the correct path to the files.
You should learn how to use fullfile()
projectdir = 'D:\etc'
listing = dir( fullfile(projectdir, '*.jpg'));
ridx = randi(length (listing))
thisfile = fullfile (projectdir, listing(ridx).name));
imread(thisfile)
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!