error using rgb2gray parse input
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
charuleelaa vanilavarasu
am 3 Feb. 2016
Beantwortet: Star Strider
am 3 Feb. 2016
Though i have a rgb image, it shows an error while executing
gray=rgb2gray(image)
this is the image
0 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Feb. 2016
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 Kommentare
Weitere Antworten (1)
Walter Roberson
am 3 Feb. 2016
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 Kommentare
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!