please explain size function in MATLAB
조회 수: 1 (최근 30일)
이전 댓글 표시
if(size(img,3) == 1) disp('Error: Pick a color image'); return;
댓글 수: 0
답변 (1개)
Image Analyst
2017년 10월 18일
size(img,3) returns the number of color channels in an image. It will be 1 for a gray scale image and 3 for an RGB image. That should explain it (why they ask for a color image if the program was given a gray scale image).
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!