img=('frame1.jpg');
nayaRes=img;
R=img(:,:,1);
G=img(:,:,2);
Error Masg:Index exceeds matrix dimensions.

댓글 수: 2

madhan ravi
madhan ravi 2018년 11월 10일
편집: madhan ravi 2018년 11월 10일
Paste full code with jpg file
Shahid Mandokhail
Shahid Mandokhail 2018년 11월 13일
Its my mistake ....
if I have to seperate Red, Green and Blue chenals of image .....then i have to write like
img=imread('frame.jpg');

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

 채택된 답변

Bruno Luong
Bruno Luong 2018년 11월 10일

1 개 추천

After read the file type
>> size(img)
If the third dimension is not 3, it's not RGB image

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2018년 11월 10일

댓글:

2018년 11월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by