필터 지우기
필터 지우기

Error regarding Size of the image

조회 수: 1 (최근 30일)
saravanakumar D
saravanakumar D 2014년 1월 21일
답변: Image Analyst 2014년 1월 21일
This is my ERROR. My image dimension is about 667*535. But in error it replaces x values with y and y values with x. I don't know why it is replace x and y values
Attempted to access RGB(548,493,1); index out of bounds because size(RGB)=[535,667,3].
Error in connect (line 109) red(j)=RGB(x,y,j);
  댓글 수: 1
Walter Roberson
Walter Roberson 2014년 1월 21일
We will need to see more of your code.

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

채택된 답변

Image Analyst
Image Analyst 2014년 1월 21일
A very common mistake is to confuse rows and columns with x and y.
Images are arrays and thus the first index is the row, and the second one is the column. So if you ever refer to yourImage(x, y) you could well go out of bounds or certainly will have your operation transposed (rotated 90 clockwise or counterclockwise). You need to use yourImage(y, x), NOT yourImage(x, y)!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by