error using rgb2gray parse input
1 回表示 (過去 30 日間)
古いコメントを表示
Though i have a rgb image, it shows an error while executing
gray=rgb2gray(image)
this is the image
0 件のコメント
採用された回答
Star Strider
2016 年 2 月 3 日
The problem is probably that you named your image ‘image’. That’s the name of a quite useful core MATLAB function you will likely want to use. (This is called ‘overshadowing’ — in this instance overshadowing the funciton name with your variable name.)
This works:
I = imread('charuleelaa vanilavarasu_1.jpeg');
gray=rgb2gray(I);
figure(1)
imshow(gray)
0 件のコメント
その他の回答 (1 件)
Walter Roberson
2016 年 2 月 3 日
Do not use "image" as the name of a variable.
You do not show your code. Note that you must pass the result of imread to the function, not the file name.
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!