image error

조회 수: 1 (최근 30일)
pdp rpa
pdp rpa 2012년 3월 19일
x=imread('pp.jpg');
>> [m,n]=size(x);
>> x=[[1:m]' x];
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.
why this error occured and how to remove this error?
  댓글 수: 1
Image Analyst
Image Analyst 2012년 3월 19일
What are you trying to do? Put up a ramp from 1 to m along the first row or first column of x? Be aware that if the number of rows is more than 255 your ramp will get clipped to 255.

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

채택된 답변

Andreas Goser
Andreas Goser 2012년 3월 19일
Your code would work with some images, but in your case, x likely is 3 dimensional. E.g this examples image is
imdata = imread('ngc6543a.jpg');
Depending on what you need, you may want to convert x or extract the data relevant for you.
  댓글 수: 3
Andreas Goser
Andreas Goser 2012년 3월 20일
That sounds like a good reason for you to contact Technical Support. Alone or with your professor.
pdp rpa
pdp rpa 2012년 3월 22일
thnks .i am doing this project alone. plz help me

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

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by