how to display a montage of images from a dataset
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
Hello I am using the AT&T standard database for face recognition. I want to display a montage of just a particular face of one individual in the screen for all the 40 individuals in the database.
This is my initial code
 %extract the face databse from the folders
 facedatabase=imageSet('orl_faces','recursive');
 %display montage for the first image
 montage(facedatabase(1).ImageLocation);
 %createa a gallery of all individuals
 for i=0:size((facedatabase),2)
    imagegallery{i}=read(facedatabase(i),1);
 end
 montage(imagegallery(1).ImageLocation);
 %
In the second part of the code where I want to show a gallery of all the individuals as a montage in one image its showing the follwing error
 Subscript indices must either be real positive integers or logicals.
Error in face_databse_extraction (line 11)
    imagegallery{i}=read(facedatabase(i));
Kindly tell me how to resolve this error
댓글 수: 0
답변 (1개)
  Walter Roberson
      
      
 2016년 6월 27일
        You start your i loop from 0, and try to index at i. It is not permitted to index at 0 in MATLAB. Your loop should start at 1.
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!