Hello.
I am working on a code named Demo_SR via this link https://github.com/tingfengainiaini/sparseCodingSuperResolution.
I tried to rename the images on the Testing folder to suite image list. I obtain the below error each time I run the code.
I really wish to know why and how to resolve this.
Thanks
Error using rgb2ycbcr>parse_inputs (line 127)
MAP must be a m x 3 array.
Error in rgb2ycbcr (line 49)
rgb = parse_inputs(varargin{:});
Error in Demo_SR (line 41)
im_l_ycbcr = rgb2ycbcr(im_l);

 채택된 답변

Image Analyst
Image Analyst 2018년 11월 20일

0 개 추천

You forgot to completely fill out the form when you posted, or chose not to. So we don't know what release you have. Evidently your release of MATLAB expects rgb2ycbcr() to have a colormap as it's input, and does not allow images, if that is what im_l is. New versions of MATLAB will take an rgb image so make sure that's what you're using and what you're passing in. At line 41, insert this and tell us what it says
whos im_l
It should show rows by columns by 3.

댓글 수: 3

Chidiebere Ike
Chidiebere Ike 2018년 11월 20일
편집: Chidiebere Ike 2018년 11월 20일
Sorry about that. I didn't take note. I typed whos im_l as advised. Below is the output. Obviously its an image
>> whos im_l
Name Size Bytes Class Attributes
im_l 128x128 16384 uint8
MATLAB Version: 9.3.0.713579 (R2017b)
MATLAB License Number: 123456
Operating System: Mac OS X Version: 10.14.1 Build: 18B75
Java Version: Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server
Image Analyst
Image Analyst 2018년 11월 20일
So you have a gray scale image, not a true color RGB image. So it doesn't really make sense to ask for Cb and Cr images. Your gray scale image is just the Y image. Do you (incorrectly) think your image is color? It is not.
Chidiebere Ike
Chidiebere Ike 2018년 11월 21일
Noted. Thanks so much. It works fine now.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

질문:

2018년 11월 20일

댓글:

2018년 11월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by