Info
この質問は閉じられています。 編集または回答するには再度開いてください。
I am trying to run the following code. i am getting an error in line 15 as "Subscript indices must either be real positive integers or logicals".
1 回表示 (過去 30 日間)
古いコメントを表示
mbCount = 1; for i = 1:mbSize:row-mbSize+1 for j = 1:mbSize:col-mbSize+1
% dy is row(vertical) index
% dx is col(horizontal) index
% this means we are scanning in order
dy = motionVect(1,mbCount);
dx = motionVect(2,mbCount);
refBlkVer = i + dy;
refBlkHor = j + dx;
imageComp(i:i+mbSize-1,j:j+mbSize-1) = imgI(refBlkVer:refBlkVer+mbSize-1, refBlkHor:refBlkHor+mbSize-1); --line 15
mbCount = mbCount + 1;
end
end
Kindly help me. Thanks in advance.
2 件のコメント
Fox Peterson
2014 年 9 月 12 日
also check on mbSize (is a real positive integer?) , since it's in the range definitions for i and j. also, are there instances where col-mbSize + 1 or row - mbSize + 1 could be less than 1? for example, if mbSize is 20 and col is 10, then 1:20:10-20+1 would not work...
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!