Error using rgb2gray>parse_inputs (line 82)
조회 수: 5 (최근 30일)
이전 댓글 표시
y=audioread('one1.wav'); y1=audioread('one2.wav'); y2=audioread('one3.wav'); y3=audioread('one4.wav');
figure,plot(y); imwrite(y,'one1.png'); figure,plot(y1); imwrite(y,'one2.png'); figure,plot(y2); imwrite(y,'one3.png'); figure,plot(y3); imwrite(y,'one4.png');
img1=imread('one1.png');
img2=imread('one2.png'); img3=imread('one3.png'); img4=imread('one4.png');
image1=rgb2gray(img1);
image2=rgb2gray(img2); image3=rgb2gray(img3); image4=rgb2gray(img4);
i1=imcrop(img1,[300,66,50,300]); i2=imcrop(img2,[300,66,50,300]); i3=imcrop(img3,[300,66,50,300]); i4=imcrop(img4,[300,66,50,300]); figure,imshow(i1); figure,imshow(i2); figure,imshow(i3); figure,imshow(i4);
I used above code but I got Error using rgb2gray>parse_inputs (line 82) MAP must be a m x 3 array.
Error in rgb2gray (line 37) X = parse_inputs(X);
Error in voicerecognition (line 21) image1=rgb2gray(img1); this error. what should I do for this
댓글 수: 0
답변 (1개)
KSSV
2017년 7월 17일
You can apply rgb2gray to a colored/rgb image. In your case your images are not colored images. A color image will be a 3D matrix.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!