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 で Convert Image Type についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by