필터 지우기
필터 지우기

Storing images in matrix

조회 수: 1 (최근 30일)
James
James 2011년 7월 16일
Hi
I am getting an error with my image processing algorithm, code given below:
for c = 2:50
Img = double(Video(1,c).cdata);
r = c - 1;
while (r>=1)
if (c - r) >= 10
break
end
ImgR = double(Video(1,r).cdata);
NewFrame = Predicted_Function(Img, ImgR);
NewFrames(c,r) = NewFrame;
r = r - 1;
end
"??? Subscripted assignment dimension mismatch." error in line "NewFrames(c,r) = NewFrame"
Please Help!

채택된 답변

Walter Roberson
Walter Roberson 2011년 7월 16일
Your ImgR will be an array. What does Predicted_Function do with array inputs? If it returns an array, then you are expecting to store that array in the single location NewFrames(c,r).
Perhaps you want,
NewFrames(c,r).cdata = NewFrame;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by