필터 지우기
필터 지우기

store array into matrix

조회 수: 2 (최근 30일)
pammy
pammy 2013년 5월 17일
i've divided the image into overlapping blocks of size 2x2.
overlapR=(rows-(blockSizeR-1));
overlapC=(columns-(blockSizeC-1));
BmatRows=(rows-(blockSizeR-1))*(columns-(blockSizeC-1));
BmatCols=blockSizeR*blockSizeC;
index=1;
newB=zeros(BmatRows,BmatCols);
for row=1:incrR:rows-(blockSizeR-1)
rowStart=row;
rowEnd=row+(blockSizeR-1);
for col=1:incrC:columns-(blockSizeC-1)
colStart=col;
colEnd=col+(blockSizeC-1);
dbstop if error
oneBlock=grayImage(rowStart:rowEnd,colStart:colEnd);
blurMoment=BlurInvariants(oneBlock);
newB(index,:)=blurMoment;
index=index+1;
end
end
next i calculated the BlurInvariant (I1 to I6 moments) its output is
Columns 1 through 4
55.578300091237828 80.214628323890793 63.941635242249006 67.963797222206097
Columns 5 through 6
81.296646744833296 7.960173582309505
the following error occurs
Subscripted assignment dimension mismatch.
Error in overlapLexicoBlurInvariant (line 72)
newB(index,:)=blurMoment;
plz help me solving my error

답변 (1개)

Jan
Jan 2013년 5월 17일
The size of newB and blurMoment do not match. What sizes do you get, when the deugger stops at the error?

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by